Closed twilson90 closed 2 weeks ago
@twilson90 Can you provide the relevant code with which you are having issue .
Chart.js uses binary search internally to find the visible indices, but does not store them. See https://github.com/chartjs/Chart.js/blob/master/src/helpers/helpers.extras.ts#L87
I have a zoomable line chart and I need to know the visible dataset indices. According to old answers on stackoverflow
chart.scales.x.minIndex
andchart.scales.x.maxIndex
were available in older versions, but they no longer appear to exist in the latest version of chartjs. I can get the value range with_range
but I would need to process the entire dataset to find the indices from that, and my dataset is rather massive (which is why I'm using zoom)