stream-charts 1.2.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +809 -1022
- package/changes.md +36 -0
- package/dist/app/charts/Chart.d.ts +35 -139
- package/dist/app/charts/Chart.d.ts.map +1 -0
- package/dist/app/charts/Chart.js +74 -65
- package/dist/app/charts/Chart.js.map +1 -1
- package/dist/app/charts/axes/AxesState.d.ts +26 -18
- package/dist/app/charts/axes/AxesState.d.ts.map +1 -0
- package/dist/app/charts/axes/AxesState.js +26 -24
- package/dist/app/charts/axes/AxesState.js.map +1 -1
- package/dist/app/charts/axes/AxisInterval.d.ts +44 -26
- package/dist/app/charts/axes/AxisInterval.d.ts.map +1 -0
- package/dist/app/charts/axes/AxisInterval.js +48 -29
- package/dist/app/charts/axes/AxisInterval.js.map +1 -1
- package/dist/app/charts/axes/BaseAxisRange.d.ts +46 -22
- package/dist/app/charts/axes/BaseAxisRange.d.ts.map +1 -0
- package/dist/app/charts/axes/BaseAxisRange.js +17 -12
- package/dist/app/charts/axes/BaseAxisRange.js.map +1 -1
- package/dist/app/charts/axes/ContinuousAxis.d.ts +47 -6
- package/dist/app/charts/axes/ContinuousAxis.d.ts.map +1 -0
- package/dist/app/charts/axes/ContinuousAxis.js +160 -27
- package/dist/app/charts/axes/ContinuousAxis.js.map +1 -1
- package/dist/app/charts/axes/ContinuousAxisRange.d.ts +29 -10
- package/dist/app/charts/axes/ContinuousAxisRange.d.ts.map +1 -0
- package/dist/app/charts/axes/ContinuousAxisRange.js +29 -11
- package/dist/app/charts/axes/ContinuousAxisRange.js.map +1 -1
- package/dist/app/charts/axes/EmptyAxis.d.ts +5 -2
- package/dist/app/charts/axes/EmptyAxis.d.ts.map +1 -0
- package/dist/app/charts/axes/EmptyAxis.js +30 -9
- package/dist/app/charts/axes/EmptyAxis.js.map +1 -1
- package/dist/app/charts/axes/OrdinalAxis.d.ts +5 -3
- package/dist/app/charts/axes/OrdinalAxis.d.ts.map +1 -0
- package/dist/app/charts/axes/OrdinalAxis.js +39 -16
- package/dist/app/charts/axes/OrdinalAxis.js.map +1 -1
- package/dist/app/charts/axes/OrdinalAxisRange.d.ts +76 -13
- package/dist/app/charts/axes/OrdinalAxisRange.d.ts.map +1 -0
- package/dist/app/charts/axes/OrdinalAxisRange.js +95 -16
- package/dist/app/charts/axes/OrdinalAxisRange.js.map +1 -1
- package/dist/app/charts/axes/autoScale.d.ts +111 -0
- package/dist/app/charts/axes/autoScale.d.ts.map +1 -0
- package/dist/app/charts/axes/autoScale.js +188 -0
- package/dist/app/charts/axes/autoScale.js.map +1 -0
- package/dist/app/charts/axes/axes.d.ts +273 -150
- package/dist/app/charts/axes/axes.d.ts.map +1 -0
- package/dist/app/charts/axes/axes.js +808 -583
- package/dist/app/charts/axes/axes.js.map +1 -1
- package/dist/app/charts/d3types.d.ts +40 -11
- package/dist/app/charts/d3types.d.ts.map +1 -0
- package/dist/app/charts/d3types.js +3 -0
- package/dist/app/charts/d3types.js.map +1 -1
- package/dist/app/charts/datasources/StreamingDataSource.d.ts +149 -0
- package/dist/app/charts/datasources/StreamingDataSource.d.ts.map +1 -0
- package/dist/app/charts/datasources/StreamingDataSource.js +110 -0
- package/dist/app/charts/datasources/StreamingDataSource.js.map +1 -0
- package/dist/app/charts/datasources/iteratesDataSource.d.ts +73 -0
- package/dist/app/charts/datasources/iteratesDataSource.d.ts.map +1 -0
- package/dist/app/charts/datasources/iteratesDataSource.js +87 -0
- package/dist/app/charts/datasources/iteratesDataSource.js.map +1 -0
- package/dist/app/charts/datasources/ordinalDataSource.d.ts +75 -0
- package/dist/app/charts/datasources/ordinalDataSource.d.ts.map +1 -0
- package/dist/app/charts/datasources/ordinalDataSource.js +135 -0
- package/dist/app/charts/datasources/ordinalDataSource.js.map +1 -0
- package/dist/app/charts/datasources/outlierDataSource.d.ts +53 -0
- package/dist/app/charts/datasources/outlierDataSource.d.ts.map +1 -0
- package/dist/app/charts/datasources/outlierDataSource.js +57 -0
- package/dist/app/charts/datasources/outlierDataSource.js.map +1 -0
- package/dist/app/charts/datasources/timeSeriesDataSource.d.ts +77 -0
- package/dist/app/charts/datasources/timeSeriesDataSource.d.ts.map +1 -0
- package/dist/app/charts/datasources/timeSeriesDataSource.js +85 -0
- package/dist/app/charts/datasources/timeSeriesDataSource.js.map +1 -0
- package/dist/app/charts/filters/regexFilter.d.ts +31 -4
- package/dist/app/charts/filters/regexFilter.d.ts.map +1 -0
- package/dist/app/charts/filters/regexFilter.js +38 -4
- package/dist/app/charts/filters/regexFilter.js.map +1 -1
- package/dist/app/charts/hooks/AxesProvider.d.ts +21 -0
- package/dist/app/charts/hooks/AxesProvider.d.ts.map +1 -0
- package/dist/app/charts/hooks/AxesProvider.js +213 -0
- package/dist/app/charts/hooks/AxesProvider.js.map +1 -0
- package/dist/app/charts/hooks/CanvasSurfaceProvider.d.ts +25 -0
- package/dist/app/charts/hooks/CanvasSurfaceProvider.d.ts.map +1 -0
- package/dist/app/charts/hooks/CanvasSurfaceProvider.js +76 -0
- package/dist/app/charts/hooks/CanvasSurfaceProvider.js.map +1 -0
- package/dist/app/charts/hooks/ChartProvider.d.ts +40 -0
- package/dist/app/charts/hooks/ChartProvider.d.ts.map +1 -0
- package/dist/app/charts/hooks/ChartProvider.js +33 -0
- package/dist/app/charts/hooks/ChartProvider.js.map +1 -0
- package/dist/app/charts/hooks/InteractionProvider.d.ts +23 -0
- package/dist/app/charts/hooks/InteractionProvider.d.ts.map +1 -0
- package/dist/app/charts/hooks/InteractionProvider.js +60 -0
- package/dist/app/charts/hooks/InteractionProvider.js.map +1 -0
- package/dist/app/charts/hooks/PlotDimensionsProvider.d.ts +16 -0
- package/dist/app/charts/hooks/PlotDimensionsProvider.d.ts.map +1 -0
- package/dist/app/charts/hooks/PlotDimensionsProvider.js +76 -0
- package/dist/app/charts/hooks/PlotDimensionsProvider.js.map +1 -0
- package/dist/app/charts/hooks/defaultAxesValues.d.ts +11 -0
- package/dist/app/charts/hooks/defaultAxesValues.d.ts.map +1 -0
- package/dist/app/charts/hooks/defaultAxesValues.js +36 -0
- package/dist/app/charts/hooks/defaultAxesValues.js.map +1 -0
- package/dist/app/charts/hooks/defaultMouseValues.d.ts +9 -0
- package/dist/app/charts/hooks/defaultMouseValues.d.ts.map +1 -0
- package/dist/app/charts/hooks/defaultMouseValues.js +23 -0
- package/dist/app/charts/hooks/defaultMouseValues.js.map +1 -0
- package/dist/app/charts/hooks/defaultPlotDimensions.d.ts +13 -0
- package/dist/app/charts/hooks/defaultPlotDimensions.d.ts.map +1 -0
- package/dist/app/charts/hooks/defaultPlotDimensions.js +23 -0
- package/dist/app/charts/hooks/defaultPlotDimensions.js.map +1 -0
- package/dist/app/charts/hooks/defaultTooltipValues.d.ts +9 -0
- package/dist/app/charts/hooks/defaultTooltipValues.d.ts.map +1 -0
- package/dist/app/charts/hooks/defaultTooltipValues.js +21 -0
- package/dist/app/charts/hooks/defaultTooltipValues.js.map +1 -0
- package/dist/app/charts/hooks/defaultUseChartValues.d.ts +14 -0
- package/dist/app/charts/hooks/defaultUseChartValues.d.ts.map +1 -0
- package/dist/app/charts/hooks/defaultUseChartValues.js +30 -0
- package/dist/app/charts/hooks/defaultUseChartValues.js.map +1 -0
- package/dist/app/charts/hooks/useAxes.d.ts +49 -36
- package/dist/app/charts/hooks/useAxes.d.ts.map +1 -0
- package/dist/app/charts/hooks/useAxes.js +16 -176
- package/dist/app/charts/hooks/useAxes.js.map +1 -1
- package/dist/app/charts/hooks/useCanvasSurface.d.ts +25 -0
- package/dist/app/charts/hooks/useCanvasSurface.d.ts.map +1 -0
- package/dist/app/charts/hooks/useCanvasSurface.js +18 -0
- package/dist/app/charts/hooks/useCanvasSurface.js.map +1 -0
- package/dist/app/charts/hooks/useChart.d.ts +30 -44
- package/dist/app/charts/hooks/useChart.d.ts.map +1 -0
- package/dist/app/charts/hooks/useChart.js +26 -48
- package/dist/app/charts/hooks/useChart.js.map +1 -1
- package/dist/app/charts/hooks/useDataSource.d.ts +68 -0
- package/dist/app/charts/hooks/useDataSource.d.ts.map +1 -0
- package/dist/app/charts/hooks/useDataSource.js +63 -0
- package/dist/app/charts/hooks/useDataSource.js.map +1 -0
- package/dist/app/charts/hooks/useHoveredSeries.d.ts +25 -0
- package/dist/app/charts/hooks/useHoveredSeries.d.ts.map +1 -0
- package/dist/app/charts/hooks/useHoveredSeries.js +15 -0
- package/dist/app/charts/hooks/useHoveredSeries.js.map +1 -0
- package/dist/app/charts/hooks/useMouse.d.ts +46 -22
- package/dist/app/charts/hooks/useMouse.d.ts.map +1 -0
- package/dist/app/charts/hooks/useMouse.js +12 -56
- package/dist/app/charts/hooks/useMouse.js.map +1 -1
- package/dist/app/charts/hooks/usePlotDimensions.d.ts +25 -13
- package/dist/app/charts/hooks/usePlotDimensions.d.ts.map +1 -0
- package/dist/app/charts/hooks/usePlotDimensions.js +6 -62
- package/dist/app/charts/hooks/usePlotDimensions.js.map +1 -1
- package/dist/app/charts/hooks/useTooltip.d.ts +24 -26
- package/dist/app/charts/hooks/useTooltip.d.ts.map +1 -0
- package/dist/app/charts/hooks/useTooltip.js +12 -42
- package/dist/app/charts/hooks/useTooltip.js.map +1 -1
- package/dist/app/charts/index.d.ts +66 -0
- package/dist/app/charts/index.d.ts.map +1 -0
- package/dist/app/charts/index.js +87 -0
- package/dist/app/charts/index.js.map +1 -0
- package/dist/app/charts/legends/Legend.d.ts +33 -12
- package/dist/app/charts/legends/Legend.d.ts.map +1 -0
- package/dist/app/charts/legends/Legend.js +138 -379
- package/dist/app/charts/legends/Legend.js.map +1 -1
- package/dist/app/charts/legends/constants.d.ts +19 -0
- package/dist/app/charts/legends/constants.d.ts.map +1 -0
- package/dist/app/charts/legends/constants.js +34 -0
- package/dist/app/charts/legends/constants.js.map +1 -0
- package/dist/app/charts/observables/ChartData.d.ts +1 -0
- package/dist/app/charts/observables/ChartData.d.ts.map +1 -0
- package/dist/app/charts/observables/iterates.d.ts +13 -7
- package/dist/app/charts/observables/iterates.d.ts.map +1 -0
- package/dist/app/charts/observables/iterates.js +42 -9
- package/dist/app/charts/observables/iterates.js.map +1 -1
- package/dist/app/charts/observables/ordinals.d.ts +70 -12
- package/dist/app/charts/observables/ordinals.d.ts.map +1 -0
- package/dist/app/charts/observables/ordinals.js +127 -48
- package/dist/app/charts/observables/ordinals.js.map +1 -1
- package/dist/app/charts/observables/outliers.d.ts +18 -0
- package/dist/app/charts/observables/outliers.d.ts.map +1 -0
- package/dist/app/charts/observables/outliers.js +2 -0
- package/dist/app/charts/observables/outliers.js.map +1 -0
- package/dist/app/charts/plots/BarPlot.d.ts +87 -13
- package/dist/app/charts/plots/BarPlot.d.ts.map +1 -0
- package/dist/app/charts/plots/BarPlot.js +603 -356
- package/dist/app/charts/plots/BarPlot.js.map +1 -1
- package/dist/app/charts/plots/OutlierPlot.d.ts +123 -0
- package/dist/app/charts/plots/OutlierPlot.d.ts.map +1 -0
- package/dist/app/charts/plots/OutlierPlot.js +430 -0
- package/dist/app/charts/plots/OutlierPlot.js.map +1 -0
- package/dist/app/charts/plots/PoincarePlot.d.ts +92 -14
- package/dist/app/charts/plots/PoincarePlot.d.ts.map +1 -0
- package/dist/app/charts/plots/PoincarePlot.js +523 -364
- package/dist/app/charts/plots/PoincarePlot.js.map +1 -1
- package/dist/app/charts/plots/RasterPlot.d.ts +31 -10
- package/dist/app/charts/plots/RasterPlot.d.ts.map +1 -0
- package/dist/app/charts/plots/RasterPlot.js +198 -306
- package/dist/app/charts/plots/RasterPlot.js.map +1 -1
- package/dist/app/charts/plots/ScatterPlot.d.ts +77 -21
- package/dist/app/charts/plots/ScatterPlot.d.ts.map +1 -0
- package/dist/app/charts/plots/ScatterPlot.js +359 -302
- package/dist/app/charts/plots/ScatterPlot.js.map +1 -1
- package/dist/app/charts/plots/autoScaleYAxes.d.ts +43 -0
- package/dist/app/charts/plots/autoScaleYAxes.d.ts.map +1 -0
- package/dist/app/charts/plots/autoScaleYAxes.js +71 -0
- package/dist/app/charts/plots/autoScaleYAxes.js.map +1 -0
- package/dist/app/charts/plots/colorizedLine.d.ts +61 -0
- package/dist/app/charts/plots/colorizedLine.d.ts.map +1 -0
- package/dist/app/charts/plots/colorizedLine.js +157 -0
- package/dist/app/charts/plots/colorizedLine.js.map +1 -0
- package/dist/app/charts/plots/constants.d.ts +7 -0
- package/dist/app/charts/plots/constants.d.ts.map +1 -0
- package/dist/app/charts/plots/constants.js +11 -0
- package/dist/app/charts/plots/constants.js.map +1 -0
- package/dist/app/charts/plots/hitTesting.d.ts +88 -0
- package/dist/app/charts/plots/hitTesting.d.ts.map +1 -0
- package/dist/app/charts/plots/hitTesting.js +136 -0
- package/dist/app/charts/plots/hitTesting.js.map +1 -0
- package/dist/app/charts/plots/plot.d.ts +52 -16
- package/dist/app/charts/plots/plot.d.ts.map +1 -0
- package/dist/app/charts/plots/plot.js +108 -35
- package/dist/app/charts/plots/plot.js.map +1 -1
- package/dist/app/charts/plots/useCanvasZoomPan.d.ts +119 -0
- package/dist/app/charts/plots/useCanvasZoomPan.d.ts.map +1 -0
- package/dist/app/charts/plots/useCanvasZoomPan.js +113 -0
- package/dist/app/charts/plots/useCanvasZoomPan.js.map +1 -0
- package/dist/app/charts/plots/useStreamingTimeAxes.d.ts +103 -0
- package/dist/app/charts/plots/useStreamingTimeAxes.d.ts.map +1 -0
- package/dist/app/charts/plots/useStreamingTimeAxes.js +257 -0
- package/dist/app/charts/plots/useStreamingTimeAxes.js.map +1 -0
- package/dist/app/charts/series/baseSeries.d.ts +60 -8
- package/dist/app/charts/series/baseSeries.d.ts.map +1 -0
- package/dist/app/charts/series/baseSeries.js +53 -8
- package/dist/app/charts/series/baseSeries.js.map +1 -1
- package/dist/app/charts/series/iterateSeries.d.ts +9 -8
- package/dist/app/charts/series/iterateSeries.d.ts.map +1 -0
- package/dist/app/charts/series/iterateSeries.js +7 -7
- package/dist/app/charts/series/iterateSeries.js.map +1 -1
- package/dist/app/charts/series/ordinalSeries.d.ts +27 -13
- package/dist/app/charts/series/ordinalSeries.d.ts.map +1 -0
- package/dist/app/charts/series/ordinalSeries.js +29 -15
- package/dist/app/charts/series/ordinalSeries.js.map +1 -1
- package/dist/app/charts/series/outlierSeries.d.ts +142 -0
- package/dist/app/charts/series/outlierSeries.d.ts.map +1 -0
- package/dist/app/charts/series/outlierSeries.js +82 -0
- package/dist/app/charts/series/outlierSeries.js.map +1 -0
- package/dist/app/charts/series/timeSeries.d.ts +13 -9
- package/dist/app/charts/series/timeSeries.d.ts.map +1 -0
- package/dist/app/charts/series/timeSeries.js +6 -3
- package/dist/app/charts/series/timeSeries.js.map +1 -1
- package/dist/app/charts/series/timeSeriesChartData.d.ts +18 -10
- package/dist/app/charts/series/timeSeriesChartData.d.ts.map +1 -0
- package/dist/app/charts/series/timeSeriesChartData.js +28 -14
- package/dist/app/charts/series/timeSeriesChartData.js.map +1 -1
- package/dist/app/charts/styling/barPlotStyle.d.ts +46 -2
- package/dist/app/charts/styling/barPlotStyle.d.ts.map +1 -0
- package/dist/app/charts/styling/barPlotStyle.js +37 -3
- package/dist/app/charts/styling/barPlotStyle.js.map +1 -1
- package/dist/app/charts/styling/canvasStyle.d.ts +53 -0
- package/dist/app/charts/styling/canvasStyle.d.ts.map +1 -0
- package/dist/app/charts/styling/canvasStyle.js +71 -0
- package/dist/app/charts/styling/canvasStyle.js.map +1 -0
- package/dist/app/charts/styling/margins.d.ts +21 -2
- package/dist/app/charts/styling/margins.d.ts.map +1 -0
- package/dist/app/charts/styling/margins.js +25 -4
- package/dist/app/charts/styling/margins.js.map +1 -1
- package/dist/app/charts/styling/svgStyle.d.ts +10 -56
- package/dist/app/charts/styling/svgStyle.d.ts.map +1 -0
- package/dist/app/charts/styling/svgStyle.js +3 -78
- package/dist/app/charts/styling/svgStyle.js.map +1 -1
- package/dist/app/charts/subscriptions/viewDrivers.d.ts +124 -0
- package/dist/app/charts/subscriptions/viewDrivers.d.ts.map +1 -0
- package/dist/app/charts/subscriptions/viewDrivers.js +338 -0
- package/dist/app/charts/subscriptions/viewDrivers.js.map +1 -0
- package/dist/app/charts/tooltips/BarPlotTooltipContent.d.ts +12 -78
- package/dist/app/charts/tooltips/BarPlotTooltipContent.d.ts.map +1 -0
- package/dist/app/charts/tooltips/BarPlotTooltipContent.js +65 -257
- package/dist/app/charts/tooltips/BarPlotTooltipContent.js.map +1 -1
- package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.d.ts +9 -0
- package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.d.ts.map +1 -0
- package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.js +16 -0
- package/dist/app/charts/tooltips/DefaultOutlierTooltipContent.js.map +1 -0
- package/dist/app/charts/tooltips/OutlierPlotTooltipContent.d.ts +30 -0
- package/dist/app/charts/tooltips/OutlierPlotTooltipContent.d.ts.map +1 -0
- package/dist/app/charts/tooltips/OutlierPlotTooltipContent.js +26 -0
- package/dist/app/charts/tooltips/OutlierPlotTooltipContent.js.map +1 -0
- package/dist/app/charts/tooltips/PoincarePlotTooltipContent.d.ts +22 -72
- package/dist/app/charts/tooltips/PoincarePlotTooltipContent.d.ts.map +1 -0
- package/dist/app/charts/tooltips/PoincarePlotTooltipContent.js +104 -171
- package/dist/app/charts/tooltips/PoincarePlotTooltipContent.js.map +1 -1
- package/dist/app/charts/tooltips/RasterPlotTooltipContent.d.ts +32 -8
- package/dist/app/charts/tooltips/RasterPlotTooltipContent.d.ts.map +1 -0
- package/dist/app/charts/tooltips/RasterPlotTooltipContent.js +62 -115
- package/dist/app/charts/tooltips/RasterPlotTooltipContent.js.map +1 -1
- package/dist/app/charts/tooltips/ScatterPlotTooltipContent.d.ts +39 -12
- package/dist/app/charts/tooltips/ScatterPlotTooltipContent.d.ts.map +1 -0
- package/dist/app/charts/tooltips/ScatterPlotTooltipContent.js +162 -134
- package/dist/app/charts/tooltips/ScatterPlotTooltipContent.js.map +1 -1
- package/dist/app/charts/tooltips/Tooltip.d.ts +27 -32
- package/dist/app/charts/tooltips/Tooltip.d.ts.map +1 -0
- package/dist/app/charts/tooltips/Tooltip.js +37 -81
- package/dist/app/charts/tooltips/Tooltip.js.map +1 -1
- package/dist/app/charts/tooltips/TooltipContent.d.ts +81 -0
- package/dist/app/charts/tooltips/TooltipContent.d.ts.map +1 -0
- package/dist/app/charts/tooltips/TooltipContent.js +99 -0
- package/dist/app/charts/tooltips/TooltipContent.js.map +1 -0
- package/dist/app/charts/tooltips/tooltipUtils.d.ts +186 -36
- package/dist/app/charts/tooltips/tooltipUtils.d.ts.map +1 -0
- package/dist/app/charts/tooltips/tooltipUtils.js +277 -48
- package/dist/app/charts/tooltips/tooltipUtils.js.map +1 -1
- package/dist/app/charts/tooltips/useOutlierTooltip.d.ts +59 -0
- package/dist/app/charts/tooltips/useOutlierTooltip.d.ts.map +1 -0
- package/dist/app/charts/tooltips/useOutlierTooltip.js +16 -0
- package/dist/app/charts/tooltips/useOutlierTooltip.js.map +1 -0
- package/dist/app/charts/tooltips/useTooltipPlacement.d.ts +51 -0
- package/dist/app/charts/tooltips/useTooltipPlacement.d.ts.map +1 -0
- package/dist/app/charts/tooltips/useTooltipPlacement.js +52 -0
- package/dist/app/charts/tooltips/useTooltipPlacement.js.map +1 -0
- package/dist/app/charts/tooltips/useTooltipStyle.d.ts +11 -0
- package/dist/app/charts/tooltips/useTooltipStyle.d.ts.map +1 -0
- package/dist/app/charts/tooltips/useTooltipStyle.js +14 -0
- package/dist/app/charts/tooltips/useTooltipStyle.js.map +1 -0
- package/dist/app/charts/trackers/Tracker.d.ts +22 -6
- package/dist/app/charts/trackers/Tracker.d.ts.map +1 -0
- package/dist/app/charts/trackers/Tracker.js +36 -22
- package/dist/app/charts/trackers/Tracker.js.map +1 -1
- package/dist/app/charts/trackers/trackerUtils.d.ts +40 -18
- package/dist/app/charts/trackers/trackerUtils.d.ts.map +1 -0
- package/dist/app/charts/trackers/trackerUtils.js +213 -300
- package/dist/app/charts/trackers/trackerUtils.js.map +1 -1
- package/dist/app/charts/utils.d.ts +72 -33
- package/dist/app/charts/utils.d.ts.map +1 -0
- package/dist/app/charts/utils.js +87 -42
- package/dist/app/charts/utils.js.map +1 -1
- package/dist/index.d.ts +2 -45
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -72
- package/dist/index.js.map +1 -1
- package/package.json +87 -46
- package/src/app/charts/Chart.tsx +132 -168
- package/src/app/charts/axes/AxesState.ts +27 -29
- package/src/app/charts/axes/AxisInterval.ts +57 -32
- package/src/app/charts/axes/BaseAxisRange.ts +47 -27
- package/src/app/charts/axes/ContinuousAxis.tsx +235 -39
- package/src/app/charts/axes/ContinuousAxisRange.ts +29 -11
- package/src/app/charts/axes/EmptyAxis.tsx +52 -17
- package/src/app/charts/axes/OrdinalAxis.tsx +54 -28
- package/src/app/charts/axes/OrdinalAxisRange.ts +96 -16
- package/src/app/charts/axes/autoScale.ts +244 -0
- package/src/app/charts/axes/axes.ts +954 -735
- package/src/app/charts/d3types.ts +42 -13
- package/src/app/charts/datasources/StreamingDataSource.ts +214 -0
- package/src/app/charts/datasources/iteratesDataSource.ts +122 -0
- package/src/app/charts/datasources/ordinalDataSource.ts +205 -0
- package/src/app/charts/datasources/outlierDataSource.ts +90 -0
- package/src/app/charts/datasources/timeSeriesDataSource.ts +133 -0
- package/src/app/charts/filters/regexFilter.ts +45 -5
- package/src/app/charts/hooks/AxesProvider.tsx +301 -0
- package/src/app/charts/hooks/CanvasSurfaceProvider.tsx +117 -0
- package/src/app/charts/hooks/ChartProvider.tsx +79 -0
- package/src/app/charts/hooks/InteractionProvider.tsx +88 -0
- package/src/app/charts/hooks/PlotDimensionsProvider.tsx +109 -0
- package/src/app/charts/hooks/defaultAxesValues.ts +40 -0
- package/src/app/charts/hooks/defaultMouseValues.ts +24 -0
- package/src/app/charts/hooks/defaultPlotDimensions.ts +27 -0
- package/src/app/charts/hooks/defaultTooltipValues.tsx +23 -0
- package/src/app/charts/hooks/defaultUseChartValues.tsx +36 -0
- package/src/app/charts/hooks/useAxes.tsx +60 -228
- package/src/app/charts/hooks/useCanvasSurface.tsx +35 -0
- package/src/app/charts/hooks/useChart.tsx +47 -106
- package/src/app/charts/hooks/useDataSource.tsx +106 -0
- package/src/app/charts/hooks/useHoveredSeries.tsx +33 -0
- package/src/app/charts/hooks/useMouse.tsx +58 -82
- package/src/app/charts/hooks/usePlotDimensions.tsx +25 -89
- package/src/app/charts/hooks/useTooltip.tsx +32 -63
- package/src/app/charts/index.ts +213 -0
- package/src/app/charts/legends/Legend.tsx +198 -479
- package/src/app/charts/legends/constants.ts +37 -0
- package/src/app/charts/observables/iterates.ts +32 -12
- package/src/app/charts/observables/ordinals.ts +141 -67
- package/src/app/charts/observables/outliers.ts +20 -0
- package/src/app/charts/plots/BarPlot.tsx +784 -666
- package/src/app/charts/plots/OutlierPlot.tsx +685 -0
- package/src/app/charts/plots/PoincarePlot.tsx +707 -489
- package/src/app/charts/plots/RasterPlot.tsx +253 -445
- package/src/app/charts/plots/ScatterPlot.tsx +480 -463
- package/src/app/charts/plots/autoScaleYAxes.ts +102 -0
- package/src/app/charts/plots/colorizedLine.ts +185 -0
- package/src/app/charts/plots/constants.ts +16 -0
- package/src/app/charts/plots/hitTesting.ts +198 -0
- package/src/app/charts/plots/plot.ts +138 -44
- package/src/app/charts/plots/useCanvasZoomPan.ts +240 -0
- package/src/app/charts/plots/useStreamingTimeAxes.ts +384 -0
- package/src/app/charts/series/baseSeries.ts +81 -14
- package/src/app/charts/series/iterateSeries.ts +8 -8
- package/src/app/charts/series/ordinalSeries.ts +35 -20
- package/src/app/charts/series/outlierSeries.ts +188 -0
- package/src/app/charts/series/timeSeries.ts +14 -12
- package/src/app/charts/series/timeSeriesChartData.ts +31 -17
- package/src/app/charts/styling/barPlotStyle.ts +48 -5
- package/src/app/charts/styling/canvasStyle.ts +86 -0
- package/src/app/charts/styling/margins.ts +28 -4
- package/src/app/charts/styling/svgStyle.ts +10 -91
- package/src/app/charts/subscriptions/viewDrivers.ts +447 -0
- package/src/app/charts/tooltips/BarPlotTooltipContent.tsx +156 -380
- package/src/app/charts/tooltips/DefaultOutlierTooltipContent.tsx +40 -0
- package/src/app/charts/tooltips/OutlierPlotTooltipContent.tsx +67 -0
- package/src/app/charts/tooltips/PoincarePlotTooltipContent.tsx +229 -292
- package/src/app/charts/tooltips/RasterPlotTooltipContent.tsx +164 -217
- package/src/app/charts/tooltips/ScatterPlotTooltipContent.tsx +373 -236
- package/src/app/charts/tooltips/Tooltip.tsx +58 -124
- package/src/app/charts/tooltips/TooltipContent.tsx +177 -0
- package/src/app/charts/tooltips/tooltipUtils.ts +359 -61
- package/src/app/charts/tooltips/useOutlierTooltip.tsx +68 -0
- package/src/app/charts/tooltips/useTooltipPlacement.ts +86 -0
- package/src/app/charts/tooltips/useTooltipStyle.ts +15 -0
- package/src/app/charts/trackers/Tracker.tsx +68 -33
- package/src/app/charts/trackers/trackerUtils.ts +263 -376
- package/src/app/charts/utils.ts +90 -48
- package/src/index.ts +2 -322
- package/dist/app/charts/axes/AxesState.test.d.ts +0 -1
- package/dist/app/charts/axes/AxesState.test.js +0 -30
- package/dist/app/charts/axes/AxesState.test.js.map +0 -1
- package/dist/app/charts/axes/AxisInterval.test.d.ts +0 -1
- package/dist/app/charts/axes/AxisInterval.test.js +0 -120
- package/dist/app/charts/axes/AxisInterval.test.js.map +0 -1
- package/dist/app/charts/axes/ContinuousAxisRange.test.d.ts +0 -1
- package/dist/app/charts/axes/ContinuousAxisRange.test.js +0 -47
- package/dist/app/charts/axes/ContinuousAxisRange.test.js.map +0 -1
- package/dist/app/charts/axes/OrdinalAxisRange.test.d.ts +0 -1
- package/dist/app/charts/axes/OrdinalAxisRange.test.js +0 -48
- package/dist/app/charts/axes/OrdinalAxisRange.test.js.map +0 -1
- package/dist/app/charts/filters/regexFilter.test.d.ts +0 -1
- package/dist/app/charts/filters/regexFilter.test.js +0 -11
- package/dist/app/charts/filters/regexFilter.test.js.map +0 -1
- package/dist/app/charts/hooks/useDataObservable.d.ts +0 -72
- package/dist/app/charts/hooks/useDataObservable.js +0 -74
- package/dist/app/charts/hooks/useDataObservable.js.map +0 -1
- package/dist/app/charts/hooks/useInitialData.d.ts +0 -36
- package/dist/app/charts/hooks/useInitialData.js +0 -28
- package/dist/app/charts/hooks/useInitialData.js.map +0 -1
- package/dist/app/charts/observables/iterates.test.d.ts +0 -1
- package/dist/app/charts/observables/iterates.test.js +0 -180
- package/dist/app/charts/observables/iterates.test.js.map +0 -1
- package/dist/app/charts/observables/ordinals.test.d.ts +0 -1
- package/dist/app/charts/observables/ordinals.test.js +0 -102
- package/dist/app/charts/observables/ordinals.test.js.map +0 -1
- package/dist/app/charts/series/datumSeries.test.d.ts +0 -1
- package/dist/app/charts/series/datumSeries.test.js +0 -50
- package/dist/app/charts/series/datumSeries.test.js.map +0 -1
- package/dist/app/charts/styling/margins.test.d.ts +0 -1
- package/dist/app/charts/styling/margins.test.js +0 -19
- package/dist/app/charts/styling/margins.test.js.map +0 -1
- package/dist/app/charts/subscriptions/subscription.test.d.ts +0 -1
- package/dist/app/charts/subscriptions/subscription.test.js +0 -395
- package/dist/app/charts/subscriptions/subscription.test.js.map +0 -1
- package/dist/app/charts/subscriptions/subscriptions.d.ts +0 -100
- package/dist/app/charts/subscriptions/subscriptions.js +0 -449
- package/dist/app/charts/subscriptions/subscriptions.js.map +0 -1
- package/src/app/charts/axes/AxesState.test.ts +0 -34
- package/src/app/charts/axes/AxisInterval.test.ts +0 -143
- package/src/app/charts/axes/ContinuousAxisRange.test.ts +0 -55
- package/src/app/charts/axes/OrdinalAxisRange.test.ts +0 -55
- package/src/app/charts/filters/regexFilter.test.ts +0 -13
- package/src/app/charts/hooks/useDataObservable.tsx +0 -170
- package/src/app/charts/hooks/useInitialData.tsx +0 -64
- package/src/app/charts/observables/iterates.test.ts +0 -201
- package/src/app/charts/observables/ordinals.test.ts +0 -135
- package/src/app/charts/series/datumSeries.test.ts +0 -60
- package/src/app/charts/styling/margins.test.ts +0 -22
- package/src/app/charts/subscriptions/subscription.test.ts +0 -499
- package/src/app/charts/subscriptions/subscriptions.ts +0 -635
|
@@ -1,635 +0,0 @@
|
|
|
1
|
-
import {bufferTime, map, mergeAll, mergeWith} from "rxjs/operators";
|
|
2
|
-
import {continuousAxisRanges, ContinuousNumericAxis, ordinalAxisRanges, OrdinalStringAxis} from "../axes/axes";
|
|
3
|
-
import {Datum, TimeSeries} from "../series/timeSeries";
|
|
4
|
-
import {interval, Observable, Subscription} from "rxjs";
|
|
5
|
-
import {TimeSeriesChartData} from "../series/timeSeriesChartData";
|
|
6
|
-
import {AxesAssignment} from "../plots/plot";
|
|
7
|
-
import {AxesState} from "../axes/AxesState";
|
|
8
|
-
import {BaseSeries, emptySeries} from "../series/baseSeries";
|
|
9
|
-
import {IterateChartData} from "../observables/iterates";
|
|
10
|
-
import {IterateDatum, IterateSeries} from "../series/iterateSeries";
|
|
11
|
-
import {
|
|
12
|
-
copyOrdinalDatumExtremum,
|
|
13
|
-
copyOrdinalValueStats,
|
|
14
|
-
copyValueStatsForSeries,
|
|
15
|
-
defaultOrdinalValueStats,
|
|
16
|
-
initialMaxValueDatum,
|
|
17
|
-
initialMinValueDatum,
|
|
18
|
-
OrdinalChartData,
|
|
19
|
-
OrdinalStats,
|
|
20
|
-
OrdinalValueStats
|
|
21
|
-
} from "../observables/ordinals";
|
|
22
|
-
import {ChartData} from "../observables/ChartData";
|
|
23
|
-
import {OrdinalDatum} from "../series/ordinalSeries";
|
|
24
|
-
import {RefObject} from "react";
|
|
25
|
-
import {AxisInterval} from "../axes/AxisInterval";
|
|
26
|
-
import {Optional} from "result-fn";
|
|
27
|
-
import {OrdinalAxisRange} from "../axes/OrdinalAxisRange";
|
|
28
|
-
import {ContinuousAxisRange} from "../axes/ContinuousAxisRange";
|
|
29
|
-
|
|
30
|
-
export enum TimeWindowBehavior { SCROLL, SQUEEZE }
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Creates a subscription to the series observable with the data stream. This is common code
|
|
34
|
-
* shared by the plots.
|
|
35
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
36
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
37
|
-
* @param windowingTime Basically the update time when data is collected and then rendered
|
|
38
|
-
* @param axisAssignments The assignment of the series to their x- and y-axes
|
|
39
|
-
* @param xAxesState The current state of the x-axis
|
|
40
|
-
* @param onUpdateData Callback for when data is updated
|
|
41
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
42
|
-
* be dropped on the next update
|
|
43
|
-
* @param updateTimingAndPlot The callback function to update the plot and timing
|
|
44
|
-
* @param seriesMap The series-name and the associated series
|
|
45
|
-
* @param setCurrentTime Callback to update the current time based on the streamed data
|
|
46
|
-
* @param timeWindowBehavior Whether to scroll the time axis or squeeze it
|
|
47
|
-
* @param initialTimes The initial times for each axis, a map(axis_id -> initial_time)
|
|
48
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
49
|
-
*/
|
|
50
|
-
export function subscriptionTimeSeriesFor(
|
|
51
|
-
seriesObservable: Observable<TimeSeriesChartData>,
|
|
52
|
-
onSubscribe: (subscription: Subscription) => void,
|
|
53
|
-
windowingTime: number,
|
|
54
|
-
axisAssignments: Map<string, AxesAssignment>,
|
|
55
|
-
xAxesState: AxesState<ContinuousNumericAxis>,
|
|
56
|
-
onUpdateData: ((seriesName: string, data: Array<Datum>) => void) | undefined,
|
|
57
|
-
dropDataAfter: number,
|
|
58
|
-
updateTimingAndPlot: (ranges: Map<string, ContinuousAxisRange>) => void,
|
|
59
|
-
seriesMap: Map<string, TimeSeries>,
|
|
60
|
-
setCurrentTime: (axisId: string, end: number) => void,
|
|
61
|
-
timeWindowBehavior: TimeWindowBehavior = TimeWindowBehavior.SCROLL,
|
|
62
|
-
initialTimes: Map<string, number> = new Map<string, number>(),
|
|
63
|
-
): Subscription {
|
|
64
|
-
const subscription = seriesObservable
|
|
65
|
-
.pipe(bufferTime(windowingTime))
|
|
66
|
-
.subscribe(dataList => {
|
|
67
|
-
dataList.forEach(data => {
|
|
68
|
-
// grab the time-windows for the x-axes
|
|
69
|
-
const timesWindows = continuousAxisRanges(xAxesState.axes as Map<string, ContinuousNumericAxis>);
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
// calculate the max times for each x-axis, which is the max time over all the
|
|
73
|
-
// series assigned to an x-axis
|
|
74
|
-
|
|
75
|
-
// get the series associated with each axis (Map<axis_id, [series_names]>)
|
|
76
|
-
const axesSeries = associatedSeriesForXAxes(data, axisAssignments, xAxesState)
|
|
77
|
-
|
|
78
|
-
// add each new point to it's corresponding series, the new points
|
|
79
|
-
// is a map(series_name -> new_point[])
|
|
80
|
-
data.newPoints.forEach((newData, name) => {
|
|
81
|
-
// grab the current series associated with the new data
|
|
82
|
-
const series = seriesMap.get(name) || emptySeries(name)
|
|
83
|
-
|
|
84
|
-
// update the handler with the new data point
|
|
85
|
-
if (onUpdateData) onUpdateData(name, newData)
|
|
86
|
-
|
|
87
|
-
// add the new data to the series
|
|
88
|
-
series.data.push(...newData)
|
|
89
|
-
|
|
90
|
-
// calculate the current time for the series' assigned x-axis (which may end up
|
|
91
|
-
// just being the default) based on the max time for the series, and the overall
|
|
92
|
-
// max time
|
|
93
|
-
const axisId = axisAssignments.get(name)?.xAxis || xAxesState.axisDefaultId().getOrElse("");
|
|
94
|
-
const currentAxisTime = axesSeries.get(axisId)
|
|
95
|
-
?.reduce(
|
|
96
|
-
(tMax, seriesName) => Math.max(data.maxTimes.get(seriesName) || data.maxTime, tMax),
|
|
97
|
-
-Infinity
|
|
98
|
-
) || data.maxTime
|
|
99
|
-
|
|
100
|
-
if (currentAxisTime !== undefined) {
|
|
101
|
-
// drop data that is older than the max time-window
|
|
102
|
-
while (currentAxisTime - series.data[0].time > dropDataAfter) {
|
|
103
|
-
series.data.shift()
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// update the time range for the x-axis, and if the time range
|
|
107
|
-
// needs to be updated, then recalculate the time range for the
|
|
108
|
-
// axis, update the time windows, and call the setCurrentTime
|
|
109
|
-
// callback to update the current time for the caller
|
|
110
|
-
const range = timesWindows.get(axisId)
|
|
111
|
-
const [startTime, endTime] = Optional.ofNullable(range?.current)
|
|
112
|
-
.map(interval => interval.asTuple())
|
|
113
|
-
.getOrElse([0, 0])
|
|
114
|
-
if (range !== undefined && endTime < currentAxisTime) {
|
|
115
|
-
const timeWindow = endTime - startTime
|
|
116
|
-
const timeRange = ContinuousAxisRange.from(
|
|
117
|
-
// 0,
|
|
118
|
-
timeWindowBehavior === TimeWindowBehavior.SQUEEZE && initialTimes.get(axisId) !== undefined ?
|
|
119
|
-
initialTimes.get(axisId)! :
|
|
120
|
-
Math.max(0, currentAxisTime - timeWindow),
|
|
121
|
-
Math.max(currentAxisTime, timeWindow)
|
|
122
|
-
)
|
|
123
|
-
timesWindows.set(axisId, timeRange)
|
|
124
|
-
setCurrentTime(axisId, endTime) // callback
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
// update the data
|
|
130
|
-
updateTimingAndPlot(timesWindows) // callback
|
|
131
|
-
})
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
// provide the subscription to the caller
|
|
135
|
-
onSubscribe(subscription) // callback
|
|
136
|
-
|
|
137
|
-
return subscription
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* **Function has side effects on the Series (for performance).**
|
|
142
|
-
*
|
|
143
|
-
* Creates a subscription to the series observable with the data stream. The common code is
|
|
144
|
-
* shared by the plots.
|
|
145
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
146
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
147
|
-
* @param windowingTime Basically the update time when data is collected and then rendered
|
|
148
|
-
* @param axisAssignments The assignment of the series to their x- and y-axes
|
|
149
|
-
* @param xAxesState The current state of the x-axis
|
|
150
|
-
* @param onUpdateData Callback for when data is updated
|
|
151
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
152
|
-
* be dropped on the next update
|
|
153
|
-
* @param updateTimingAndPlot The callback function to update the plot and timing
|
|
154
|
-
* @param seriesMap The series-name and the associated series
|
|
155
|
-
* @param setCurrentTime Callback to update the current time based on the streamed data
|
|
156
|
-
* @param cadencePeriod The number of milliseconds between time updates
|
|
157
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
158
|
-
*/
|
|
159
|
-
export function subscriptionTimeSeriesWithCadenceFor(
|
|
160
|
-
seriesObservable: Observable<TimeSeriesChartData>,
|
|
161
|
-
onSubscribe: (subscription: Subscription) => void,
|
|
162
|
-
windowingTime: number,
|
|
163
|
-
axisAssignments: Map<string, AxesAssignment>,
|
|
164
|
-
xAxesState: AxesState<ContinuousNumericAxis>,
|
|
165
|
-
onUpdateData: ((seriesName: string, data: Array<Datum>) => void) | undefined,
|
|
166
|
-
dropDataAfter: number,
|
|
167
|
-
updateTimingAndPlot: (ranges: Map<string, ContinuousAxisRange>) => void,
|
|
168
|
-
seriesMap: Map<string, TimeSeries>,
|
|
169
|
-
setCurrentTime: (axisId: string, end: number) => void,
|
|
170
|
-
cadencePeriod: number
|
|
171
|
-
): Subscription {
|
|
172
|
-
const maxTime = Array.from(seriesMap.entries())
|
|
173
|
-
.reduce(
|
|
174
|
-
(tMax, [, series]) => Math.max(tMax, series.last().map(datum => datum.time).getOrElse(tMax)),
|
|
175
|
-
-Infinity
|
|
176
|
-
)
|
|
177
|
-
const cadence = interval(cadencePeriod)
|
|
178
|
-
.pipe(
|
|
179
|
-
map(value => ({
|
|
180
|
-
currentTime: value * cadencePeriod,
|
|
181
|
-
maxTime: value * cadencePeriod,
|
|
182
|
-
maxTimes: new Map(),
|
|
183
|
-
newPoints: new Map()
|
|
184
|
-
} as TimeSeriesChartData)
|
|
185
|
-
)
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
const subscription = seriesObservable
|
|
189
|
-
.pipe(
|
|
190
|
-
mergeWith(cadence),
|
|
191
|
-
bufferTime(windowingTime),
|
|
192
|
-
mergeAll(),
|
|
193
|
-
)
|
|
194
|
-
.subscribe(data => {
|
|
195
|
-
// grab the time-windows for the x-axes
|
|
196
|
-
const timesWindows = continuousAxisRanges(xAxesState.axes as Map<string, ContinuousNumericAxis>)
|
|
197
|
-
|
|
198
|
-
if (data.currentTime !== undefined) {
|
|
199
|
-
xAxesState.axisIds().forEach(axisId => {
|
|
200
|
-
const range = timesWindows.get(axisId)
|
|
201
|
-
if (range !== undefined && data.currentTime !== undefined) {
|
|
202
|
-
const [startTime, endTime] = range.current.asTuple()
|
|
203
|
-
const timeWindow = endTime - startTime
|
|
204
|
-
// const timeWindow = measureOf(range.current)
|
|
205
|
-
const timeRange = ContinuousAxisRange.from(
|
|
206
|
-
Math.max(0, Math.max(endTime, data.currentTime + maxTime) - timeWindow),
|
|
207
|
-
Math.max(Math.max(endTime, data.currentTime + maxTime), timeWindow)
|
|
208
|
-
)
|
|
209
|
-
timesWindows.set(axisId, timeRange)
|
|
210
|
-
setCurrentTime(axisId, data.currentTime + maxTime)
|
|
211
|
-
}
|
|
212
|
-
})
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
if (data.newPoints.size === 0) {
|
|
216
|
-
updateTimingAndPlot(timesWindows)
|
|
217
|
-
return
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// determine which series belong to each x-axis
|
|
221
|
-
const axesSeries = associatedSeriesForXAxes(data, axisAssignments, xAxesState)
|
|
222
|
-
|
|
223
|
-
// add each new point to it's corresponding series, the new points
|
|
224
|
-
// is a map(series_name -> new_point[])
|
|
225
|
-
data.newPoints.forEach((newData, name) => {
|
|
226
|
-
// grab the current series associated with the new data
|
|
227
|
-
const series = seriesMap.get(name) || emptySeries(name);
|
|
228
|
-
|
|
229
|
-
// update the handler with the new data point
|
|
230
|
-
if (onUpdateData) onUpdateData(name, newData);
|
|
231
|
-
|
|
232
|
-
// add the new data to the series
|
|
233
|
-
series.data.push(...newData);
|
|
234
|
-
|
|
235
|
-
// drop data when specified
|
|
236
|
-
const axisId = axisAssignments.get(name)?.xAxis || xAxesState.axisDefaultId().getOrElse("")
|
|
237
|
-
const currentAxisTime = axesSeries.get(axisId)
|
|
238
|
-
?.reduce(
|
|
239
|
-
(tMax, seriesName) => Math.max(data.maxTimes.get(seriesName) || data.maxTime, tMax),
|
|
240
|
-
-Infinity
|
|
241
|
-
) || data.maxTime
|
|
242
|
-
if (currentAxisTime !== undefined) {
|
|
243
|
-
// drop data that is older than the max time-window
|
|
244
|
-
while (currentAxisTime - series.data[0].time > dropDataAfter) {
|
|
245
|
-
series.data.shift()
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
})
|
|
249
|
-
|
|
250
|
-
// update the data
|
|
251
|
-
updateTimingAndPlot(timesWindows)
|
|
252
|
-
})
|
|
253
|
-
|
|
254
|
-
// provide the subscription to the caller
|
|
255
|
-
onSubscribe(subscription)
|
|
256
|
-
|
|
257
|
-
return subscription
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Creates a subscription to the series observable with the data stream. The common code is
|
|
262
|
-
* shared by the plots.
|
|
263
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
264
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
265
|
-
* @param windowingTime Basically the update time when data is collected and then rendered
|
|
266
|
-
* @param xAxesState The current state of the x-axis
|
|
267
|
-
* @param yAxesState The current state of the y-axis
|
|
268
|
-
* @param onUpdateData Callback for when data is updated
|
|
269
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
270
|
-
* be dropped on the next update
|
|
271
|
-
* @param updateRangesAndPlot The callback function to update the plot
|
|
272
|
-
* @param seriesMap The series-name and the associated series
|
|
273
|
-
* @param updateCurrentTime Callback to update the current time based on the streamed data
|
|
274
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
275
|
-
*/
|
|
276
|
-
export function subscriptionIteratesFor(
|
|
277
|
-
seriesObservable: Observable<IterateChartData>,
|
|
278
|
-
onSubscribe: (subscription: Subscription) => void,
|
|
279
|
-
windowingTime: number,
|
|
280
|
-
xAxesState: AxesState<ContinuousNumericAxis>,
|
|
281
|
-
yAxesState: AxesState<ContinuousNumericAxis>,
|
|
282
|
-
onUpdateData: ((seriesName: string, data: Array<IterateDatum>) => void) | undefined,
|
|
283
|
-
dropDataAfter: number,
|
|
284
|
-
updateRangesAndPlot: () => void,
|
|
285
|
-
seriesMap: Map<string, IterateSeries>,
|
|
286
|
-
updateCurrentTime: (time: number) => void
|
|
287
|
-
): Subscription {
|
|
288
|
-
// maintains the x and y-axis ranges based on the original domain of the axes
|
|
289
|
-
const xAxesRanges = new Map<string, ContinuousAxisRange>(Array.from(xAxesState.axes.entries())
|
|
290
|
-
.map(([id, axis]) => {
|
|
291
|
-
const [start, end] = (axis as ContinuousNumericAxis).scale.domain()
|
|
292
|
-
return [id, ContinuousAxisRange.from(start, end)]
|
|
293
|
-
}))
|
|
294
|
-
const yAxesRanges = new Map<string, ContinuousAxisRange>(Array.from(yAxesState.axes.entries())
|
|
295
|
-
.map(([id, axis]) => {
|
|
296
|
-
const [start, end] = (axis as ContinuousNumericAxis).scale.domain()
|
|
297
|
-
return [id, ContinuousAxisRange.from(start, end)]
|
|
298
|
-
}))
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Updates the original axis range with new domain values, while maintaining the original
|
|
302
|
-
* domain values.
|
|
303
|
-
* @param originals The original axis ranges
|
|
304
|
-
* @param axes The current axes
|
|
305
|
-
*/
|
|
306
|
-
function updateRange(originals: Map<string, ContinuousAxisRange>, axes: Map<string, ContinuousNumericAxis>): void {
|
|
307
|
-
axes.forEach((axis, id) => {
|
|
308
|
-
const [start, end] = axis.scale.domain()
|
|
309
|
-
const original: ContinuousAxisRange = originals.get(id) || ContinuousAxisRange.from(start, end)
|
|
310
|
-
originals.set(id, original.update(start, end))
|
|
311
|
-
})
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
const subscription = seriesObservable
|
|
315
|
-
.pipe(bufferTime(windowingTime))
|
|
316
|
-
.subscribe(dataList => {
|
|
317
|
-
dataList.forEach(data => {
|
|
318
|
-
// calculate the bounds for each of the x- and y-axes
|
|
319
|
-
updateRange(xAxesRanges, xAxesState.axes as Map<string, ContinuousNumericAxis>)
|
|
320
|
-
updateRange(yAxesRanges, yAxesState.axes as Map<string, ContinuousNumericAxis>)
|
|
321
|
-
|
|
322
|
-
// add each new point to its corresponding series, the newPoints object
|
|
323
|
-
// is a map(series_name -> new_point[])
|
|
324
|
-
data.newPoints.forEach((newData, seriesName) => {
|
|
325
|
-
// grab the current series associated with the new data
|
|
326
|
-
const series = seriesMap.get(seriesName) || emptySeries(seriesName)
|
|
327
|
-
|
|
328
|
-
// update the handler with the new data points
|
|
329
|
-
if (onUpdateData) onUpdateData(seriesName, newData)
|
|
330
|
-
|
|
331
|
-
// add the new data to the series
|
|
332
|
-
series.data.push(...newData)
|
|
333
|
-
|
|
334
|
-
// calculate and update the current time, which will be that max time of the
|
|
335
|
-
// f[n+1](x) values (y-axis)
|
|
336
|
-
const currentTime = Array.from(data.newPoints.values())
|
|
337
|
-
.reduce((maxTime, currentSeries) => {
|
|
338
|
-
const seriesMaxTime = currentSeries.length > 0 ? currentSeries[currentSeries.length-1].time : 0
|
|
339
|
-
if (seriesMaxTime > maxTime) {
|
|
340
|
-
return seriesMaxTime
|
|
341
|
-
}
|
|
342
|
-
return maxTime
|
|
343
|
-
}, 0)
|
|
344
|
-
|
|
345
|
-
updateCurrentTime(currentTime)
|
|
346
|
-
|
|
347
|
-
// drop data that is older than the max time-window
|
|
348
|
-
while (currentTime - series.data[0].time > dropDataAfter) {
|
|
349
|
-
series.data.shift()
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
})
|
|
353
|
-
|
|
354
|
-
// update the data
|
|
355
|
-
const xRange = xAxesRanges.get(xAxesState.axisDefaultId().getOrElse(""))
|
|
356
|
-
const yRange = yAxesRanges.get(yAxesState.axisDefaultId().getOrElse(""))
|
|
357
|
-
if (xRange !== undefined && yRange !== undefined) {
|
|
358
|
-
updateRangesAndPlot()
|
|
359
|
-
}
|
|
360
|
-
})
|
|
361
|
-
})
|
|
362
|
-
|
|
363
|
-
// provide the subscription to the caller
|
|
364
|
-
onSubscribe(subscription)
|
|
365
|
-
|
|
366
|
-
return subscription
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export interface WindowedOrdinalStats extends OrdinalStats {
|
|
370
|
-
/**
|
|
371
|
-
* A map associating each series to stats about that series (e.g. map(series_name -> stats))
|
|
372
|
-
*/
|
|
373
|
-
windowedValueStatsForSeries: Map<string, OrdinalValueStats>
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Creates a subscription to the series observable with the data stream. The common code is
|
|
378
|
-
* shared by the plots.
|
|
379
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
380
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
381
|
-
* @param windowingTime Basically the update time when data is collected and then rendered
|
|
382
|
-
* @param axisAssignments The assignment of the series to their x- and y-axes
|
|
383
|
-
* @param yAxesState The current state of the x-axis
|
|
384
|
-
* @param onUpdateData Callback for when data is updated
|
|
385
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
386
|
-
* be dropped on the next update
|
|
387
|
-
* @param updateTimingAndPlot The callback function to update the plot and timing
|
|
388
|
-
* @param seriesMap The series-name and the associated series
|
|
389
|
-
* @param ordinalStatsRef The statistics about the data in the chart and about each series
|
|
390
|
-
* @param setCurrentTime Callback to update the current time based on the streamed data
|
|
391
|
-
* @param originalRange The original range of the axes
|
|
392
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
393
|
-
*/
|
|
394
|
-
export function subscriptionOrdinalXFor(
|
|
395
|
-
seriesObservable: Observable<OrdinalChartData>,
|
|
396
|
-
onSubscribe: (subscription: Subscription) => void,
|
|
397
|
-
windowingTime: number,
|
|
398
|
-
axisAssignments: Map<string, AxesAssignment>,
|
|
399
|
-
yAxesState: AxesState<OrdinalStringAxis>,
|
|
400
|
-
onUpdateData: ((seriesName: string, data: Array<OrdinalDatum>) => void) | undefined,
|
|
401
|
-
dropDataAfter: number,
|
|
402
|
-
updateTimingAndPlot: (ranges: Map<string, OrdinalAxisRange>) => void,
|
|
403
|
-
seriesMap: Map<string, BaseSeries<OrdinalDatum>>,
|
|
404
|
-
ordinalStatsRef: RefObject<WindowedOrdinalStats>,
|
|
405
|
-
setCurrentTime: (currentTime: number) => void,
|
|
406
|
-
originalRange: AxisInterval,
|
|
407
|
-
): Subscription {
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* First of two functions to calculate the current ordinal stats for the current time window. This
|
|
411
|
-
* function updates the windowed stats for the new data.
|
|
412
|
-
* @param newData The new data for that series
|
|
413
|
-
* @param windowedStats The current windowed ordinal value status
|
|
414
|
-
* @return The windowed ordinal value stats updated for the new data
|
|
415
|
-
*/
|
|
416
|
-
function updatedWindowedValueStatsForNewData(newData: Array<OrdinalDatum>, windowedStats: OrdinalValueStats): OrdinalValueStats {
|
|
417
|
-
const updatedStats = copyOrdinalValueStats(windowedStats)
|
|
418
|
-
updatedStats.count += newData.length
|
|
419
|
-
const newSum = newData.reduce((total, datum) => total + datum.value, 0)
|
|
420
|
-
updatedStats.sum += newSum
|
|
421
|
-
updatedStats.sumSquared += newSum * newSum
|
|
422
|
-
updatedStats.mean = (updatedStats.count > 0) ? updatedStats.sum / updatedStats.count : NaN
|
|
423
|
-
updatedStats.min = newData.reduce((min, datum) => datum.value < min.value ? datum : min, updatedStats.min)
|
|
424
|
-
updatedStats.max = newData.reduce((max, datum) => datum.value > max.value ? datum : max, updatedStats.max)
|
|
425
|
-
return updatedStats
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Second of two functions to calculate the current ordinal stats for the current time window. This
|
|
430
|
-
* function updates the windowed stats by for the dropped data
|
|
431
|
-
* @param droppedData An array of datum that was dropped from the time window
|
|
432
|
-
* @param windowedStats The current windowed ordinal value stats
|
|
433
|
-
* @param series An array of series holding all the current data in the time-window
|
|
434
|
-
* @return The windowed ordinal value stats updated for the dropped data
|
|
435
|
-
*/
|
|
436
|
-
function updateWindowedValueStatsForDroppedData(
|
|
437
|
-
droppedData: Array<OrdinalDatum>,
|
|
438
|
-
windowedStats: OrdinalValueStats,
|
|
439
|
-
series: BaseSeries<OrdinalDatum>
|
|
440
|
-
): OrdinalValueStats {
|
|
441
|
-
const updatedStats = copyOrdinalValueStats(windowedStats)
|
|
442
|
-
// calculate the windowed stats based on the dropped data
|
|
443
|
-
updatedStats.count -= droppedData.length
|
|
444
|
-
const droppedSum = droppedData.reduce((total, datum) => total + datum.value, 0)
|
|
445
|
-
updatedStats.sum -= droppedSum
|
|
446
|
-
updatedStats.sumSquared -= droppedSum * droppedSum
|
|
447
|
-
updatedStats.mean = (updatedStats.count > 0) ? updatedStats.sum / updatedStats.count : NaN
|
|
448
|
-
updatedStats.min = series.data.reduce((min, datum) => datum.value < min.value ? datum : min, initialMinValueDatum())
|
|
449
|
-
updatedStats.max = series.data.reduce((max, datum) => datum.value > max.value ? datum : max, initialMaxValueDatum())
|
|
450
|
-
return updatedStats
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
//
|
|
454
|
-
// beginning of the subscription function
|
|
455
|
-
//
|
|
456
|
-
const subscription = seriesObservable
|
|
457
|
-
.pipe(bufferTime(windowingTime))
|
|
458
|
-
.subscribe(dataList => {
|
|
459
|
-
dataList.forEach((data: OrdinalChartData) => {
|
|
460
|
-
// grab the axis ranges for the y-axes
|
|
461
|
-
const yAxisRanges = ordinalAxisRanges(
|
|
462
|
-
yAxesState.axes as Map<string, OrdinalStringAxis>,
|
|
463
|
-
originalRange
|
|
464
|
-
);
|
|
465
|
-
|
|
466
|
-
//
|
|
467
|
-
// calculate the max times for each x-axis, which is the max time over all the
|
|
468
|
-
// series assigned to an x-axis
|
|
469
|
-
|
|
470
|
-
// get the series associated with each y-axis (Map<axis_id, [series_names]>)
|
|
471
|
-
const axesSeries = associatedSeriesForYAxes(data, axisAssignments, yAxesState)
|
|
472
|
-
|
|
473
|
-
// add each new point to it's corresponding series, the new points
|
|
474
|
-
// is a map(series_name -> new_point[])
|
|
475
|
-
data.newPoints.forEach((newData, name) => {
|
|
476
|
-
// grab the current series associated with the new data
|
|
477
|
-
const series = seriesMap.get(name) || emptySeries(name)
|
|
478
|
-
|
|
479
|
-
// update the handler with the new data point
|
|
480
|
-
if (onUpdateData) onUpdateData(name, newData)
|
|
481
|
-
|
|
482
|
-
// add the new data to the series
|
|
483
|
-
series.data.push(...newData)
|
|
484
|
-
|
|
485
|
-
// grab the stats
|
|
486
|
-
ordinalStatsRef.current.minDatum = copyOrdinalDatumExtremum(data.stats.minDatum)
|
|
487
|
-
ordinalStatsRef.current.maxDatum = copyOrdinalDatumExtremum(data.stats.maxDatum)
|
|
488
|
-
ordinalStatsRef.current.valueStatsForSeries = copyValueStatsForSeries(data.stats.valueStatsForSeries)
|
|
489
|
-
|
|
490
|
-
// set up for the windowed-stats
|
|
491
|
-
const lifetimeValueStats = data.stats.valueStatsForSeries.get(name) || defaultOrdinalValueStats()
|
|
492
|
-
if (!ordinalStatsRef.current.windowedValueStatsForSeries.has(name)) {
|
|
493
|
-
ordinalStatsRef.current.windowedValueStatsForSeries.set(name, copyOrdinalValueStats(lifetimeValueStats))
|
|
494
|
-
// ordinalStatsRef.current.windowedValueStatsForSeries.set(name, defaultOrdinalValueStats())
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
// update the windowed-stats for the new points (later will deal with datum
|
|
498
|
-
// that were dropped)
|
|
499
|
-
const updatedStats = ordinalStatsRef.current.windowedValueStatsForSeries.get(name)!
|
|
500
|
-
const windowedValueStats = updatedWindowedValueStatsForNewData(newData, updatedStats)
|
|
501
|
-
ordinalStatsRef.current.windowedValueStatsForSeries.set(name, windowedValueStats)
|
|
502
|
-
|
|
503
|
-
// calculate the current value for the series' assigned y-axis (which may end up
|
|
504
|
-
// just being the default) based on the max time for the series, and the overall
|
|
505
|
-
// max time
|
|
506
|
-
const axisId = axisAssignments.get(name)?.yAxis || yAxesState.axisDefaultId().getOrElse("");
|
|
507
|
-
const currentTime = axesSeries.get(axisId)
|
|
508
|
-
?.reduce(
|
|
509
|
-
(tMax, _) => Math.max(data.stats.maxDatum.time.time, tMax),
|
|
510
|
-
-Infinity
|
|
511
|
-
) || NaN
|
|
512
|
-
setCurrentTime(currentTime)
|
|
513
|
-
|
|
514
|
-
if (currentTime !== undefined) {
|
|
515
|
-
// drop data that is older than the max time-window, holding on to the dropped ones
|
|
516
|
-
let droppedData: Array<OrdinalDatum> = []
|
|
517
|
-
while (currentTime - series.data[0].time > dropDataAfter) {
|
|
518
|
-
const dropped = series.data.shift()
|
|
519
|
-
if (dropped !== undefined) {
|
|
520
|
-
droppedData.push(dropped)
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// calculate the windowed stats based on the dropped data
|
|
525
|
-
if (droppedData.length > 0) {
|
|
526
|
-
ordinalStatsRef.current.windowedValueStatsForSeries.set(
|
|
527
|
-
name,
|
|
528
|
-
updateWindowedValueStatsForDroppedData(droppedData, windowedValueStats, series)
|
|
529
|
-
)
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
// // update the time range for the x-axis, and if the time range
|
|
533
|
-
// // needs to be updated, then recalculate the time range for the
|
|
534
|
-
// // axis, update the time windows, and call the setCurrentTime
|
|
535
|
-
// // callback to update the current time for the caller
|
|
536
|
-
// const range = yAxisRanges.get(axisId)
|
|
537
|
-
// if (range !== undefined && range.end < currentAxisTime) {
|
|
538
|
-
// const timeWindow = range.end - range.start
|
|
539
|
-
// const timeRange = continuousAxisRangeFor(
|
|
540
|
-
// // 0,
|
|
541
|
-
// timeWindowBehavior === TimeWindowBehavior.SQUEEZE && initialTimes.get(axisId) !== undefined ?
|
|
542
|
-
// initialTimes.get(axisId)! :
|
|
543
|
-
// Math.max(0, currentAxisTime - timeWindow),
|
|
544
|
-
// Math.max(currentAxisTime, timeWindow)
|
|
545
|
-
// )
|
|
546
|
-
// yAxisRanges.set(axisId, timeRange)
|
|
547
|
-
// setCurrentTime(axisId, timeRange.end) // callback
|
|
548
|
-
// }
|
|
549
|
-
}
|
|
550
|
-
})
|
|
551
|
-
|
|
552
|
-
// // grab the stats
|
|
553
|
-
// ordinalStatsRef.current.minDatum = copyOrdinalDatumExtremum(data.stats.minDatum)
|
|
554
|
-
// ordinalStatsRef.current.maxDatum = copyOrdinalDatumExtremum(data.stats.maxDatum)
|
|
555
|
-
// ordinalStatsRef.current.valueStatsForSeries = copyValueStatsForSeries(data.stats.valueStatsForSeries)
|
|
556
|
-
|
|
557
|
-
// update the data
|
|
558
|
-
updateTimingAndPlot(yAxisRanges) // callback
|
|
559
|
-
})
|
|
560
|
-
})
|
|
561
|
-
|
|
562
|
-
// provide the subscription to the caller
|
|
563
|
-
onSubscribe(subscription) // callback
|
|
564
|
-
|
|
565
|
-
return subscription
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* Determines which series are assigned to which x-axes, and returns a map holding the
|
|
570
|
-
* x-axis names and their associated list of series
|
|
571
|
-
* @param data The chart data
|
|
572
|
-
* @param axisAssignments A map holding the series names and its associated x-axis and y-axis names
|
|
573
|
-
* @param xAxesState Holds information about the axis and how it is displayed
|
|
574
|
-
* @return A map holding the x-axis names the names of the series associated with the axis.
|
|
575
|
-
*/
|
|
576
|
-
function associatedSeriesForXAxes(
|
|
577
|
-
data: TimeSeriesChartData,
|
|
578
|
-
axisAssignments: Map<string, AxesAssignment>,
|
|
579
|
-
xAxesState: AxesState<ContinuousNumericAxis>
|
|
580
|
-
): Map<string, Array<string>> {
|
|
581
|
-
return associatedSeriesFor(
|
|
582
|
-
assignment => assignment?.xAxis || xAxesState.axisDefaultId().getOrElse(""),
|
|
583
|
-
data,
|
|
584
|
-
axisAssignments
|
|
585
|
-
)
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Determines which series are assigned to which y-axes, and returns a map holding the
|
|
590
|
-
* x-axis names and their associated list of series
|
|
591
|
-
* @param data The chart data
|
|
592
|
-
* @param axisAssignments A map holding the series names and its associated x-axis and y-axis names
|
|
593
|
-
* @param yAxesState Holds information about the axis and how it is displayed
|
|
594
|
-
* @return A map holding the y-axis names the names of the series associated with the axis.
|
|
595
|
-
*/
|
|
596
|
-
function associatedSeriesForYAxes(
|
|
597
|
-
data: ChartData,
|
|
598
|
-
axisAssignments: Map<string, AxesAssignment>,
|
|
599
|
-
yAxesState: AxesState<OrdinalStringAxis>
|
|
600
|
-
): Map<string, Array<string>> {
|
|
601
|
-
return associatedSeriesFor(
|
|
602
|
-
assignment => assignment?.yAxis || yAxesState.axisDefaultId().getOrElse(""),
|
|
603
|
-
data,
|
|
604
|
-
axisAssignments
|
|
605
|
-
)
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Determines which series are assigned to which axes, and returns a map holding the
|
|
610
|
-
* axis names and their associated list of series. The extractor function returns the axis ID
|
|
611
|
-
* for the series and is responsible for return the x-axis ID or the y-axis ID depending
|
|
612
|
-
* on the context of the call.
|
|
613
|
-
* @param axisIdExtractor A function that accepts the {@link AxesAssignment} and returns the axis ID
|
|
614
|
-
* @param data The chart data
|
|
615
|
-
* @param axisAssignments A map holding the series names and its associated x-axis and y-axis names
|
|
616
|
-
* @return A map holding the axis names the names of the series associated with the axis.
|
|
617
|
-
*/
|
|
618
|
-
function associatedSeriesFor(
|
|
619
|
-
axisIdExtractor: (assignment?: AxesAssignment) => string,
|
|
620
|
-
data: ChartData,
|
|
621
|
-
axisAssignments: Map<string, AxesAssignment>
|
|
622
|
-
): Map<string, Array<string>> {
|
|
623
|
-
return Array
|
|
624
|
-
.from(data.seriesNames)
|
|
625
|
-
.reduce(
|
|
626
|
-
(assignedSeries, seriesName) => {
|
|
627
|
-
const id = axisIdExtractor(axisAssignments.get(seriesName))
|
|
628
|
-
const series = assignedSeries.get(id) || []
|
|
629
|
-
series.push(seriesName)
|
|
630
|
-
assignedSeries.set(id, series)
|
|
631
|
-
return assignedSeries
|
|
632
|
-
},
|
|
633
|
-
new Map<string, Array<string>>()
|
|
634
|
-
)
|
|
635
|
-
}
|