stream-charts 1.0.0 → 1.1.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/README.md +758 -345
- package/changes.md +10 -0
- package/dist/src/app/charts/Chart.d.ts +116 -87
- package/dist/src/app/charts/Chart.js +96 -101
- package/dist/src/app/charts/Chart.js.map +1 -1
- package/dist/src/app/charts/axes/AxesState.d.ts +64 -0
- package/dist/src/app/charts/axes/AxesState.js +97 -0
- package/dist/src/app/charts/axes/AxesState.js.map +1 -0
- package/dist/src/app/charts/axes/AxesState.test.js +30 -0
- package/dist/src/app/charts/axes/AxesState.test.js.map +1 -0
- package/dist/src/app/charts/axes/AxisInterval.d.ts +92 -0
- package/dist/src/app/charts/axes/AxisInterval.js +126 -0
- package/dist/src/app/charts/axes/AxisInterval.js.map +1 -0
- package/dist/src/app/charts/axes/AxisInterval.test.js +120 -0
- package/dist/src/app/charts/axes/AxisInterval.test.js.map +1 -0
- package/dist/src/app/charts/axes/BaseAxisRange.d.ts +83 -0
- package/dist/src/app/charts/axes/BaseAxisRange.js +58 -0
- package/dist/src/app/charts/axes/BaseAxisRange.js.map +1 -0
- package/dist/src/app/charts/axes/ContinuousAxis.d.ts +22 -0
- package/dist/src/app/charts/axes/ContinuousAxis.js +96 -0
- package/dist/src/app/charts/axes/ContinuousAxis.js.map +1 -0
- package/dist/src/app/charts/axes/ContinuousAxisRange.d.ts +59 -0
- package/dist/src/app/charts/axes/ContinuousAxisRange.js +84 -0
- package/dist/src/app/charts/axes/ContinuousAxisRange.js.map +1 -0
- package/dist/src/app/charts/axes/ContinuousAxisRange.test.js +47 -0
- package/dist/src/app/charts/axes/ContinuousAxisRange.test.js.map +1 -0
- package/dist/src/app/charts/axes/OrdinalAxis.d.ts +23 -0
- package/dist/src/app/charts/axes/OrdinalAxis.js +124 -0
- package/dist/src/app/charts/axes/OrdinalAxis.js.map +1 -0
- package/dist/src/app/charts/axes/OrdinalAxisRange.d.ts +69 -0
- package/dist/src/app/charts/axes/OrdinalAxisRange.js +100 -0
- package/dist/src/app/charts/axes/OrdinalAxisRange.js.map +1 -0
- package/dist/src/app/charts/axes/OrdinalAxisRange.test.js +48 -0
- package/dist/src/app/charts/axes/OrdinalAxisRange.test.js.map +1 -0
- package/dist/src/app/charts/axes/axes.d.ts +391 -0
- package/dist/src/app/charts/axes/axes.js +1046 -0
- package/dist/src/app/charts/axes/axes.js.map +1 -0
- package/dist/src/app/charts/d3types.d.ts +10 -10
- package/dist/src/app/charts/filters/regexFilter.d.ts +9 -0
- package/dist/src/app/charts/filters/regexFilter.js +18 -0
- package/dist/src/app/charts/filters/regexFilter.js.map +1 -0
- package/dist/src/app/charts/filters/regexFilter.test.d.ts +1 -0
- package/dist/src/app/charts/filters/regexFilter.test.js +11 -0
- package/dist/src/app/charts/filters/regexFilter.test.js.map +1 -0
- package/dist/src/app/charts/hooks/useAxes.d.ts +144 -0
- package/dist/src/app/charts/hooks/useAxes.js +187 -0
- package/dist/src/app/charts/hooks/useAxes.js.map +1 -0
- package/dist/src/app/charts/hooks/useChart.d.ts +30 -201
- package/dist/src/app/charts/hooks/useChart.js +33 -134
- package/dist/src/app/charts/hooks/useChart.js.map +1 -1
- package/dist/src/app/charts/hooks/useDataObservable.d.ts +74 -0
- package/dist/src/app/charts/hooks/useDataObservable.js +76 -0
- package/dist/src/app/charts/hooks/useDataObservable.js.map +1 -0
- package/dist/src/app/charts/hooks/useInitialData.d.ts +38 -0
- package/dist/src/app/charts/hooks/useInitialData.js +29 -0
- package/dist/src/app/charts/hooks/useInitialData.js.map +1 -0
- package/dist/src/app/charts/hooks/useMouse.d.ts +53 -0
- package/dist/src/app/charts/hooks/useMouse.js +65 -0
- package/dist/src/app/charts/hooks/useMouse.js.map +1 -0
- package/dist/src/app/charts/hooks/usePlotDimensions.d.ts +34 -0
- package/dist/src/app/charts/hooks/usePlotDimensions.js +73 -0
- package/dist/src/app/charts/hooks/usePlotDimensions.js.map +1 -0
- package/dist/src/app/charts/hooks/useTooltip.d.ts +64 -0
- package/dist/src/app/charts/hooks/useTooltip.js +52 -0
- package/dist/src/app/charts/hooks/useTooltip.js.map +1 -0
- package/dist/src/app/charts/observables/ChartData.d.ts +23 -0
- package/dist/src/app/charts/observables/ChartData.js +20 -0
- package/dist/src/app/charts/observables/ChartData.js.map +1 -0
- package/dist/src/app/charts/observables/iterates.d.ts +52 -0
- package/dist/src/app/charts/observables/iterates.js +121 -0
- package/dist/src/app/charts/observables/iterates.js.map +1 -0
- package/dist/src/app/charts/observables/iterates.test.d.ts +1 -0
- package/dist/src/app/charts/observables/iterates.test.js +180 -0
- package/dist/src/app/charts/observables/iterates.test.js.map +1 -0
- package/dist/src/app/charts/observables/ordinals.d.ts +75 -0
- package/dist/src/app/charts/observables/ordinals.js +141 -0
- package/dist/src/app/charts/observables/ordinals.js.map +1 -0
- package/dist/src/app/charts/observables/ordinals.test.d.ts +1 -0
- package/dist/src/app/charts/observables/ordinals.test.js +102 -0
- package/dist/src/app/charts/observables/ordinals.test.js.map +1 -0
- package/dist/src/app/charts/plots/BarPlot.d.ts +81 -0
- package/dist/src/app/charts/plots/BarPlot.js +557 -0
- package/dist/src/app/charts/plots/BarPlot.js.map +1 -0
- package/dist/src/app/charts/plots/PoincarePlot.d.ts +78 -0
- package/dist/src/app/charts/plots/PoincarePlot.js +504 -0
- package/dist/src/app/charts/plots/PoincarePlot.js.map +1 -0
- package/dist/src/app/charts/{RasterPlot.d.ts → plots/RasterPlot.d.ts} +1 -1
- package/dist/src/app/charts/{RasterPlot.js → plots/RasterPlot.js} +152 -133
- package/dist/src/app/charts/plots/RasterPlot.js.map +1 -0
- package/dist/src/app/charts/{ScatterPlot.d.ts → plots/ScatterPlot.d.ts} +10 -8
- package/dist/src/app/charts/plots/ScatterPlot.js +379 -0
- package/dist/src/app/charts/plots/ScatterPlot.js.map +1 -0
- package/dist/src/app/charts/{plot.d.ts → plots/plot.d.ts} +12 -14
- package/dist/src/app/charts/{plot.js → plots/plot.js} +19 -17
- package/dist/src/app/charts/plots/plot.js.map +1 -0
- package/dist/src/app/charts/series/baseSeries.d.ts +38 -0
- package/dist/src/app/charts/series/baseSeries.js +36 -0
- package/dist/src/app/charts/series/baseSeries.js.map +1 -0
- package/dist/src/app/charts/series/datumSeries.test.d.ts +1 -0
- package/dist/src/app/charts/series/datumSeries.test.js +50 -0
- package/dist/src/app/charts/series/datumSeries.test.js.map +1 -0
- package/dist/src/app/charts/series/iterateSeries.d.ts +42 -0
- package/dist/src/app/charts/series/iterateSeries.js +34 -0
- package/dist/src/app/charts/series/iterateSeries.js.map +1 -0
- package/dist/src/app/charts/series/ordinalSeries.d.ts +54 -0
- package/dist/src/app/charts/series/ordinalSeries.js +98 -0
- package/dist/src/app/charts/series/ordinalSeries.js.map +1 -0
- package/dist/src/app/charts/series/timeSeries.d.ts +30 -0
- package/dist/src/app/charts/series/timeSeries.js +19 -0
- package/dist/src/app/charts/series/timeSeries.js.map +1 -0
- package/dist/src/app/charts/{chartData.d.ts → series/timeSeriesChartData.d.ts} +11 -6
- package/dist/src/app/charts/series/timeSeriesChartData.js +32 -0
- package/dist/src/app/charts/series/timeSeriesChartData.js.map +1 -0
- package/dist/src/app/charts/styling/barPlotStyle.d.ts +41 -0
- package/dist/src/app/charts/styling/barPlotStyle.js +84 -0
- package/dist/src/app/charts/styling/barPlotStyle.js.map +1 -0
- package/dist/src/app/charts/{margins.d.ts → styling/margins.d.ts} +7 -5
- package/dist/src/app/charts/{margins.js → styling/margins.js} +19 -9
- package/dist/src/app/charts/styling/margins.js.map +1 -0
- package/dist/src/app/charts/styling/margins.test.d.ts +1 -0
- package/dist/src/app/charts/styling/margins.test.js +19 -0
- package/dist/src/app/charts/styling/margins.test.js.map +1 -0
- package/dist/src/app/charts/styling/svgStyle.d.ts +76 -0
- package/dist/src/app/charts/styling/svgStyle.js +84 -0
- package/dist/src/app/charts/styling/svgStyle.js.map +1 -0
- package/dist/src/app/charts/subscriptions/subscription.test.d.ts +1 -0
- package/dist/src/app/charts/subscriptions/subscription.test.js +395 -0
- package/dist/src/app/charts/subscriptions/subscription.test.js.map +1 -0
- package/dist/src/app/charts/subscriptions/subscriptions.d.ts +100 -0
- package/dist/src/app/charts/subscriptions/subscriptions.js +449 -0
- package/dist/src/app/charts/subscriptions/subscriptions.js.map +1 -0
- package/dist/src/app/charts/tooltips/BarPlotTooltipContent.d.ts +90 -0
- package/dist/src/app/charts/tooltips/BarPlotTooltipContent.js +302 -0
- package/dist/src/app/charts/tooltips/BarPlotTooltipContent.js.map +1 -0
- package/dist/src/app/charts/tooltips/PoincarePlotTooltipContent.d.ts +100 -0
- package/dist/src/app/charts/tooltips/PoincarePlotTooltipContent.js +190 -0
- package/dist/src/app/charts/tooltips/PoincarePlotTooltipContent.js.map +1 -0
- package/dist/src/app/charts/{RasterPlotTooltipContent.js → tooltips/RasterPlotTooltipContent.js} +40 -44
- package/dist/src/app/charts/tooltips/RasterPlotTooltipContent.js.map +1 -0
- package/dist/src/app/charts/tooltips/ScatterPlotTooltipContent.js +154 -0
- package/dist/src/app/charts/tooltips/ScatterPlotTooltipContent.js.map +1 -0
- package/dist/src/app/charts/{Tooltip.d.ts → tooltips/Tooltip.d.ts} +4 -2
- package/dist/src/app/charts/{Tooltip.js → tooltips/Tooltip.js} +23 -28
- package/dist/src/app/charts/tooltips/Tooltip.js.map +1 -0
- package/dist/src/app/charts/{tooltipUtils.d.ts → tooltips/tooltipUtils.d.ts} +17 -11
- package/dist/src/app/charts/{tooltipUtils.js → tooltips/tooltipUtils.js} +52 -25
- package/dist/src/app/charts/tooltips/tooltipUtils.js.map +1 -0
- package/dist/src/app/charts/{Tracker.d.ts → trackers/Tracker.d.ts} +6 -5
- package/dist/src/app/charts/trackers/Tracker.js +60 -0
- package/dist/src/app/charts/trackers/Tracker.js.map +1 -0
- package/dist/src/app/charts/{trackerUtils.d.ts → trackers/trackerUtils.d.ts} +13 -8
- package/dist/src/app/charts/trackers/trackerUtils.js +359 -0
- package/dist/src/app/charts/trackers/trackerUtils.js.map +1 -0
- package/dist/src/app/charts/utils.d.ts +22 -32
- package/dist/src/app/charts/utils.js +36 -37
- package/dist/src/app/charts/utils.js.map +1 -1
- package/dist/src/index.d.ts +48 -15
- package/dist/src/index.js +71 -15
- package/dist/src/index.js.map +1 -1
- package/package.json +30 -20
- package/src/app/charts/Chart.tsx +334 -0
- package/src/app/charts/axes/AxesState.test.ts +34 -0
- package/src/app/charts/axes/AxesState.ts +112 -0
- package/src/app/charts/axes/AxisInterval.test.ts +143 -0
- package/src/app/charts/axes/AxisInterval.ts +139 -0
- package/src/app/charts/axes/BaseAxisRange.ts +113 -0
- package/src/app/charts/axes/ContinuousAxis.tsx +192 -0
- package/src/app/charts/axes/ContinuousAxisRange.test.ts +55 -0
- package/src/app/charts/axes/ContinuousAxisRange.ts +96 -0
- package/src/app/charts/axes/OrdinalAxis.tsx +223 -0
- package/src/app/charts/axes/OrdinalAxisRange.test.ts +55 -0
- package/src/app/charts/axes/OrdinalAxisRange.ts +112 -0
- package/src/app/charts/axes/axes.ts +1569 -0
- package/src/app/charts/d3types.ts +16 -0
- package/src/app/charts/filters/regexFilter.test.ts +13 -0
- package/src/app/charts/filters/regexFilter.ts +17 -0
- package/src/app/charts/hooks/useAxes.tsx +341 -0
- package/src/app/charts/hooks/useChart.tsx +159 -0
- package/src/app/charts/hooks/useDataObservable.tsx +175 -0
- package/src/app/charts/hooks/useInitialData.tsx +65 -0
- package/src/app/charts/hooks/useMouse.tsx +125 -0
- package/src/app/charts/hooks/usePlotDimensions.tsx +120 -0
- package/src/app/charts/hooks/useTooltip.tsx +112 -0
- package/src/app/charts/observables/ChartData.ts +31 -0
- package/src/app/charts/observables/iterates.test.ts +201 -0
- package/src/app/charts/observables/iterates.ts +203 -0
- package/src/app/charts/observables/ordinals.test.ts +135 -0
- package/src/app/charts/observables/ordinals.ts +248 -0
- package/src/app/charts/plots/BarPlot.tsx +1088 -0
- package/src/app/charts/plots/PoincarePlot.tsx +832 -0
- package/src/app/charts/plots/RasterPlot.tsx +676 -0
- package/src/app/charts/plots/ScatterPlot.tsx +653 -0
- package/src/app/charts/plots/plot.ts +75 -0
- package/src/app/charts/series/baseSeries.ts +52 -0
- package/src/app/charts/series/datumSeries.test.ts +60 -0
- package/src/app/charts/series/iterateSeries.ts +56 -0
- package/src/app/charts/series/ordinalSeries.ts +164 -0
- package/src/app/charts/series/timeSeries.ts +40 -0
- package/src/app/charts/series/timeSeriesChartData.ts +68 -0
- package/src/app/charts/styling/barPlotStyle.ts +126 -0
- package/src/app/charts/styling/margins.test.ts +22 -0
- package/src/app/charts/styling/margins.ts +58 -0
- package/src/app/charts/styling/svgStyle.ts +118 -0
- package/src/app/charts/subscriptions/subscription.test.ts +499 -0
- package/src/app/charts/subscriptions/subscriptions.ts +635 -0
- package/src/app/charts/tooltips/BarPlotTooltipContent.tsx +440 -0
- package/src/app/charts/tooltips/PoincarePlotTooltipContent.tsx +352 -0
- package/src/app/charts/tooltips/RasterPlotTooltipContent.tsx +274 -0
- package/src/app/charts/tooltips/ScatterPlotTooltipContent.tsx +319 -0
- package/src/app/charts/tooltips/Tooltip.tsx +148 -0
- package/src/app/charts/tooltips/tooltipUtils.ts +216 -0
- package/src/app/charts/trackers/Tracker.tsx +129 -0
- package/src/app/charts/trackers/trackerUtils.ts +494 -0
- package/src/app/charts/utils.ts +109 -0
- package/dist/src/app/charts/CategoryAxis.d.ts +0 -20
- package/dist/src/app/charts/CategoryAxis.js +0 -112
- package/dist/src/app/charts/CategoryAxis.js.map +0 -1
- package/dist/src/app/charts/ContinuousAxis.d.ts +0 -16
- package/dist/src/app/charts/ContinuousAxis.js +0 -186
- package/dist/src/app/charts/ContinuousAxis.js.map +0 -1
- package/dist/src/app/charts/RasterPlot.js.map +0 -1
- package/dist/src/app/charts/RasterPlotTooltipContent.js.map +0 -1
- package/dist/src/app/charts/ScatterPlot.js +0 -351
- package/dist/src/app/charts/ScatterPlot.js.map +0 -1
- package/dist/src/app/charts/ScatterPlotTooltipContent.js +0 -163
- package/dist/src/app/charts/ScatterPlotTooltipContent.js.map +0 -1
- package/dist/src/app/charts/Tooltip.js.map +0 -1
- package/dist/src/app/charts/Tracker.js +0 -65
- package/dist/src/app/charts/Tracker.js.map +0 -1
- package/dist/src/app/charts/axes.d.ts +0 -132
- package/dist/src/app/charts/axes.js +0 -265
- package/dist/src/app/charts/axes.js.map +0 -1
- package/dist/src/app/charts/chartData.js +0 -32
- package/dist/src/app/charts/chartData.js.map +0 -1
- package/dist/src/app/charts/continuousAxisRangeFor.d.ts +0 -20
- package/dist/src/app/charts/continuousAxisRangeFor.js +0 -68
- package/dist/src/app/charts/continuousAxisRangeFor.js.map +0 -1
- package/dist/src/app/charts/datumSeries.d.ts +0 -59
- package/dist/src/app/charts/datumSeries.js +0 -55
- package/dist/src/app/charts/datumSeries.js.map +0 -1
- package/dist/src/app/charts/datumSeries.test.js +0 -50
- package/dist/src/app/charts/datumSeries.test.js.map +0 -1
- package/dist/src/app/charts/hooks/AxesState.d.ts +0 -37
- package/dist/src/app/charts/hooks/AxesState.js +0 -44
- package/dist/src/app/charts/hooks/AxesState.js.map +0 -1
- package/dist/src/app/charts/margins.js.map +0 -1
- package/dist/src/app/charts/margins.test.js +0 -14
- package/dist/src/app/charts/margins.test.js.map +0 -1
- package/dist/src/app/charts/plot.js.map +0 -1
- package/dist/src/app/charts/regexFilter.d.ts +0 -9
- package/dist/src/app/charts/regexFilter.js +0 -17
- package/dist/src/app/charts/regexFilter.js.map +0 -1
- package/dist/src/app/charts/regexFilter.test.js +0 -11
- package/dist/src/app/charts/regexFilter.test.js.map +0 -1
- package/dist/src/app/charts/subscriptions.d.ts +0 -43
- package/dist/src/app/charts/subscriptions.js +0 -213
- package/dist/src/app/charts/subscriptions.js.map +0 -1
- package/dist/src/app/charts/svgStyle.d.ts +0 -27
- package/dist/src/app/charts/svgStyle.js +0 -32
- package/dist/src/app/charts/svgStyle.js.map +0 -1
- package/dist/src/app/charts/timeRange.test.js +0 -54
- package/dist/src/app/charts/timeRange.test.js.map +0 -1
- package/dist/src/app/charts/tooltipUtils.js.map +0 -1
- package/dist/src/app/charts/trackerUtils.js +0 -130
- package/dist/src/app/charts/trackerUtils.js.map +0 -1
- /package/dist/src/app/charts/{datumSeries.test.d.ts → axes/AxesState.test.d.ts} +0 -0
- /package/dist/src/app/charts/{margins.test.d.ts → axes/AxisInterval.test.d.ts} +0 -0
- /package/dist/src/app/charts/{regexFilter.test.d.ts → axes/ContinuousAxisRange.test.d.ts} +0 -0
- /package/dist/src/app/charts/{timeRange.test.d.ts → axes/OrdinalAxisRange.test.d.ts} +0 -0
- /package/dist/src/app/charts/{RasterPlotTooltipContent.d.ts → tooltips/RasterPlotTooltipContent.d.ts} +0 -0
- /package/dist/src/app/charts/{ScatterPlotTooltipContent.d.ts → tooltips/ScatterPlotTooltipContent.d.ts} +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Option } from "prelude-ts";
|
|
2
|
-
export function datumOf(time, value) {
|
|
3
|
-
return { time: time, value: value };
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Creates a series from the name and the optional array of `Datum`.
|
|
7
|
-
* @param name The name of the series (i.e. neuron)
|
|
8
|
-
* @param data The array of (time, value) pairs, where the value is the spike value (in mV)
|
|
9
|
-
* @return A `Series` for object that can be used by the `RasterChart`
|
|
10
|
-
* @see seriesFromTuples
|
|
11
|
-
* @see emptySeries
|
|
12
|
-
*/
|
|
13
|
-
export function seriesFrom(name, data) {
|
|
14
|
-
if (data === void 0) { data = []; }
|
|
15
|
-
return {
|
|
16
|
-
name: name,
|
|
17
|
-
data: data,
|
|
18
|
-
last: function () { return data ? (data.length > 0 ? Option.of(data[data.length - 1]) : Option.none()) : Option.none(); },
|
|
19
|
-
length: function () { return data ? data.length : 0; },
|
|
20
|
-
isEmpty: function () { return data ? data.length === 0 : true; }
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Creates a series from the name and the optional array of (x, y) pairs (tuples)
|
|
25
|
-
* @param name The name of the series
|
|
26
|
-
* @param data The optional array of (x, y) pairs (tuples)
|
|
27
|
-
* @return A `Series` for object that can be used by the `RasterChart`
|
|
28
|
-
* @see seriesFrom
|
|
29
|
-
* @see emptySeries
|
|
30
|
-
*/
|
|
31
|
-
export var seriesFromTuples = function (name, data) {
|
|
32
|
-
if (data === void 0) { data = []; }
|
|
33
|
-
return seriesFrom(name, data.map(function (_a) {
|
|
34
|
-
var t = _a[0], y = _a[1];
|
|
35
|
-
return datumOf(t, y);
|
|
36
|
-
}));
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Returns an empty series with the specified name
|
|
40
|
-
* @param name The name of the series
|
|
41
|
-
* @return The empty series
|
|
42
|
-
* @see seriesFrom
|
|
43
|
-
* @see seriesFromTuples
|
|
44
|
-
*/
|
|
45
|
-
export var emptySeries = function (name) { return seriesFrom(name); };
|
|
46
|
-
/**
|
|
47
|
-
* Creates an array of empty series, one for each specified name
|
|
48
|
-
* @param names The names for each of the empty series
|
|
49
|
-
* @return An array of empty series with the specified names
|
|
50
|
-
* @see emptySeries
|
|
51
|
-
* @see seriesFrom
|
|
52
|
-
* @see seriesFromTuples
|
|
53
|
-
*/
|
|
54
|
-
export var emptySeriesFor = function (names) { return names.map(function (name) { return seriesFrom(name); }); };
|
|
55
|
-
//# sourceMappingURL=datumSeries.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datumSeries.js","sourceRoot":"","sources":["../../../../src/app/charts/datumSeries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,YAAY,CAAC;AAUlC,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,KAAa;IAC/C,OAAO,EAAC,IAAI,MAAA,EAAE,KAAK,OAAA,EAAC,CAAA;AACxB,CAAC;AAcD;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAAuB;IAAvB,qBAAA,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CAAmC,CAAA"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { emptySeries, seriesFrom } from "./datumSeries";
|
|
2
|
-
describe('should be able to create an empty series', function () {
|
|
3
|
-
test('an empty series should be empty', function () {
|
|
4
|
-
expect(emptySeries('test1').isEmpty());
|
|
5
|
-
});
|
|
6
|
-
test('an empty series should not have a last element', function () {
|
|
7
|
-
expect(emptySeries('test1').last().isNone());
|
|
8
|
-
});
|
|
9
|
-
test('an empty series should have 0 length', function () {
|
|
10
|
-
expect(emptySeries('test1').length()).toBe(0);
|
|
11
|
-
});
|
|
12
|
-
test('an empty series should not have any data', function () {
|
|
13
|
-
expect(emptySeries('test1').data.length).toBe(0);
|
|
14
|
-
});
|
|
15
|
-
test('an empty series should have the specified name', function () {
|
|
16
|
-
expect(emptySeries('test1').name).toBe('test1');
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
describe('should be able to create a series from data', function () {
|
|
20
|
-
var data = [
|
|
21
|
-
{ time: 1, value: 10 },
|
|
22
|
-
{ time: 2, value: 20 },
|
|
23
|
-
{ time: 3, value: 30 },
|
|
24
|
-
{ time: 4, value: 40 },
|
|
25
|
-
{ time: 5, value: 50 },
|
|
26
|
-
{ time: 6, value: 60 },
|
|
27
|
-
{ time: 7, value: 70 },
|
|
28
|
-
{ time: 8, value: 80 },
|
|
29
|
-
{ time: 9, value: 90 },
|
|
30
|
-
{ time: 10, value: 100 },
|
|
31
|
-
];
|
|
32
|
-
var series = seriesFrom('test2', data);
|
|
33
|
-
test('series should not be empty', function () {
|
|
34
|
-
expect(!series.isEmpty());
|
|
35
|
-
});
|
|
36
|
-
test('series name should be test2', function () {
|
|
37
|
-
expect(series.name).toEqual('test2');
|
|
38
|
-
});
|
|
39
|
-
test('series should have 10 points', function () {
|
|
40
|
-
expect(series.length()).toBe(10);
|
|
41
|
-
});
|
|
42
|
-
test('last value in series should be (10, 100)', function () {
|
|
43
|
-
var lastElement = series.last().getOrElse({ time: NaN, value: NaN });
|
|
44
|
-
expect(lastElement).toEqual({ time: 10, value: 100 });
|
|
45
|
-
});
|
|
46
|
-
test('series data should equal original data', function () {
|
|
47
|
-
expect(series.data).toEqual(data);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=datumSeries.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datumSeries.test.js","sourceRoot":"","sources":["../../../../src/app/charts/datumSeries.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAEtD,QAAQ,CAAC,0CAA0C,EAAE;IACjD,IAAI,CAAC,iCAAiC,EAAE;QACpC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,gDAAgD,EAAE;QACnD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,sCAAsC,EAAE;QACzC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,0CAA0C,EAAE;QAC7C,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,gDAAgD,EAAE;QACnD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,6CAA6C,EAAE;IACpD,IAAM,IAAI,GAAG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C,CAAC;QACrE,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAC,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,wCAAwC,EAAE;QAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BaseAxis } from "../axes";
|
|
2
|
-
export interface AxesState {
|
|
3
|
-
/**
|
|
4
|
-
* Attempts to retrieve the x-axis for the specified ID
|
|
5
|
-
* @param axisId The unique ID of the axis
|
|
6
|
-
* @return The axis, or undefined if no axis with the specified ID is found
|
|
7
|
-
*/
|
|
8
|
-
readonly axisFor: (axisId: string) => BaseAxis | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* @return An array holding all existing the x-axis IDs
|
|
11
|
-
*/
|
|
12
|
-
readonly axisIds: () => Array<string>;
|
|
13
|
-
/**
|
|
14
|
-
* @return The default name of the x-axis (in case only on default axis was added)
|
|
15
|
-
*/
|
|
16
|
-
readonly axisDefaultName: () => string;
|
|
17
|
-
/**
|
|
18
|
-
* Mapping of the axis IDs to their axis objects
|
|
19
|
-
*/
|
|
20
|
-
readonly axes: Map<string, BaseAxis>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @return a new, empty {@link AxesState}
|
|
24
|
-
*/
|
|
25
|
-
export declare function createAxesState(): AxesState;
|
|
26
|
-
/**
|
|
27
|
-
* Adds an axis to the current axis state and returns a new axis state. This is an internal state
|
|
28
|
-
* management function. This should generally not be used. Instead use the {@link UseChartValues.addXAxis}
|
|
29
|
-
* and {@link UseChartValues.addYAxis} functions to add axes.
|
|
30
|
-
* @param axesState The current axes state
|
|
31
|
-
* @param axis The axis to add
|
|
32
|
-
* @param id The ID of the axis to add
|
|
33
|
-
* @return An updated axes state that has the new axis
|
|
34
|
-
* @see UseChartValues.addXAxis
|
|
35
|
-
* @see UseChartValues.addYAxis
|
|
36
|
-
*/
|
|
37
|
-
export declare function addAxisTo(axesState: AxesState, axis: BaseAxis, id: string): AxesState;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @return a new, empty {@link AxesState}
|
|
3
|
-
*/
|
|
4
|
-
export function createAxesState() {
|
|
5
|
-
return axesStateFrom(new Map());
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Adds an axis to the current axis state and returns a new axis state. This is an internal state
|
|
9
|
-
* management function. This should generally not be used. Instead use the {@link UseChartValues.addXAxis}
|
|
10
|
-
* and {@link UseChartValues.addYAxis} functions to add axes.
|
|
11
|
-
* @param axesState The current axes state
|
|
12
|
-
* @param axis The axis to add
|
|
13
|
-
* @param id The ID of the axis to add
|
|
14
|
-
* @return An updated axes state that has the new axis
|
|
15
|
-
* @see UseChartValues.addXAxis
|
|
16
|
-
* @see UseChartValues.addYAxis
|
|
17
|
-
*/
|
|
18
|
-
export function addAxisTo(axesState, axis, id) {
|
|
19
|
-
var updatedAxes = axesState.axes.set(id, axis);
|
|
20
|
-
return axesStateFrom(updatedAxes);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Calculates the axes-state from the specified map. The map associates the axis ID
|
|
24
|
-
* to the each axis
|
|
25
|
-
* @param axes The map associating the axes IDs to their respective axes
|
|
26
|
-
* @return An {@link AxesState}
|
|
27
|
-
*/
|
|
28
|
-
function axesStateFrom(axes) {
|
|
29
|
-
return {
|
|
30
|
-
axisFor: function (id) {
|
|
31
|
-
var axis = axes.get(id);
|
|
32
|
-
// when there is no axis for the specified ID and there is at least
|
|
33
|
-
// one axis, then just use that...it is the default axis
|
|
34
|
-
if (axis === undefined && axes.size >= 1) {
|
|
35
|
-
return Array.from(axes.values())[0];
|
|
36
|
-
}
|
|
37
|
-
return axis;
|
|
38
|
-
},
|
|
39
|
-
axisIds: function () { return Array.from(axes.keys()); },
|
|
40
|
-
axisDefaultName: function () { return Array.from(axes.keys())[0]; },
|
|
41
|
-
axes: axes
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=AxesState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AxesState.js","sourceRoot":"","sources":["../../../../../src/app/charts/hooks/AxesState.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,MAAM,UAAU,eAAe;IAC3B,OAAO,aAAa,CAAC,IAAI,GAAG,EAAoB,CAAC,CAAA;AACrD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,SAAS,CAAC,SAAoB,EAAE,IAAc,EAAE,EAAU;IACtE,IAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAChD,OAAO,aAAa,CAAC,WAAW,CAAC,CAAA;AACrC,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,IAA2B;IAC9C,OAAO;QACH,OAAO,EAAE,UAAA,EAAE;YACP,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;YACzB,mEAAmE;YACnE,wDAAwD;YACxD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE;gBACtC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;aACtC;YACD,OAAO,IAAI,CAAA;QACf,CAAC;QACD,OAAO,EAAE,cAAM,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAvB,CAAuB;QACtC,eAAe,EAAE,cAAM,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAA1B,CAA0B;QACjD,IAAI,MAAA;KACP,CAAA;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"margins.js","sourceRoot":"","sources":["../../../../src/app/charts/margins.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,SAAS;IACrB,OAAO,EAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAA;AACjD,CAAC;AAOD;;;;;;;;;GASG;AACH,MAAM,CAAC,IAAM,kBAAkB,GAC3B,UAAC,cAAsB,EAAE,eAAuB,EAAE,WAAmB,IAAiB,OAAA,CAAC;IACnF,KAAK,EAAE,cAAc,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,KAAK;IAC5D,MAAM,EAAE,eAAe,GAAG,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,MAAM;CACjE,CAAC,EAHoF,CAGpF,CAAA;AAEN;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,cAA0B,EAAE,UAAkB,IAAiB,OAAA,CAAC;IACpG,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK;IAChE,MAAM,EAAE,cAAc,CAAC,MAAM,GAAG,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM;CACrE,CAAC,EAHqG,CAGrG,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { plotDimensionsFrom } from "./margins";
|
|
2
|
-
describe('adjusted dimension should correct for margins', function () {
|
|
3
|
-
var margins = { top: 11, bottom: 12, left: 13, right: 14 };
|
|
4
|
-
var width = 100;
|
|
5
|
-
var height = 200;
|
|
6
|
-
var dimensions = plotDimensionsFrom(width, height, margins);
|
|
7
|
-
test('adjusted width should have the left and right margins removed', function () {
|
|
8
|
-
expect(dimensions.width).toBe(width - margins.right - margins.left);
|
|
9
|
-
});
|
|
10
|
-
test('adjusted height should have the top and bottom margins removed', function () {
|
|
11
|
-
expect(dimensions.height).toBe(height - margins.top - margins.bottom);
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
//# sourceMappingURL=margins.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"margins.test.js","sourceRoot":"","sources":["../../../../src/app/charts/margins.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAS,MAAM,WAAW,CAAC;AAErD,QAAQ,CAAC,+CAA+C,EAAE;IACtD,IAAM,OAAO,GAAW,EAAC,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAC,CAAC;IACnE,IAAM,KAAK,GAAG,GAAG,CAAC;IAClB,IAAM,MAAM,GAAG,GAAG,CAAC;IACnB,IAAM,UAAU,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9D,IAAI,CAAC,+DAA+D,EAAE;QAClE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,gEAAgE,EAAE;QACnE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plot.js","sourceRoot":"","sources":["../../../../src/app/charts/plot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAMzB;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAC/B,OAAe,EACf,SAAwB,EAC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ex in a try/catch and returns the regex, wrapped in an option,
|
|
4
|
-
* when it is valid. This can be used, for example, in a text field where the user types a regex.
|
|
5
|
-
* @param {string} regexString The string representation of the regex
|
|
6
|
-
* @return {Option<RegExp>} The regular expression (`RegExp`) wrapped in an option. If the regexp
|
|
7
|
-
* is invalid, then the option is none.
|
|
8
|
-
*/
|
|
9
|
-
export declare function regexFilter(regexString: string): Option<RegExp>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Option } from "prelude-ts";
|
|
2
|
-
/**
|
|
3
|
-
* Wraps the creation of the regex in a try/catch and returns the regex, wrapped in an option,
|
|
4
|
-
* when it is valid. This can be used, for example, in a text field where the user types a regex.
|
|
5
|
-
* @param {string} regexString The string representation of the regex
|
|
6
|
-
* @return {Option<RegExp>} The regular expression (`RegExp`) wrapped in an option. If the regexp
|
|
7
|
-
* is invalid, then the option is none.
|
|
8
|
-
*/
|
|
9
|
-
export function regexFilter(regexString) {
|
|
10
|
-
var regex;
|
|
11
|
-
try {
|
|
12
|
-
regex = new RegExp(regexString);
|
|
13
|
-
}
|
|
14
|
-
catch (error) { }
|
|
15
|
-
return regex ? Option.of(regex) : Option.none();
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=regexFilter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regexFilter.js","sourceRoot":"","sources":["../../../../src/app/charts/regexFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,YAAY,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC3C,IAAI,KAAK,CAAC;IACV,IAAI;QAAC,KAAK,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAA;KAAC;IAAC,OAAM,KAAK,EAAE,GAAE;IACrD,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAS,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAU,CAAC;AACpE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { regexFilter } from "./regexFilter";
|
|
2
|
-
test('option should contain a valid regex', function () {
|
|
3
|
-
expect(regexFilter("^[0-9]+$").isSome()).toEqual(true);
|
|
4
|
-
});
|
|
5
|
-
test('should allow progression of building regex', function () {
|
|
6
|
-
var filter = regexFilter("^[0-9").map(function (regex) { return '100a200'.match(regex).map(function (t) { return t; }); }).getOrUndefined();
|
|
7
|
-
expect(filter).toBeUndefined();
|
|
8
|
-
filter = regexFilter("^[0-9]+").map(function (regex) { return '100a200'.match(regex).map(function (t) { return t; }); }).getOrUndefined();
|
|
9
|
-
expect(filter).toEqual(['100']);
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=regexFilter.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regexFilter.test.js","sourceRoot":"","sources":["../../../../src/app/charts/regexFilter.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,IAAI,CAAC,qCAAqC,EAAE;IACxC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,4CAA4C,EAAE;IAC/C,IAAI,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAE,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,EAAD,CAAC,CAAC,EAAnC,CAAmC,CAAC,CAAC,cAAc,EAAE,CAAC;IACrG,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC;IAE/B,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAE,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,EAAD,CAAC,CAAC,EAAnC,CAAmC,CAAC,CAAC,cAAc,EAAE,CAAC;IACnG,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Datum, Series } from "./datumSeries";
|
|
2
|
-
import { ContinuousAxisRange } from "./continuousAxisRangeFor";
|
|
3
|
-
import { Observable, Subscription } from "rxjs";
|
|
4
|
-
import { ChartData } from "./chartData";
|
|
5
|
-
import { AxesAssignment } from "./plot";
|
|
6
|
-
import { AxesState } from "./hooks/AxesState";
|
|
7
|
-
/**
|
|
8
|
-
* Creates a subscription to the series observable with the data stream. The common code is
|
|
9
|
-
* shared by the plots.
|
|
10
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
11
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
12
|
-
* @param windowingTime Basically the update time where data is collected and then rendered
|
|
13
|
-
* @param axisAssignments The assignment of the series to their x- and y-axes
|
|
14
|
-
* @param xAxesState The current state of the x-axis
|
|
15
|
-
* @param onUpdateData Callback for when data is updated
|
|
16
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
17
|
-
* be dropped on the next update
|
|
18
|
-
* @param updateTimingAndPlot The callback function to update the plot and timing
|
|
19
|
-
* @param seriesMap The series-name and the associated series
|
|
20
|
-
* @param setCurrentTime Callback to update the current time based on the streamed data
|
|
21
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
22
|
-
*/
|
|
23
|
-
export declare function subscriptionFor(seriesObservable: Observable<ChartData>, onSubscribe: (subscription: Subscription) => void, windowingTime: number, axisAssignments: Map<string, AxesAssignment>, xAxesState: AxesState, onUpdateData: ((seriesName: string, data: Array<Datum>) => void) | undefined, dropDataAfter: number, updateTimingAndPlot: (ranges: Map<string, ContinuousAxisRange>) => void, seriesMap: Map<string, Series>, setCurrentTime: (axisId: string, end: number) => void): Subscription;
|
|
24
|
-
/**
|
|
25
|
-
* **Function has side-effects on the Series (for performance).**
|
|
26
|
-
*
|
|
27
|
-
* Creates a subscription to the series observable with the data stream. The common code is
|
|
28
|
-
* shared by the plots.
|
|
29
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
30
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
31
|
-
* @param windowingTime Basically the update time where data is collected and then rendered
|
|
32
|
-
* @param axisAssignments The assignment of the series to their x- and y-axes
|
|
33
|
-
* @param xAxesState The current state of the x-axis
|
|
34
|
-
* @param onUpdateData Callback for when data is updated
|
|
35
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
36
|
-
* be dropped on the next update
|
|
37
|
-
* @param updateTimingAndPlot The callback function to update the plot and timing
|
|
38
|
-
* @param seriesMap The series-name and the associated series
|
|
39
|
-
* @param setCurrentTime Callback to update the current time based on the streamed data
|
|
40
|
-
* @param cadencePeriod The number of milliseconds between time updates
|
|
41
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
42
|
-
*/
|
|
43
|
-
export declare function subscriptionWithCadenceFor(seriesObservable: Observable<ChartData>, onSubscribe: (subscription: Subscription) => void, windowingTime: number, axisAssignments: Map<string, AxesAssignment>, xAxesState: AxesState, onUpdateData: ((seriesName: string, data: Array<Datum>) => void) | undefined, dropDataAfter: number, updateTimingAndPlot: (ranges: Map<string, ContinuousAxisRange>) => void, seriesMap: Map<string, Series>, setCurrentTime: (axisId: string, end: number) => void, cadencePeriod: number): Subscription;
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import { bufferTime, map, mergeAll, mergeWith } from "rxjs/operators";
|
|
38
|
-
import { timeRanges } from "./axes";
|
|
39
|
-
import { emptySeries } from "./datumSeries";
|
|
40
|
-
import { continuousAxisRangeFor } from "./continuousAxisRangeFor";
|
|
41
|
-
import { interval } from "rxjs";
|
|
42
|
-
/**
|
|
43
|
-
* Creates a subscription to the series observable with the data stream. The common code is
|
|
44
|
-
* shared by the plots.
|
|
45
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
46
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
47
|
-
* @param windowingTime Basically the update time where data is collected and then rendered
|
|
48
|
-
* @param axisAssignments The assignment of the series to their x- and y-axes
|
|
49
|
-
* @param xAxesState The current state of the x-axis
|
|
50
|
-
* @param onUpdateData Callback for when data is updated
|
|
51
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
52
|
-
* be dropped on the next update
|
|
53
|
-
* @param updateTimingAndPlot The callback function to update the plot and timing
|
|
54
|
-
* @param seriesMap The series-name and the associated series
|
|
55
|
-
* @param setCurrentTime Callback to update the current time based on the streamed data
|
|
56
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
57
|
-
*/
|
|
58
|
-
export function subscriptionFor(seriesObservable, onSubscribe, windowingTime, axisAssignments, xAxesState, onUpdateData, dropDataAfter, updateTimingAndPlot, seriesMap, setCurrentTime) {
|
|
59
|
-
var _this = this;
|
|
60
|
-
var subscription = seriesObservable
|
|
61
|
-
.pipe(bufferTime(windowingTime))
|
|
62
|
-
.subscribe(function (dataList) { return __awaiter(_this, void 0, void 0, function () {
|
|
63
|
-
return __generator(this, function (_a) {
|
|
64
|
-
switch (_a.label) {
|
|
65
|
-
case 0: return [4 /*yield*/, dataList.forEach(function (data) {
|
|
66
|
-
// grab the time-winds for the x-axes
|
|
67
|
-
var timesWindows = timeRanges(xAxesState.axes);
|
|
68
|
-
// calculate the max times for each x-axis, which is the max time over all the
|
|
69
|
-
// series assigned to an x-axis
|
|
70
|
-
var axesSeries = Array.from(data.maxTimes.entries())
|
|
71
|
-
.reduce(function (assignedSeries, _a) {
|
|
72
|
-
var _b;
|
|
73
|
-
var seriesName = _a[0];
|
|
74
|
-
var id = ((_b = axisAssignments.get(seriesName)) === null || _b === void 0 ? void 0 : _b.xAxis) || xAxesState.axisDefaultName();
|
|
75
|
-
var as = assignedSeries.get(id) || [];
|
|
76
|
-
as.push(seriesName);
|
|
77
|
-
assignedSeries.set(id, as);
|
|
78
|
-
return assignedSeries;
|
|
79
|
-
}, new Map());
|
|
80
|
-
// add each new point to it's corresponding series, the new points
|
|
81
|
-
// is a map(series_name -> new_point[])
|
|
82
|
-
data.newPoints.forEach(function (newData, name) {
|
|
83
|
-
var _a;
|
|
84
|
-
var _b, _c;
|
|
85
|
-
// grab the current series associated with the new data
|
|
86
|
-
var series = seriesMap.get(name) || emptySeries(name);
|
|
87
|
-
// update the handler with the new data point
|
|
88
|
-
if (onUpdateData)
|
|
89
|
-
onUpdateData(name, newData);
|
|
90
|
-
// add the new data to the series
|
|
91
|
-
(_a = series.data).push.apply(_a, newData);
|
|
92
|
-
var axisId = ((_b = axisAssignments.get(name)) === null || _b === void 0 ? void 0 : _b.xAxis) || xAxesState.axisDefaultName();
|
|
93
|
-
var currentAxisTime = ((_c = axesSeries.get(axisId)) === null || _c === void 0 ? void 0 : _c.reduce(function (tMax, seriesName) { return Math.max(data.maxTimes.get(seriesName) || data.maxTime, tMax); }, -Infinity)) || data.maxTime;
|
|
94
|
-
if (currentAxisTime !== undefined) {
|
|
95
|
-
// drop data that is older than the max time-window
|
|
96
|
-
while (currentAxisTime - series.data[0].time > dropDataAfter) {
|
|
97
|
-
series.data.shift();
|
|
98
|
-
}
|
|
99
|
-
var range = timesWindows.get(axisId);
|
|
100
|
-
if (range !== undefined && range.end < currentAxisTime) {
|
|
101
|
-
var timeWindow = range.end - range.start;
|
|
102
|
-
var timeRange = continuousAxisRangeFor(Math.max(0, currentAxisTime - timeWindow), Math.max(currentAxisTime, timeWindow));
|
|
103
|
-
timesWindows.set(axisId, timeRange);
|
|
104
|
-
setCurrentTime(axisId, timeRange.end);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
// update the data
|
|
109
|
-
updateTimingAndPlot(timesWindows);
|
|
110
|
-
})];
|
|
111
|
-
case 1:
|
|
112
|
-
_a.sent();
|
|
113
|
-
return [2 /*return*/];
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}); });
|
|
117
|
-
// provide the subscription to the caller
|
|
118
|
-
onSubscribe(subscription);
|
|
119
|
-
return subscription;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* **Function has side-effects on the Series (for performance).**
|
|
123
|
-
*
|
|
124
|
-
* Creates a subscription to the series observable with the data stream. The common code is
|
|
125
|
-
* shared by the plots.
|
|
126
|
-
* @param seriesObservable The series observable holding the stream of chart data
|
|
127
|
-
* @param onSubscribe Callback for when the observable is subscribed to
|
|
128
|
-
* @param windowingTime Basically the update time where data is collected and then rendered
|
|
129
|
-
* @param axisAssignments The assignment of the series to their x- and y-axes
|
|
130
|
-
* @param xAxesState The current state of the x-axis
|
|
131
|
-
* @param onUpdateData Callback for when data is updated
|
|
132
|
-
* @param dropDataAfter Limits the amount of data stored. Any data older than this value (ms) will
|
|
133
|
-
* be dropped on the next update
|
|
134
|
-
* @param updateTimingAndPlot The callback function to update the plot and timing
|
|
135
|
-
* @param seriesMap The series-name and the associated series
|
|
136
|
-
* @param setCurrentTime Callback to update the current time based on the streamed data
|
|
137
|
-
* @param cadencePeriod The number of milliseconds between time updates
|
|
138
|
-
* @return A subscription to the observable (for cancelling and the likes)
|
|
139
|
-
*/
|
|
140
|
-
export function subscriptionWithCadenceFor(seriesObservable, onSubscribe, windowingTime, axisAssignments, xAxesState, onUpdateData, dropDataAfter, updateTimingAndPlot, seriesMap, setCurrentTime, cadencePeriod) {
|
|
141
|
-
var maxTime = Array.from(seriesMap.entries())
|
|
142
|
-
.reduce(function (tMax, _a) {
|
|
143
|
-
var series = _a[1];
|
|
144
|
-
return Math.max(tMax, series.last().map(function (datum) { return datum.time; }).getOrElse(tMax));
|
|
145
|
-
}, -Infinity);
|
|
146
|
-
var cadence = interval(cadencePeriod)
|
|
147
|
-
.pipe(map(function (value) { return ({
|
|
148
|
-
currentTime: value * cadencePeriod,
|
|
149
|
-
maxTime: value * cadencePeriod,
|
|
150
|
-
maxTimes: new Map(),
|
|
151
|
-
newPoints: new Map()
|
|
152
|
-
}); }));
|
|
153
|
-
var subscription = seriesObservable
|
|
154
|
-
.pipe(mergeWith(cadence), bufferTime(windowingTime), mergeAll())
|
|
155
|
-
.subscribe(function (data) {
|
|
156
|
-
// grab the time-windows for the x-axes
|
|
157
|
-
var timesWindows = timeRanges(xAxesState.axes);
|
|
158
|
-
if (data.currentTime !== undefined) {
|
|
159
|
-
xAxesState.axisIds().forEach(function (axisId) {
|
|
160
|
-
var range = timesWindows.get(axisId);
|
|
161
|
-
if (range !== undefined && data.currentTime !== undefined) {
|
|
162
|
-
var timeWindow = (range.end - range.start);
|
|
163
|
-
var timeRange = continuousAxisRangeFor(Math.max(0, Math.max(range.end, data.currentTime + maxTime) - timeWindow), Math.max(Math.max(range.end, data.currentTime + maxTime), timeWindow));
|
|
164
|
-
timesWindows.set(axisId, timeRange);
|
|
165
|
-
setCurrentTime(axisId, data.currentTime + maxTime);
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
if (data.newPoints.size === 0) {
|
|
170
|
-
updateTimingAndPlot(timesWindows);
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
// determine which series belong to each x-axis
|
|
174
|
-
var axesSeries = Array.from(data.maxTimes.entries())
|
|
175
|
-
.reduce(function (assignedSeries, _a) {
|
|
176
|
-
var _b;
|
|
177
|
-
var seriesName = _a[0];
|
|
178
|
-
var id = ((_b = axisAssignments.get(seriesName)) === null || _b === void 0 ? void 0 : _b.xAxis) || xAxesState.axisDefaultName();
|
|
179
|
-
var as = assignedSeries.get(id) || [];
|
|
180
|
-
as.push(seriesName);
|
|
181
|
-
assignedSeries.set(id, as);
|
|
182
|
-
return assignedSeries;
|
|
183
|
-
}, new Map());
|
|
184
|
-
// add each new point to it's corresponding series, the new points
|
|
185
|
-
// is a map(series_name -> new_point[])
|
|
186
|
-
data.newPoints.forEach(function (newData, name) {
|
|
187
|
-
var _a;
|
|
188
|
-
var _b, _c;
|
|
189
|
-
// grab the current series associated with the new data
|
|
190
|
-
var series = seriesMap.get(name) || emptySeries(name);
|
|
191
|
-
// update the handler with the new data point
|
|
192
|
-
if (onUpdateData)
|
|
193
|
-
onUpdateData(name, newData);
|
|
194
|
-
// add the new data to the series
|
|
195
|
-
(_a = series.data).push.apply(_a, newData);
|
|
196
|
-
// drop data when specified
|
|
197
|
-
var axisId = ((_b = axisAssignments.get(name)) === null || _b === void 0 ? void 0 : _b.xAxis) || xAxesState.axisDefaultName();
|
|
198
|
-
var currentAxisTime = ((_c = axesSeries.get(axisId)) === null || _c === void 0 ? void 0 : _c.reduce(function (tMax, seriesName) { return Math.max(data.maxTimes.get(seriesName) || data.maxTime, tMax); }, -Infinity)) || data.maxTime;
|
|
199
|
-
if (currentAxisTime !== undefined) {
|
|
200
|
-
// drop data that is older than the max time-window
|
|
201
|
-
while (currentAxisTime - series.data[0].time > dropDataAfter) {
|
|
202
|
-
series.data.shift();
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
// update the data
|
|
207
|
-
updateTimingAndPlot(timesWindows);
|
|
208
|
-
});
|
|
209
|
-
// provide the subscription to the caller
|
|
210
|
-
onSubscribe(subscription);
|
|
211
|
-
return subscription;
|
|
212
|
-
}
|
|
213
|
-
//# sourceMappingURL=subscriptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../../src/app/charts/subscriptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAa,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAwB,UAAU,EAAC,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAQ,WAAW,EAAS,MAAM,eAAe,CAAC;AACzD,OAAO,EAAsB,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAA0C,QAAQ,EAA2B,MAAM,MAAM,CAAC;AAKjG;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,eAAe,CAC3B,gBAAuC,EACvC,WAAiD,EACjD,aAAqB,EACrB,eAA4C,EAC5C,UAAqB,EACrB,YAA4E,EAC5E,aAAqB,EACrB,mBAAuE,EACvE,SAA8B,EAC9B,cAAqD;IAVzD,iBA+EC;IAnEG,IAAM,YAAY,GAAG,gBAAgB;SAChC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;SAC/B,SAAS,CAAC,UAAM,QAAQ;;;wBACrB,qBAAM,QAAQ,CAAC,OAAO,CAAC,UAAA,IAAI;wBACvB,qCAAqC;wBACrC,IAAM,YAAY,GAAG,UAAU,CAAC,UAAU,CAAC,IAA0C,CAAC,CAAA;wBAEtF,8EAA8E;wBAC9E,+BAA+B;wBAC/B,IAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;6BACjD,MAAM,CACH,UAAC,cAAc,EAAE,EAAa;;gCAAZ,UAAU,QAAA;4BACxB,IAAM,EAAE,GAAG,CAAA,M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W,CAAC,IAAI,CAAC,CAAC;YAExD,6CAA6C;YAC7C,IAAI,YAAY;gBAAE,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAE9C,iCAAiC;YACjC,CAAA,KAAA,MAAM,CAAC,IAAI,CAAA,CAAC,IAAI,WAAI,OAAO,EAAE;YAE7B,2BAA2B;YAC3B,IAAM,MAAM,GAAG,CAAA,MAAA,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,KAAK,KAAI,UAAU,CAAC,eAAe,EAAE,CAAA;YAC/E,IAAM,eAAe,GAAG,CAAA,MAAA,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,0CACxC,MAAM,CACJ,UAAC,IAAI,EAAE,UAAU,IAAK,OAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAA7D,CAA6D,EACnF,CAAC,QAAQ,CACZ,KAAI,IAAI,CAAC,OAAO,CAAA;YACrB,IAAI,eAAe,KAAK,SAAS,EAAE;gBAC/B,mDAAmD;gBACnD,OAAO,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,aAAa,EAAE;oBAC1D,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;iBACtB;aACJ;QACL,CAAC,CAAC,CAAA;QAEF,kBAAkB;QAClB,mBAAmB,CAAC,YAAY,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEN,yCAAyC;IACzC,WAAW,CAAC,YAAY,CAAC,CAAA;IAEzB,OAAO,YAAY,CAAA;AACvB,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface SvgStyle {
|
|
2
|
-
height?: string | number;
|
|
3
|
-
width?: string | number;
|
|
4
|
-
outline?: string;
|
|
5
|
-
[propName: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export declare const initialSvgStyle: SvgStyle;
|
|
8
|
-
/**
|
|
9
|
-
* Grabs the client-width of the svg element, or 1 if the svg element hasn't yet
|
|
10
|
-
* been initialized. The client-width is a read-only property returns the width of
|
|
11
|
-
* the html element, including horizontal padding and borders, as an integer. The reason
|
|
12
|
-
* that we return 1 when the svg element hasn't yet been initialized, is so that the
|
|
13
|
-
* aspect (width / height) is 1.
|
|
14
|
-
* @param {SVGElement | null} svg The svg element
|
|
15
|
-
* @return {number} The client width of the svg
|
|
16
|
-
*/
|
|
17
|
-
export declare function grabWidth(svg: SVGElement | null): number;
|
|
18
|
-
/**
|
|
19
|
-
* Grabs the client-height of the svg element, or 1 if the svg element hasn't yet
|
|
20
|
-
* been initialized. The client-height is a read-only property returns the height of
|
|
21
|
-
* the html element, including vertical padding and borders, as an integer. The reason
|
|
22
|
-
* that we return 1 when the svg element hasn't yet been initialized, is so that the
|
|
23
|
-
* aspect (width / height) is 1.
|
|
24
|
-
* @param {SVGElement | null} svg The svg element
|
|
25
|
-
* @return {number} The client height of the svg
|
|
26
|
-
*/
|
|
27
|
-
export declare function grabHeight(svg: SVGElement | null): number;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export var initialSvgStyle = {
|
|
2
|
-
width: '100%',
|
|
3
|
-
// display: "inline-block",
|
|
4
|
-
// position: "floating",
|
|
5
|
-
top: 0,
|
|
6
|
-
left: 0
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Grabs the client-width of the svg element, or 1 if the svg element hasn't yet
|
|
10
|
-
* been initialized. The client-width is a read-only property returns the width of
|
|
11
|
-
* the html element, including horizontal padding and borders, as an integer. The reason
|
|
12
|
-
* that we return 1 when the svg element hasn't yet been initialized, is so that the
|
|
13
|
-
* aspect (width / height) is 1.
|
|
14
|
-
* @param {SVGElement | null} svg The svg element
|
|
15
|
-
* @return {number} The client width of the svg
|
|
16
|
-
*/
|
|
17
|
-
export function grabWidth(svg) {
|
|
18
|
-
return svg !== null ? svg.clientWidth : 1;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Grabs the client-height of the svg element, or 1 if the svg element hasn't yet
|
|
22
|
-
* been initialized. The client-height is a read-only property returns the height of
|
|
23
|
-
* the html element, including vertical padding and borders, as an integer. The reason
|
|
24
|
-
* that we return 1 when the svg element hasn't yet been initialized, is so that the
|
|
25
|
-
* aspect (width / height) is 1.
|
|
26
|
-
* @param {SVGElement | null} svg The svg element
|
|
27
|
-
* @return {number} The client height of the svg
|
|
28
|
-
*/
|
|
29
|
-
export function grabHeight(svg) {
|
|
30
|
-
return svg !== null ? svg.clientHeight : 1;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=svgStyle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"svgStyle.js","sourceRoot":"","sources":["../../../../src/app/charts/svgStyle.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,IAAM,eAAe,GAAa;IACrC,KAAK,EAAE,MAAM;IACb,2BAA2B;IAC3B,wBAAwB;IACxB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;CACV,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,GAAsB;IAC5C,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,GAAsB;IAC7C,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|