* Build the chart.events block for adaptive zoom. * * The chart is always rendered with the full coalesced-by-day dataset. * ApexCharts handles zoom natively within that dataset. On reset we * ensure the coalesced view is restored (in case updateSeries was called * from elsewhere). * * sample
(sampledEntries)
| 392 | * getChartRef: () -> ApexCharts instance (populated after render) |
| 393 | */ |
| 394 | function sampledTimeRange(sampledEntries) { |
| 395 | const min = new Date(sampledEntries[0].timestamp).getTime(); |
| 396 | const max = new Date(sampledEntries[sampledEntries.length - 1].timestamp).getTime(); |
| 397 | return { min, max }; |
| 398 | } |
| 399 | |
| 400 | function buildZoomEvents(sampledEntries, seriesBuilder, getChartRef) { |
| 401 | const { min, max } = sampledTimeRange(sampledEntries); |
no outgoing calls
no test coverage detected