MCPcopy Create free account
hub / github.com/csskit/csskit / sampledTimeRange

Function sampledTimeRange

website/script/benchmarks.js:394–398  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

392 * getChartRef: () -> ApexCharts instance (populated after render)
393 */
394function 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
400function buildZoomEvents(sampledEntries, seriesBuilder, getChartRef) {
401 const { min, max } = sampledTimeRange(sampledEntries);

Callers 5

buildZoomEventsFunction · 0.85
createTimeChartFunction · 0.85
createCompressionChartFunction · 0.85
createThroughputChartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected