(function () { var script = document.getElementById('highcharts-script'); function addChart() { function parseData(completeHandler, chartOptions) { try { var dataOptions = { "seriesMapping": [ { "x": 0 } ], "columnTypes": [ "string", "float" ], "csv": ",\nHome Broadband is \u003cbr\u003e too expensive,59\nHave other options for internet \u003cbr\u003e access outside of home,46\nComputer is too expensive,45\nSmartphone does everything \u003cbr\u003e online that you need to do,27\nService is not available \u003cbr\u003e or speed is unacceptable,23\nSome other reason,25" }; dataOptions.sort = true dataOptions.complete = completeHandler; Highcharts.data(dataOptions, chartOptions); } catch (error) { console.log(error); completeHandler(undefined); } } var shareUrl = 'https://cloud.highcharts.com/show/ekesygi'; var encodedUrl = encodeURIComponent(shareUrl); Highcharts.setOptions({ "lang": { "decimalPoint": ".", "thousandsSep": "," } }); var template = { chart: { renderTo: 'highcharts-ekesygi' }, 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}%", "style": { "fontSize": "10px" }, "enabled": true } } }, "yAxis": { "gridLineColor": "#000000", "minorTickLength": 0, "minorTickColor": "#000000", "visible": false, "max": 25, "tickInterval": 25, "tickColor": "#ffffff", "lineColor": "#000000", "minorGridLineWidth": 0.75, "title": { "style": { "color": "#000000" }, "text": null }, "labels": { "format": "{value}%" }, "minorGridLineColor": "#000000", "tickAmount": 0, "minorTickInterval": "", "gridLineWidth": 0.75, "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, "labels": { "x": -225, "format": "\u003cp style\u003d\"font-size:11px\"\u003e{value}\u003c/p\u003e", "align": "left" } }, "exporting": { "sourceWidth": 560, "sourceHeight": 370 }, "credits": { "href": null, "text": "Source: Adobe Analytics", "enabled": false }, "legend": { "itemStyle": { "color": "#000000", "fontSize": "10px" }, "align": "left", "itemMarginTop": -35, "enabled": false }, "series": [ { "color": "#ffc672", "index": 0 } ], "subtitle": { "x": -225, "style": { "fontSize": "14px", "fontWeight": "normal", "color": "#000000" }, "text": "People who don\u0027t subscribe usually cite cost as one of their reasons.", "align": "left" }, "tooltip": { "enabled": false }, "title": { "margin": 40, "x": -225, "style": { "fontWeight": "bold", "color": "#000000", "fontSize": "16px" }, "text": "Why Don\u0027t You Have Broadband", "align": "left" }, "chart": { "borderColor": "#000000", "spacing": [ 10, 10, 15, 10 ], "spacingLeft": 250, "style": { "fontFamily": "Arial" }, "type": "column", "inverted": true }, "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); } }());