I have a chart that is filled with content from HTTP requests. And data always come with this code
chartComponent.chartInstance
.getDefaultAxisX()
.onAxisInteractionAreaMouseDragStop((axis: Axis, event: MouseEvent, button: number, startLocation: Point): void => {
if (axis.getInterval().start / 2 < 10000) {
this.chartService.loadHistorySeriesData(chartComponent.selectedTimeRangeMinutes).subscribe((data: SeriesMapResponse) => {
this.chartService.addNewDataToTheSeriesInstances(chartComponent.chartId, chartComponent.seriesInstances);
})
}
})
So I have to implement conditions like if the offset is less than some number load me new data... Like pagination on the Instagram feed but with carts. How can I get this offset, I tried a lot of approaches and nothing works.