(function () { var script = document.getElementById('highcharts-script'); function addChart() { function parseData(completeHandler, chartOptions) { try { var dataOptions = { "seriesMapping": [ { "x": 0 } ], "columnTypes": [ "string", "float" ], "csv": ",\nNovember 2012,100\nMay 2014,300\nJune 2015,400\nMarch 2016,500" }; dataOptions.sort = true dataOptions.complete = completeHandler; Highcharts.data(dataOptions, chartOptions); } catch (error) { console.log(error); completeHandler(undefined); } } var shareUrl = 'https://cloud.highcharts.com/show/ahygyky'; var encodedUrl = encodeURIComponent(shareUrl); Highcharts.setOptions({ "lang": { "decimalPoint": ".", "thousandsSep": "," } }); var template = { chart: { renderTo: 'highcharts-ahygyky' }, navigation: { menuItemStyle: { fontFamily: Highcharts.SVGRenderer.prototype.getStyle().fontFamily, padding: '2px 10px' } }, exporting: { buttons: { contextButton: { menuItems: [{ text: '' + 'Share on Facebook' }, { text: '' + 'Share on Google+' }, { text: '' + 'Share on Twitter' }, { text: '' + 'Share on LinkedIn' }, { separator: true }] .concat(Highcharts.getOptions().exporting.buttons.contextButton.menuItems) .concat([{ separator: true }, { text: '' + 'Edit chart' }, { text: '' + 'Create chart' }]) } } } }; var chartOptions = { "yAxis": { "gridLineColor": "#000000", "minorTickColor": "#000000", "max": 500, "tickInterval": 100, "tickColor": "#000000", "lineColor": "#000000", "minorGridLineWidth": 0.75, "title": { "style": { "color": "#000000" }, "text": null }, "labels": { "format": "{value} million" }, "minorGridLineColor": "#000000", "startOnTick": false, "gridLineWidth": 0.75, "showFirstLabel": false, "maxColor": "#000000" }, "xAxis": { "tickWidth": 0.75, "minorGridLineColor": "#000000", "gridLineColor": "#000000", "minorTickColor": "#000000", "tickColor": "#000000", "tickLength": 0, "lineColor": "#000000", "title": { "style": { "color": "#000" }, "text": null }, "minorGridLineWidth": 0.75, "type": "category", "lineWidth": 0.75 }, "exporting": { "sourceWidth": 560, "sourceHeight": 370 }, "credits": { "href": null, "text": "Source: Adobe Analytics", "enabled": false }, "legend": { "x": 56, "align": "left", "enabled": false }, "series": [ { "color": "#de2e2d", "index": 0 } ], "subtitle": { "x": 40, "style": { "fontSize": "14px", "fontWeight": "normal", "color": "#000000" }, "text": null, "align": "left" }, "tooltip": { "enabled": false }, "title": { "margin": 40, "x": 69, "y": 30, "style": { "fontWeight": "bold", "color": "#000000" }, "text": "Dropbox\u0027s Growing User Base", "align": "left" }, "chart": { "borderColor": "#000000", "style": { "fontFamily": "Arial" }, "type": "column" }, "colors": [ "#f06d2c", "#cc2a29", "#54b89e", "#6594b0", "#5d934f", "#5d64aa", "#0060fc", "#abaaaf", "#f9c6af", "#ffffff" ] }; parseData(function (dataOptions) { // Merge series configs if (chartOptions.series && dataOptions) { Highcharts.each(chartOptions.series, function (series, i) { chartOptions.series[i] = Highcharts.merge(series, dataOptions.series[i]); }); } var options = Highcharts.merge(dataOptions, chartOptions, template); var chart = new Highcharts['Chart'](options); }, chartOptions); } // Load the Highcharts script if undefined, and add the chart if (typeof Highcharts !== 'undefined') { addChart(); } else if (script) { script.deferredCharts.push(addChart); } else { script = document.createElement('script'); script.id = 'highcharts-script'; script.src = '//cloud.highcharts.com/resources/js/highstock-cloud-5.0.7.js'; script.type = 'text/javascript'; script.deferredCharts = [addChart]; script.onload = function () { // Prevent double firing of event in IE9/IE10 if (!script.chartsAdded) { script.chartsAdded = true; while(script.deferredCharts.length) { script.deferredCharts.shift()(); } } }; script.onreadystatechange = function() { if (this.readyState == 'complete' || this.readyState == 'loaded') { script.onload(); } }; document.getElementsByTagName('head')[0].appendChild(script); } }());