{"size":{"Width":643,"Height":297},"appearance":{"background":null,"padding":14,"font":{"family":"Courier New","size":10.0,"bold":false,"italic":false,"underline":false,"strikeout":false,"color":"rgb(0,72,168)"},"border":{"on":true,"size":0.0,"style":"solid","color":"#666"},"text":{"wrap":false,"hAlign":"left","vAlign":"top"}},"outputType":"WIDGET","widgetState":null,"outputs":{"console":"<pre class='debug-source'>># VERSION 1.0.8\n</pre>\n<pre class='debug-source'>>library(flipChart)\n</pre>\n<pre class='debug-source'>># Processing all the selections from the 'Inputs' and 'Charts' tab.\n</pre>\n<pre class='debug-source'>>pd <- PrepareData(formChartType, QFilter, QPopulationWeight, input.data.table = get0("formTable"), input.data.tables = get0("formTables"), input.data.raw = list(X = get0("formX"), Y = get0("formY"), Z1 = get0("formZ"), Z2 = get0("formZ2"), labels = get0("formScatterLabels")), input.data.pasted = list(get0("formPastedData"), get0("formPastedFactor"), get0("formPastedColumnNames"), get0("formPastedRowNames"), get0("formPastedDateConvention")), input.data.other = get0("formOther"), data.source = get0("formDataSource"), first.aggregate = get0("formFirstAggregate", ifnotfound = FALSE), tidy = get0("formTidy"), transpose = get0("formTranspose"), row.names.to.remove = get0("formIgnoreRows"), column.names.to.remove = get0("formIgnoreColumns"), as.percentages = get0("formAsPercentages", ifnotfound = FALSE), show.labels = !get0("formNames", ifnotfound=TRUE), values.title = get0("formValuesTitle"))\n</pre>\n<pre class='debug-source'>>pc <- PrepareColors(pd$data, formChartType, scatter.colors.column = pd$scatter.variable.indices["colors"], palette = get0("formPalette"), palette.custom.color = get0("formCustomColor"), palette.custom.gradient.start = get0("formCustomGradientStart"), palette.custom.gradient.end = get0("formCustomGradientEnd"), palette.custom.palette = get0("formCustomPalette"), fit.palette = get0("formFitPalette"), fit.palette.custom.color = get0("formFitCustomColor"), fit.palette.custom.gradient.start = get0("formFitCustomGradientStart"), fit.palette.custom.gradient.end = get0("formFitCustomGradientEnd"), fit.palette.custom.palette = get0("formFitCustomPalette"), subslice.palette = get0("formSubslicePalette"), subslice.palette.custom.color = get0("formSubsliceCustomColor"), subslice.palette.custom.gradient.start = get0("formSubsliceCustomGradientStart"), subslice.palette.custom.gradient.end = get0("formSubsliceCustomGradientEnd"), subslice.palette.custom.palette = get0("formSubsliceCustomPalette")) \n</pre>\n<pre class='debug-source'>>pn <- PrepareNumbers(categories.format.list = list(get0("formCategoriesNumberType"), get0("formCategoriesDateType"), get0("formCategoriesNumberCustom"), get0("formCategoriesSeparateThousands"), get0("formCategoriesDecimals")), values.format.list = list(get0("formValuesNumberType"), get0("formValuesDateType"), get0("formValuesNumberCustom"), get0("formValuesSeparateThousands"), get0("formValuesDecimals")), hover.format.list = list(get0("formHoverNumberType"), get0("formHoverDateType"), get0("formHoverNumberCustom"), get0("formHoverSeparateThousands"), get0("formHoverDecimals")), data.labels.format.list = list(get0("formDataLabelNumberType"), get0("formDataLabelDateType"), get0("formDataLabelCustom"), get0("formDataLabelSeparateThousands"), get0("formDataLabelDecimals")), !is.null(attr(pd$data, "statistic")) && grepl("%", attr(pd$data, "statistic"), fixed = TRUE))\n</pre>\n<pre class='debug-source'>>\n</pre>\n<pre class='debug-source'>># Creating the chart.\n</pre>\n<pre class='debug-source'>>chart <- CChart(chart.type = formChartType,\n x = pd$data,\n return.data = formChartOutput == "Table",\n weights = pd$weights,\n series.stack = get0("formStackSeries", ifnotfound=FALSE),\n max.label.length = 0,\n #Scatter plot inputs.\n scatter.max.labels = get0("formScatterMaxLab", ifnotfound=20),\n scatter.labels.as.hovertext= if (exists("formScatterLabelType")) formScatterLabelType!="On chart" else TRUE,\n scatter.colors.as.categorical = if (exists("formScatterColorType")) formScatterColorType=="Categories" else FALSE,\n scatter.sizes.as.diameter = if (exists("formScatterSizeType")) formScatterSizeType=="Diameter" else FALSE,\n scatter.x.column = pd$scatter.variable.indices["x"],\n scatter.y.column = pd$scatter.variable.indices["y"],\n scatter.sizes.column = pd$scatter.variable.indices["sizes"],\n scatter.colors.column = pd$scatter.variable.indices["colors"],\n trend.lines = get0("formTrendLines", ifnotfound=FALSE),\n # Chart: DATA SERIES\n colors = pc$series.colors,\n pie.subslice.colors = pc$subslice.colors,\n # Chart: FIT LINE\n fit.type = get0("formFit", ifnotfound="None"),\n fit.ignore.last = get0("formFitIgnoreLast"),\n fit.line.type = get0("formFitLineType"),\n fit.line.colors = pc$fit.line.colors,\n fit.line.width = get0("formFitLineWidth", ifnotfound=1),\n # Chart: DATA LABELS\n data.label.show = get0("formDataLabelShow", ifnotfound = FALSE),\n data.label.format = pn$data.labels.number.format,\n data.label.font.size = get0("formDataLabelFontSize"),\n data.label.font.family = get0("formDataLabelFontFamily"),\n data.label.font.color = get0("formDataLabelFontColor"),\n data.label.prefix = get0("formPrefix", ifnotfound=""),\n data.label.suffix = get0("formSuffix", ifnotfound=""),\n data.label.position = get0("formDataLabelPosition", ifnotfound="top middle"),\n data.label.align.horizontal = get0("formDataLabelHorizAlign", ifnotfound="Default"),\n # Chart: FONT\n global.font.family = get0("formFont"),\n global.font.color = get0("formFontColor"),\n #Chart: GRIDLINES\n grid.show = get0("formShowGrid", ifnotfound=TRUE),\n # Chart: LEGEND\n legend.show = get0("formLegendShow", ifnotfound=TRUE),\n legend.title = get0("formLegendTitle"),\n legend.font.family = get0("formLegendFontFamily"),\n legend.font.color = get0("formLegendFontColor"),\n legend.font.size = get0("formLegendFontSize"),\n legend.x.position = get0("formLegendXPos", ifnotfound=1.02),\n legend.y.position = get0("formLegendYPos", ifnotfound=1.0),\n # Chart: TITLE\n title = get0("formTitle", ifnotfound=""),\n title.font.family = get0("formTitleFontFamily"),\n title.font.color = get0("formTitleFontColor"),\n title.font.size = get0("formTitleFontSize"),\n subtitle = get0("formSubtitle", ifnotfound=""),\n subtitle.font.family = get0("formSubtitleFontFamily"),\n subtitle.font.color = get0("formSubtitleFontColor"),\n subtitle.font.size = get0("formSubtitleFontSize"),\n footer = get0("formFooter", ifnotfound=""),\n footer.font.family = get0("formFooterFontFamily"),\n footer.font.color = get0("formFooterFontColor"),\n footer.font.size = get0("formFooterFontSize"),\n footer.wrap = get0("formFooterWrap", ifnotfound=FALSE),\n footer.wrap.nchar = get0("formFooterWrapNchar"),\n #Chart: CATEGORIES_AXIS\n categories.axis.show = get0("formCategoriesAxisShow", ifnotfound=TRUE),\n categories.tick.show = get0("formCategoriesAxisShow", ifnotfound=TRUE),\n categories.tick.format = pn$categories.number.format,\n categories.tick.prefix = paste0("", get0("formCategoriesPrefix"), get0("formCategoriesCurrency")), # currency is just another prefix\n categories.tick.suffix = get0("formCategoriesSuffix", ifnotfound=""),\n categories.tick.interval = get0("formCategoriesTickInterval"),\n categories.tick.units = get0("formCategoriesTickUnits"),\n categories.title = get0("formCategoriesTitle", ifnotfound=""),\n categories.title.font.family = get0("formCategoriesTitleFontFamily"),\n categories.title.font.color = get0("formCategoriesTitleFontColor"),\n categories.title.font.size = get0("formCategoriesTitleFontSize"), \n categories.tick.font.family = get0("formCategoriesTickFontFamily"),\n categories.tick.font.color = get0("formCategoriesTickFontColor"),\n categories.tick.font.size = get0("formCategoriesTickFontSize", ifnotfound=10),\n categories.tick.angle = if (!exists("formCategoriesTickAngle")) NULL else switch(get0("formCategoriesTickAngle"), Automatic=NULL, Horizontal=0, Vertical=90, Diagonal=45),\n categories.tick.label.wrap = get0("formLabelWrap", ifnotfound=FALSE),\n categories.tick.label.wrap.nchar = get0("formLabelWrapNchar", ifnotfound=100),\n categories.tick.align.horizontal = get0("formCategoriesTickHorizAlign", ifnotfound = "Default"),\n #Chart: VALUES_AXIS\n values.axis.show = get0("formValuesAxisShow"),\n values.tick.show = get0("formValuesAxisShow", ifnotfound=TRUE),\n values.tick.format = pn$values.number.format,\n values.tick.prefix = paste0("", get0("formValuesPrefix"), get0("formValuesCurrency")), # currency is just another prefix\n values.tick.suffix = get0("formValuesSuffix", ifnotfound=""),\n values.title = pd$values.title,\n values.title.font.family = get0("formValuesTitleFontFamily"),\n values.title.font.color = get0("formValuesTitleFontColor"),\n values.title.font.size = get0("formValuesTitleFontSize"),\n values.number.ticks = get0("formValuesNumberTicks"),\n values.tick.font.size = get0("formValuesTickFontSize", ifnotfound=10),\n values.tick.font.family = get0("formValuesTickFontFamily"),\n values.tick.font.color = get0("formValuesTickFontColor"),\n # Chart: HOVER\n values.hovertext.format = pn$hover.number.format,\n # Chart: MARGINS\n margin.top = get0("formMarginTop"),\n margin.left = get0("formMarginLeft"),\n margin.bottom = get0("formMarginBottom"),\n margin.right = get0("formMarginRight"),\n # Chart: APPEARANCE\n pie.inner.radius = get0("formPieRadius"),\n pie.border.color = get0("formBorderColor"),\n density.color = get0("formDensityColor"),\n vertical = get0("formVertical"),\n show.mean = get0("formShowMean"),\n show.median = get0("formShowMedian"),\n show.quartiles = get0("formShowQuartiles"),\n show.range = get0("formShowRange"),\n show.values = get0("formShowValues"),\n histogram.cumulative = get0("formHistogramCumulative"),\n histogram.counts = get0("formHistogramCounts"),\n maximum.bins = get0("formMaximumBins"),\n box.points = get0("formBoxPoints"),\n mean.color = get0("formMeanColor"),\n median.color = get0("formMedianColor"),\n quartile.color = get0("formQuartilesColor"),\n range.color = get0("formRangeColor"),\n values.color = get0("formValuesColor"),\n window.start = get0("formWindowStart"),\n range.bars = get0("formRangeBars"),\n # BarPictograph parameters\n image = get0("formIcon"),\n custom.image = get0("formCustomIcon"),\n base.image = get0("formBaseImage", ifnotfound = ""), \n hide.base.image = get0("formHideBase", ifnotfound = FALSE),\n base.icon.color = get0("formBaseColor", ifnotfound = ""),\n scale = if (exists("formIconScale")) as.numeric(formIconScale), \n total.icons = if (exists("formTotalIcons")) as.numeric(formTotalIcons),\n icon.ncol = if (exists("formIconNCol")) as.numeric(formIconNCol),\n fix.icon.nrow = get0("formFixNRows", ifnotfound = TRUE),\n fill.direction = get0("formFillDirection"),\n label.color.asIcon = get0("formLabelColorAsIcon", ifnotfound = FALSE),\n categories.tick.align = get0("formCategoriesTickAlign"),\n pad.row = get0("formIconPadding", ifnotfound = 0),\n graphic.width.inch = QOutputSizeWidth,\n graphic.height.inch = QOutputSizeHeight,\n # GeographicMap parameters\n mapping.package = get0("formMapPackage"),\n high.resolution = get0("formHighRes", ifnotfound = TRUE),\n treat.NA.as.0 = get0("formNAasZero", ifnotfound = FALSE),\n color.NA = get0("formNAColor"), \n ocean.color = get0("formOceanColor"), \n # General arguments\n warn.if.no.match = FALSE)\n</pre>\n<pre class='debug-message'>Loading required package: flipStandardCharts\n</pre>\r\n<div class=\"debug-summarystatistics\">\r\n<table>\r\n<tr><th>Total time:</th><td>2.59s</td></tr>\r\n<tr><th>Time on R server:</th><td title=\"rApacheServe 2.48s (pre 0.00s, post 0.00s) httpget_code() setup for eval 0.00s session$eval 2.42s (pre 0.00s, post 0.04s) unexplained 0.06s apparmor forking (pre 0.00s, post 0.00s)\">2.48s</td></tr>\r\n<tr><th>Time evaluating code:</th><td>2.36s</td></tr>\r\n<tr><th>Bytes sent:</th><td>14,163</td></tr>\r\n<tr><th>Bytes received:</th><td>30,028</td></tr>\r\n</table>\r\n</div>","message":"Loading required package: flipStandardCharts\n","htmlwidgets":"<div id=\"htmlwidget_container\">\n <div id=\"htmlwidget-1bea989912e82a9b3d81\" style=\"width:960px;height:500px;\" class=\"rhtmlPalmTrees html-widget\"></div>\n</div>\n<script type=\"application/json\" data-for=\"htmlwidget-1bea989912e82a9b3d81\">{\"x\":{\"data\":[[6.42201834862385,1.8348623853211,9.1743119266055,65.1376146788991,22.6299694189602,26.2996941896024,9.1743119266055,92.3547400611621,0.611620795107034],[57.4923547400612,58.7155963302752,22.9357798165138,21.7125382262997,9.1743119266055,4.58715596330275,23.5474006116208,14.6788990825688,76.4525993883792],[22.3241590214067,55.045871559633,12.8440366972477,4.58715596330275,51.9877675840979,31.4984709480122,9.1743119266055,3.05810397553517,64.5259938837921],[8.56269113149847,2.14067278287462,9.78593272171254,37.9204892966361,15.5963302752294,17.737003058104,14.3730886850153,53.822629969419,0],[60.5504587155963,57.7981651376147,43.4250764525994,9.1743119266055,16.2079510703364,3.97553516819572,29.6636085626911,3.36391437308868,76.4525993883792],[10.0917431192661,30.8868501529052,7.3394495412844,6.42201834862385,50.4587155963303,44.6483180428135,6.42201834862385,3.97553516819572,40.6727828746177],[9.78593272171254,17.4311926605505,29.9694189602446,8.56269113149847,11.9266055045872,15.9021406727829,38.8379204892966,2.75229357798165,5.5045871559633]],\"settings\":{\"rawData\":[[6.42201834862385,1.8348623853211,9.1743119266055,65.1376146788991,22.6299694189602,26.2996941896024,9.1743119266055,92.3547400611621,0.611620795107034],[57.4923547400612,58.7155963302752,22.9357798165138,21.7125382262997,9.1743119266055,4.58715596330275,23.5474006116208,14.6788990825688,76.4525993883792],[22.3241590214067,55.045871559633,12.8440366972477,4.58715596330275,51.9877675840979,31.4984709480122,9.1743119266055,3.05810397553517,64.5259938837921],[8.56269113149847,2.14067278287462,9.78593272171254,37.9204892966361,15.5963302752294,17.737003058104,14.3730886850153,53.822629969419,0],[60.5504587155963,57.7981651376147,43.4250764525994,9.1743119266055,16.2079510703364,3.97553516819572,29.6636085626911,3.36391437308868,76.4525993883792],[10.0917431192661,30.8868501529052,7.3394495412844,6.42201834862385,50.4587155963303,44.6483180428135,6.42201834862385,3.97553516819572,40.6727828746177],[9.78593272171254,17.4311926605505,29.9694189602446,8.56269113149847,11.9266055045872,15.9021406727829,38.8379204892966,2.75229357798165,5.5045871559633]],\"weights\":[0.111111111111111,0.111111111111111,0.111111111111111,0.111111111111111,0.111111111111111,0.111111111111111,0.111111111111111,0.111111111111111,0.111111111111111],\"rowNames\":[\"Coke\",\"Diet Coke\",\"Coke Zero\",\"Pepsi\",\"Diet Pepsi\",\"Pepsi Max\",\"None of these\"],\"rowFontSize\":10,\"rowFontFamily\":\"Arial\",\"rowHeading\":\"\",\"rowHeadingFontSize\":12,\"rowHeadingFontFamily\":\"Arial\",\"colNames\":[\"Feminine\",\"Health-conscious\",\"Innocent\",\"Older\",\"Open to new experiences\",\"Rebellious\",\"Sleepy\",\"Traditional\",\"Weight-conscious\"],\"colFontSize\":10,\"colFontFamily\":\"Arial\",\"colHeading\":\"\",\"colHeadingFontSize\":0,\"colHeadingFontFamily\":\"Arial\",\"tooltips\":true,\"tooltipsFontSize\":10,\"tooltipsFontFamily\":\"Arial\",\"tooltipsHeadingFontSize\":12,\"tooltipsHeadingFontFamily\":\"Arial\",\"showYAxis\":true,\"ylab\":null,\"yprefix\":null,\"ysuffix\":null,\"ydigits\":0,\"yFontSize\":10,\"yFontFamily\":\"Arial\",\"yLabFontSize\":12,\"yLabFontFamily\":\"Arial\",\"digits\":0,\"colors\":[\"#5C9AD3\",\"#ED7D31\",\"#A5A5A5\",\"#FFC000\",\"#4473C5\",\"#70AD46\",\"#255F91\",\"#9E480D\",\"#636365\"],\"barHeights\":null,\"order\":\"original\",\"prefix\":\"\",\"suffix\":\"% \"}},\"evals\":[],\"jsHooks\":[]}</script>\n<script type=\"application/htmlwidget-sizing\" data-for=\"htmlwidget-1bea989912e82a9b3d81\">{\"viewer\":{\"width\":450,\"height\":350,\"padding\":5,\"fill\":true},\"browser\":{\"width\":960,\"height\":500,\"padding\":5,\"fill\":true}}</script>","htmlwidget-head":"{\"stylesheets\":[\"https://rserverhtmlwidgetasset.azureedge.net/rhtmlPalmTrees-8a631367a3ea18031364cd6c8cd10fdf.css\"],\"javascript\":[\"https://rserverhtmlwidgetasset.azureedge.net/htmlwidgets-cd5c5716917807e1b69e2493221698b2.js\",\"https://rserverhtmlwidgetasset.azureedge.net/d3.min-2f50967ff82fd3475fcd22e9253d546e.js\",\"https://rserverhtmlwidgetasset.azureedge.net/d3-tip-d5050b0c26c67189049a70c72a07b7cd.js\",\"https://rserverhtmlwidgetasset.azureedge.net/PalmTrees-5247a2710bf7c6a56f2fb9e220056667.js\",\"https://rserverhtmlwidgetasset.azureedge.net/rhtmlPalmTrees-00a7bd29faa805d24337ad3c2f2eebae.js\"],\"attachments\":[],\"widget-cannot-re-render\":false}","warning":""},"secondsTaken":2.5931602000000002,"updated":"2017-12-11T00:03:29.1614311Z","lastUpdatedMessage":null,"executedCode":"# VERSION 1.0.8\nlibrary(flipChart)\n# Processing all the selections from the 'Inputs' and 'Charts' tab.\npd <- PrepareData(formChartType, QFilter, QPopulationWeight, input.data.table = get0(\"formTable\"), input.data.tables = get0(\"formTables\"), input.data.raw = list(X = get0(\"formX\"), Y = get0(\"formY\"), Z1 = get0(\"formZ\"), Z2 = get0(\"formZ2\"), labels = get0(\"formScatterLabels\")), input.data.pasted = list(get0(\"formPastedData\"), get0(\"formPastedFactor\"), get0(\"formPastedColumnNames\"), get0(\"formPastedRowNames\"), get0(\"formPastedDateConvention\")), input.data.other = get0(\"formOther\"), data.source = get0(\"formDataSource\"), first.aggregate = get0(\"formFirstAggregate\", ifnotfound = FALSE), tidy = get0(\"formTidy\"), transpose = get0(\"formTranspose\"), row.names.to.remove = get0(\"formIgnoreRows\"), column.names.to.remove = get0(\"formIgnoreColumns\"), as.percentages = get0(\"formAsPercentages\", ifnotfound = FALSE), show.labels = !get0(\"formNames\", ifnotfound=TRUE), values.title = get0(\"formValuesTitle\"))\npc <- PrepareColors(pd$data, formChartType, scatter.colors.column = pd$scatter.variable.indices[\"colors\"], palette = get0(\"formPalette\"), palette.custom.color = get0(\"formCustomColor\"), palette.custom.gradient.start = get0(\"formCustomGradientStart\"), palette.custom.gradient.end = get0(\"formCustomGradientEnd\"), palette.custom.palette = get0(\"formCustomPalette\"), fit.palette = get0(\"formFitPalette\"), fit.palette.custom.color = get0(\"formFitCustomColor\"), fit.palette.custom.gradient.start = get0(\"formFitCustomGradientStart\"), fit.palette.custom.gradient.end = get0(\"formFitCustomGradientEnd\"), fit.palette.custom.palette = get0(\"formFitCustomPalette\"), subslice.palette = get0(\"formSubslicePalette\"), subslice.palette.custom.color = get0(\"formSubsliceCustomColor\"), subslice.palette.custom.gradient.start = get0(\"formSubsliceCustomGradientStart\"), subslice.palette.custom.gradient.end = get0(\"formSubsliceCustomGradientEnd\"), subslice.palette.custom.palette = get0(\"formSubsliceCustomPalette\")) \npn <- PrepareNumbers(categories.format.list = list(get0(\"formCategoriesNumberType\"), get0(\"formCategoriesDateType\"), get0(\"formCategoriesNumberCustom\"), get0(\"formCategoriesSeparateThousands\"), get0(\"formCategoriesDecimals\")), values.format.list = list(get0(\"formValuesNumberType\"), get0(\"formValuesDateType\"), get0(\"formValuesNumberCustom\"), get0(\"formValuesSeparateThousands\"), get0(\"formValuesDecimals\")), hover.format.list = list(get0(\"formHoverNumberType\"), get0(\"formHoverDateType\"), get0(\"formHoverNumberCustom\"), get0(\"formHoverSeparateThousands\"), get0(\"formHoverDecimals\")), data.labels.format.list = list(get0(\"formDataLabelNumberType\"), get0(\"formDataLabelDateType\"), get0(\"formDataLabelCustom\"), get0(\"formDataLabelSeparateThousands\"), get0(\"formDataLabelDecimals\")), !is.null(attr(pd$data, \"statistic\")) && grepl(\"%\", attr(pd$data, \"statistic\"), fixed = TRUE))\n\n# Creating the chart.\nchart <- CChart(chart.type = formChartType,\n x = pd$data,\n return.data = formChartOutput == \"Table\",\n weights = pd$weights,\n series.stack = get0(\"formStackSeries\", ifnotfound=FALSE),\n max.label.length = 0,\n #Scatter plot inputs.\n scatter.max.labels = get0(\"formScatterMaxLab\", ifnotfound=20),\n scatter.labels.as.hovertext= if (exists(\"formScatterLabelType\")) formScatterLabelType!=\"On chart\" else TRUE,\n scatter.colors.as.categorical = if (exists(\"formScatterColorType\")) formScatterColorType==\"Categories\" else FALSE,\n scatter.sizes.as.diameter = if (exists(\"formScatterSizeType\")) formScatterSizeType==\"Diameter\" else FALSE,\n scatter.x.column = pd$scatter.variable.indices[\"x\"],\n scatter.y.column = pd$scatter.variable.indices[\"y\"],\n scatter.sizes.column = pd$scatter.variable.indices[\"sizes\"],\n scatter.colors.column = pd$scatter.variable.indices[\"colors\"],\n trend.lines = get0(\"formTrendLines\", ifnotfound=FALSE),\n # Chart: DATA SERIES\n colors = pc$series.colors,\n pie.subslice.colors = pc$subslice.colors,\n # Chart: FIT LINE\n fit.type = get0(\"formFit\", ifnotfound=\"None\"),\n fit.ignore.last = get0(\"formFitIgnoreLast\"),\n fit.line.type = get0(\"formFitLineType\"),\n fit.line.colors = pc$fit.line.colors,\n fit.line.width = get0(\"formFitLineWidth\", ifnotfound=1),\n # Chart: DATA LABELS\n data.label.show = get0(\"formDataLabelShow\", ifnotfound = FALSE),\n data.label.format = pn$data.labels.number.format,\n data.label.font.size = get0(\"formDataLabelFontSize\"),\n data.label.font.family = get0(\"formDataLabelFontFamily\"),\n data.label.font.color = get0(\"formDataLabelFontColor\"),\n data.label.prefix = get0(\"formPrefix\", ifnotfound=\"\"),\n data.label.suffix = get0(\"formSuffix\", ifnotfound=\"\"),\n data.label.position = get0(\"formDataLabelPosition\", ifnotfound=\"top middle\"),\n data.label.align.horizontal = get0(\"formDataLabelHorizAlign\", ifnotfound=\"Default\"),\n # Chart: FONT\n global.font.family = get0(\"formFont\"),\n global.font.color = get0(\"formFontColor\"),\n #Chart: GRIDLINES\n grid.show = get0(\"formShowGrid\", ifnotfound=TRUE),\n # Chart: LEGEND\n legend.show = get0(\"formLegendShow\", ifnotfound=TRUE),\n legend.title = get0(\"formLegendTitle\"),\n legend.font.family = get0(\"formLegendFontFamily\"),\n legend.font.color = get0(\"formLegendFontColor\"),\n legend.font.size = get0(\"formLegendFontSize\"),\n legend.x.position = get0(\"formLegendXPos\", ifnotfound=1.02),\n legend.y.position = get0(\"formLegendYPos\", ifnotfound=1.0),\n # Chart: TITLE\n title = get0(\"formTitle\", ifnotfound=\"\"),\n title.font.family = get0(\"formTitleFontFamily\"),\n title.font.color = get0(\"formTitleFontColor\"),\n title.font.size = get0(\"formTitleFontSize\"),\n subtitle = get0(\"formSubtitle\", ifnotfound=\"\"),\n subtitle.font.family = get0(\"formSubtitleFontFamily\"),\n subtitle.font.color = get0(\"formSubtitleFontColor\"),\n subtitle.font.size = get0(\"formSubtitleFontSize\"),\n footer = get0(\"formFooter\", ifnotfound=\"\"),\n footer.font.family = get0(\"formFooterFontFamily\"),\n footer.font.color = get0(\"formFooterFontColor\"),\n footer.font.size = get0(\"formFooterFontSize\"),\n footer.wrap = get0(\"formFooterWrap\", ifnotfound=FALSE),\n footer.wrap.nchar = get0(\"formFooterWrapNchar\"),\n #Chart: CATEGORIES_AXIS\n categories.axis.show = get0(\"formCategoriesAxisShow\", ifnotfound=TRUE),\n categories.tick.show = get0(\"formCategoriesAxisShow\", ifnotfound=TRUE),\n categories.tick.format = pn$categories.number.format,\n categories.tick.prefix = paste0(\"\", get0(\"formCategoriesPrefix\"), get0(\"formCategoriesCurrency\")), # currency is just another prefix\n categories.tick.suffix = get0(\"formCategoriesSuffix\", ifnotfound=\"\"),\n categories.tick.interval = get0(\"formCategoriesTickInterval\"),\n categories.tick.units = get0(\"formCategoriesTickUnits\"),\n categories.title = get0(\"formCategoriesTitle\", ifnotfound=\"\"),\n categories.title.font.family = get0(\"formCategoriesTitleFontFamily\"),\n categories.title.font.color = get0(\"formCategoriesTitleFontColor\"),\n categories.title.font.size = get0(\"formCategoriesTitleFontSize\"), \n categories.tick.font.family = get0(\"formCategoriesTickFontFamily\"),\n categories.tick.font.color = get0(\"formCategoriesTickFontColor\"),\n categories.tick.font.size = get0(\"formCategoriesTickFontSize\", ifnotfound=10),\n categories.tick.angle = if (!exists(\"formCategoriesTickAngle\")) NULL else switch(get0(\"formCategoriesTickAngle\"), Automatic=NULL, Horizontal=0, Vertical=90, Diagonal=45),\n categories.tick.label.wrap = get0(\"formLabelWrap\", ifnotfound=FALSE),\n categories.tick.label.wrap.nchar = get0(\"formLabelWrapNchar\", ifnotfound=100),\n categories.tick.align.horizontal = get0(\"formCategoriesTickHorizAlign\", ifnotfound = \"Default\"),\n #Chart: VALUES_AXIS\n values.axis.show = get0(\"formValuesAxisShow\"),\n values.tick.show = get0(\"formValuesAxisShow\", ifnotfound=TRUE),\n values.tick.format = pn$values.number.format,\n values.tick.prefix = paste0(\"\", get0(\"formValuesPrefix\"), get0(\"formValuesCurrency\")), # currency is just another prefix\n values.tick.suffix = get0(\"formValuesSuffix\", ifnotfound=\"\"),\n values.title = pd$values.title,\n values.title.font.family = get0(\"formValuesTitleFontFamily\"),\n values.title.font.color = get0(\"formValuesTitleFontColor\"),\n values.title.font.size = get0(\"formValuesTitleFontSize\"),\n values.number.ticks = get0(\"formValuesNumberTicks\"),\n values.tick.font.size = get0(\"formValuesTickFontSize\", ifnotfound=10),\n values.tick.font.family = get0(\"formValuesTickFontFamily\"),\n values.tick.font.color = get0(\"formValuesTickFontColor\"),\n # Chart: HOVER\n values.hovertext.format = pn$hover.number.format,\n # Chart: MARGINS\n margin.top = get0(\"formMarginTop\"),\n margin.left = get0(\"formMarginLeft\"),\n margin.bottom = get0(\"formMarginBottom\"),\n margin.right = get0(\"formMarginRight\"),\n # Chart: APPEARANCE\n pie.inner.radius = get0(\"formPieRadius\"),\n pie.border.color = get0(\"formBorderColor\"),\n density.color = get0(\"formDensityColor\"),\n vertical = get0(\"formVertical\"),\n show.mean = get0(\"formShowMean\"),\n show.median = get0(\"formShowMedian\"),\n show.quartiles = get0(\"formShowQuartiles\"),\n show.range = get0(\"formShowRange\"),\n show.values = get0(\"formShowValues\"),\n histogram.cumulative = get0(\"formHistogramCumulative\"),\n histogram.counts = get0(\"formHistogramCounts\"),\n maximum.bins = get0(\"formMaximumBins\"),\n box.points = get0(\"formBoxPoints\"),\n mean.color = get0(\"formMeanColor\"),\n median.color = get0(\"formMedianColor\"),\n quartile.color = get0(\"formQuartilesColor\"),\n range.color = get0(\"formRangeColor\"),\n values.color = get0(\"formValuesColor\"),\n window.start = get0(\"formWindowStart\"),\n range.bars = get0(\"formRangeBars\"),\n # BarPictograph parameters\n image = get0(\"formIcon\"),\n custom.image = get0(\"formCustomIcon\"),\n base.image = get0(\"formBaseImage\", ifnotfound = \"\"), \n hide.base.image = get0(\"formHideBase\", ifnotfound = FALSE),\n base.icon.color = get0(\"formBaseColor\", ifnotfound = \"\"),\n scale = if (exists(\"formIconScale\")) as.numeric(formIconScale), \n total.icons = if (exists(\"formTotalIcons\")) as.numeric(formTotalIcons),\n icon.ncol = if (exists(\"formIconNCol\")) as.numeric(formIconNCol),\n fix.icon.nrow = get0(\"formFixNRows\", ifnotfound = TRUE),\n fill.direction = get0(\"formFillDirection\"),\n label.color.asIcon = get0(\"formLabelColorAsIcon\", ifnotfound = FALSE),\n categories.tick.align = get0(\"formCategoriesTickAlign\"),\n pad.row = get0(\"formIconPadding\", ifnotfound = 0),\n graphic.width.inch = QOutputSizeWidth,\n graphic.height.inch = QOutputSizeHeight,\n # GeographicMap parameters\n mapping.package = get0(\"formMapPackage\"),\n high.resolution = get0(\"formHighRes\", ifnotfound = TRUE),\n treat.NA.as.0 = get0(\"formNAasZero\", ifnotfound = FALSE),\n color.NA = get0(\"formNAColor\"), \n ocean.color = get0(\"formOceanColor\"), \n # General arguments\n warn.if.no.match = FALSE)","lastSavedCode":"# VERSION 1.0.8\nlibrary(flipChart)\n# Processing all the selections from the 'Inputs' and 'Charts' tab.\npd <- PrepareData(formChartType, QFilter, QPopulationWeight, input.data.table = get0(\"formTable\"), input.data.tables = get0(\"formTables\"), input.data.raw = list(X = get0(\"formX\"), Y = get0(\"formY\"), Z1 = get0(\"formZ\"), Z2 = get0(\"formZ2\"), labels = get0(\"formScatterLabels\")), input.data.pasted = list(get0(\"formPastedData\"), get0(\"formPastedFactor\"), get0(\"formPastedColumnNames\"), get0(\"formPastedRowNames\"), get0(\"formPastedDateConvention\")), input.data.other = get0(\"formOther\"), data.source = get0(\"formDataSource\"), first.aggregate = get0(\"formFirstAggregate\", ifnotfound = FALSE), tidy = get0(\"formTidy\"), transpose = get0(\"formTranspose\"), row.names.to.remove = get0(\"formIgnoreRows\"), column.names.to.remove = get0(\"formIgnoreColumns\"), as.percentages = get0(\"formAsPercentages\", ifnotfound = FALSE), show.labels = !get0(\"formNames\", ifnotfound=TRUE), values.title = get0(\"formValuesTitle\"))\npc <- PrepareColors(pd$data, formChartType, scatter.colors.column = pd$scatter.variable.indices[\"colors\"], palette = get0(\"formPalette\"), palette.custom.color = get0(\"formCustomColor\"), palette.custom.gradient.start = get0(\"formCustomGradientStart\"), palette.custom.gradient.end = get0(\"formCustomGradientEnd\"), palette.custom.palette = get0(\"formCustomPalette\"), fit.palette = get0(\"formFitPalette\"), fit.palette.custom.color = get0(\"formFitCustomColor\"), fit.palette.custom.gradient.start = get0(\"formFitCustomGradientStart\"), fit.palette.custom.gradient.end = get0(\"formFitCustomGradientEnd\"), fit.palette.custom.palette = get0(\"formFitCustomPalette\"), subslice.palette = get0(\"formSubslicePalette\"), subslice.palette.custom.color = get0(\"formSubsliceCustomColor\"), subslice.palette.custom.gradient.start = get0(\"formSubsliceCustomGradientStart\"), subslice.palette.custom.gradient.end = get0(\"formSubsliceCustomGradientEnd\"), subslice.palette.custom.palette = get0(\"formSubsliceCustomPalette\")) \npn <- PrepareNumbers(categories.format.list = list(get0(\"formCategoriesNumberType\"), get0(\"formCategoriesDateType\"), get0(\"formCategoriesNumberCustom\"), get0(\"formCategoriesSeparateThousands\"), get0(\"formCategoriesDecimals\")), values.format.list = list(get0(\"formValuesNumberType\"), get0(\"formValuesDateType\"), get0(\"formValuesNumberCustom\"), get0(\"formValuesSeparateThousands\"), get0(\"formValuesDecimals\")), hover.format.list = list(get0(\"formHoverNumberType\"), get0(\"formHoverDateType\"), get0(\"formHoverNumberCustom\"), get0(\"formHoverSeparateThousands\"), get0(\"formHoverDecimals\")), data.labels.format.list = list(get0(\"formDataLabelNumberType\"), get0(\"formDataLabelDateType\"), get0(\"formDataLabelCustom\"), get0(\"formDataLabelSeparateThousands\"), get0(\"formDataLabelDecimals\")), !is.null(attr(pd$data, \"statistic\")) && grepl(\"%\", attr(pd$data, \"statistic\"), fixed = TRUE))\n\n# Creating the chart.\nchart <- CChart(chart.type = formChartType,\n x = pd$data,\n return.data = formChartOutput == \"Table\",\n weights = pd$weights,\n series.stack = get0(\"formStackSeries\", ifnotfound=FALSE),\n max.label.length = 0,\n #Scatter plot inputs.\n scatter.max.labels = get0(\"formScatterMaxLab\", ifnotfound=20),\n scatter.labels.as.hovertext= if (exists(\"formScatterLabelType\")) formScatterLabelType!=\"On chart\" else TRUE,\n scatter.colors.as.categorical = if (exists(\"formScatterColorType\")) formScatterColorType==\"Categories\" else FALSE,\n scatter.sizes.as.diameter = if (exists(\"formScatterSizeType\")) formScatterSizeType==\"Diameter\" else FALSE,\n scatter.x.column = pd$scatter.variable.indices[\"x\"],\n scatter.y.column = pd$scatter.variable.indices[\"y\"],\n scatter.sizes.column = pd$scatter.variable.indices[\"sizes\"],\n scatter.colors.column = pd$scatter.variable.indices[\"colors\"],\n trend.lines = get0(\"formTrendLines\", ifnotfound=FALSE),\n # Chart: DATA SERIES\n colors = pc$series.colors,\n pie.subslice.colors = pc$subslice.colors,\n # Chart: FIT LINE\n fit.type = get0(\"formFit\", ifnotfound=\"None\"),\n fit.ignore.last = get0(\"formFitIgnoreLast\"),\n fit.line.type = get0(\"formFitLineType\"),\n fit.line.colors = pc$fit.line.colors,\n fit.line.width = get0(\"formFitLineWidth\", ifnotfound=1),\n # Chart: DATA LABELS\n data.label.show = get0(\"formDataLabelShow\", ifnotfound = FALSE),\n data.label.format = pn$data.labels.number.format,\n data.label.font.size = get0(\"formDataLabelFontSize\"),\n data.label.font.family = get0(\"formDataLabelFontFamily\"),\n data.label.font.color = get0(\"formDataLabelFontColor\"),\n data.label.prefix = get0(\"formPrefix\", ifnotfound=\"\"),\n data.label.suffix = get0(\"formSuffix\", ifnotfound=\"\"),\n data.label.position = get0(\"formDataLabelPosition\", ifnotfound=\"top middle\"),\n data.label.align.horizontal = get0(\"formDataLabelHorizAlign\", ifnotfound=\"Default\"),\n # Chart: FONT\n global.font.family = get0(\"formFont\"),\n global.font.color = get0(\"formFontColor\"),\n #Chart: GRIDLINES\n grid.show = get0(\"formShowGrid\", ifnotfound=TRUE),\n # Chart: LEGEND\n legend.show = get0(\"formLegendShow\", ifnotfound=TRUE),\n legend.title = get0(\"formLegendTitle\"),\n legend.font.family = get0(\"formLegendFontFamily\"),\n legend.font.color = get0(\"formLegendFontColor\"),\n legend.font.size = get0(\"formLegendFontSize\"),\n legend.x.position = get0(\"formLegendXPos\", ifnotfound=1.02),\n legend.y.position = get0(\"formLegendYPos\", ifnotfound=1.0),\n # Chart: TITLE\n title = get0(\"formTitle\", ifnotfound=\"\"),\n title.font.family = get0(\"formTitleFontFamily\"),\n title.font.color = get0(\"formTitleFontColor\"),\n title.font.size = get0(\"formTitleFontSize\"),\n subtitle = get0(\"formSubtitle\", ifnotfound=\"\"),\n subtitle.font.family = get0(\"formSubtitleFontFamily\"),\n subtitle.font.color = get0(\"formSubtitleFontColor\"),\n subtitle.font.size = get0(\"formSubtitleFontSize\"),\n footer = get0(\"formFooter\", ifnotfound=\"\"),\n footer.font.family = get0(\"formFooterFontFamily\"),\n footer.font.color = get0(\"formFooterFontColor\"),\n footer.font.size = get0(\"formFooterFontSize\"),\n footer.wrap = get0(\"formFooterWrap\", ifnotfound=FALSE),\n footer.wrap.nchar = get0(\"formFooterWrapNchar\"),\n #Chart: CATEGORIES_AXIS\n categories.axis.show = get0(\"formCategoriesAxisShow\", ifnotfound=TRUE),\n categories.tick.show = get0(\"formCategoriesAxisShow\", ifnotfound=TRUE),\n categories.tick.format = pn$categories.number.format,\n categories.tick.prefix = paste0(\"\", get0(\"formCategoriesPrefix\"), get0(\"formCategoriesCurrency\")), # currency is just another prefix\n categories.tick.suffix = get0(\"formCategoriesSuffix\", ifnotfound=\"\"),\n categories.tick.interval = get0(\"formCategoriesTickInterval\"),\n categories.tick.units = get0(\"formCategoriesTickUnits\"),\n categories.title = get0(\"formCategoriesTitle\", ifnotfound=\"\"),\n categories.title.font.family = get0(\"formCategoriesTitleFontFamily\"),\n categories.title.font.color = get0(\"formCategoriesTitleFontColor\"),\n categories.title.font.size = get0(\"formCategoriesTitleFontSize\"), \n categories.tick.font.family = get0(\"formCategoriesTickFontFamily\"),\n categories.tick.font.color = get0(\"formCategoriesTickFontColor\"),\n categories.tick.font.size = get0(\"formCategoriesTickFontSize\", ifnotfound=10),\n categories.tick.angle = if (!exists(\"formCategoriesTickAngle\")) NULL else switch(get0(\"formCategoriesTickAngle\"), Automatic=NULL, Horizontal=0, Vertical=90, Diagonal=45),\n categories.tick.label.wrap = get0(\"formLabelWrap\", ifnotfound=FALSE),\n categories.tick.label.wrap.nchar = get0(\"formLabelWrapNchar\", ifnotfound=100),\n categories.tick.align.horizontal = get0(\"formCategoriesTickHorizAlign\", ifnotfound = \"Default\"),\n #Chart: VALUES_AXIS\n values.axis.show = get0(\"formValuesAxisShow\"),\n values.tick.show = get0(\"formValuesAxisShow\", ifnotfound=TRUE),\n values.tick.format = pn$values.number.format,\n values.tick.prefix = paste0(\"\", get0(\"formValuesPrefix\"), get0(\"formValuesCurrency\")), # currency is just another prefix\n values.tick.suffix = get0(\"formValuesSuffix\", ifnotfound=\"\"),\n values.title = pd$values.title,\n values.title.font.family = get0(\"formValuesTitleFontFamily\"),\n values.title.font.color = get0(\"formValuesTitleFontColor\"),\n values.title.font.size = get0(\"formValuesTitleFontSize\"),\n values.number.ticks = get0(\"formValuesNumberTicks\"),\n values.tick.font.size = get0(\"formValuesTickFontSize\", ifnotfound=10),\n values.tick.font.family = get0(\"formValuesTickFontFamily\"),\n values.tick.font.color = get0(\"formValuesTickFontColor\"),\n # Chart: HOVER\n values.hovertext.format = pn$hover.number.format,\n # Chart: MARGINS\n margin.top = get0(\"formMarginTop\"),\n margin.left = get0(\"formMarginLeft\"),\n margin.bottom = get0(\"formMarginBottom\"),\n margin.right = get0(\"formMarginRight\"),\n # Chart: APPEARANCE\n pie.inner.radius = get0(\"formPieRadius\"),\n pie.border.color = get0(\"formBorderColor\"),\n density.color = get0(\"formDensityColor\"),\n vertical = get0(\"formVertical\"),\n show.mean = get0(\"formShowMean\"),\n show.median = get0(\"formShowMedian\"),\n show.quartiles = get0(\"formShowQuartiles\"),\n show.range = get0(\"formShowRange\"),\n show.values = get0(\"formShowValues\"),\n histogram.cumulative = get0(\"formHistogramCumulative\"),\n histogram.counts = get0(\"formHistogramCounts\"),\n maximum.bins = get0(\"formMaximumBins\"),\n box.points = get0(\"formBoxPoints\"),\n mean.color = get0(\"formMeanColor\"),\n median.color = get0(\"formMedianColor\"),\n quartile.color = get0(\"formQuartilesColor\"),\n range.color = get0(\"formRangeColor\"),\n values.color = get0(\"formValuesColor\"),\n window.start = get0(\"formWindowStart\"),\n range.bars = get0(\"formRangeBars\"),\n # BarPictograph parameters\n image = get0(\"formIcon\"),\n custom.image = get0(\"formCustomIcon\"),\n base.image = get0(\"formBaseImage\", ifnotfound = \"\"), \n hide.base.image = get0(\"formHideBase\", ifnotfound = FALSE),\n base.icon.color = get0(\"formBaseColor\", ifnotfound = \"\"),\n scale = if (exists(\"formIconScale\")) as.numeric(formIconScale), \n total.icons = if (exists(\"formTotalIcons\")) as.numeric(formTotalIcons),\n icon.ncol = if (exists(\"formIconNCol\")) as.numeric(formIconNCol),\n fix.icon.nrow = get0(\"formFixNRows\", ifnotfound = TRUE),\n fill.direction = get0(\"formFillDirection\"),\n label.color.asIcon = get0(\"formLabelColorAsIcon\", ifnotfound = FALSE),\n categories.tick.align = get0(\"formCategoriesTickAlign\"),\n pad.row = get0(\"formIconPadding\", ifnotfound = 0),\n graphic.width.inch = QOutputSizeWidth,\n graphic.height.inch = QOutputSizeHeight,\n # GeographicMap parameters\n mapping.package = get0(\"formMapPackage\"),\n high.resolution = get0(\"formHighRes\", ifnotfound = TRUE),\n treat.NA.as.0 = get0(\"formNAasZero\", ifnotfound = FALSE),\n color.NA = get0(\"formNAColor\"), \n ocean.color = get0(\"formOceanColor\"), \n # General arguments\n warn.if.no.match = FALSE)","highlightedCodeSpans":[{"start":121,"length":13,"index":4},{"start":137,"length":7,"index":6},{"start":146,"length":17,"index":6},{"start":1035,"length":13,"index":4},{"start":2932,"length":13,"index":4},{"start":2982,"length":15,"index":4}],"tableTransformations":"<TabularTransformer>\r\n <TabularTransform type=\"Truncation\" truncationHeaderType=\"Column\" />\r\n <TabularTransform />\r\n</TabularTransformer>","tabularFilteringOptions":null,"hasGuiControls":true,"guiControls":{"Code":"// VERSION 1.0.10\n\nvar groups = Q.fileFormatVersion() > 10.9;\nif (groups)\n form.group(\"OUTPUT\")\n// Chart type selector.\n// Separate words in chart types e.g. scatter plot not scatterplot\nvar chartType = form.comboBox({name: \"formChartType\", label: \"Chart type\",\n alternatives: [\"Area\", \n \"Column\", \n \"Donut\",\n \"Bar\",\n \"Bar Pictograph\",\n \"Bean\", \n \"Box\",\n \"Density\",\n \"Geographic Map\",\n \"Heat\", \n \"Histogram\", \n \"Line\",\n \"Palm\", \n \"Pie\", \n \"Radar\", \n \"Stream\", \n \"Scatter\",\n \"Time Series\",\n \"Venn\", \n \"Violin\"], default_value: \"Palm\", required: true}).getValue();\n\nform.comboBox({name: \"formChartOutput\", label: \"Show as\", \n alternatives: [\"Chart\", \"Table\"], default_value: \"Chart\"});\n \n// * Data types *\n// These should be as rich as possible. While we do not want duplicates,\n// the more informative we can make the inputs the better.\nvar suffix = \"\";\nif (Q.isOnTheWeb())\n suffix = \" in 'Pages'\";\nvar INPUTS_types = {};\nINPUTS_types['Pasted'] = \"Type or paste in data\";\nINPUTS_types['Table'] = \"Link to a table\".concat(suffix);\nINPUTS_types[\"tables\"] = \"Link to multiple tables\".concat(suffix);\nINPUTS_types['r'] = \"Use an existing R Output\".concat(suffix);\nINPUTS_types[\"variable\"] = \"Link to a variable in 'Data'\";\nINPUTS_types['variables'] = \"Link to variables in 'Data'\";\nINPUTS_types[\"binaryMulti\"] = \"Variable Set: Binary - Multi\";\nINPUTS_types[\"numberMulti\"] = \"Variable Set: Number - Multi\";\nINPUTS_types[\"sets\"] = \"Link to variable sets in 'Data'\";\nINPUTS_types[\"set\"] = \"Link to a variable in 'Data'\";\n\n// Default axis names\nvar categoriesAxisLabel = \"CATEGORIES (X) AXIS\";\nvar valuesAxisLabel = \"VALUES (Y) AXIS\";\nfunction SwappedXY() { categoriesAxisLabel = \"CATEGORIES (Y) AXIS\"; \n valuesAxisLabel = \"VALUES (X) AXIS\"; }\n\n// * Combo box alternatives *\ncategories_number_formats = [\"Automatic\", \"Number\", \"Category\", \"Percentage\", \"Date/Time\", \"Currency\", \"Metric units suffix\", \"Scientific\", \"Custom\"];\nvalues_number_formats = [\"Automatic\", \"Number\", \"Category\", \"Percentage\", \"Date/Time\", \"Currency\", \"Metric units suffix\", \"Scientific\", \"Custom\"];\nhover_number_formats = [\"Automatic\", \"Number\", \"Category\", \"Percentage\", \"Date/Time\", \"Metric units suffix\", \"Scientific\", \"Custom\"]; // no currency since cannot add as prefix\ndata_label_formats = [\"Automatic\", \"Number\", \"Percentage\"];\ndate_formats = [\"YY (Year, 2 digit)\", \"DD Mon YY\", \"DD Month YY\", \"DD MM YY\", \"YYYY (Year, 4 digit)\", \"DD Mon YYYY\", \"DD Month YYYY\", \"DD MM YYYY\", \"Mon DD YY\", \"Month DD YY\", \"MM DD YY\", \"Mon DD YYYY\", \"Month DD YYYY\", \"MM DD YYYY\", \"YY Mon DD\", \"YY Month DD\", \"YY MM DD\", \"YYYY Mon DD\", \"YYYY Month DD\", \"YYYY MM DD\", \"Custom\"];\n \n// * Font alternatives *\nfont_families = [\"Andale Mono\", \"Arial\", \"Arial Black\", \"Century Gothic\", \"Comic Sans MS\",\n \"Courier New\", \"Georgia\", \"Impact\", \"Open Sans\", \"Times New Roman\", \"Trebuchet MS\", \"Verdana\"];\n\n// * Palette alternatives *\npalettes = [\"Default colors\", \"Primary colors\", \"Rainbow\", \"Light pastels\", \"Strong colors\", \"Reds, dark to light\", \"Reds, light to dark\", \"Greens, dark to light\", \"Greens, light to dark\", \"Blues, dark to light\", \"Blues, light to dark\", \"Greys, dark to light\", \"Greys, light to dark\", \"Heat colors (red, yellow, white)\", \"Terrain colors (green, beige, grey)\", \"Custom color\", \"Custom gradient\", \"Custom palette\"];\nline_subslice_palletes = [\"Group colors\"].concat(palettes);\n\n// *Controls linked to specific chart types*\n// - We uses lowercase camel to represent the input data controls. These are not the names of the actual controls.\n// - The input data controls for a specific chart type are store in 'input_data'.\n// - All other controls that modify the data are stored in 'INPUTS'.\n// - Other than for 'INPUTS', the name of an array of controls becomes the name of the group on the Charts tab. \n// - The names used to refer to individual controls in the arrays are the same as the names of the R parameters (where there is a one-to-one match)\n\n// Default controls (modified below for specific charts)\nAPPEARANCE = null; GRIDLINES = null; \nDATA_SERIES = ['Colors'];\nDATA_LABELS = ['DataLabelShow', 'DataLabelDecimals', 'DataLabelFont', 'DataLabelPrefix', 'DataLabelSuffix'];\nTITLE = ['Title', 'Subtitle', 'Footer'];\ntidy = true;\nxLabel = 'Categories';\nyLabel = 'Groups';\nINPUTS_data = ['Pasted', 'Table', 'r', 'variables'];\nCATEGORIES_AXIS = ['CategoriesTitle', 'CategoriesAxisShow', 'CategoriesTickFont', 'CategoriesTickAngle', \n 'CategoriesNumberFormat', 'LabelWrap','CategoriesSuffix', 'CategoriesPrefix'];\nVALUES_AXIS = ['ValuesTitle', 'ValuesAxisShow', 'ValuesTickFont', 'ValuesNumberFormat'];\nHOVER = ['HoverNumberFormat'];\nLEGEND = ['LegendShow', 'LegendFont', 'LegendPosition'];\nINPUTS = ['x', 'y', \"AsPercentages\", \"FirstAggregate\"];\nFONT = ['GlobalFontFamily', 'GlobalFontColor'];\nfunction AddMargins() { MARGINS = ['MarginTop', 'MarginLeft', 'MarginBottom', 'MarginRight'];}\nif (chartType == \"Venn\")\n{\n FONT = null; DATA_SERIES = null; TITLE = null; CATEGORIES_AXIS = null; VALUES_AXIS = null; LEGEND = null; \n INPUTS_data = [\"binaryMulti\", 'r', 'Pasted', 'Table', 'variables'];\n INPUTS = [\"AsPercentages\"];\n tidy = false;\n DATA_LABELS = [\"DataLabelFontSize\"];\n hover_number_formats = [\"Automatic\", \"Number\", \"Percentage\"];\n} else if (chartType == \"Stream\")\n{\n DATA_LABELS = null; TITLE = null; LEGEND = null;\n CATEGORIES_AXIS = ['CategoriesNumberFormat']; // Additional controls are defined below\n VALUES_AXIS = ['ValuesNumberTicks', 'ValuesAxisShow', 'ValuesNumberFormat'];\n categories_number_formats = [\"Automatic\", \"Number\", \"Date/Time\", \"Scientific\", \"Custom\"];\n values_number_formats = [\"Automatic\", \"Number\", \"Scientific\", \"Custom\"];\n hover_number_formats = [\"Automatic\", \"Number\"];\n AddMargins();\n}else if (chartType == \"Pie\" || chartType == \"Donut\")\n{\n var radiusLabel = \"Donut hole radius %\";\n if (chartType == \"Pie\")\n radiusLabel = \"Radius of pie groupings % (multi-column tables only)\";\n CATEGORIES_AXIS = null; VALUES_AXIS = null; HOVER = null; LEGEND = null;\n DATA_SERIES.push('SubsliceColors');\n DATA_LABELS = [\"DataLabelFormat\", \"DataLabelFont\", \"DataLabelPrefix\", \"DataLabelSuffix\"];\n APPEARANCE = [\"PieRadius\", \"BorderColor\"];\n \n} else if (chartType == \"Radar\")\n{\n categoriesAxisLabel = \"Angular axis\";\n valuesAxisLabel = \"Radial axis\";\n CATEGORIES_AXIS = ['CategoriesAxisShow', 'CategoriesTickFont', 'CategoriesTickAngle', 'LabelWrap'];\n VALUES_AXIS = ['ValuesAxisShow', 'ValuesTickFont', 'ValuesNumberFormat'];\n hover_number_formats = [\"Automatic\", \"Number\", \"Percentage\"];\n DATA_LABELS = ['DataLabelShow', 'DataLabelFormat', 'DataLabelFont', 'DataLabelPrefix', 'DataLabelSuffix'];\n} else if (chartType == \"Palm\")\n{\n FONT = ['GlobalFontFamily'];\n CATEGORIES_AXIS = ['CategoriesTitle', 'CategoriesTickFont'];\n VALUES_AXIS = ['ValuesTitle', 'ValuesAxisShow', 'ValuesTickFont', 'ValuesNumberFormat', 'ValuesSuffix', 'ValuesPrefix'];\n values_number_formats = [\"Automatic\", \"Number\", \"Percentage\", \"Currency\"];\n DATA_LABELS = null;\n LEGEND = ['LegendFont'];\n TITLE = null;\n HOVER = null;\n} else if (chartType == \"Time Series\")\n{\n INPUTS_data = ['Pasted', 'Table'];\t \n INPUTS = ['x', 'y'];\n DATA_LABELS = null;\n TITLE = ['Title'];\n LEGEND = null;\n HOVER = null;\n CATEGORIES_AXIS = ['CategoriesTitle', 'CategoriesTickFont'];\n VALUES_AXIS = ['ValuesTitle', 'ValuesTickFont'];\n APPEARANCE = [\"WindowStart\", \"RangeBars\"];\n} else if (chartType == \"Geographic Map\")\n{\n DATA_LABELS = null;\n TITLE = null;\n LEGEND = ['LegendShow', 'LegendTitle']\n hover_number_formats = [\"Automatic\", \"Number\", \"Percentage\"];\n CATEGORIES_AXIS = null;\n VALUES_AXIS = null;\n palettes = [\"Blues, light to dark\", \"Blues, dark to light\", \"Greys, light to dark\", \"Greys, dark to light\", \"Reds, light to dark\", \"Reds, dark to light\", \"Greens, light to dark\", \"Greens, dark to light\", \"Custom gradient\"];\n FONT = null;\n APPEARANCE = [];\n} else if (chartType == \"Heat\")\n{\n // TODO add controls for Heat\n} else if (chartType == \"Scatter\")\n{\n INPUTS_data = ['Pasted', 'Table', 'tables', 'r', 'variables'];\n INPUTS = ['x', 'y', 'ScatterSizes', 'ScatterColors', 'ScatterLabels'];\n categoriesAxisLabel = \"X AXIS\";\n valuesAxisLabel = \"Y AXIS\";\n xLabel = 'X coordinates';\n yLabel = 'Y coordinates';\n FITLINE = null;\n HOVER = null;\n VALUES_AXIS = ['ValuesTitle', 'ValuesAxisShow', 'ValuesTickFont', 'ValuesNumberFormat', 'ValuesSuffix', 'ValuesPrefix'];\n APPEARANCE = ['dummy']; \n DATA_LABELS = null; // this is overridden if LabeledScatter\n var isLabeled = false;\n //isLabeled is set in the DATA MANIPULATION tab, as is DATA_LABELS and APPEARANCE\n\n} else if ([\"Column\", \"Bar\", \"Area\", \"Line\"]. indexOf(chartType) != -1)\n{\n if (chartType.indexOf(\"Bar\") != -1)\n SwappedXY();\n if (chartType != \"Line\")\n APPEARANCE = ['Stacked'];\n FITLINE = ['FitLine'];\n GRIDLINES = ['ShowGrid'];\n DATA_LABELS = ['DataLabelShow', 'DataLabelFormat', 'DataLabelFont', 'DataLabelPrefix', 'DataLabelSuffix'];\n} else if ([\"Box\", \"Bean\", \"Density\", \"Histogram\", \"Violin\"]. indexOf(chartType) != -1)\n{ \n INPUTS_data = ['Pasted', 'Table', 'r', 'variables', \"sets\"];\n INPUTS = ['x', 'y'];\n APPEARANCE = ['DensityColor'];\n xLabel = 'Variable(s)';\n DATA_SERIES = null; DATA_LABELS = null; LEGEND = null;\n CATEGORIES_AXIS = ['CategoriesTickFont', 'LabelWrap'];\n TITLE = ['Title'];\n vertical = ['Violin', 'Box'].indexOf(chartType) > -1;\n APPEARANCE.push('boxVertical');\n if (chartType == 'Violin')\n APPEARANCE.push('ShowMean');\n else if (chartType == 'Bean')\n APPEARANCE.push('ValuesColor');\n else (chartType != 'Bean')\n APPEARANCE.push('ShowValues', 'ValuesColor');\n GRIDLINES = ['ShowGrid']; \n AddMargins();\n} else if (chartType == \"Bar Pictograph\")\n{\n SwappedXY();\n INPUTS = ['x', 'AsPercentages', 'FirstAggregate']; // only accepts 1-d tables\n CATEGORIES_AXIS = ['CategoriesAxisShow', 'CategoriesTickFont', 'CategoriesTickHorizAlign'];\n DATA_LABELS = ['DataLabelFont', 'DataLabelFormat',\n 'DataLabelPrefix', 'DataLabelSuffix', 'DataLabelPosition'];\n APPEARANCE = ['Icon', 'FillDirection', 'IconPadding'];\n VALUES_AXIS = null;\n HOVER = null;\n LEGEND = null;\n TITLE = null;\n FONT = ['GlobalFontFamily', 'GlobalFontColor'];\n} else\n throw \"Unknown chart type\";\n \n \n//// Creating the controls\n//// Data Selector.\n// Creating an array of the the data input controls\nvar data_INPUTS_alternatives = new Array(INPUTS_data.length);\nvar i = 0; \nfor(var i = 0; i < INPUTS_data.length; i++)\n data_INPUTS_alternatives[i] = INPUTS_types[INPUTS_data[i]];\n// Creating the data inputs.\nif (groups)\n form.group(\"DATA\")\nvar dtype = form.comboBox({name: \"formDataSource\", label: \"Data source\", alternatives: data_INPUTS_alternatives, required: true, prompt: \"The location of the data to be used in the chart.\"}).getValue();\nif (dtype == INPUTS_types['Table'])\n form.dropBox({name: \"formTable\", label: 'Table', types: ['Table', \"RItem:integer,numeric,matrix,array,data.frame,table\"], required: true, prompt: \"Typically, a table contains data that has already been summarized (e.g., aggregated). Tables are stored in the Pages tree (top-left).\"});\nelse if (dtype == INPUTS_types[\"tables\"]) \n{\n form.dropBox({name: \"formTables\", label: \"Tables\", types: ['Table', \"RItem:integer,numeric,matrix,array,data.frame,table\"], required: true, multi: true, min_inputs: 2});\n if (chartType == \"Scatter\")\n {\n isLabeled = true;\n APPEARANCE.push('ScatterTrendLine');\n }\n} else if (dtype == INPUTS_types['r'])\n{\n form.dropBox({name: \"formOther\", label: \"R Output\", types: [\"RItem:integer,numeric,matrix,array,data.frame,table,list\"], required: true}); \n}\nvar aggregate = false;\nif (dtype == INPUTS_types['Pasted']) \n{\n form.dataEntry({name: \"formPastedData\", prompt: \"Opens a spreadsheet into which you can enter data.\"}) //\"Press the 'Edit' button below to add in the data.\"\n} else if (dtype == INPUTS_types[\"sets\"] || dtype == INPUTS_types[\"set\"])\n{\n form.dropBox({label: \"Variable set\", \n name: \"formX\", \n types:[\"Questions\"],\n prompt: \"Variable sets are shown as groups of variables in the 'Data' tree (bottom-left). 'Binary - Multi' variable sets are represented by a column of checkboxes.\",\n multi: dtype == INPUTS_types[\"sets\"]});\n} else if (dtype == INPUTS_types[\"binaryMulti\"])\n{\n form.dropBox({label: \"Variable set\", \n name: \"formX\", \n types:[\"Questions: PickAny\"],\n prompt: \"Variable sets are shown as groups of variables in the 'Data' tree (bottom-left). 'Binary - Multi' variable sets are represented by a column of checkboxes.\"});\n} else if (dtype == INPUTS_types['variable'])\n{\n form.dropBox({label: \"Variable\", \n name: \"formX\", \n types:['variable'], \n prompt: \"Variable shown in the 'Data' tree (bottom-left).\", \n multi: false, \n required: true}).getValue();\n}\nelse if (dtype == INPUTS_types['variables'])\n{\n if (INPUTS.indexOf('ScatterLabels') > -1)\n var VLabels = form.dropBox({label: \"Labels\", \n name: \"formScatterLabels\", \n types:['variables'], \n prompt: \"Variables are shown in the 'Data' tree (bottom-left).\", \n multi: false, \n required: false});\n if (INPUTS.indexOf('x') > -1)\n var varX = form.dropBox({label: xLabel, name: \"formX\", types:['variables'],\n prompt: \"Variables are shown in the 'Data' tree (bottom-left).\",\n multi: chartType != \"Scatter\", required: false});\n if (INPUTS.indexOf('y')> -1 && (chartType == \"Scatter\" || (varX != null)))\n form.dropBox({label: yLabel, name: \"formY\", types:['variable'], prompt: \"Variables are shown in the 'Data' tree (bottom-left).\", multi: false, required: false});\n if (INPUTS.indexOf('ScatterSizes')> -1)\n var VSizes = form.dropBox({label: \"Sizes\", name: \"formZ\", types:['variables'], prompt: \"Variables are shown in the 'Data' tree (bottom-left).\", multi: false, required: false});\n if (INPUTS.indexOf('ScatterColors')> -1)\n var VColors = form.dropBox({label: \"Colors\", name: \"formZ2\", types:['variables'], prompt: \"Variables are shown in the 'Data' tree (bottom-left).\", multi: false, required: false});\n}\n\nif (groups)\n form.group(\"DATA MANIPULATION\");\nif (INPUTS.indexOf(\"FirstAggregate\") > 0)\n aggregate = form.checkBox({label: \"Aggregate the data prior to plotting\", \n name: \"formFirstAggregate\", \n default_value: [INPUTS_types['Pasted'],INPUTS_types['Table'], INPUTS_types['tables'], INPUTS_types['r']].indexOf(dtype) == -1, \n prompt: \"The data is 'raw', where each row represents an individual case. It needs to be aggregated prior to plotting.\"}).getValue();\n if (aggregate && dtype == INPUTS_types['Pasted'])\n {\n form.checkBox({label: \"First row contains column names\", name: \"formPastedColumnNames\", default_value: true});\n form.checkBox({label: \"First column contains row names\", name: \"formPastedRowNames\", default_value: false});\n form.checkBox({label: \"Factor variables\", name: \"formPastedFactor\", default_value: true});\n form.checkBox({label: \"US date convention (mm/dd/yyyy)\", name: \"formPastedDateConvention\", default_value: true});\n }\nif (tidy)\n form.checkBox({label: \"Automatically tidy the data\", name: \"formTidy\", default_value: true, prompt: \"Automaticaly tidy the data.\"});\nif (chartType != 'Donut') // && chartType != \"Scatter\")\n form.checkBox({name: \"formTranspose\", label: \"Switch rows and columns\"});\n\n// Creating other input controls on the Inputs page.\nvar asPct = false;\nif (INPUTS != null)\n{\n form.textBox({label: \"Rows to ignore\", type: \"text\", default_value: \"NET, Total, SUM\", name: \"formIgnoreRows\", required: false});\n form.textBox({label: \"Columns to ignore\", type: \"text\", default_value: \"NET, Total, SUM\", name: \"formIgnoreColumns\", required: false});\n if (INPUTS.indexOf('AsPercentages') > -1)\n asPct = form.checkBox({name: \"formAsPercentages\", label: \"Show as percentages\"}).getValue();\n // Set default formatting if 'as percentage' is checked\n if (asPct)\n {\n var formats = [values_number_formats, hover_number_formats, data_label_formats];\n for (var i = 0; i < formats.length; i++)\n {\n var format_array = formats[i];\n var pct_idx = format_array.indexOf('Percentage');\n if (pct_idx != -1) \n {\n format_array.splice(pct_idx, 1);\n format_array.splice(0, 0, \"Percentage\");\n var auto_idx = format_array.indexOf('Automatic');\n if (auto_idx != -1)\n format_array.splice(auto_idx, 1);\n }\n }\n }\n if (dtype == INPUTS_types['variables'])\n form.checkBox({label: \"Variable names\", name:\"formNames\", default_value: false});\n}\n\n//// Creating controls on the Chart page\nform.page('Chart');\nif (APPEARANCE != null)\n{\n var isStacked = false;\n if (groups)\n form.group('APPEARANCE');\n if (chartType == 'Scatter')\n {\n // Scatter is always labeled in INPUTS_types['tables']\n // For other input types we need to check\n if ((dtype != INPUTS_types['tables'] && dtype != INPUTS_types['variables']) || \n (dtype == INPUTS_types['variables'] && VLabels.getValue() != null))\n {\n var labtype = form.comboBox({name: \"formScatterLabelType\", label: \"Show labels\", alternatives:['As hover text', 'On chart'], default_value: 'As hover text'}).getValue();\n isLabeled = labtype == 'On chart';\n }\n if (isLabeled)\n {\n APPEARANCE.push('ScatterMaxLab');\n categories_number_formats = [\"Automatic\", \"Number\", \"Percentage\", \"Currency\"];\n values_number_formats = [\"Automatic\", \"Number\", \"Percentage\", \"Currency\"];\n data_label_formats = [\"Automatic\", \"Number\", \"Category\", \"Percentage\", \"Currency\"]\n DATA_LABELS = ['DataLabelFormat', 'DataLabelFont', 'DataLabelPrefix', 'DataLabelSuffix'];\n }\n if (!isLabeled && ((dtype != INPUTS_types['tables'] && dtype != INPUTS_types['variables']) || \n (dtype == INPUTS_types['variables'] && VSizes.getValue() != null)))\n APPEARANCE.push('ScatterSizeType');\n if ((dtype != INPUTS_types['tables'] && dtype != INPUTS_types['variables']) || \n (dtype == INPUTS_types['variables'] && VColors.getValue() != null))\n APPEARANCE.push('ScatterColorType');\n if (!isLabeled)\n FITLINE = ['FitLine'];\n }\n if (APPEARANCE.indexOf(\"ScatterMaxLab\") > -1)\n form.numericUpDown({name: \"formScatterMaxLab\", label: \"Maximum data labels (left of column 1) to plot\", default_value: 20, maximum: 200, minimum: 0});\n if (APPEARANCE.indexOf(\"ScatterTrendLine\") > -1)\n form.checkBox({label: \"Show trend lines\", name: \"formTrendLines\", default_value: false});\n if (APPEARANCE.indexOf(\"ScatterSizeType\") > -1)\n form.comboBox({label: \"Treat sizes variable (column 3) as\", name:\"formScatterSizeType\", alternatives:['Area', 'Diameter'], default_value:'Area'});\n if (APPEARANCE.indexOf(\"ScatterColorType\") > -1)\n form.comboBox({label: \"Treat colors variable (column 4) as\", name:\"formScatterColorType\", alternatives:['Categories', 'Numeric scale'], default_value:'Numeric scale'});\n\n\n if (APPEARANCE.indexOf(\"Icon\") > -1)\n {\n var custom_icon_label = \"(Custom icon)\";\n var picto_icon = form.comboBox({name: \"formIcon\", label: \"Icon\", alternatives: [\n custom_icon_label, \"Apple\", \"Banana\", \"Baby\", \"Beer\", \"Book\", \"Bread\", \"Building\", \"Cake\", \"Car\", \"Cash\", \"Circle\", \"Chicken\", \"Church\", \"Computer\", \"Cow\", \"Cross\", \"Cup\", \"Cutlery\",\n \"Elephant\", \"Glass\", \"Globe\", \"Gun\", \"Heart\", \"House\", \"Idea\", \"Law\", \"Medicine\", \"Money\", \"Rocket\", \"Soldier\", \"Soup\", \"Sport\", \"Square\", \"Star\", \"Sick person\", \"Stick man\", \"Stick woman\", \"Test tube\",\n \"Thumbs up\", \"Thumbs down\", \"Tick\", \"Tools\", \"Tomato\", \"Traffic light\", \"Train\", \"Tree\", \"Truck\", \"TV\", \"User\", \"Water drop\", \"Weight\", \"Wine\"], default_value: \"Stick man\"}).getValue();\n if (picto_icon == custom_icon_label)\n {\n form.textBox({name: \"formCustomIcon\", label: \"Icon URL\", type: \"text\", required: true});\n var customBase = form.textBox({name: \"formBaseImage\", label: \"Base icon URL\", type: \"text\", required: false, prompt: \"Leave blank to hide unfilled icons\"}).getValue();\n }\n form.textBox({name: \"formIconScale\", label: \"Units per icon (scale)\", type: \"number\", required: false, prompt: \"Leave blank to determine based on range of Input data\"});\n form.textBox({name: \"formTotalIcons\", label: \"Total icons\", type: \"number\", required: false, prompt: \"Leave blank to determine from Input data\"});\n var ncolOpt = form.textBox({name:\"formIconNCol\", label: \"Maximum icons per row\", type: \"number\", prompt: \"Leave blank for all icons to be placed in a single row\", required: false}).getValue();\n form.comboBox({name:\"formFillDirection\", label: \"Direction of fill\", alternatives: [\"From left\", \"From right\"], default_value: \"From left\"});\n if (picto_icon != custom_icon_label)\n {\n var baseOpt = form.checkBox({name: \"formHideBase\", label: \"Hide base image\", default_value: true}).getValue();\n if (!baseOpt)\n form.colorPicker({name: \"formBaseColor\", label: \"Icon base color\",default_value: \"#CCCCCC\"});\n var labColAsIcon = form.checkBox({name: \"formLabelColorAsIcon\", label: \"Labels colored as icons\"}).getValue();\n if (ncolOpt != \"\" && baseOpt)\n form.checkBox({name:\"formFixNRows\", label:\"Fixed number of rows per bar\", default_value: true});\n }\n if (ncolOpt != \"\" && picto_icon == custom_icon_label && !customBase)\n form.checkBox({name:\"formFixNRows\", label:\"Fixed number of rows per bar\", default_value: true});\n form.numericUpDown({name: \"formIconPadding\", label: \"Space between bars\", minimum: 0, default_value: 2, increment:1});\n }\n if (APPEARANCE.indexOf(\"Stacked\") > -1)\n isStacked = form.checkBox({label: \"Stack series\", name: \"formStackSeries\", default_value: false}).getValue();\n if (APPEARANCE.indexOf(\"PieRadius\") > -1)\n form.numericUpDown({name: \"formPieRadius\", label: radiusLabel, default_value: 70, increment: 1, minimum: 0, maximum: 100});\n if (APPEARANCE.indexOf(\"BorderColor\") > -1)\n form.colorPicker({name: \"formBorderColor\", label: \"Border color\", default_value: \"#ffffff\"});\n if (APPEARANCE.indexOf(\"DensityColor\") > -1)\n form.colorPicker({name: \"formDensityColor\", label: \"Color\", default_value: \"#5C9AD3\"});\n if (APPEARANCE.indexOf(\"boxVertical\") > -1)\n {\n var v = form.checkBox({name: \"formVertical\", label: \"Plot vertically\", default_value: vertical});\n if (!v.getValue())\n SwappedXY();\n }\n if (APPEARANCE.indexOf(\"ShowValues\") > -1)\n form.checkBox({name: \"formShowValues\", label: \"Plot the individual data values\", default_value: false});\n if (APPEARANCE.indexOf(\"ValuesColor\") > - 1)\n form.colorPicker({name: \"formValuesColor\", label: \"Data value color\", default_value: \"#5C9AD3\"});\n if (APPEARANCE.indexOf(\"ShowMean\") > -1)\n {\n var c = form.checkBox({name: \"formShowMean\", label: \"Plot the mean value\", default_value: true});\n if (c.getValue())\n form.colorPicker({name: \"formMeanColor\", label: \"Color of the mean dot\", default_value: \"#ffffff\"});\n c = form.checkBox({name: \"formShowMedian\", label: \"Plot the median\", default_value: true});\n if (c.getValue())\n form.colorPicker({name: \"formMedianColor\", label: \"Color of the median line\", default_value: \"#000000\"});\n c = form.checkBox({name: \"formShowQuartiles\", label: \"Plot the quartiles\", default_value: true});\n if (c.getValue())\n form.colorPicker({name: \"formQuartilesColor\", label: \"Color of the quartiles box\", default_value: \"#000000\"});\n c = form.checkBox({name: \"formShowRange\", label: \"Plot the range\", default_value: true});\n if (c.getValue())\n form.colorPicker({name: \"formRangeColor\", label: \"Color of the range line\", default_value: \"#000000\"});\n }\n if (chartType == \"Geographic Map\")\n {\n var package = form.comboBox({name: \"formMapPackage\", label: \"Map package\", alternatives: [\"plotly\", \"leaflet\"], default_value: \"plotly\"}).getValue();\n if (package == \"plotly\")\n form.checkBox({label: \"High resolution\", name: \"formHighRes\", default_value: false});\n var NAasZero = form.checkBox({label: \"Treat NA as zero\", name: \"formNAasZero\", default_value: false}).getValue();\n if (!NAasZero)\n form.colorPicker({name: \"formNAColor\", label: \"Color of NA values\", default_value: \"#808080\"});\n if (package == \"plotly\")\n form.colorPicker({name: \"formOceanColor\", label: \"Ocean color\", default_value: \"#DDDDDD\"}); \n }\n if (chartType == \"Box\")\n form.comboBox({name: \"formBoxPoints\", label: \"Box points\", alternatives: [\"All\", \"Outliers\", \"Suspected outliers\"], default_value: \"Suspected outliers\", required: true});\n if (chartType == \"Histogram\") {\n form.checkBox({name: \"formHistogramCumulative\", label: \"Cumulative histogram\", default_value: false});\n form.checkBox({name: \"formHistogramCounts\", label: \"Show counts\", default_value: false});\n var c = form.checkBox({name: \"formAutomaticBinning\", label: \"Automatic column widths (bins)\", default_value: true});\n if (!c.getValue())\n form.numericUpDown({name: \"formMaximumBins\", label: \"Maximum columns (bins)\", default_value: 20});\n }\n if (APPEARANCE.indexOf(\"RangeBars\") > -1)\n form.checkBox({name: \"formRangeBars\", label: \"Data are low, value, high\", default_value: false});\n if (APPEARANCE.indexOf(\"WindowStart\") > -1)\n form.numericUpDown({name: \"formWindowStart\", label: \"Range window start (days from data end)\", default_value: 30});\n}\nif (DATA_SERIES != null && !(chartType == \"Bar Pictograph\" && picto_icon == custom_icon_label))\n{\n if (groups)\n form.group(\"DATA SERIES\");\n if (DATA_SERIES.indexOf('Colors') > -1)\n {\n var colOpt = form.comboBox({name: \"formPalette\", label: \"Color palette\", alternatives: palettes, default_value: palettes[0], required: true});\n if (colOpt.getValue() == \"Custom color\")\n form.colorPicker({name: \"formCustomColor\", label: \"Custom color\", default_value: \"#5C9AD3\"});\n if (colOpt.getValue() == \"Custom gradient\")\n {\n form.colorPicker({name: \"formCustomGradientStart\", label: \"Gradient start\", default_value: \"#5C9AD3\"});\n form.colorPicker({name: \"formCustomGradientEnd\", label: \"Gradient end\", default_value: \"#ED7D31\"});\n }\n if (colOpt.getValue() == \"Custom palette\")\n form.textBox({name: \"formCustomPalette\", label: \"Custom palette\", default_value: \"#5C9AD3, #ED7D31\", prompt: \"Enter color as a string. Multiple values should be separated by commas.\"});\n }\n if (DATA_SERIES.indexOf('SubsliceColors') > -1)\n {\n var colOpt = form.comboBox({name: \"formSubslicePalette\", label: \"Outer ring color palette\", alternatives: line_subslice_palletes, default_value: line_subslice_palletes[0], required: true});\n if (colOpt.getValue() == \"Custom color\")\n form.colorPicker({name: \"formSubsliceCustomColor\", label: \"Custom color\", default_value: \"#5C9AD3\"});\n if (colOpt.getValue() == \"Custom gradient\")\n {\n form.colorPicker({name: \"formSubsliceCustomGradientStart\", label: \"Gradient start\", default_value: \"#5C9AD3\"});\n form.colorPicker({name: \"formSubsliceCustomGradientEnd\", label: \"Gradient end\", default_value: \"#ED7D31\"});\n }\n if (colOpt.getValue() == \"Custom palette\")\n form.textBox({name: \"formCustomPalette\", label: \"Custom palette\", default_value: \"#5C9AD3, #ED7D31\", prompt: \"Enter color as a string. Multiple values should be separated by commas.\"});\n } \n}\nif (typeof FITLINE != 'undefined' && FITLINE != null && !isStacked)\n{\n if (groups)\n form.group(\"TREND LINES\");\n if (FITLINE.indexOf('FitLine') > -1)\n {\n var fitOpt = form.comboBox({name: \"formFit\", label: \"Show line of best fit\", alternatives: [\"None\", \"Linear\", \"Smooth\"], default_value: \"None\"});\n if (fitOpt.getValue() != \"None\")\n {\n form.checkBox({name: \"formFitIgnoreLast\", label: \"Ignore last data point\", default_value: false});\n form.comboBox({name: \"formFitLineType\", label: \"Line type\", alternatives: [\"dot\", \"dash\", \"longdash\", \"dashdot\", \"solid\"], default_value:\"dot\"});\n form.numericUpDown({name: \"formFitLineWidth\", label: \"Line width\", default_value: 1, minimum: 1, maximum: 20});\n var fitcolOpt = form.comboBox({name: \"formFitPalette\", label: \"Fit line color palette\", alternatives: line_subslice_palletes, default_value: line_subslice_palletes[0], required: true});\n if (fitcolOpt.getValue() == \"Custom color\")\n form.colorPicker({name: \"formFitCustomColor\", label: \"Custom color of fit line\", default_value: \"#5C9AD3\"})\n if (fitcolOpt.getValue() == \"Custom gradient\")\n {\n form.colorPicker({name: \"formFitCustomGradientStart\", label: \"Gradient start of fit lines\", default_value: \"#5C9AD3\"});\n form.colorPicker({name: \"formFitCustomGradientEnd\", label: \"Gradient end of fit lines\", default_value: \"#ED7D31\"});\n }\n if (fitcolOpt.getValue() == \"Custom palette\")\n form.textBox({name: \"formFitCustomPalette\", label: \"Custom palette of fit lines\", default_value: \"#5C9AD3, #ED7D31\", prompt: \"Enter color as a string. Multiple values should be separated by commas.\"});\n }\n }\n}\n \nif (FONT != null)\n{\n if (groups)\n form.group(\"FONT\");\n if (FONT.indexOf('GlobalFontFamily') > -1)\n var globalFontFamily = form.comboBox({name: \"formFont\", label: \"Global font family\", alternatives: font_families, default_value: \"Arial\"}).getValue();\n if (FONT.indexOf('GlobalFontColor') > -1 && !(chartType == \"Bar Pictograph\" && labColAsIcon))\n var globalFontColor = form.colorPicker({name: \"formFontColor\", label: \"Global font color\", default_value: \"#2C2C2C\"}).getValue();\n}\n \nif (DATA_LABELS != null)\n{\n if (groups)\n form.group(\"DATA LABELS\");\n var datalabshow = true;\n if (DATA_LABELS.indexOf('DataLabelPosition') > -1)\n {\n var dLabOpt = form.comboBox({name:\"formDataLabelPosition\", label: \"Show data label\", alternatives: [\"No\", \"Next to bar\", \"Below row label\", \"Above row label\", \"Below icons\", \"Above icons\"], default_value: \"Next to bar\"}).getValue();\n if (dLabOpt == \"No\")\n datalabshow = false;\n if (dLabOpt == \"Below icons\" || dLabOpt == \"Above icons\")\n form.comboBox({name:\"formDataLabelHorizAlign\", label:\" Data label horizontal alignment\", alternatives: [\"Default\", \"Left\", \"Center\", \"Right\"], default_value: \"Default\"});\n }\n if (DATA_LABELS.indexOf('DataLabelShow') > -1)\n datalabshow = form.checkBox({name: \"formDataLabelShow\", label: \"Show data labels\", default_value: false}).getValue();\n if (datalabshow && DATA_LABELS.indexOf('DataLabelFont') > -1)\n {\n \n form.comboBox({name: \"formDataLabelFontFamily\", label: \"Data label font family\", alternatives: font_families, default_value: globalFontFamily});\n if (!(chartType == \"Bar Pictograph\" && labColAsIcon))\n form.colorPicker({name: \"formDataLabelFontColor\", label: \"Data label font color\", default_value: globalFontColor});\n form.numericUpDown({name: \"formDataLabelFontSize\", label: \"Data label font size\", default_value: 10});\n }\n if (chartType == \"Venn\" && DATA_LABELS.indexOf('DataLabelFontSize') > -1)\n form.numericUpDown({name: \"formDataLabelFontSize\", label: \"Data label font size\", default_value: 10});\n \n if (datalabshow && DATA_LABELS.indexOf('DataLabelFormat') > -1)\n var dataLabelFormat = form.comboBox({name: \"formDataLabelNumberType\", label: \"Number type\", alternatives: data_label_formats, default_value: data_label_formats[0], required: true}).getValue();\n if (datalabshow && (DATA_LABELS.indexOf('DataLabelDecimals') > -1 || (DATA_LABELS.indexOf('DataLabelFormat') > -1 && dataLabelFormat != \"Automatic\")))\n form.numericUpDown({name: \"formDataLabelDecimals\", label: \"Decimal places\", default_value: dataLabelFormat == \"Percentage\" ? 0 : 2, increment: 1, minimum: 0, maximum: 12});\n if (datalabshow && DATA_LABELS.indexOf('DataLabelPrefix') > -1)\n form.textBox({name:'formPrefix', label: 'Custom prefix', required: false});\n if (datalabshow && DATA_LABELS.indexOf('DataLabelSuffix') > -1)\n form.textBox({name:'formSuffix', label: 'Custom suffix', required: false});\n if (DATA_LABELS.indexOf('data.label.max.plot') > -1)\n form.numericUpDown({name: \"formMaxLab\", label: \"Maximum data labels to plot\", default_value: 50, maximum: 200, minimum: 0});\n}\nif (GRIDLINES != null)\n{\n if (groups)\n form.group(\"GRID LINES\");\n if (GRIDLINES.indexOf('ShowGrid') > -1)\n form.checkBox({name: \"formShowGrid\", label: \"Show grid lines\", default_value: true});\n}\nif (LEGEND != null)\n{\n if (groups)\n form.group(\"LEGEND\");\n var hasleg = 1;\n if (LEGEND.indexOf('LegendShow') > -1)\n hasleg = form.checkBox({name: \"formLegendShow\", label: \"Show legend (if applicable)\", default_value: true}).getValue();\n if (hasleg && LEGEND.indexOf('LegendTitle') > -1)\n {\n form.textBox({label: \"Legend title\", type: \"text\", name: \"formLegendTitle\", required: false});\n }\n if (hasleg && LEGEND.indexOf('LegendFont') > -1)\n {\n form.comboBox({name: \"formLegendFontFamily\", label: \"Legend font family\", alternatives: font_families, default_value: globalFontFamily});\n if (chartType != \"Palm\")\n form.colorPicker({name: \"formLegendFontColor\", label: \"Legend font color\", default_value: globalFontColor});\n form.numericUpDown({name: \"formLegendFontSize\", label: \"Legend font size\", default_value: 10});\n }\n if (hasleg && LEGEND.indexOf('LegendPosition') > -1)\n {\n form.numericUpDown({name: \"formLegendXPos\", label: \"Horizontal placement\", default_value: 1.02, increment: 0.02, minimum: -2, maximum: 3, prompt: \"Choose numeric value between -2 (far left) to 3 (far right)\"});\n form.numericUpDown({name: \"formLegendYPos\", label: \"Vertical placement\", default_value: 1.00, increment: 0.02, minimum: -2, maximum: 3, prompt: \"Choose numeric value between -2 (below) and 3 (above)\"});\n }\n}\nif (TITLE != null)\n{\n if (groups)\n form.group('Title');\n if (TITLE.indexOf('Title') > -1)\n {\n titleOpt = form.textBox({name:\"formTitle\", label:\"Title\", required:false});\n if (typeof titleOpt != \"undefined\" && titleOpt.getValue() != \"\")\n {\n form.comboBox({name: \"formTitleFontFamily\", label: \"Title font family\", alternatives: font_families, default_value: globalFontFamily});\n form.colorPicker({name: \"formTitleFontColor\", label: \"Title font color\", default_value: globalFontColor});\n form.numericUpDown({name:\"formTitleFontSize\", label:\"Title font size\", default_value: 16});\n }\n }\n if (TITLE.indexOf('Subtitle') > -1)\n {\n subtitleOpt = form.textBox({name:\"formSubtitle\", label:\"Subtitle\", required:false});\n if (typeof subtitleOpt != \"undefined\" && subtitleOpt.getValue() != \"\")\n {\n form.comboBox({name: \"formSubtitleFontFamily\", label: \"Subtitle font family\", alternatives: font_families, default_value: globalFontFamily});\n form.colorPicker({name: \"formSubtitleFontColor\", label: \"Subtitle font color\", default_value: globalFontColor});\n form.numericUpDown({name:\"formSubtitleFontSize\", label:\"Subtitle font size\", default_value: 12});\n }\n }\n if (TITLE.indexOf('Footer') > -1)\n {\n footerOpt = form.textBox({name:\"formFooter\", label:\"Footer\", required:false});\n if (chartType == \"Scatter\" || (typeof footerOpt != \"undefined\" && footerOpt.getValue() != \"\"))\n {\n form.comboBox({name: \"formFooterFontFamily\", label: \"Footer font family\", alternatives: font_families, default_value: globalFontFamily});\n form.colorPicker({name: \"formFooterFontColor\", label: \"Footer font color\", default_value: globalFontColor});\n form.numericUpDown({name:\"formFooterFontSize\", label:\"Footer font size\", default_value: 8});\n var footerWrapOpt = form.checkBox({name: \"formFooterWrap\", label: \"Wrap footer\", default_value: true});\n if (footerWrapOpt.getValue())\n form.numericUpDown({name: \"formFooterWrapNchar\", label: \"Footer line width\", default_value: 150, minimum: 5, increment: 5, maximum: 5000});\n }\n }\n}\nif (CATEGORIES_AXIS != null)\n{\n if (groups)\n form.group(categoriesAxisLabel);\n if (CATEGORIES_AXIS.indexOf('CategoriesTitle') > -1)\n {\n form.textBox({name: \"formCategoriesTitle\", label: \"Axis title\", required: false});\n form.comboBox({name: \"formCategoriesTitleFontFamily\", label: \"Axis title font family\", alternatives: font_families, default_value: globalFontFamily});\n if (chartType != \"Palm\")\n form.colorPicker({name: \"formCategoriesTitleFontColor\", label: \"Axis title font color\", default_value: globalFontColor});\n form.numericUpDown({name: \"formCategoriesTitleFontSize\", label: \"Axis title font size\", default_value: 12});\n }\n var showX = true;\n var labelShowX = \"Show axis\";\n if (chartType == \"Bar Pictograph\")\n labelShowX = \"Show row labels\";\n if (CATEGORIES_AXIS.indexOf('CategoriesAxisShow') > -1)\n showX = form.checkBox({name: \"formCategoriesAxisShow\", label: labelShowX, default_value: true}).getValue(); \n if (showX) {\n if (CATEGORIES_AXIS.indexOf('CategoriesNumberFormat') > -1) {\n var xNumberType = form.comboBox({name: \"formCategoriesNumberType\", label: \"Number type\", alternatives: categories_number_formats, default_value: categories_number_formats[0], required: true}).getValue();\n if (xNumberType == \"Date/Time\")\n xNumberType = form.comboBox({name: \"formCategoriesDateType\", label: \"Date type\", alternatives: date_formats, default_value: date_formats[0], required: true}).getValue();\n if (xNumberType == \"Custom\")\n form.textBox({name: \"formCategoriesNumberCustom\", label: \"Custom code\", default_value: \"%d %b %y\", required: false});\n if (xNumberType == 'Currency')\n form.textBox({name: \"formCategoriesCurrency\", label: \"Currency symbol\", default_value: \"\", required: true}); \n if (xNumberType == 'Number' || xNumberType == 'Currency')\n form.checkBox({name: \"formCategoriesSeparateThousands\", label: \"Separate thousands by comma\", default: true});\n if (xNumberType == 'Number' || xNumberType == 'Percentage' || xNumberType == 'Scientific' || xNumberType == 'Currency')\n form.numericUpDown({name:\"formCategoriesDecimals\", label:\"Decimal places\", default_value: xNumberType == \"Percentage\" ? 0 : 2});\n if (xNumberType == 'Metric units suffix')\n form.numericUpDown({name:\"formCategoriesDecimals\", label:\"Significant digits\", default_value: 2, minimum: 1});\n if (CATEGORIES_AXIS.indexOf('CategoriesPrefix') > -1)\n form.textBox({name: \"formCategoriesPrefix\", label: \"Custom prefix\", default_value: \"\", required: false}); \n if (CATEGORIES_AXIS.indexOf('CategoriesSuffix') > -1)\n form.textBox({name: \"formCategoriesSuffix\", label: \"Custom suffix\", default_value: \"\", required: false});\n }\n if (CATEGORIES_AXIS.indexOf('CategoriesTickInterval') > -1)\n form.numericUpDown({name: \"formCategoriesTickInterval\", label: \"Tick interval\", default_value: 1, increment: 1, minimum: 1, maximum: 1000});\n if (CATEGORIES_AXIS.indexOf('CategoriesTickFont') > -1)\n {\n form.comboBox({name: \"formCategoriesTickFontFamily\", label: \"Axis label font family\", alternatives: font_families, default_value: globalFontFamily});\n if (chartType != \"Palm\" && !(chartType == \"Bar Pictograph\" && labColAsIcon))\n form.colorPicker({name: \"formCategoriesTickFontColor\", label: \"Axis label font color\", default_value: globalFontColor});\n form.numericUpDown({name: \"formCategoriesTickFontSize\", label: \"Axis label font size\", default_value: 10});\n }\n if (CATEGORIES_AXIS.indexOf('CategoriesTickHorizAlign') > -1)\n form.comboBox({name:\"formCategoriesTickHorizAlign\", label: \"Horizontal alignment\", alternatives: [\"Default\", \"Left\", \"Center\", \"Right\"], default_value: \"Default\"}); \n\n if (CATEGORIES_AXIS.indexOf('CategoriesTickAngle') > -1)\n form.comboBox({name: \"formCategoriesTickAngle\", label: \"Axis label orientation\", alternatives: [\"Automatic\", \"Horizontal\", \"Vertical\", \"Diagonal\"], default_value: \"Automatic\"});\n if (CATEGORIES_AXIS.indexOf('LabelWrap') > -1)\n {\n var xWrapOpt = form.checkBox({name: \"formLabelWrap\", label: \"Wrap axis label\", default_value: true});\n if (xWrapOpt.getValue())\n form.numericUpDown({name: \"formLabelWrapNchar\", label: \"Axis label line width\", default_value: 21, minimum: 5, increment: 5, maximum: 1000});\n } \n }\n if (chartType == \"Stream\")\n {\n form.comboBox({name: \"formCategoriesTickUnits\", label: \"Tick units\", alternatives: [\"Automatic\", \"Number\", \"Month\", \"Year\"], default_value: \"Automatic\"});\n form.numericUpDown({name: \"formCategoriesTickInterval\", label: \"Tick frequency\", default_value: 3, minimum: 1, increment: 1, maximum: 1000});\n }\n}\nif (VALUES_AXIS != null)\n{\n if (groups)\n form.group(valuesAxisLabel);\n if (VALUES_AXIS.indexOf('ValuesTitle') > -1)\n {\n form.textBox({name: \"formValuesTitle\", label: \"Axis title\", required: false});\n form.comboBox({name: \"formValuesTitleFontFamily\", label: \"Axis title font family\", alternatives: font_families, default_value: globalFontFamily});\n if (chartType != \"Palm\")\n form.colorPicker({name: \"formValuesTitleFontColor\", label: \"Axis title font color\", default_value: globalFontColor});\n form.numericUpDown({name: \"formValuesTitleFontSize\", label: \"Axis title font size\", default_value: 12});\n }\n var showY = true;\n if (VALUES_AXIS.indexOf('ValuesAxisShow') > -1)\n showY = form.checkBox({name: \"formValuesAxisShow\", label: \"Show axis\", default_value: true}).getValue(); \n if (showY) {\n if (VALUES_AXIS.indexOf('ValuesNumberFormat') > -1) {\n var yNumberType = form.comboBox({name: \"formValuesNumberType\", label: \"Number type\", alternatives: values_number_formats, default_value: values_number_formats[0], required: true}).getValue();\n if (yNumberType == \"Date/Time\")\n yNumberType = form.comboBox({name: \"formValuesDateType\", label: \"Date type\", alternatives: date_formats, default_value: date_formats[0], required: true}).getValue();\n if (yNumberType == \"Custom\")\n form.textBox({name: \"formValuesNumberCustom\", label: \"Custom code\", default_value: \"%d %b %y\", required: false});\n if (yNumberType == 'Currency')\n form.textBox({name: \"formValuesCurrency\", label: \"Currency symbol\", default_value: \"\", required: true}); \n if ((yNumberType == 'Number' || yNumberType == 'Currency') && chartType != \"Palm\")\n form.checkBox({name: \"formValuesSeparateThousands\", label: \"Separate thousands by comma\", default: true});\n if (yNumberType == 'Number' || yNumberType == 'Percentage' || yNumberType == 'Scientific' || yNumberType == 'Currency')\n form.numericUpDown({name:\"formValuesDecimals\", label:\"Decimal places\", default_value: yNumberType == \"Percentage\" ? 0 : 2});\n if (yNumberType == 'Metric units suffix')\n form.numericUpDown({name:\"formValuesDecimals\", label:\"Significant digits\", default_value: 2, minimum: 1});\n if (VALUES_AXIS.indexOf('ValuesPrefix') > -1)\n form.textBox({name: \"formValuesPrefix\", label: \"Custom prefix\", default_value: \"\", required: false}); \n if (VALUES_AXIS.indexOf('ValuesSuffix') > -1)\n form.textBox({name: \"formValuesSuffix\", label: \"Custom suffix\", default_value: \"\", required: false}); \n }\n if (showY && VALUES_AXIS.indexOf('ValuesNumberTicks') > -1) //Weird parameter for Stream Graph\n form.numericUpDown({name: \"formValuesNumberTicks\", label: \"Number of ticks\", default_value: 5, increment: 1, minimum: 1, maximum: 1000});\n if (showY && VALUES_AXIS.indexOf('ValuesTickFont') > -1)\n {\n form.comboBox({name: \"formValuesTickFontFamily\", label: \"Axis label font family\", alternatives: font_families, default_value: globalFontFamily});\n if (chartType != \"Palm\")\n form.colorPicker({name: \"formValuesTickFontColor\", label: \"Axis label font color\", default_value: globalFontColor});\n form.numericUpDown({name: \"formValuesTickFontSize\", label: \"Axis label font size\", default_value: 10});\n }\n }\n}\nif (HOVER != null)\n{\n if (groups)\n form.group(\"HOVER\");\n var showHover = true;\n if (HOVER.indexOf('HoverShow') > -1)\n showHover = form.checkBox({name: \"formHoverShow\", label: \"Show hover text\", default_value: true});\n if (showHover)\n {\n if (HOVER.indexOf('HoverNumberFormat') > -1 && (chartType != \"Venn\" || dtype == INPUTS_types['binaryMulti'] || dtype == INPUTS_types['variables'])) // only show for Venn if raw data\n {\n var hoverNumberType = form.comboBox({name: \"formHoverNumberType\", label: \"Number type\", alternatives: hover_number_formats, default_value: hover_number_formats[0], required: true}).getValue();\n if (hoverNumberType == \"Date/Time\")\n hoverNumberType = form.comboBox({name: \"formHoverDateType\", label: \"Date type\", alternatives: date_formats, default_value: date_formats[0], required: true}).getValue();\n if (hoverNumberType == \"Custom\")\n form.textBox({name: \"formHoverNumberCustom\", label: \"Custom code\", default_value: \"%d %b %y\", required: false});\n if (hoverNumberType == 'Number' && chartType != \"Venn\" && chartType != \"Stream\")\n form.checkBox({name: \"formHoverSeparateThousands\", label: \"Separate thousands by comma\", default: true});\n if (hoverNumberType == 'Number' || hoverNumberType == 'Percentage' || hoverNumberType == 'Scientific')\n form.numericUpDown({name:\"formHoverDecimals\", label:\"Decimal places\", default_value: hoverNumberType == \"Percentage\" ? 0 : 2});\n if (hoverNumberType == 'Metric units suffix')\n form.numericUpDown({name:\"formHoverDecimals\", label:\"Significant digits\", default_value: 2, minimum: 1});\n }\n }\n}\nif (typeof MARGINS != 'undefined')\n{\n if (groups)\n form.group(\"MARGINS\");\n if (MARGINS.indexOf('MarginTop') > -1)\n form.numericUpDown({name: \"formMarginTop\", label: \"Top\", default_value: 30, increment: 1, minimum: 0, maximum: 1000});\n if (MARGINS.indexOf('MarginLeft') > -1)\n form.numericUpDown({name: \"formMarginLeft\", label: \"Left\", default_value: 80, increment: 1, minimum: 0, maximum: 1000});\n if (MARGINS.indexOf('MarginBottom') > -1)\n form.numericUpDown({name: \"formMarginBottom\", label: \"Bottom\", default_value: 50, increment: 1, minimum: 0, maximum: 1000});\n if (MARGINS.indexOf('MarginRight') > -1)\n form.numericUpDown({name: \"formMarginRight\", label: \"Right\", default_value: 40, increment: 1, minimum: 0, maximum: 1000});\n}","JSError":null,"JSErrorDetails":null,"ControlDefinitionErrors":null,"InputValidationErrors":null,"Controls":[{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formChartType","Page":null,"Group":"OUTPUT","Type":"ComboBox","Label":"Chart type","LabelEmphasised":false,"Value":"Palm","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Area","Column","Donut","Bar","Bar Pictograph","Bean","Box","Density","Geographic Map","Heat","Histogram","Line","Palm","Pie","Radar","Stream","Scatter","Time Series","Venn","Violin"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formChartOutput","Page":null,"Group":"OUTPUT","Type":"ComboBox","Label":"Show as","LabelEmphasised":false,"Value":"Chart","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Chart","Table"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formDataSource","Page":null,"Group":"DATA","Type":"ComboBox","Label":"Data source","LabelEmphasised":false,"Value":"Link to a table in 'Pages'","Allowed":null,"Multi":false,"Prompt":"The location of the data to be used in the chart.","ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Type or paste in data","Link to a table in 'Pages'","Use an existing R Output in 'Pages'","Link to variables in 'Data'"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formTable","Page":null,"Group":"DATA","Type":"DropBox","Label":"Table","LabelEmphasised":false,"Value":"36136e59-4891-4762-bc63-59dd5ad2aba4","Allowed":null,"Multi":false,"Prompt":"Typically, a table contains data that has already been summarized (e.g., aggregated). Tables are stored in the Pages tree (top-left).","ErrorMessage":"Table: Table accepts only one input which is of type Table or Ritem (Integer, Numeric, Matrix, Array, Data.Frame or Table).","Invalid":null,"Required":true,"AllowedTypes":["Table","RItem:integer,numeric,matrix,array,data.frame,table"],"OwnerRItemGuid":"75f8c82d-c6ec-4c32-a2ca-d9cad95f4691","MinInputs":1,"MaxInputs":1,"Height":1,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formFirstAggregate","Page":null,"Group":"DATA MANIPULATION","Type":"CheckBox","Label":"Aggregate the data prior to plotting","LabelEmphasised":false,"Value":false,"Allowed":null,"Multi":false,"Prompt":"The data is 'raw', where each row represents an individual case. It needs to be aggregated prior to plotting.","ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formTidy","Page":null,"Group":"DATA MANIPULATION","Type":"CheckBox","Label":"Automatically tidy the data","LabelEmphasised":false,"Value":true,"Allowed":null,"Multi":false,"Prompt":"Automaticaly tidy the data.","ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formTranspose","Page":null,"Group":"DATA MANIPULATION","Type":"CheckBox","Label":"Switch rows and columns","LabelEmphasised":false,"Value":false,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formIgnoreRows","Page":null,"Group":"DATA MANIPULATION","Type":"TextBox","Label":"Rows to ignore","LabelEmphasised":false,"Value":"NET, Total, SUM","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formIgnoreColumns","Page":null,"Group":"DATA MANIPULATION","Type":"TextBox","Label":"Columns to ignore","LabelEmphasised":false,"Value":"NET, Total, SUM","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formAsPercentages","Page":null,"Group":"DATA MANIPULATION","Type":"CheckBox","Label":"Show as percentages","LabelEmphasised":false,"Value":false,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formPalette","Page":"Chart","Group":"DATA SERIES","Type":"ComboBox","Label":"Color palette","LabelEmphasised":false,"Value":"Default colors","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Default colors","Primary colors","Rainbow","Light pastels","Strong colors","Reds, dark to light","Reds, light to dark","Greens, dark to light","Greens, light to dark","Blues, dark to light","Blues, light to dark","Greys, dark to light","Greys, light to dark","Heat colors (red, yellow, white)","Terrain colors (green, beige, grey)","Custom color","Custom gradient","Custom palette"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formFont","Page":"Chart","Group":"FONT","Type":"ComboBox","Label":"Global font family","LabelEmphasised":false,"Value":"Arial","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Andale Mono","Arial","Arial Black","Century Gothic","Comic Sans MS","Courier New","Georgia","Impact","Open Sans","Times New Roman","Trebuchet MS","Verdana"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formLegendFontFamily","Page":"Chart","Group":"LEGEND","Type":"ComboBox","Label":"Legend font family","LabelEmphasised":false,"Value":"Arial","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Andale Mono","Arial","Arial Black","Century Gothic","Comic Sans MS","Courier New","Georgia","Impact","Open Sans","Times New Roman","Trebuchet MS","Verdana"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formLegendFontSize","Page":"Chart","Group":"LEGEND","Type":"NumericUpDown","Label":"Legend font size","LabelEmphasised":false,"Value":10.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Legend font size: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":0.0,"Max":100.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formCategoriesTitle","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"TextBox","Label":"Axis title","LabelEmphasised":false,"Value":"","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formCategoriesTitleFontFamily","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"ComboBox","Label":"Axis title font family","LabelEmphasised":false,"Value":"Arial","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Andale Mono","Arial","Arial Black","Century Gothic","Comic Sans MS","Courier New","Georgia","Impact","Open Sans","Times New Roman","Trebuchet MS","Verdana"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formCategoriesTitleFontSize","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"NumericUpDown","Label":"Axis title font size","LabelEmphasised":false,"Value":12.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis title font size: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":0.0,"Max":100.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formCategoriesTickFontFamily","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"ComboBox","Label":"Axis label font family","LabelEmphasised":false,"Value":"Arial","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Andale Mono","Arial","Arial Black","Century Gothic","Comic Sans MS","Courier New","Georgia","Impact","Open Sans","Times New Roman","Trebuchet MS","Verdana"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formCategoriesTickFontSize","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"NumericUpDown","Label":"Axis label font size","LabelEmphasised":false,"Value":10.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis label font size: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":0.0,"Max":100.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesTitle","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"TextBox","Label":"Axis title","LabelEmphasised":false,"Value":"","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesTitleFontFamily","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"ComboBox","Label":"Axis title font family","LabelEmphasised":false,"Value":"Arial","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Andale Mono","Arial","Arial Black","Century Gothic","Comic Sans MS","Courier New","Georgia","Impact","Open Sans","Times New Roman","Trebuchet MS","Verdana"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesTitleFontSize","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"NumericUpDown","Label":"Axis title font size","LabelEmphasised":false,"Value":12.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis title font size: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":0.0,"Max":100.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesAxisShow","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"CheckBox","Label":"Show axis","LabelEmphasised":false,"Value":true,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesNumberType","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"ComboBox","Label":"Number type","LabelEmphasised":false,"Value":"Automatic","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Automatic","Number","Percentage","Currency"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesPrefix","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"TextBox","Label":"Custom prefix","LabelEmphasised":false,"Value":"","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesSuffix","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"TextBox","Label":"Custom suffix","LabelEmphasised":false,"Value":"","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesTickFontFamily","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"ComboBox","Label":"Axis label font family","LabelEmphasised":false,"Value":"Arial","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Andale Mono","Arial","Arial Black","Century Gothic","Comic Sans MS","Courier New","Georgia","Impact","Open Sans","Times New Roman","Trebuchet MS","Verdana"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formValuesTickFontSize","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"NumericUpDown","Label":"Axis label font size","LabelEmphasised":false,"Value":10.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis label font size: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":0.0,"Max":100.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":null,"Page":null,"Group":null,"Type":null,"Label":null,"LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":true}]},"calculating":"Idle","showDebug":false,"layout":"OutputOnly","vSplit":0.25,"hSplit":0.45,"updateWarnings":true,"updateMode":"Manual","warnSlow":false,"Options":{"debugconsole":false,"codeposition":"OutputOnly","splitH":0.45,"splitV":0.25,"update warnings":true,"updating":"Manual","warn slow":false}}