score:2
Accepted answer
assuming your test.php
will return a single new point on each call, i'd code it like this:
var chart = null;
function callajax(){
$.getjson('test.php', function(data) {
if (chart === null){ // first call, create the chart
options.series = data;
chart = new highcharts.chart(options);
} else {
var seriesonenewpoint = data[0].data[0]; // subsequent calls, just get the point and add it
var seriestwonewpoint = data[1].data[0];
chart.series[0].addpoint(seriesonenewpoint, false, false); // first false is don't redraw until both series are updated
chart.series[1].addpoint(seriestwonewpoint, true, false); // second false is don't shift
}
settimeout(callajax, 20000); // queue up next ajax call
});
}
callajax();
here's an example. note, it just draws the same point over and over again.
Source: stackoverflow.com
Related Query
- highcharts spline with multiple series update every few seconds
- How to update Highcharts with multiple series via JSON?
- How to have multiple highcharts with different series data in vuejs without repeating code
- Highcharts series update with animation
- Dynamic update of multiple series in highcharts
- Highcharts with JSON data and multiple series
- Highcharts: update series on multiple charts with same data
- Multiple Series Timeline with HighCharts
- Highcharts not displaying series data for graph with multiple Y-axes
- Click events on highcharts with multiple series
- Highcharts async Server Loading with multiple series
- Highcharts problem with xAxis using multiple series
- Change chart type and redraw with multiple series in Highcharts
- Highcharts shared tooltip between charts with multiple series and shared tooltip
- Highcharts show the same yAxis start and end value with multiple data series
- Highcharts - How to make a scatter plot with multiple series from HTML table
- Highcharts Multiple series with database
- Highcharts synchronize tooltip on multiple charts with multiple series
- Charts using Highcharts with multiple series from JSON
- Strange behavior with highcharts when using "column" type and multiple datetime series
- Highcharts with multiple series from JSON Dynamically
- Highcharts solid gauge with multiple series
- Highcharts 3.08 drilldown with multiple parent series
- Multiple series in Highcharts with multiple drilldowns
- Highcharts with JSON to customize multiple series
- Highcharts with multiple series from JSON
- Highcharts multiple series combined with linkedTo hover issue
- Highcharts mouse tracking behaviour with multiple arearange & line series
- Highcharts drilldown to pie chart - Clicking on axis label with multiple series causes pie charts to overlap
- I want to update my series dynamically on highcharts with a click & also bring it to the original way by clicking on an other button (#previous)
More Query from same tag
- resetting chart title on zoom button click in highcharts
- Highcharts date not working
- Tooltip text goes out of tooltip when zoom-in
- change theme of highscharts (highstock) chart
- How does it implement this chart with highcharts?
- highchart background right side of hover marker
- DataGrouping not working on highcharts angular
- Rally Pie chart listener not working
- Stop HighCharts change transparency of another series on hover of one series
- Highchart not executed
- Hichcharts- hidden series does not show again after updating plots twice
- Passing JSON in variable to HighCharts
- highcharts not showing on heroku using python flask app
- highchart exporting with phantomjs implementation
- Highchart stacked bar yAxis stacked label issue
- How to create dynamic color for highchart with dynamic dates?
- Highcharts fill in scatter plot data with 0s
- Finding parent of highcharts button w/ jquery
- Styling Highcharts
- Non-fixed svg height? My pie charts have different size even though svg width and pie size are identical. Svg height is fixed, how do i unfix it?
- How to zoom in Highcharts Android
- How we change the rangeSelector in HighCharts
- Highcharts drilldown set x-axis setExtremes
- Is there a way to add a custom tooltip to the second level columns of the drilldown on highcharts?
- HighChart- Plot Stacked Bar Chart on Status for Every Minute
- Highcharts - add minor ticks on zoom?
- Highcharts - sync crosshair of charts with different width
- Highcharts - disable hover for slices on pie chart
- data in x-axis in highcharts with 15mins timeblock
- add event to x-axis labels of bar highchart