score:2
I've created a fiddle of what you need here - I've simplified the data series for this example
So basically you take the first 8 points from each array and use those when creating the chart:
series: [{
name: 'Timestamp1',
data: processed_json.slice(0, 8)
Then once you've created the chart you need a function that can be called every second:
function addPoints(series1, series2) {
if (series1.length > 0) {
myChart.series[0].addPoint(series1.shift());
myChart.series[1].addPoint(series2.shift());
setTimeout(function() {
addPoints(series1, series2)
}, 3000);
}
}
And you start if off with the remaining data, like this:
addPoints(processed_json.slice(8), processed_json1.slice(8));
So basically the function will take (and remove) the first value from the array, and add it to the data series. It then sets a timeout to call itself in one second. It will keep going until there is no data left in the array. I hope that makes sense.
By the way, you may need to think again about how you're displaying this data - you're trying to display the timestamps (which are a huge number) and the difference between them (which is a very small number) on the same scale, which isn't really going to work.
Source: stackoverflow.com
Related Query
- How to add new points to highcharts after plotting the first 'n' points?
- how to set the interval of points on Y - Axis highcharts
- How can I delete all of the points from a highcharts series
- How to set the z-index of points on a HighCharts scatter plot?
- How to add point to the beginning of series, Highcharts
- How to add series after click event in HighCharts
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- Highcharts - Why is there extra spacing before the first column and after the last column?
- how can i add in highcharts a different dashStyle just for a part of the graph
- How to add a border to the title in highcharts
- how to add new index Highcharts column drilldown chart
- Highcharts how to create legends based on the value of points
- How can I add a text link just below the legend box in highcharts
- Highcharts -> how to add vertical title to bar? how to make the symbol in the legend a rectangle?
- Highcharts - How do I keep both line points in from splitting between the two bar charts
- Adding points to Highcharts 3D scatter chart after the chart has loaded
- How to stop plotting the graph if data is blank and continue if data is there on the y-axis in base line highcharts
- How can you change the "label" (valueSuffix) on a highcharts gauge after the gauge has been created?
- Add new series to the top of a highcharts stacked column chart
- How to add Highcharts view data table option to the exports dropdown?
- How to add labels to the end of a highcharts line graph
- highcharts donut pie - How to calculate pie size percentages after resize the chart
- How to show only the last 100 candlesticks or hide the first 50 candlesticks in Highcharts Stock Chart?
- how add an arrow pointing to the y-axis on highcharts
- How can I change highcharts events after the chart has been initialized
- How do I calculate the sum of the points in a HighChart after I edit it
- HighCharts does not add a new points
- Highcharts add new data to series after click
- How to remove the stroke around the single points in a highcharts area. Highcharts
More Query from same tag
- Highcharts error #15: www.highcharts.com/errors/15
- Highcharts bubble graph, custom marker
- Angular Highcharts hideNoData not working dynamically
- Show Indicator at last point on Highchart spline chart
- Highcharts on Rails 3
- Add a colored text in italic to Highchart plot
- Highcharts: Set programmatically the crosshair on the first xAxis item
- Resize/Hide charts in Multi pane in Highcharts
- Highcharts with multipe Series
- Highchart - Custom Images for Labels by using html
- Change the color of bar on condition in highcharts
- How to draw an outer border for a donut chart - Highcharts
- Highcharts import loading properly in Django - Python
- HighCharts (HighMaps) - Function to resize
- How to select point on map programmatically?
- Is it possible to position the zoom buttons in highcharts/highstock?
- Highcharts error #13
- Turning array of JSON objects into an array for HighCharts/GoogleCharts
- HIghCharts PHP MySQL
- How do I disable interaction on a Highcharts chart?
- How to add a header or logo to highcharts exported PDF?
- highchart line chart last null value is not conected with line
- Multiple date array with same value by name on Highcharts
- Highcharts - gap between series in stacked area chart
- Highcharts stock chart overflow above of yAxis lable
- Why doesn't highcharts refresh this chart correctly?
- Transform an object array to an array
- how to change the slice color in donut chart on click of slice?
- Highcharts erroneously inserting numbered extra categories in error
- How do I adapt to slow-loading highcharts in EmberJS?