(function () { var script = document.getElementById('highcharts-script'); function addChart() { function parseData(completeHandler, chartOptions) { try { var dataOptions = { "seriesMapping": [ { "x": 0 } ], "columnTypes": [ "string", "float" ], "csv": ",\n2001,9\n2008,52\n2017,154" }; dataOptions.sort = true dataOptions.complete = completeHandler; Highcharts.data(dataOptions, chartOptions); } catch (error) { console.log(error); completeHandler(undefined); } } var shareUrl = 'http://54.244.161.160/show/adevemy'; var encodedUrl = encodeURIComponent(shareUrl); Highcharts.setOptions({ "lang": { "decimalPoint": ".", "thousandsSep": "," } }); var template = { chart: { renderTo: 'highcharts-adevemy' }, 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 = { "plotOptions": { "series": { "dataLabels": { "format": "${y} billion ", "style": { "fontWeight": "normal" }, "enabled": true } } }, "yAxis": { "gridLineColor": "#000000", "minorGridLineColor": "#000000", "startOnTick": false, "minorTickColor": "#000000", "gridLineWidth": 0.75, "showFirstLabel": false, "maxColor": "#000000", "lineColor": "#000000", "minorGridLineWidth": 0.75, "title": { "style": { "color": "#000000" }, "text": null }, "labels": { "format": null } }, "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: National Association of Software and Services Companies" }, "legend": { "x": 56, "align": "left", "enabled": false }, "series": [ { "color": "#798c57", "tooltip": { "valuePrefix": "Revenue", "valueSuffix": "Revenue" }, "index": 0 } ], "subtitle": { "x": 35, "style": { "fontSize": "14px", "fontWeight": "normal", "color": "#000000" }, "text": "The IT and business process outsourcing industry has become the largest private-sector employer in India.", "align": "left" }, "tooltip": { "enabled": false }, "title": { "margin": 40, "x": 35, "y": 15, "style": { "fontWeight": "bold", "color": "#000000" }, "text": "Ultra-Fast Growth (Revenue)", "align": "left" }, "chart": { "borderColor": "#000000", "description": null, "style": { "fontFamily": "Arial" }, "type": "column" }, "colors": [ "#ff7e3e", "#cc2a29", "#54b89e", "#6594b0", "#659e57", "#5d64aa", "#4d78bd", "#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); } }());