(sampledEntries, seriesBuilder, getChartRef)
| 398 | } |
| 399 | |
| 400 | function buildZoomEvents(sampledEntries, seriesBuilder, getChartRef) { |
| 401 | const { min, max } = sampledTimeRange(sampledEntries); |
| 402 | return { |
| 403 | beforeZoom: function (_ctx, { xaxis }) { |
| 404 | return { |
| 405 | xaxis: { |
| 406 | min: Math.max(xaxis.min, min), |
| 407 | max: Math.min(xaxis.max, max), |
| 408 | }, |
| 409 | }; |
| 410 | }, |
| 411 | beforeResetZoom: function (_ctx) { |
| 412 | return { xaxis: { min, max } }; |
| 413 | }, |
| 414 | }; |
| 415 | } |
| 416 | |
| 417 | function initializeCharts() { |
| 418 | const data = window.benchmarkData; |
no test coverage detected