Reputation: 1062
I have several 100 data points (type: 'scatter3d'). I do not like how the zoom works, so I would like to change the number of data points that are being used, for example only the first 10. The axis should adjust accordingly. Is this possible?
Upvotes: 0
Views: 18
Reputation: 39099
You just need to provide the proper data to the chart. For example:
var data = [
...
];
var chart = new Highcharts.Chart({
...,
series: [{
colorByPoint: true,
data: data.slice(0, 10)
}]
});
document.getElementById('first').addEventListener('click', function() {
chart.series[0].setData(data.slice(0, 10));
});
document.getElementById('next').addEventListener('click', function() {
chart.series[0].setData(data.slice(10, 20));
});
Live demo: https://jsfiddle.net/BlackLabel/9aruwzpd/
API Reference: https://api.highcharts.com/class-reference/Highcharts.Series#setData
Upvotes: 1