{"size":{"Width":456,"Height":409},"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'>&gt;# VERSION 1.0.8\n</pre>\n<pre class='debug-source'>&gt;library(flipChart)\n</pre>\n<pre class='debug-source'>&gt;# Processing all the selections from the &#39;Inputs&#39; and &#39;Charts&#39; tab.\n</pre>\n<pre class='debug-source'>&gt;pd &lt;- PrepareData(formChartType, QFilter, QPopulationWeight, input.data.table = get0(&quot;formTable&quot;), input.data.tables = get0(&quot;formTables&quot;), input.data.raw = list(X = get0(&quot;formX&quot;), Y = get0(&quot;formY&quot;), Z1 = get0(&quot;formZ&quot;), Z2 = get0(&quot;formZ2&quot;), labels = get0(&quot;formScatterLabels&quot;)), input.data.pasted = list(get0(&quot;formPastedData&quot;), get0(&quot;formPastedFactor&quot;), get0(&quot;formPastedColumnNames&quot;), get0(&quot;formPastedRowNames&quot;), get0(&quot;formPastedDateConvention&quot;)), input.data.other = get0(&quot;formOther&quot;), data.source = get0(&quot;formDataSource&quot;), first.aggregate = get0(&quot;formFirstAggregate&quot;, ifnotfound = FALSE), tidy = get0(&quot;formTidy&quot;), transpose = get0(&quot;formTranspose&quot;), row.names.to.remove = get0(&quot;formIgnoreRows&quot;), column.names.to.remove = get0(&quot;formIgnoreColumns&quot;), as.percentages = get0(&quot;formAsPercentages&quot;, ifnotfound = FALSE), show.labels = !get0(&quot;formNames&quot;, ifnotfound=TRUE), values.title = get0(&quot;formValuesTitle&quot;))\n</pre>\n<pre class='debug-source'>&gt;pc &lt;- PrepareColors(pd$data, formChartType, scatter.colors.column = pd$scatter.variable.indices[&quot;colors&quot;], palette = get0(&quot;formPalette&quot;), palette.custom.color = get0(&quot;formCustomColor&quot;), palette.custom.gradient.start = get0(&quot;formCustomGradientStart&quot;), palette.custom.gradient.end = get0(&quot;formCustomGradientEnd&quot;), palette.custom.palette = get0(&quot;formCustomPalette&quot;), fit.palette = get0(&quot;formFitPalette&quot;), fit.palette.custom.color = get0(&quot;formFitCustomColor&quot;), fit.palette.custom.gradient.start = get0(&quot;formFitCustomGradientStart&quot;), fit.palette.custom.gradient.end = get0(&quot;formFitCustomGradientEnd&quot;), fit.palette.custom.palette = get0(&quot;formFitCustomPalette&quot;), subslice.palette = get0(&quot;formSubslicePalette&quot;), subslice.palette.custom.color = get0(&quot;formSubsliceCustomColor&quot;), subslice.palette.custom.gradient.start = get0(&quot;formSubsliceCustomGradientStart&quot;), subslice.palette.custom.gradient.end = get0(&quot;formSubsliceCustomGradientEnd&quot;), subslice.palette.custom.palette = get0(&quot;formSubsliceCustomPalette&quot;)) \n</pre>\n<pre class='debug-source'>&gt;pn &lt;- PrepareNumbers(categories.format.list = list(get0(&quot;formCategoriesNumberType&quot;), get0(&quot;formCategoriesDateType&quot;), get0(&quot;formCategoriesNumberCustom&quot;), get0(&quot;formCategoriesSeparateThousands&quot;), get0(&quot;formCategoriesDecimals&quot;)), values.format.list = list(get0(&quot;formValuesNumberType&quot;), get0(&quot;formValuesDateType&quot;), get0(&quot;formValuesNumberCustom&quot;), get0(&quot;formValuesSeparateThousands&quot;), get0(&quot;formValuesDecimals&quot;)), hover.format.list = list(get0(&quot;formHoverNumberType&quot;), get0(&quot;formHoverDateType&quot;), get0(&quot;formHoverNumberCustom&quot;), get0(&quot;formHoverSeparateThousands&quot;), get0(&quot;formHoverDecimals&quot;)), data.labels.format.list = list(get0(&quot;formDataLabelNumberType&quot;), get0(&quot;formDataLabelDateType&quot;), get0(&quot;formDataLabelCustom&quot;), get0(&quot;formDataLabelSeparateThousands&quot;), get0(&quot;formDataLabelDecimals&quot;)), !is.null(attr(pd$data, &quot;statistic&quot;)) &amp;&amp; grepl(&quot;%&quot;, attr(pd$data, &quot;statistic&quot;), fixed = TRUE))\n</pre>\n<pre class='debug-source'>&gt;\n</pre>\n<pre class='debug-source'>&gt;# Creating the chart.\n</pre>\n<pre class='debug-source'>&gt;chart.4 &lt;- CChart(chart.type = formChartType,\n x = pd$data,\n return.data = formChartOutput == &quot;Table&quot;,\n weights = pd$weights,\n series.stack = get0(&quot;formStackSeries&quot;, ifnotfound=FALSE),\n max.label.length = 0,\n #Scatter plot inputs.\n scatter.max.labels = get0(&quot;formScatterMaxLab&quot;, ifnotfound=20),\n scatter.labels.as.hovertext= if (exists(&quot;formScatterLabelType&quot;)) formScatterLabelType!=&quot;On chart&quot; else TRUE,\n scatter.colors.as.categorical = if (exists(&quot;formScatterColorType&quot;)) formScatterColorType==&quot;Categories&quot; else FALSE,\n scatter.sizes.as.diameter = if (exists(&quot;formScatterSizeType&quot;)) formScatterSizeType==&quot;Diameter&quot; else FALSE,\n scatter.x.column = pd$scatter.variable.indices[&quot;x&quot;],\n scatter.y.column = pd$scatter.variable.indices[&quot;y&quot;],\n scatter.sizes.column = pd$scatter.variable.indices[&quot;sizes&quot;],\n scatter.colors.column = pd$scatter.variable.indices[&quot;colors&quot;],\n trend.lines = get0(&quot;formTrendLines&quot;, 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(&quot;formFit&quot;, ifnotfound=&quot;None&quot;),\n fit.ignore.last = get0(&quot;formFitIgnoreLast&quot;),\n fit.line.type = get0(&quot;formFitLineType&quot;),\n fit.line.colors = pc$fit.line.colors,\n fit.line.width = get0(&quot;formFitLineWidth&quot;, ifnotfound=1),\n # Chart: DATA LABELS\n data.label.show = get0(&quot;formDataLabelShow&quot;, ifnotfound = FALSE),\n data.label.format = pn$data.labels.number.format,\n data.label.font.size = get0(&quot;formDataLabelFontSize&quot;),\n data.label.font.family = get0(&quot;formDataLabelFontFamily&quot;),\n data.label.font.color = get0(&quot;formDataLabelFontColor&quot;),\n data.label.prefix = get0(&quot;formPrefix&quot;, ifnotfound=&quot;&quot;),\n data.label.suffix = get0(&quot;formSuffix&quot;, ifnotfound=&quot;&quot;),\n data.label.position = get0(&quot;formDataLabelPosition&quot;, ifnotfound=&quot;top middle&quot;),\n data.label.align.horizontal = get0(&quot;formDataLabelHorizAlign&quot;, ifnotfound=&quot;Default&quot;),\n # Chart: FONT\n global.font.family = get0(&quot;formFont&quot;),\n global.font.color = get0(&quot;formFontColor&quot;),\n #Chart: GRIDLINES\n grid.show = get0(&quot;formShowGrid&quot;, ifnotfound=TRUE),\n # Chart: LEGEND\n legend.show = get0(&quot;formLegendShow&quot;, ifnotfound=TRUE),\n legend.title = get0(&quot;formLegendTitle&quot;),\n legend.font.family = get0(&quot;formLegendFontFamily&quot;),\n legend.font.color = get0(&quot;formLegendFontColor&quot;),\n legend.font.size = get0(&quot;formLegendFontSize&quot;),\n legend.x.position = get0(&quot;formLegendXPos&quot;, ifnotfound=1.02),\n legend.y.position = get0(&quot;formLegendYPos&quot;, ifnotfound=1.0),\n # Chart: TITLE\n title = get0(&quot;formTitle&quot;, ifnotfound=&quot;&quot;),\n title.font.family = get0(&quot;formTitleFontFamily&quot;),\n title.font.color = get0(&quot;formTitleFontColor&quot;),\n title.font.size = get0(&quot;formTitleFontSize&quot;),\n subtitle = get0(&quot;formSubtitle&quot;, ifnotfound=&quot;&quot;),\n subtitle.font.family = get0(&quot;formSubtitleFontFamily&quot;),\n subtitle.font.color = get0(&quot;formSubtitleFontColor&quot;),\n subtitle.font.size = get0(&quot;formSubtitleFontSize&quot;),\n footer = get0(&quot;formFooter&quot;, ifnotfound=&quot;&quot;),\n footer.font.family = get0(&quot;formFooterFontFamily&quot;),\n footer.font.color = get0(&quot;formFooterFontColor&quot;),\n footer.font.size = get0(&quot;formFooterFontSize&quot;),\n footer.wrap = get0(&quot;formFooterWrap&quot;, ifnotfound=FALSE),\n footer.wrap.nchar = get0(&quot;formFooterWrapNchar&quot;),\n #Chart: CATEGORIES_AXIS\n categories.axis.show = get0(&quot;formCategoriesAxisShow&quot;, ifnotfound=TRUE),\n categories.tick.show = get0(&quot;formCategoriesAxisShow&quot;, ifnotfound=TRUE),\n categories.tick.format = pn$categories.number.format,\n categories.tick.prefix = paste0(&quot;&quot;, get0(&quot;formCategoriesPrefix&quot;), get0(&quot;formCategoriesCurrency&quot;)), # currency is just another prefix\n categories.tick.suffix = get0(&quot;formCategoriesSuffix&quot;, ifnotfound=&quot;&quot;),\n categories.tick.interval = get0(&quot;formCategoriesTickInterval&quot;),\n categories.tick.units = get0(&quot;formCategoriesTickUnits&quot;),\n categories.title = get0(&quot;formCategoriesTitle&quot;, ifnotfound=&quot;&quot;),\n categories.title.font.family = get0(&quot;formCategoriesTitleFontFamily&quot;),\n categories.title.font.color = get0(&quot;formCategoriesTitleFontColor&quot;),\n categories.title.font.size = get0(&quot;formCategoriesTitleFontSize&quot;), \n categories.tick.font.family = get0(&quot;formCategoriesTickFontFamily&quot;),\n categories.tick.font.color = get0(&quot;formCategoriesTickFontColor&quot;),\n categories.tick.font.size = get0(&quot;formCategoriesTickFontSize&quot;, ifnotfound=10),\n categories.tick.angle = if (!exists(&quot;formCategoriesTickAngle&quot;)) NULL else switch(get0(&quot;formCategoriesTickAngle&quot;), Automatic=NULL, Horizontal=0, Vertical=90, Diagonal=45),\n categories.tick.label.wrap = get0(&quot;formLabelWrap&quot;, ifnotfound=FALSE),\n categories.tick.label.wrap.nchar = get0(&quot;formLabelWrapNchar&quot;, ifnotfound=100),\n categories.tick.align.horizontal = get0(&quot;formCategoriesTickHorizAlign&quot;, ifnotfound = &quot;Default&quot;),\n #Chart: VALUES_AXIS\n values.axis.show = get0(&quot;formValuesAxisShow&quot;),\n values.tick.show = get0(&quot;formValuesAxisShow&quot;, ifnotfound=TRUE),\n values.tick.format = pn$values.number.format,\n values.tick.prefix = paste0(&quot;&quot;, get0(&quot;formValuesPrefix&quot;), get0(&quot;formValuesCurrency&quot;)), # currency is just another prefix\n values.tick.suffix = get0(&quot;formValuesSuffix&quot;, ifnotfound=&quot;&quot;),\n values.title = pd$values.title,\n values.title.font.family = get0(&quot;formValuesTitleFontFamily&quot;),\n values.title.font.color = get0(&quot;formValuesTitleFontColor&quot;),\n values.title.font.size = get0(&quot;formValuesTitleFontSize&quot;),\n values.number.ticks = get0(&quot;formValuesNumberTicks&quot;),\n values.tick.font.size = get0(&quot;formValuesTickFontSize&quot;, ifnotfound=10),\n values.tick.font.family = get0(&quot;formValuesTickFontFamily&quot;),\n values.tick.font.color = get0(&quot;formValuesTickFontColor&quot;),\n # Chart: HOVER\n values.hovertext.format = pn$hover.number.format,\n # Chart: MARGINS\n margin.top = get0(&quot;formMarginTop&quot;),\n margin.left = get0(&quot;formMarginLeft&quot;),\n margin.bottom = get0(&quot;formMarginBottom&quot;),\n margin.right = get0(&quot;formMarginRight&quot;),\n # Chart: APPEARANCE\n pie.inner.radius = get0(&quot;formPieRadius&quot;),\n pie.border.color = get0(&quot;formBorderColor&quot;),\n density.color = get0(&quot;formDensityColor&quot;),\n vertical = get0(&quot;formVertical&quot;),\n show.mean = get0(&quot;formShowMean&quot;),\n show.median = get0(&quot;formShowMedian&quot;),\n show.quartiles = get0(&quot;formShowQuartiles&quot;),\n show.range = get0(&quot;formShowRange&quot;),\n show.values = get0(&quot;formShowValues&quot;),\n histogram.cumulative = get0(&quot;formHistogramCumulative&quot;),\n histogram.counts = get0(&quot;formHistogramCounts&quot;),\n maximum.bins = get0(&quot;formMaximumBins&quot;),\n box.points = get0(&quot;formBoxPoints&quot;),\n mean.color = get0(&quot;formMeanColor&quot;),\n median.color = get0(&quot;formMedianColor&quot;),\n quartile.color = get0(&quot;formQuartilesColor&quot;),\n range.color = get0(&quot;formRangeColor&quot;),\n values.color = get0(&quot;formValuesColor&quot;),\n window.start = get0(&quot;formWindowStart&quot;),\n range.bars = get0(&quot;formRangeBars&quot;),\n # BarPictograph parameters\n image = get0(&quot;formIcon&quot;),\n custom.image = get0(&quot;formCustomIcon&quot;),\n base.image = get0(&quot;formBaseImage&quot;, ifnotfound = &quot;&quot;), \n hide.base.image = get0(&quot;formHideBase&quot;, ifnotfound = FALSE),\n base.icon.color = get0(&quot;formBaseColor&quot;, ifnotfound = &quot;&quot;),\n scale = if (exists(&quot;formIconScale&quot;)) as.numeric(formIconScale), \n total.icons = if (exists(&quot;formTotalIcons&quot;)) as.numeric(formTotalIcons),\n icon.ncol = if (exists(&quot;formIconNCol&quot;)) as.numeric(formIconNCol),\n fix.icon.nrow = get0(&quot;formFixNRows&quot;, ifnotfound = TRUE),\n fill.direction = get0(&quot;formFillDirection&quot;),\n label.color.asIcon = get0(&quot;formLabelColorAsIcon&quot;, ifnotfound = FALSE),\n categories.tick.align = get0(&quot;formCategoriesTickAlign&quot;),\n pad.row = get0(&quot;formIconPadding&quot;, ifnotfound = 0),\n graphic.width.inch = QOutputSizeWidth,\n graphic.height.inch = QOutputSizeHeight,\n # GeographicMap parameters\n mapping.package = get0(&quot;formMapPackage&quot;),\n high.resolution = get0(&quot;formHighRes&quot;, ifnotfound = TRUE),\n treat.NA.as.0 = get0(&quot;formNAasZero&quot;, ifnotfound = FALSE),\n color.NA = get0(&quot;formNAColor&quot;), \n ocean.color = get0(&quot;formOceanColor&quot;), \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.34s</td></tr>\r\n<tr><th>Time on R server:</th><td title=\"rApacheServe 2.33s (pre 0.00s, post 0.00s) httpget_code() setup for eval 0.00s session$eval 2.26s (pre 0.00s, post 0.06s) unexplained 0.07s apparmor forking (pre 0.00s, post 0.00s)\">2.33s</td></tr>\r\n<tr><th>Time evaluating code:</th><td>2.15s</td></tr>\r\n<tr><th>Bytes sent:</th><td>22,950</td></tr>\r\n<tr><th>Bytes received:</th><td>45,081</td></tr>\r\n</table>\r\n</div>","message":"Loading required package: xts\n\r\nLoading required package: zoo\n\r\n\nAttaching package: 'zoo'\n\n\r\nThe following objects are masked from 'package:base':\n\n as.Date, as.Date.numeric\n\n\r\nLoading required package: TTR\n\r\nVersion 0.4-0 included new data defaults. See ?getSymbols.\n\r\nLoading required package: flipU\n\r\nLoading required package: flipTime\n\r\nLoading required package: reshape2\n\r\nLoading required package: flipStandardCharts\n","htmlwidgets":"<div id=\"htmlwidget_container\">\n <div id=\"htmlwidget-bd8f06dab709041ad3e0\" style=\"width:960px;height:500px;\" class=\"dygraphs html-widget\"></div>\n</div>\n<script type=\"application/json\" data-for=\"htmlwidget-bd8f06dab709041ad3e0\">{\"x\":{\"attrs\":{\"title\":\"\",\"xlabel\":\"\",\"ylabel\":\"\",\"labels\":[\"day\",\"BARC.L.Close\"],\"legend\":\"auto\",\"retainDateWindow\":false,\"axes\":{\"x\":{\"pixelsPerLabel\":60}},\"customBars\":true,\"series\":{\"BARC.L.Close\":{\"axis\":\"y\"}},\"colors\":[\"#CB181D\"],\"showRangeSelector\":true,\"dateWindow\":[\"2017-06-11T00:00:00.000Z\",\"2017-12-08T00:00:00.000Z\"],\"rangeSelectorHeight\":40,\"rangeSelectorPlotFillColor\":\"#CB181D\",\"rangeSelectorPlotStrokeColor\":\"#808FAB\",\"interactionModel\":\"Dygraph.Interaction.defaultModel\"},\"scale\":\"daily\",\"annotations\":[],\"shadings\":[],\"events\":[],\"format\":\"date\",\"data\":[[\"2016-12-12T00:00:00.000Z\",\"2016-12-13T00:00:00.000Z\",\"2016-12-14T00:00:00.000Z\",\"2016-12-15T00:00:00.000Z\",\"2016-12-16T00:00:00.000Z\",\"2016-12-19T00:00:00.000Z\",\"2016-12-20T00:00:00.000Z\",\"2016-12-21T00:00:00.000Z\",\"2016-12-22T00:00:00.000Z\",\"2016-12-23T00:00:00.000Z\",\"2016-12-28T00:00:00.000Z\",\"2016-12-29T00:00:00.000Z\",\"2016-12-30T00:00:00.000Z\",\"2017-01-03T00:00:00.000Z\",\"2017-01-04T00:00:00.000Z\",\"2017-01-05T00:00:00.000Z\",\"2017-01-06T00:00:00.000Z\",\"2017-01-09T00:00:00.000Z\",\"2017-01-10T00:00:00.000Z\",\"2017-01-11T00:00:00.000Z\",\"2017-01-12T00:00:00.000Z\",\"2017-01-13T00:00:00.000Z\",\"2017-01-16T00:00:00.000Z\",\"2017-01-17T00:00:00.000Z\",\"2017-01-18T00:00:00.000Z\",\"2017-01-19T00:00:00.000Z\",\"2017-01-20T00:00:00.000Z\",\"2017-01-23T00:00:00.000Z\",\"2017-01-24T00:00:00.000Z\",\"2017-01-25T00:00:00.000Z\",\"2017-01-26T00:00:00.000Z\",\"2017-01-27T00:00:00.000Z\",\"2017-01-30T00:00:00.000Z\",\"2017-01-31T00:00:00.000Z\",\"2017-02-01T00:00:00.000Z\",\"2017-02-02T00:00:00.000Z\",\"2017-02-03T00:00:00.000Z\",\"2017-02-06T00:00:00.000Z\",\"2017-02-07T00:00:00.000Z\",\"2017-02-08T00:00:00.000Z\",\"2017-02-09T00:00:00.000Z\",\"2017-02-10T00:00:00.000Z\",\"2017-02-13T00:00:00.000Z\",\"2017-02-14T00:00:00.000Z\",\"2017-02-15T00:00:00.000Z\",\"2017-02-16T00:00:00.000Z\",\"2017-02-17T00:00:00.000Z\",\"2017-02-20T00:00:00.000Z\",\"2017-02-21T00:00:00.000Z\",\"2017-02-22T00:00:00.000Z\",\"2017-02-23T00:00:00.000Z\",\"2017-02-24T00:00:00.000Z\",\"2017-02-27T00:00:00.000Z\",\"2017-02-28T00:00:00.000Z\",\"2017-03-01T00:00:00.000Z\",\"2017-03-02T00:00:00.000Z\",\"2017-03-03T00:00:00.000Z\",\"2017-03-06T00:00:00.000Z\",\"2017-03-07T00:00:00.000Z\",\"2017-03-08T00:00:00.000Z\",\"2017-03-09T00:00:00.000Z\",\"2017-03-10T00:00:00.000Z\",\"2017-03-13T00:00:00.000Z\",\"2017-03-14T00:00:00.000Z\",\"2017-03-15T00:00:00.000Z\",\"2017-03-16T00:00:00.000Z\",\"2017-03-17T00:00:00.000Z\",\"2017-03-20T00:00:00.000Z\",\"2017-03-21T00:00:00.000Z\",\"2017-03-22T00:00:00.000Z\",\"2017-03-23T00:00:00.000Z\",\"2017-03-24T00:00:00.000Z\",\"2017-03-27T00:00:00.000Z\",\"2017-03-28T00:00:00.000Z\",\"2017-03-29T00:00:00.000Z\",\"2017-03-30T00:00:00.000Z\",\"2017-03-31T00:00:00.000Z\",\"2017-04-03T00:00:00.000Z\",\"2017-04-04T00:00:00.000Z\",\"2017-04-05T00:00:00.000Z\",\"2017-04-06T00:00:00.000Z\",\"2017-04-07T00:00:00.000Z\",\"2017-04-10T00:00:00.000Z\",\"2017-04-11T00:00:00.000Z\",\"2017-04-12T00:00:00.000Z\",\"2017-04-13T00:00:00.000Z\",\"2017-04-18T00:00:00.000Z\",\"2017-04-19T00:00:00.000Z\",\"2017-04-20T00:00:00.000Z\",\"2017-04-21T00:00:00.000Z\",\"2017-04-24T00:00:00.000Z\",\"2017-04-25T00:00:00.000Z\",\"2017-04-26T00:00:00.000Z\",\"2017-04-27T00:00:00.000Z\",\"2017-04-28T00:00:00.000Z\",\"2017-05-02T00:00:00.000Z\",\"2017-05-03T00:00:00.000Z\",\"2017-05-04T00:00:00.000Z\",\"2017-05-05T00:00:00.000Z\",\"2017-05-08T00:00:00.000Z\",\"2017-05-09T00:00:00.000Z\",\"2017-05-10T00:00:00.000Z\",\"2017-05-11T00:00:00.000Z\",\"2017-05-12T00:00:00.000Z\",\"2017-05-15T00:00:00.000Z\",\"2017-05-16T00:00:00.000Z\",\"2017-05-17T00:00:00.000Z\",\"2017-05-18T00:00:00.000Z\",\"2017-05-19T00:00:00.000Z\",\"2017-05-22T00:00:00.000Z\",\"2017-05-23T00:00:00.000Z\",\"2017-05-24T00:00:00.000Z\",\"2017-05-25T00:00:00.000Z\",\"2017-05-26T00:00:00.000Z\",\"2017-05-30T00:00:00.000Z\",\"2017-05-31T00:00:00.000Z\",\"2017-06-01T00:00:00.000Z\",\"2017-06-02T00:00:00.000Z\",\"2017-06-05T00:00:00.000Z\",\"2017-06-06T00:00:00.000Z\",\"2017-06-07T00:00:00.000Z\",\"2017-06-08T00:00:00.000Z\",\"2017-06-09T00:00:00.000Z\",\"2017-06-12T00:00:00.000Z\",\"2017-06-13T00:00:00.000Z\",\"2017-06-14T00:00:00.000Z\",\"2017-06-15T00:00:00.000Z\",\"2017-06-16T00:00:00.000Z\",\"2017-06-19T00:00:00.000Z\",\"2017-06-20T00:00:00.000Z\",\"2017-06-21T00:00:00.000Z\",\"2017-06-22T00:00:00.000Z\",\"2017-06-23T00:00:00.000Z\",\"2017-06-26T00:00:00.000Z\",\"2017-06-27T00:00:00.000Z\",\"2017-06-28T00:00:00.000Z\",\"2017-06-29T00:00:00.000Z\",\"2017-06-30T00:00:00.000Z\",\"2017-07-03T00:00:00.000Z\",\"2017-07-04T00:00:00.000Z\",\"2017-07-05T00:00:00.000Z\",\"2017-07-06T00:00:00.000Z\",\"2017-07-07T00:00:00.000Z\",\"2017-07-10T00:00:00.000Z\",\"2017-07-11T00:00:00.000Z\",\"2017-07-12T00:00:00.000Z\",\"2017-07-13T00:00:00.000Z\",\"2017-07-14T00:00:00.000Z\",\"2017-07-17T00:00:00.000Z\",\"2017-07-18T00:00:00.000Z\",\"2017-07-19T00:00:00.000Z\",\"2017-07-20T00:00:00.000Z\",\"2017-07-21T00:00:00.000Z\",\"2017-07-24T00:00:00.000Z\",\"2017-07-25T00:00:00.000Z\",\"2017-07-26T00:00:00.000Z\",\"2017-07-27T00:00:00.000Z\",\"2017-07-28T00:00:00.000Z\",\"2017-07-31T00:00:00.000Z\",\"2017-08-01T00:00:00.000Z\",\"2017-08-02T00:00:00.000Z\",\"2017-08-03T00:00:00.000Z\",\"2017-08-04T00:00:00.000Z\",\"2017-08-07T00:00:00.000Z\",\"2017-08-08T00:00:00.000Z\",\"2017-08-09T00:00:00.000Z\",\"2017-08-10T00:00:00.000Z\",\"2017-08-11T00:00:00.000Z\",\"2017-08-14T00:00:00.000Z\",\"2017-08-15T00:00:00.000Z\",\"2017-08-16T00:00:00.000Z\",\"2017-08-17T00:00:00.000Z\",\"2017-08-18T00:00:00.000Z\",\"2017-08-21T00:00:00.000Z\",\"2017-08-22T00:00:00.000Z\",\"2017-08-23T00:00:00.000Z\",\"2017-08-24T00:00:00.000Z\",\"2017-08-25T00:00:00.000Z\",\"2017-08-29T00:00:00.000Z\",\"2017-08-30T00:00:00.000Z\",\"2017-08-31T00:00:00.000Z\",\"2017-09-01T00:00:00.000Z\",\"2017-09-04T00:00:00.000Z\",\"2017-09-05T00:00:00.000Z\",\"2017-09-06T00:00:00.000Z\",\"2017-09-07T00:00:00.000Z\",\"2017-09-08T00:00:00.000Z\",\"2017-09-11T00:00:00.000Z\",\"2017-09-12T00:00:00.000Z\",\"2017-09-13T00:00:00.000Z\",\"2017-09-14T00:00:00.000Z\",\"2017-09-15T00:00:00.000Z\",\"2017-09-18T00:00:00.000Z\",\"2017-09-19T00:00:00.000Z\",\"2017-09-20T00:00:00.000Z\",\"2017-09-21T00:00:00.000Z\",\"2017-09-22T00:00:00.000Z\",\"2017-09-25T00:00:00.000Z\",\"2017-09-26T00:00:00.000Z\",\"2017-09-27T00:00:00.000Z\",\"2017-09-28T00:00:00.000Z\",\"2017-09-29T00:00:00.000Z\",\"2017-10-02T00:00:00.000Z\",\"2017-10-03T00:00:00.000Z\",\"2017-10-04T00:00:00.000Z\",\"2017-10-05T00:00:00.000Z\",\"2017-10-06T00:00:00.000Z\",\"2017-10-09T00:00:00.000Z\",\"2017-10-10T00:00:00.000Z\",\"2017-10-11T00:00:00.000Z\",\"2017-10-12T00:00:00.000Z\",\"2017-10-13T00:00:00.000Z\",\"2017-10-16T00:00:00.000Z\",\"2017-10-17T00:00:00.000Z\",\"2017-10-18T00:00:00.000Z\",\"2017-10-19T00:00:00.000Z\",\"2017-10-20T00:00:00.000Z\",\"2017-10-23T00:00:00.000Z\",\"2017-10-24T00:00:00.000Z\",\"2017-10-25T00:00:00.000Z\",\"2017-10-26T00:00:00.000Z\",\"2017-10-27T00:00:00.000Z\",\"2017-10-30T00:00:00.000Z\",\"2017-10-31T00:00:00.000Z\",\"2017-11-01T00:00:00.000Z\",\"2017-11-02T00:00:00.000Z\",\"2017-11-03T00:00:00.000Z\",\"2017-11-06T00:00:00.000Z\",\"2017-11-07T00:00:00.000Z\",\"2017-11-08T00:00:00.000Z\",\"2017-11-09T00:00:00.000Z\",\"2017-11-10T00:00:00.000Z\",\"2017-11-13T00:00:00.000Z\",\"2017-11-14T00:00:00.000Z\",\"2017-11-15T00:00:00.000Z\",\"2017-11-16T00:00:00.000Z\",\"2017-11-17T00:00:00.000Z\",\"2017-11-20T00:00:00.000Z\",\"2017-11-21T00:00:00.000Z\",\"2017-11-22T00:00:00.000Z\",\"2017-11-23T00:00:00.000Z\",\"2017-11-24T00:00:00.000Z\",\"2017-11-27T00:00:00.000Z\",\"2017-11-28T00:00:00.000Z\",\"2017-11-29T00:00:00.000Z\",\"2017-11-30T00:00:00.000Z\",\"2017-12-01T00:00:00.000Z\",\"2017-12-04T00:00:00.000Z\",\"2017-12-05T00:00:00.000Z\",\"2017-12-06T00:00:00.000Z\",\"2017-12-07T00:00:00.000Z\",\"2017-12-08T00:00:00.000Z\"],[[227.024994,227.550003,234.199997],[225.988998,230.100006,231.350006],[221.75,221.75,228.25],[221.25,229.449997,230.25],[226.794998,228.149994,230.149994],[221.25,222.050003,227.306],[221.619003,227.649994,227.75],[225.5,228.75,229.300003],[225.600006,227,229.800003],[223.195999,224.949997,227.399994],[223.5,224.75,226.050003],[220.5,222.350006,223.649994],[220.082993,223.449997,223.449997],[223.449997,231.899994,234.550003],[231.169998,235,235],[230.850006,232.550003,236.899994],[231.5,235.25,235.949997],[232.550003,234.050003,240],[230.050003,236.25,237.300003],[231.75,234.199997,237.5],[231.699997,232.25,235.050003],[231.050003,235.25,236.149994],[229.199997,231.100006,233.5],[229,231.600006,235.550003],[226.25,227.600006,235.016998],[226.800003,228.300003,235.016998],[226.399994,227.399994,229.449997],[222.149994,224.5,225.300003],[225.75,228.649994,229.399994],[230.050003,230.850006,233],[231.600006,232.350006,236.179993],[228.449997,230.600006,234.574997],[222.800003,223.399994,228.100006],[219.100006,219.449997,226.050003],[219.949997,222.100006,223.949997],[220.199997,221.350006,224.699997],[221.300003,228.850006,230.149994],[227.354996,227.399994,233.350006],[225.449997,226.050003,229.149994],[221.100006,224.949997,227.800003],[225.649994,229.550003,230.199997],[226.600006,228.649994,231.350006],[228.25,232.350006,233.350006],[230.699997,235.25,236.600006],[234.738007,239.25,241],[237.311996,238,240.699997],[233.550003,237,237.207993],[236.955002,237.5,240.018005],[233.5,235.949997,237.550003],[233.199997,235.149994,240.199997],[224.75,229.050003,244.399994],[221.975006,225.899994,238.824997],[224.100006,225,228.550003],[222.75,226.5,227.449997],[224.582001,232.899994,233.399994],[229.100006,229.5,235.149994],[225.25,231.399994,231.800003],[226.899994,226.949997,229.949997],[226.100006,227.050003,228.649994],[225.949997,232.300003,233.699997],[230,232.199997,233.5],[230.850006,231.850006,234.149994],[229,230.199997,232],[225.949997,226.550003,230.5],[225.649994,227.5,228.800003],[227.600006,229.449997,230.199997],[229.087006,230.399994,235.350006],[227.850006,228.300003,230.75],[227.449997,230,233.237],[221.940002,224.550003,229.440002],[222.949997,223.899994,225.5],[224.725006,226.949997,227.75],[220.899994,224.199997,229.949997],[224,228.100006,228.399994],[224.949997,227.300003,228.962997],[224.699997,228.050003,228.449997],[225.087997,225.100006,227.949997],[220.399994,221.449997,225.25],[216.699997,217.75,223],[215.800003,218.600006,219.923996],[213.600006,216.399994,217.300003],[213.731995,215.300003,215.649994],[212.75,216.199997,216.850006],[213.699997,215,217.613007],[213.5,213.699997,218.108002],[210.100006,212.649994,213.75],[205.600006,207.300003,213],[206.399994,208.5,209.899994],[206.100006,207.75,209.399994],[205.886993,207.949997,209.399994],[213.626999,219.199997,220.149994],[217.699997,222.800003,223.399994],[220.100006,224.649994,225.5],[223.149994,223.949997,225.149994],[207.75,212.25,218.091003],[207.199997,209.850006,211.699997],[205.800003,208.949997,209.949997],[207.949997,211.850006,212.100006],[205.75,206.350006,209.899994],[204.5,204.899994,209.350006],[204.824005,205.300003,207.147003],[205.5,209.949997,210.399994],[205.649994,206.550003,210.899994],[204.75,205.899994,206.455002],[205.5,210.600006,210.899994],[209.199997,211.600006,213.25],[208.600006,209.5,213.300003],[205.100006,212.25,213.149994],[210.138,213.699997,214.149994],[212.681,213.649994,216.100006],[213.649994,214.25,217.25],[213.199997,216.449997,216.725006],[212.949997,214.050003,217.100006],[209.587006,211.649994,213.75],[208.300003,209.199997,211.649994],[206.600006,210,215.404999],[208.098999,211.100006,214.557007],[210.473999,210.899994,214.449997],[209.544998,211.699997,211.899994],[208.899994,209.5,211.600006],[208.050003,208.149994,213.949997],[202.300003,205.399994,209.149994],[202.100006,206.600006,207.550003],[204.199997,205.25,207.639008],[205.649994,206.300003,208.300003],[203.5,203.5,208.199997],[200.800003,203.149994,203.800003],[201.699997,203.25,206.300003],[204.149994,206.75,207.399994],[202.789001,202.800003,207.050003],[199.699997,200.149994,202.149994],[195.449997,196,199.75],[194.449997,197.550003,198.899994],[197.475006,197.475006,202.100006],[199.699997,202.610992,203.850006],[200.899994,203.449997,204.600006],[205.100006,205.5,210.263],[202,202.75,207.149994],[203.550003,207.050003,207.600006],[205.300003,206.949997,209.350006],[203.436005,204.199997,207.300003],[203.649994,209.149994,210],[206.5,208.149994,209.550003],[206.362,207.699997,210],[205.175995,205.75,208.949997],[206,208,210.199997],[208.5,211.300003,213.149994],[207.350006,208.5,212.600006],[207.026001,209.050003,209.800003],[204.550003,205.050003,209.25],[204.149994,206.300003,206.649994],[205.050003,208.199997,208.850006],[203.800003,205.050003,207.850006],[203.373993,205.5,207.876999],[206.350006,209.699997,211.050003],[208.399994,211.199997,212.75],[207.949997,208.600006,211.300003],[202.449997,205.100006,213.899994],[201.199997,203,206.399994],[203.649994,206.600006,207.399994],[205.615005,207.699997,208],[205.199997,208.5,208.850006],[207.25,210.350006,210.75],[209.179993,210,211],[209.449997,210.350006,211.199997],[206.300003,208.75,209.850006],[204.365005,204.800003,210],[198.949997,199.350006,203.912994],[199.5,199.800003,202.5],[199.199997,200.449997,202.149994],[200.738998,200.75,201.949997],[196.895004,197.25,200.649994],[193.300003,195.649994,196.199997],[192.25,193.25,194.600006],[192.850006,193.300003,194.949997],[192.100006,192.850006,194.75],[193.050003,194.5,195.699997],[194.199997,194.300003,195.839996],[189.429993,190.350006,194.300003],[190.688995,190.699997,193.5],[190,191.100006,192.25],[190.300003,192.149994,194.399994],[189.449997,190.199997,191.399994],[187.5,187.899994,190.625],[184.699997,185.850006,187.600006],[183.850006,184,186.75],[183.100006,187.600006,188.399994],[183.901993,186.649994,189],[185.692993,191.350006,192.5],[189.699997,191.550003,193.75],[188.850006,189.800003,192.600006],[186.050003,186.649994,190.414001],[186.800003,187.449997,190.414001],[185.899994,188.300003,189],[184.699997,185.899994,188.199997],[186,190.399994,191.600006],[186.5,191.550003,191.949997],[188.800003,189.699997,190.649994],[187.800003,188.300003,189.949997],[188.300003,190.25,192.199997],[191.100006,192.199997,195.350006],[191.5,193.350006,194.050003],[191.225006,192.699997,194.149994],[192.518005,193.649994,194.100006],[192,192.350006,194.050003],[189,190.149994,192.149994],[189.399994,190.199997,191.600006],[187.600006,188.350006,191.100006],[188.199997,190,191.199997],[189.449005,190.399994,191.496002],[189.800003,193.050003,193.399994],[189.649994,191.25,192.748993],[188.699005,189.25,192],[189.300003,191.350006,192.800003],[190.100006,192.649994,192.899994],[191.050003,192,193.199997],[193.050003,195.699997,195.720001],[193.149994,195.449997,195.75],[194.602997,198,198.164993],[195.699997,197,198.600006],[180.399994,182.399994,190.938995],[182.300003,183.800003,185.399994],[182.949997,183.5,185.949997],[183.690002,185.949997,186.649994],[183.5,184.100006,186.910004],[183.550003,185,186.149994],[182.800003,183.25,185],[179.850006,182,183.300003],[181.339996,181.350006,183.25],[179.25,179.449997,181.399994],[178.399994,179.449997,180.550003],[178.449997,179.149994,180.199997],[177.300003,178.899994,179.449997],[178.75,180.699997,181.300003],[178.600006,182.399994,182.649994],[182.449997,185.449997,186.050003],[183.75,185,186.100006],[186.149994,188.75,189.25],[187.949997,189.199997,190.300003],[188.5,189.199997,190.149994],[187.75,188.75,189.850006],[187.800003,189.350006,189.850006],[185.550003,187.5,189.5],[184.050003,187.350006,187.350006],[189.649994,194.25,194.449997],[191.699997,193.5,195.75],[188.850006,189.399994,193],[191.949997,194.25,195.449997],[190.550003,191.699997,194.899994],[189.050003,191,191.5],[190.75,191.466995,192.5],[192.100006,196.399994,198.649994]]],\"css\":\".dygraph-title {\\n color: ;\\n font-size: px;\\n font-family: ;\\n font-weight: bold;\\n }\\n .dygraph-label.dygraph-xlabel {\\n color: #2C2C2C;\\n font-size: 12px;\\n font-family: Arial;\\n }\\n .dygraph-label.dygraph-ylabel {\\n color: #2C2C2C;\\n font-size: 12px;\\n font-family: Arial;\\n }\\n .dygraph-axis-label.dygraph-axis-label-x {\\n color: #2C2C2C;\\n font-size: 10px;\\n font-family: Arial;\\n }\\n .dygraph-axis-label.dygraph-axis-label-y {\\n color: #2C2C2C;\\n font-size10px;\\n font-family: Arial;\\n }\"},\"evals\":[\"attrs.interactionModel\"],\"jsHooks\":[]}</script>\n<script type=\"application/htmlwidget-sizing\" data-for=\"htmlwidget-bd8f06dab709041ad3e0\">{\"viewer\":{\"width\":450,\"height\":350,\"padding\":10,\"fill\":true},\"browser\":{\"width\":960,\"height\":500,\"padding\":40,\"fill\":true}}</script>","htmlwidget-head":"{\"stylesheets\":[\"https://rserverhtmlwidgetasset.azureedge.net/dygraph-c78e2138ac392de6711e8d89898cbd9d.css\"],\"javascript\":[\"https://rserverhtmlwidgetasset.azureedge.net/htmlwidgets-cd5c5716917807e1b69e2493221698b2.js\",\"https://rserverhtmlwidgetasset.azureedge.net/jquery.min-645e33b8208e68b0315cb73eeb3c47cf.js\",\"https://rserverhtmlwidgetasset.azureedge.net/dygraph-combined-8539fb538a49842eda63f0f16c21fbde.js\",\"https://rserverhtmlwidgetasset.azureedge.net/moment-0b08a4081a859452f6c02ac46514226e.js\",\"https://rserverhtmlwidgetasset.azureedge.net/moment-timezone-with-data-74217cafc5e4e292ceea9bdcf6bf3b1f.js\",\"https://rserverhtmlwidgetasset.azureedge.net/moment-fquarter.min-4c8609abfdcfa5eb1ffee93f174c5b25.js\",\"https://rserverhtmlwidgetasset.azureedge.net/dygraphs-c662247161934ee8cfeb0fa780c44bf4.js\"],\"attachments\":[],\"widget-cannot-re-render\":false}","warning":""},"secondsTaken":2.3440006,"updated":"2017-12-11T01:10:01.0239722Z","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.4 <- 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.4 <- 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":2934,"length":13,"index":4},{"start":2984,"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.11\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: \"Column\", 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', 'variables'];\t \n INPUTS = ['x', 'y', 'firstAggregate'];\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: \"Show range bars (data are low, value and high)\", default_value: false});\n if (APPEARANCE.indexOf(\"WindowStart\") > -1)\n form.numericUpDown({name: \"formWindowStart\", label: \"Window start (days from data end)\", default_value: 30, maximum: 100000});\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":"Time Series","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":"The location of the data to be used in the chart.","ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Type or paste in data","Link to a table 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":"33ac9871-c193-4d26-8f23-2f7d35e3784e","Allowed":["58c4836a-7936-4a14-8e09-a1b67ddea935","33ac9871-c193-4d26-8f23-2f7d35e3784e","bbd89e48-d4f8-41ae-81bc-d2c5efba84ef","7aaa2a66-5d11-4049-a297-0de1a33b975a","f3d83029-b95a-4b5e-9ca9-337989dcf96f","5e3e1e1c-ddab-4b62-96a1-63bd2344f5d0"],"EmptyListMessage":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"],"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":"formTidy","Page":null,"Group":"DATA MANIPULATION","Type":"CheckBox","Label":"Automatically tidy the data","LabelEmphasised":false,"Value":true,"Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":"Automaticaly tidy the data.","ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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":"formRangeBars","Page":"Chart","Group":"APPEARANCE","Type":"CheckBox","Label":"Show range bars (data are low, value and high)","LabelEmphasised":false,"Value":true,"Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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":"formWindowStart","Page":"Chart","Group":"APPEARANCE","Type":"NumericUpDown","Label":"Window start (days from data end)","LabelEmphasised":false,"Value":180.0,"Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Window start (days from data end): ","Invalid":null,"Required":false,"AllowedTypes":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":0.0,"Max":100000.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formPalette","Page":"Chart","Group":"DATA SERIES","Type":"ComboBox","Label":"Color palette","LabelEmphasised":false,"Value":"Reds, dark to light","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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":"formFontColor","Page":"Chart","Group":"FONT","Type":"ColorPicker","Label":"Global font color","LabelEmphasised":false,"Value":"rgb(44, 44, 44)","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Global font color: ","Invalid":null,"Required":false,"AllowedTypes":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":"formTitle","Page":"Chart","Group":"Title","Type":"TextBox","Label":"Title","LabelEmphasised":false,"Value":"","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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":"formCategoriesTitle","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"TextBox","Label":"Axis title","LabelEmphasised":false,"Value":"","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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":"formCategoriesTitleFontColor","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"ColorPicker","Label":"Axis title font color","LabelEmphasised":false,"Value":"rgb(44, 44, 44)","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis title font color: ","Invalid":null,"Required":false,"AllowedTypes":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":"formCategoriesTitleFontSize","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"NumericUpDown","Label":"Axis title font size","LabelEmphasised":false,"Value":12.0,"Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis title font size: ","Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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":"formCategoriesTickFontColor","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"ColorPicker","Label":"Axis label font color","LabelEmphasised":false,"Value":"rgb(44, 44, 44)","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis label font color: ","Invalid":null,"Required":false,"AllowedTypes":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":"formCategoriesTickFontSize","Page":"Chart","Group":"CATEGORIES (X) AXIS","Type":"NumericUpDown","Label":"Axis label font size","LabelEmphasised":false,"Value":10.0,"Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis label font size: ","Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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":"formValuesTitleFontColor","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"ColorPicker","Label":"Axis title font color","LabelEmphasised":false,"Value":"rgb(44, 44, 44)","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis title font color: ","Invalid":null,"Required":false,"AllowedTypes":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":"formValuesTitleFontSize","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"NumericUpDown","Label":"Axis title font size","LabelEmphasised":false,"Value":12.0,"Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis title font size: ","Invalid":null,"Required":false,"AllowedTypes":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":"formValuesTickFontFamily","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"ComboBox","Label":"Axis label font family","LabelEmphasised":false,"Value":"Arial","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":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":"formValuesTickFontColor","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"ColorPicker","Label":"Axis label font color","LabelEmphasised":false,"Value":"rgb(44, 44, 44)","Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis label font color: ","Invalid":null,"Required":false,"AllowedTypes":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":"formValuesTickFontSize","Page":"Chart","Group":"VALUES (Y) AXIS","Type":"NumericUpDown","Label":"Axis label font size","LabelEmphasised":false,"Value":10.0,"Allowed":null,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":"Axis label font size: ","Invalid":null,"Required":false,"AllowedTypes":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,"EmptyListMessage":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":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":"Automatic","warnSlow":true,"Options":{"debugconsole":false,"codeposition":"OutputOnly","splitH":0.45,"splitV":0.25,"update warnings":true,"updating":"Automatic","warn slow":true}}