Highcharts – redraw() vs. new Highcharts.chart
chart.series[0].setData(data,true); The setData method itself will call the redraw method
chart.series[0].setData(data,true); The setData method itself will call the redraw method
Chart’s width is taken from jQuery.width(container), so if you have chart in some hidden tabs or something similar, width will be undefined. In that case default width and height are set (600×400).
It could be done really easy with PhantomJS. You can render Highchart chart and save it to SVG, PNG, JPEG or PDF. The example below renders a demo Highcharts diagram to SVG and PDF at the same time: var system = require(‘system’); var page = require(‘webpage’).create(); var fs = require(‘fs’); // load JS libraries page.injectJs(“js/jquery.min.js”); … Read more
Highcharts will automatically try to find the best format for the current zoom-range. This is done if the xAxis has the type ‘datetime’. Next the unit of the current zoom is calculated, it could be one of: second minute hour day week month year This unit is then used find a format for the axis … Read more
You can use jQuery.extend() and Highcharts.setOptions. So first you’ll make the first object which will be extended by all your charts, this object will contain your Highchart default functions. You can do it using namespacing. The following way is good when you have very different charts. Default graphic: var defaultChart = { chartContent: null, highchart: … Read more
The other answers didn’t work for me. I found the answer in their documentation: http://api.highcharts.com/highcharts#Series Using this method (see JSFiddle example): var chart = new Highcharts.Chart({ chart: { renderTo: ‘container’ }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); // the button action $(‘#button’).click(function() { chart.series[0].setData([129.2, … Read more
Yes, if you set up the series object like the following, where each data point is a hash, then you can pass extra values: new Highcharts.Chart( { …, series: [ { name: ‘Foo’, data: [ { y : 3, myData : ‘firstPoint’ }, { y : 7, myData : ‘secondPoint’ }, { y : 1, … Read more
The Cause This is not a Highcharts issue, at least not by itself, the problem is caused by the fact that Bootstrap uses display: none to hide inactive tabs: .tab-content > .tab-pane, .pill-content > .pill-pane { display: none; /* this is the problem */ } This causes Highcharts not able to get the expected width … Read more
Based on the answer from this topic – stepped-color-shading-in-highcharts-doughnut-chart. Wrapping bubble’s prototype: var bubbleProto = Highcharts.seriesTypes.bubble.prototype; bubbleProto.axisTypes = [‘xAxis’, ‘yAxis’, ‘colorAxis’]; bubbleProto.optionalAxis=”colorAxis”; bubbleProto.colorKey = ‘y’; Highcharts.wrap(bubbleProto, ‘translate’, function(proceed) { proceed.apply(this, Array.prototype.slice.call(arguments, 1)); Highcharts.seriesTypes.heatmap.prototype.translateColors.call(this); }); Live example and output http://jsfiddle.net/4y3qgdmn/41/