@chipmobilesdk/rn-chart 0.4.0 → 0.5.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/CHANGELOG.md +111 -0
- package/README.md +1 -1
- package/lib/commonjs/a11y/summary.js +190 -0
- package/lib/commonjs/a11y/summary.js.map +1 -0
- package/lib/commonjs/contract/datasource.js +64 -0
- package/lib/commonjs/contract/datasource.js.map +1 -0
- package/lib/commonjs/contract/distribution.js +45 -0
- package/lib/commonjs/contract/distribution.js.map +1 -0
- package/lib/commonjs/contract/errors.js +88 -0
- package/lib/commonjs/contract/errors.js.map +1 -0
- package/lib/commonjs/contract/format.js +133 -0
- package/lib/commonjs/contract/format.js.map +1 -0
- package/lib/commonjs/contract/interaction.js +24 -0
- package/lib/commonjs/contract/interaction.js.map +1 -0
- package/lib/commonjs/contract/marker.js +55 -0
- package/lib/commonjs/contract/marker.js.map +1 -0
- package/lib/commonjs/contract/props.js +6 -0
- package/lib/commonjs/contract/props.js.map +1 -0
- package/lib/commonjs/contract/state.js +68 -0
- package/lib/commonjs/contract/state.js.map +1 -0
- package/lib/commonjs/contract/strings.js +54 -0
- package/lib/commonjs/contract/strings.js.map +1 -0
- package/lib/commonjs/contract/theme.js +116 -0
- package/lib/commonjs/contract/theme.js.map +1 -0
- package/lib/commonjs/contract/value.js +112 -0
- package/lib/commonjs/contract/value.js.map +1 -0
- package/lib/commonjs/geometry/bar.js +257 -0
- package/lib/commonjs/geometry/bar.js.map +1 -0
- package/lib/commonjs/geometry/distribution.js +197 -0
- package/lib/commonjs/geometry/distribution.js.map +1 -0
- package/lib/commonjs/geometry/heatmap.js +186 -0
- package/lib/commonjs/geometry/heatmap.js.map +1 -0
- package/lib/commonjs/geometry/hitTest.js +117 -0
- package/lib/commonjs/geometry/hitTest.js.map +1 -0
- package/lib/commonjs/geometry/layout.js +134 -0
- package/lib/commonjs/geometry/layout.js.map +1 -0
- package/lib/commonjs/geometry/markers.js +59 -0
- package/lib/commonjs/geometry/markers.js.map +1 -0
- package/lib/commonjs/geometry/path.js +166 -0
- package/lib/commonjs/geometry/path.js.map +1 -0
- package/lib/commonjs/geometry/progress.js +203 -0
- package/lib/commonjs/geometry/progress.js.map +1 -0
- package/lib/commonjs/geometry/scale.js +127 -0
- package/lib/commonjs/geometry/scale.js.map +1 -0
- package/lib/commonjs/geometry/ticks.js +120 -0
- package/lib/commonjs/geometry/ticks.js.map +1 -0
- package/lib/commonjs/geometry/timeSeries.js +157 -0
- package/lib/commonjs/geometry/timeSeries.js.map +1 -0
- package/lib/commonjs/geometry/types.js +43 -0
- package/lib/commonjs/geometry/types.js.map +1 -0
- package/lib/commonjs/index.js +284 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/react/ChartBoundary.js +82 -0
- package/lib/commonjs/react/ChartBoundary.js.map +1 -0
- package/lib/commonjs/react/ChartFrame.js +270 -0
- package/lib/commonjs/react/ChartFrame.js.map +1 -0
- package/lib/commonjs/react/ChartLegend.js +242 -0
- package/lib/commonjs/react/ChartLegend.js.map +1 -0
- package/lib/commonjs/react/ChartPlot.js +62 -0
- package/lib/commonjs/react/ChartPlot.js.map +1 -0
- package/lib/commonjs/react/ChartStateOverlay.js +89 -0
- package/lib/commonjs/react/ChartStateOverlay.js.map +1 -0
- package/lib/commonjs/react/ChartThemeProvider.js +51 -0
- package/lib/commonjs/react/ChartThemeProvider.js.map +1 -0
- package/lib/commonjs/react/charts.js +108 -0
- package/lib/commonjs/react/charts.js.map +1 -0
- package/lib/commonjs/react/pointEvent.js +35 -0
- package/lib/commonjs/react/pointEvent.js.map +1 -0
- package/lib/commonjs/react/useChartA11y.js +97 -0
- package/lib/commonjs/react/useChartA11y.js.map +1 -0
- package/lib/commonjs/react/useChartFormatters.js +66 -0
- package/lib/commonjs/react/useChartFormatters.js.map +1 -0
- package/lib/commonjs/react/useChartLayout.js +100 -0
- package/lib/commonjs/react/useChartLayout.js.map +1 -0
- package/lib/commonjs/react/useChartSelection.js +131 -0
- package/lib/commonjs/react/useChartSelection.js.map +1 -0
- package/lib/commonjs/react/useChartStatus.js +74 -0
- package/lib/commonjs/react/useChartStatus.js.map +1 -0
- package/lib/commonjs/render/Axis.js +88 -0
- package/lib/commonjs/render/Axis.js.map +1 -0
- package/lib/commonjs/render/Marks.js +184 -0
- package/lib/commonjs/render/Marks.js.map +1 -0
- package/lib/commonjs/validation/budgets.js +106 -0
- package/lib/commonjs/validation/budgets.js.map +1 -0
- package/lib/commonjs/validation/validateDatasource.js +189 -0
- package/lib/commonjs/validation/validateDatasource.js.map +1 -0
- package/lib/module/a11y/summary.js +184 -0
- package/lib/module/a11y/summary.js.map +1 -0
- package/lib/module/contract/datasource.js +57 -0
- package/lib/module/contract/datasource.js.map +1 -0
- package/lib/module/contract/distribution.js +40 -0
- package/lib/module/contract/distribution.js.map +1 -0
- package/lib/module/contract/errors.js +80 -0
- package/lib/module/contract/errors.js.map +1 -0
- package/lib/module/contract/format.js +123 -0
- package/lib/module/contract/format.js.map +1 -0
- package/lib/module/contract/interaction.js +20 -0
- package/lib/module/contract/interaction.js.map +1 -0
- package/lib/module/contract/marker.js +49 -0
- package/lib/module/contract/marker.js.map +1 -0
- package/lib/module/contract/props.js +4 -0
- package/lib/module/contract/props.js.map +1 -0
- package/lib/module/contract/state.js +61 -0
- package/lib/module/contract/state.js.map +1 -0
- package/lib/module/contract/strings.js +49 -0
- package/lib/module/contract/strings.js.map +1 -0
- package/lib/module/contract/theme.js +109 -0
- package/lib/module/contract/theme.js.map +1 -0
- package/lib/module/contract/value.js +101 -0
- package/lib/module/contract/value.js.map +1 -0
- package/lib/module/geometry/bar.js +253 -0
- package/lib/module/geometry/bar.js.map +1 -0
- package/lib/module/geometry/distribution.js +193 -0
- package/lib/module/geometry/distribution.js.map +1 -0
- package/lib/module/geometry/heatmap.js +182 -0
- package/lib/module/geometry/heatmap.js.map +1 -0
- package/lib/module/geometry/hitTest.js +110 -0
- package/lib/module/geometry/hitTest.js.map +1 -0
- package/lib/module/geometry/layout.js +122 -0
- package/lib/module/geometry/layout.js.map +1 -0
- package/lib/module/geometry/markers.js +53 -0
- package/lib/module/geometry/markers.js.map +1 -0
- package/lib/module/geometry/path.js +157 -0
- package/lib/module/geometry/path.js.map +1 -0
- package/lib/module/geometry/progress.js +199 -0
- package/lib/module/geometry/progress.js.map +1 -0
- package/lib/module/geometry/scale.js +119 -0
- package/lib/module/geometry/scale.js.map +1 -0
- package/lib/module/geometry/ticks.js +112 -0
- package/lib/module/geometry/ticks.js.map +1 -0
- package/lib/module/geometry/timeSeries.js +153 -0
- package/lib/module/geometry/timeSeries.js.map +1 -0
- package/lib/module/geometry/types.js +39 -0
- package/lib/module/geometry/types.js.map +1 -0
- package/lib/module/index.js +85 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/react/ChartBoundary.js +75 -0
- package/lib/module/react/ChartBoundary.js.map +1 -0
- package/lib/module/react/ChartFrame.js +263 -0
- package/lib/module/react/ChartFrame.js.map +1 -0
- package/lib/module/react/ChartLegend.js +234 -0
- package/lib/module/react/ChartLegend.js.map +1 -0
- package/lib/module/react/ChartPlot.js +56 -0
- package/lib/module/react/ChartPlot.js.map +1 -0
- package/lib/module/react/ChartStateOverlay.js +82 -0
- package/lib/module/react/ChartStateOverlay.js.map +1 -0
- package/lib/module/react/ChartThemeProvider.js +44 -0
- package/lib/module/react/ChartThemeProvider.js.map +1 -0
- package/lib/module/react/charts.js +102 -0
- package/lib/module/react/charts.js.map +1 -0
- package/lib/module/react/pointEvent.js +30 -0
- package/lib/module/react/pointEvent.js.map +1 -0
- package/lib/module/react/useChartA11y.js +92 -0
- package/lib/module/react/useChartA11y.js.map +1 -0
- package/lib/module/react/useChartFormatters.js +61 -0
- package/lib/module/react/useChartFormatters.js.map +1 -0
- package/lib/module/react/useChartLayout.js +95 -0
- package/lib/module/react/useChartLayout.js.map +1 -0
- package/lib/module/react/useChartSelection.js +125 -0
- package/lib/module/react/useChartSelection.js.map +1 -0
- package/lib/module/react/useChartStatus.js +69 -0
- package/lib/module/react/useChartStatus.js.map +1 -0
- package/lib/module/render/Axis.js +80 -0
- package/lib/module/render/Axis.js.map +1 -0
- package/lib/module/render/Marks.js +173 -0
- package/lib/module/render/Marks.js.map +1 -0
- package/lib/module/validation/budgets.js +97 -0
- package/lib/module/validation/budgets.js.map +1 -0
- package/lib/module/validation/validateDatasource.js +184 -0
- package/lib/module/validation/validateDatasource.js.map +1 -0
- package/lib/typescript/commonjs/a11y/summary.d.ts +38 -0
- package/lib/typescript/commonjs/a11y/summary.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/datasource.d.ts +94 -0
- package/lib/typescript/commonjs/contract/datasource.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/distribution.d.ts +17 -0
- package/lib/typescript/commonjs/contract/distribution.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/errors.d.ts +53 -0
- package/lib/typescript/commonjs/contract/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/format.d.ts +63 -0
- package/lib/typescript/commonjs/contract/format.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/interaction.d.ts +53 -0
- package/lib/typescript/commonjs/contract/interaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/marker.d.ts +39 -0
- package/lib/typescript/commonjs/contract/marker.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/props.d.ts +58 -0
- package/lib/typescript/commonjs/contract/props.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/state.d.ts +45 -0
- package/lib/typescript/commonjs/contract/state.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/strings.d.ts +39 -0
- package/lib/typescript/commonjs/contract/strings.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/theme.d.ts +85 -0
- package/lib/typescript/commonjs/contract/theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/value.d.ts +69 -0
- package/lib/typescript/commonjs/contract/value.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/bar.d.ts +18 -0
- package/lib/typescript/commonjs/geometry/bar.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/distribution.d.ts +23 -0
- package/lib/typescript/commonjs/geometry/distribution.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/heatmap.d.ts +24 -0
- package/lib/typescript/commonjs/geometry/heatmap.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/hitTest.d.ts +68 -0
- package/lib/typescript/commonjs/geometry/hitTest.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/layout.d.ts +67 -0
- package/lib/typescript/commonjs/geometry/layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/markers.d.ts +29 -0
- package/lib/typescript/commonjs/geometry/markers.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/path.d.ts +66 -0
- package/lib/typescript/commonjs/geometry/path.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/progress.d.ts +17 -0
- package/lib/typescript/commonjs/geometry/progress.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/scale.d.ts +55 -0
- package/lib/typescript/commonjs/geometry/scale.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/ticks.d.ts +48 -0
- package/lib/typescript/commonjs/geometry/ticks.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/timeSeries.d.ts +20 -0
- package/lib/typescript/commonjs/geometry/timeSeries.d.ts.map +1 -0
- package/lib/typescript/commonjs/geometry/types.d.ts +91 -0
- package/lib/typescript/commonjs/geometry/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +47 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/react/ChartBoundary.d.ts +47 -0
- package/lib/typescript/commonjs/react/ChartBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/ChartFrame.d.ts +31 -0
- package/lib/typescript/commonjs/react/ChartFrame.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/ChartLegend.d.ts +31 -0
- package/lib/typescript/commonjs/react/ChartLegend.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/ChartPlot.d.ts +19 -0
- package/lib/typescript/commonjs/react/ChartPlot.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/ChartStateOverlay.d.ts +25 -0
- package/lib/typescript/commonjs/react/ChartStateOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/ChartThemeProvider.d.ts +21 -0
- package/lib/typescript/commonjs/react/ChartThemeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/charts.d.ts +51 -0
- package/lib/typescript/commonjs/react/charts.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/pointEvent.d.ts +13 -0
- package/lib/typescript/commonjs/react/pointEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/useChartA11y.d.ts +37 -0
- package/lib/typescript/commonjs/react/useChartA11y.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/useChartFormatters.d.ts +21 -0
- package/lib/typescript/commonjs/react/useChartFormatters.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/useChartLayout.d.ts +27 -0
- package/lib/typescript/commonjs/react/useChartLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/useChartSelection.d.ts +52 -0
- package/lib/typescript/commonjs/react/useChartSelection.d.ts.map +1 -0
- package/lib/typescript/commonjs/react/useChartStatus.d.ts +22 -0
- package/lib/typescript/commonjs/react/useChartStatus.d.ts.map +1 -0
- package/lib/typescript/commonjs/render/Axis.d.ts +31 -0
- package/lib/typescript/commonjs/render/Axis.d.ts.map +1 -0
- package/lib/typescript/commonjs/render/Marks.d.ts +44 -0
- package/lib/typescript/commonjs/render/Marks.d.ts.map +1 -0
- package/lib/typescript/commonjs/validation/budgets.d.ts +24 -0
- package/lib/typescript/commonjs/validation/budgets.d.ts.map +1 -0
- package/lib/typescript/commonjs/validation/validateDatasource.d.ts +26 -0
- package/lib/typescript/commonjs/validation/validateDatasource.d.ts.map +1 -0
- package/lib/typescript/module/a11y/summary.d.ts +38 -0
- package/lib/typescript/module/a11y/summary.d.ts.map +1 -0
- package/lib/typescript/module/contract/datasource.d.ts +94 -0
- package/lib/typescript/module/contract/datasource.d.ts.map +1 -0
- package/lib/typescript/module/contract/distribution.d.ts +17 -0
- package/lib/typescript/module/contract/distribution.d.ts.map +1 -0
- package/lib/typescript/module/contract/errors.d.ts +53 -0
- package/lib/typescript/module/contract/errors.d.ts.map +1 -0
- package/lib/typescript/module/contract/format.d.ts +63 -0
- package/lib/typescript/module/contract/format.d.ts.map +1 -0
- package/lib/typescript/module/contract/interaction.d.ts +53 -0
- package/lib/typescript/module/contract/interaction.d.ts.map +1 -0
- package/lib/typescript/module/contract/marker.d.ts +39 -0
- package/lib/typescript/module/contract/marker.d.ts.map +1 -0
- package/lib/typescript/module/contract/props.d.ts +58 -0
- package/lib/typescript/module/contract/props.d.ts.map +1 -0
- package/lib/typescript/module/contract/state.d.ts +45 -0
- package/lib/typescript/module/contract/state.d.ts.map +1 -0
- package/lib/typescript/module/contract/strings.d.ts +39 -0
- package/lib/typescript/module/contract/strings.d.ts.map +1 -0
- package/lib/typescript/module/contract/theme.d.ts +85 -0
- package/lib/typescript/module/contract/theme.d.ts.map +1 -0
- package/lib/typescript/module/contract/value.d.ts +69 -0
- package/lib/typescript/module/contract/value.d.ts.map +1 -0
- package/lib/typescript/module/geometry/bar.d.ts +18 -0
- package/lib/typescript/module/geometry/bar.d.ts.map +1 -0
- package/lib/typescript/module/geometry/distribution.d.ts +23 -0
- package/lib/typescript/module/geometry/distribution.d.ts.map +1 -0
- package/lib/typescript/module/geometry/heatmap.d.ts +24 -0
- package/lib/typescript/module/geometry/heatmap.d.ts.map +1 -0
- package/lib/typescript/module/geometry/hitTest.d.ts +68 -0
- package/lib/typescript/module/geometry/hitTest.d.ts.map +1 -0
- package/lib/typescript/module/geometry/layout.d.ts +67 -0
- package/lib/typescript/module/geometry/layout.d.ts.map +1 -0
- package/lib/typescript/module/geometry/markers.d.ts +29 -0
- package/lib/typescript/module/geometry/markers.d.ts.map +1 -0
- package/lib/typescript/module/geometry/path.d.ts +66 -0
- package/lib/typescript/module/geometry/path.d.ts.map +1 -0
- package/lib/typescript/module/geometry/progress.d.ts +17 -0
- package/lib/typescript/module/geometry/progress.d.ts.map +1 -0
- package/lib/typescript/module/geometry/scale.d.ts +55 -0
- package/lib/typescript/module/geometry/scale.d.ts.map +1 -0
- package/lib/typescript/module/geometry/ticks.d.ts +48 -0
- package/lib/typescript/module/geometry/ticks.d.ts.map +1 -0
- package/lib/typescript/module/geometry/timeSeries.d.ts +20 -0
- package/lib/typescript/module/geometry/timeSeries.d.ts.map +1 -0
- package/lib/typescript/module/geometry/types.d.ts +91 -0
- package/lib/typescript/module/geometry/types.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +47 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/react/ChartBoundary.d.ts +47 -0
- package/lib/typescript/module/react/ChartBoundary.d.ts.map +1 -0
- package/lib/typescript/module/react/ChartFrame.d.ts +31 -0
- package/lib/typescript/module/react/ChartFrame.d.ts.map +1 -0
- package/lib/typescript/module/react/ChartLegend.d.ts +31 -0
- package/lib/typescript/module/react/ChartLegend.d.ts.map +1 -0
- package/lib/typescript/module/react/ChartPlot.d.ts +19 -0
- package/lib/typescript/module/react/ChartPlot.d.ts.map +1 -0
- package/lib/typescript/module/react/ChartStateOverlay.d.ts +25 -0
- package/lib/typescript/module/react/ChartStateOverlay.d.ts.map +1 -0
- package/lib/typescript/module/react/ChartThemeProvider.d.ts +21 -0
- package/lib/typescript/module/react/ChartThemeProvider.d.ts.map +1 -0
- package/lib/typescript/module/react/charts.d.ts +51 -0
- package/lib/typescript/module/react/charts.d.ts.map +1 -0
- package/lib/typescript/module/react/pointEvent.d.ts +13 -0
- package/lib/typescript/module/react/pointEvent.d.ts.map +1 -0
- package/lib/typescript/module/react/useChartA11y.d.ts +37 -0
- package/lib/typescript/module/react/useChartA11y.d.ts.map +1 -0
- package/lib/typescript/module/react/useChartFormatters.d.ts +21 -0
- package/lib/typescript/module/react/useChartFormatters.d.ts.map +1 -0
- package/lib/typescript/module/react/useChartLayout.d.ts +27 -0
- package/lib/typescript/module/react/useChartLayout.d.ts.map +1 -0
- package/lib/typescript/module/react/useChartSelection.d.ts +52 -0
- package/lib/typescript/module/react/useChartSelection.d.ts.map +1 -0
- package/lib/typescript/module/react/useChartStatus.d.ts +22 -0
- package/lib/typescript/module/react/useChartStatus.d.ts.map +1 -0
- package/lib/typescript/module/render/Axis.d.ts +31 -0
- package/lib/typescript/module/render/Axis.d.ts.map +1 -0
- package/lib/typescript/module/render/Marks.d.ts +44 -0
- package/lib/typescript/module/render/Marks.d.ts.map +1 -0
- package/lib/typescript/module/validation/budgets.d.ts +24 -0
- package/lib/typescript/module/validation/budgets.d.ts.map +1 -0
- package/lib/typescript/module/validation/validateDatasource.d.ts +26 -0
- package/lib/typescript/module/validation/validateDatasource.d.ts.map +1 -0
- package/package.json +40 -15
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.buildProgressGeometry = buildProgressGeometry;
|
|
7
|
+
var _marker = require("../contract/marker.js");
|
|
8
|
+
var _value = require("../contract/value.js");
|
|
9
|
+
var _layout = require("./layout.js");
|
|
10
|
+
var _path = require("./path.js");
|
|
11
|
+
/**
|
|
12
|
+
* Progress geometry: current value against an optional target.
|
|
13
|
+
*
|
|
14
|
+
* The rule that matters (FR-021, FR-022): with no usable target there is **no
|
|
15
|
+
* proportion**. The chart shows the current value and nothing else. And a value
|
|
16
|
+
* beyond its target renders as overshoot rather than a clamped full bar that
|
|
17
|
+
* hides the excess.
|
|
18
|
+
*
|
|
19
|
+
* PURE. No React, no SVG.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** How far past the target an overshoot bar is allowed to extend visually. */
|
|
23
|
+
const OVERSHOOT_DISPLAY_CAP = 1.25;
|
|
24
|
+
function buildProgressGeometry(datasource, input, options = {}) {
|
|
25
|
+
const {
|
|
26
|
+
plot
|
|
27
|
+
} = input;
|
|
28
|
+
const metrics = datasource.series.flatMap(series => series.points.map(point => ({
|
|
29
|
+
series,
|
|
30
|
+
point
|
|
31
|
+
})));
|
|
32
|
+
if (metrics.length === 0 || plot.width <= 0) {
|
|
33
|
+
return {
|
|
34
|
+
plot,
|
|
35
|
+
paths: [],
|
|
36
|
+
markers: [],
|
|
37
|
+
labels: [],
|
|
38
|
+
xTicks: [],
|
|
39
|
+
yTicks: [],
|
|
40
|
+
hitRegions: [],
|
|
41
|
+
incomplete: false
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const readings = metrics.map(({
|
|
45
|
+
point
|
|
46
|
+
}) => (0, _marker.readProgress)(point.value, (0, _marker.findTarget)(datasource.markers, point.id) ?? (0, _marker.findTarget)(datasource.markers)));
|
|
47
|
+
|
|
48
|
+
// The track spans 0..displayMax of the target, shared by every row so their
|
|
49
|
+
// targets line up. With an overshoot the target sits inside the plot and the
|
|
50
|
+
// excess is drawn to its right — previously the target was the plot's right
|
|
51
|
+
// edge, so overshoot started there and was clipped by the SVG (CHT-03).
|
|
52
|
+
const displayMax = readings.reduce((max, r) => r.proportion === undefined ? max : Math.max(max, Math.min(r.proportion, OVERSHOOT_DISPLAY_CAP)), 1);
|
|
53
|
+
const unit = plot.width / displayMax;
|
|
54
|
+
const targetX = plot.x + unit;
|
|
55
|
+
const rowHeight = plot.height / metrics.length;
|
|
56
|
+
const barHeight = Math.min(rowHeight * 0.45, 24);
|
|
57
|
+
const radius = options.trackRadius ?? barHeight / 2;
|
|
58
|
+
const paths = [];
|
|
59
|
+
const labels = [];
|
|
60
|
+
const hitRegions = [];
|
|
61
|
+
const markers = [];
|
|
62
|
+
let incomplete = false;
|
|
63
|
+
metrics.forEach(({
|
|
64
|
+
series,
|
|
65
|
+
point
|
|
66
|
+
}, index) => {
|
|
67
|
+
const rowY = plot.y + index * rowHeight + (rowHeight - barHeight) / 2;
|
|
68
|
+
const reading = readings[index];
|
|
69
|
+
|
|
70
|
+
// Track: the full width, always drawn, so an empty metric still reads as
|
|
71
|
+
// a metric rather than as blank space.
|
|
72
|
+
paths.push({
|
|
73
|
+
key: `track-${series.id}-${point.id}`,
|
|
74
|
+
seriesId: series.id,
|
|
75
|
+
d: (0, _path.rectSubpath)({
|
|
76
|
+
x: plot.x,
|
|
77
|
+
y: rowY,
|
|
78
|
+
width: plot.width,
|
|
79
|
+
height: barHeight,
|
|
80
|
+
radius
|
|
81
|
+
}),
|
|
82
|
+
color: input.seriesColors[series.id],
|
|
83
|
+
pattern: 'solid',
|
|
84
|
+
filled: true,
|
|
85
|
+
opacity: 0.15
|
|
86
|
+
});
|
|
87
|
+
if (!(0, _value.isKnown)(point.value)) {
|
|
88
|
+
incomplete = true;
|
|
89
|
+
// No fill at all, and a texture rather than a zero-length bar — a gap
|
|
90
|
+
// must not look like "none of the target achieved".
|
|
91
|
+
paths.push({
|
|
92
|
+
key: `nonvalue-${series.id}-${point.id}`,
|
|
93
|
+
seriesId: series.id,
|
|
94
|
+
d: (0, _path.rectSubpath)({
|
|
95
|
+
x: plot.x,
|
|
96
|
+
y: rowY,
|
|
97
|
+
width: plot.width,
|
|
98
|
+
height: barHeight,
|
|
99
|
+
radius
|
|
100
|
+
}),
|
|
101
|
+
color: input.seriesColors[series.id],
|
|
102
|
+
pattern: 'solid',
|
|
103
|
+
filled: true,
|
|
104
|
+
texture: input.nonValueTextures[point.value.kind],
|
|
105
|
+
opacity: 0.5
|
|
106
|
+
});
|
|
107
|
+
} else {
|
|
108
|
+
const proportion = reading.proportion;
|
|
109
|
+
// With no usable target there is no proportion to draw, so the fill
|
|
110
|
+
// shows the value's presence rather than a fabricated percentage.
|
|
111
|
+
const fillFraction = proportion === undefined ? 1 : Math.min(proportion, OVERSHOOT_DISPLAY_CAP);
|
|
112
|
+
paths.push({
|
|
113
|
+
key: `fill-${series.id}-${point.id}`,
|
|
114
|
+
seriesId: series.id,
|
|
115
|
+
d: (0, _path.rectSubpath)({
|
|
116
|
+
x: plot.x,
|
|
117
|
+
y: rowY,
|
|
118
|
+
width: Math.max(0, unit * Math.min(fillFraction, 1)),
|
|
119
|
+
height: barHeight,
|
|
120
|
+
radius
|
|
121
|
+
}),
|
|
122
|
+
color: input.seriesColors[series.id],
|
|
123
|
+
pattern: 'solid',
|
|
124
|
+
filled: true
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// Overshoot is drawn beyond the target line rather than clamped away,
|
|
128
|
+
// so exceeding a goal is visible instead of indistinguishable from
|
|
129
|
+
// exactly meeting it.
|
|
130
|
+
if (reading.overshoot && proportion !== undefined) {
|
|
131
|
+
const overshootWidth = unit * (Math.min(proportion, OVERSHOOT_DISPLAY_CAP) - 1);
|
|
132
|
+
paths.push({
|
|
133
|
+
key: `overshoot-${series.id}-${point.id}`,
|
|
134
|
+
seriesId: series.id,
|
|
135
|
+
d: (0, _path.rectSubpath)({
|
|
136
|
+
x: targetX,
|
|
137
|
+
y: rowY + barHeight * 0.2,
|
|
138
|
+
width: Math.max(0, overshootWidth),
|
|
139
|
+
height: barHeight * 0.6,
|
|
140
|
+
radius: radius / 2
|
|
141
|
+
}),
|
|
142
|
+
color: input.seriesColors[series.id],
|
|
143
|
+
pattern: 'dashed',
|
|
144
|
+
filled: true,
|
|
145
|
+
opacity: 0.7
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// The target itself, across this row's bar (FR-022, FR-072).
|
|
151
|
+
if (reading.proportion !== undefined && reading.target) {
|
|
152
|
+
markers.push({
|
|
153
|
+
id: `target-${series.id}-${point.id}`,
|
|
154
|
+
d: `M${targetX},${Math.max(plot.y, rowY - 3)}V${Math.min((0, _layout.plotBottom)(plot), rowY + barHeight + 3)}`,
|
|
155
|
+
label: reading.target.label,
|
|
156
|
+
kind: 'target'
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const valueText = (0, _value.isKnown)(point.value) ? input.formatValue(point.value.value) : '';
|
|
160
|
+
// Only append a percentage when one is real.
|
|
161
|
+
const proportionText = reading.proportion === undefined ? '' : ` (${Math.round(reading.proportion * 100)}%)`;
|
|
162
|
+
labels.push({
|
|
163
|
+
key: `label-${series.id}-${point.id}`,
|
|
164
|
+
text: input.formatCategory(point.position.kind === 'category' ? point.position.category : series.label),
|
|
165
|
+
x: plot.x,
|
|
166
|
+
y: rowY - 4,
|
|
167
|
+
anchor: 'start'
|
|
168
|
+
});
|
|
169
|
+
if (valueText) {
|
|
170
|
+
labels.push({
|
|
171
|
+
key: `value-${series.id}-${point.id}`,
|
|
172
|
+
text: `${valueText}${proportionText}`,
|
|
173
|
+
x: (0, _layout.plotRight)(plot),
|
|
174
|
+
y: rowY - 4,
|
|
175
|
+
anchor: 'end'
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
hitRegions.push({
|
|
179
|
+
seriesId: series.id,
|
|
180
|
+
pointId: point.id,
|
|
181
|
+
x: plot.x + plot.width / 2,
|
|
182
|
+
y: rowY + barHeight / 2,
|
|
183
|
+
bounds: {
|
|
184
|
+
x: plot.x,
|
|
185
|
+
y: rowY,
|
|
186
|
+
width: plot.width,
|
|
187
|
+
height: barHeight
|
|
188
|
+
},
|
|
189
|
+
selectable: !(0, _value.isWithheld)(point.value)
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
return {
|
|
193
|
+
plot,
|
|
194
|
+
paths,
|
|
195
|
+
markers,
|
|
196
|
+
labels,
|
|
197
|
+
xTicks: [],
|
|
198
|
+
yTicks: [],
|
|
199
|
+
hitRegions,
|
|
200
|
+
incomplete
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_marker","require","_value","_layout","_path","OVERSHOOT_DISPLAY_CAP","buildProgressGeometry","datasource","input","options","plot","metrics","series","flatMap","points","map","point","length","width","paths","markers","labels","xTicks","yTicks","hitRegions","incomplete","readings","readProgress","value","findTarget","id","displayMax","reduce","max","r","proportion","undefined","Math","min","unit","targetX","x","rowHeight","height","barHeight","radius","trackRadius","forEach","index","rowY","y","reading","push","key","seriesId","d","rectSubpath","color","seriesColors","pattern","filled","opacity","isKnown","texture","nonValueTextures","kind","fillFraction","overshoot","overshootWidth","target","plotBottom","label","valueText","formatValue","proportionText","round","text","formatCategory","position","category","anchor","plotRight","pointId","bounds","selectable","isWithheld"],"sourceRoot":"../../../src","sources":["geometry/progress.ts"],"mappings":";;;;;;AAWA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA,MAAMI,qBAAqB,GAAG,IAAI;AAE3B,SAASC,qBAAqBA,CACpCC,UAA8B,EAC9BC,KAAoB,EACpBC,OAAwB,GAAG,CAAC,CAAC,EACV;EACnB,MAAM;IAAEC;EAAK,CAAC,GAAGF,KAAK;EACtB,MAAMG,OAAO,GAAGJ,UAAU,CAACK,MAAM,CAACC,OAAO,CAACD,MAAM,IAC/CA,MAAM,CAACE,MAAM,CAACC,GAAG,CAACC,KAAK,KAAK;IAAEJ,MAAM;IAAEI;EAAM,CAAC,CAAC,CAC/C,CAAC;EAED,IAAIL,OAAO,CAACM,MAAM,KAAK,CAAC,IAAIP,IAAI,CAACQ,KAAK,IAAI,CAAC,EAAE;IAC5C,OAAO;MACNR,IAAI;MACJS,KAAK,EAAE,EAAE;MACTC,OAAO,EAAE,EAAE;MACXC,MAAM,EAAE,EAAE;MACVC,MAAM,EAAE,EAAE;MACVC,MAA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C;MACpEwC,UAAU,EAAE,CAAC,IAAAC,iBAAU,EAACrE,KAAK,CAACY,KAAK;IACpC,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,OAAO;IACNlB,IAAI;IACJS,KAAK;IACLC,OAAO;IACPC,MAAM;IACNC,MAAM,EAAE,EAAE;IACVC,MAAM,EAAE,EAAE;IACVC,UAAU;IACVC;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.bandScale = bandScale;
|
|
7
|
+
exports.domainFrom = domainFrom;
|
|
8
|
+
exports.linearScale = linearScale;
|
|
9
|
+
exports.timeScale = timeScale;
|
|
10
|
+
exports.widenDegenerateDomain = widenDegenerateDomain;
|
|
11
|
+
/**
|
|
12
|
+
* Scales: domain values to pixel positions.
|
|
13
|
+
*
|
|
14
|
+
* PURE. No React, no SVG — enforced by the ESLint override in `.eslintrc.js`
|
|
15
|
+
* and by geometryPurity.test.ts.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Nudges a zero-width domain outward so an all-identical dataset still gets a
|
|
20
|
+
* usable axis. Without this the projection divides by zero and every point
|
|
21
|
+
* lands on the same pixel — or on NaN.
|
|
22
|
+
*/
|
|
23
|
+
function widenDegenerateDomain(domain) {
|
|
24
|
+
if (domain.max > domain.min) {
|
|
25
|
+
return domain;
|
|
26
|
+
}
|
|
27
|
+
const value = domain.min;
|
|
28
|
+
// Scale the padding to the magnitude so large values do not get a
|
|
29
|
+
// meaninglessly tiny window, and zero still gets a sensible one.
|
|
30
|
+
const pad = value === 0 ? 1 : Math.abs(value) * 0.5;
|
|
31
|
+
return {
|
|
32
|
+
min: value - pad,
|
|
33
|
+
max: value + pad
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function linearScale(domain, rangePx) {
|
|
37
|
+
const safeDomain = widenDegenerateDomain(domain);
|
|
38
|
+
const domainSpan = safeDomain.max - safeDomain.min;
|
|
39
|
+
const pxSpan = rangePx.max - rangePx.min;
|
|
40
|
+
return {
|
|
41
|
+
domain: safeDomain,
|
|
42
|
+
rangePx,
|
|
43
|
+
project: value => rangePx.min + (value - safeDomain.min) / domainSpan * pxSpan,
|
|
44
|
+
invert: px => safeDomain.min + (px - rangePx.min) / pxSpan * domainSpan
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Discrete positions for category axes.
|
|
49
|
+
*
|
|
50
|
+
* `padding` is the fraction of each step left as gap, so 0.2 means bars occupy
|
|
51
|
+
* 80% of their slot.
|
|
52
|
+
*/
|
|
53
|
+
function bandScale(categories, rangePx, padding = 0.2) {
|
|
54
|
+
const count = Math.max(categories.length, 1);
|
|
55
|
+
const pxSpan = rangePx.max - rangePx.min;
|
|
56
|
+
const step = pxSpan / count;
|
|
57
|
+
const bandWidth = step * (1 - padding);
|
|
58
|
+
const offset = (step - bandWidth) / 2;
|
|
59
|
+
const indexOf = new Map();
|
|
60
|
+
categories.forEach((c, i) => {
|
|
61
|
+
if (!indexOf.has(c)) {
|
|
62
|
+
indexOf.set(c, i);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const project = category => {
|
|
66
|
+
const i = indexOf.get(category);
|
|
67
|
+
return i === undefined ? undefined : rangePx.min + i * step + offset;
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
categories,
|
|
71
|
+
bandWidth,
|
|
72
|
+
step,
|
|
73
|
+
project,
|
|
74
|
+
centerOf: category => {
|
|
75
|
+
const start = project(category);
|
|
76
|
+
return start === undefined ? undefined : start + bandWidth / 2;
|
|
77
|
+
},
|
|
78
|
+
invert: px => {
|
|
79
|
+
const i = Math.floor((px - rangePx.min) / step);
|
|
80
|
+
return i >= 0 && i < categories.length ? categories[i] : undefined;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Time is just a linear scale over epoch milliseconds. Kept as a named
|
|
87
|
+
* function so call sites read clearly and so tick generation can branch on it.
|
|
88
|
+
*/
|
|
89
|
+
function timeScale(domain, rangePx) {
|
|
90
|
+
return linearScale(domain, rangePx);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Domain from known values, padded so marks do not touch the plot edges.
|
|
95
|
+
*
|
|
96
|
+
* `includeZero` matters for bar charts: a bar's length is only meaningful when
|
|
97
|
+
* measured from zero. Time-series charts leave it off so a narrow band of
|
|
98
|
+
* values stays legible.
|
|
99
|
+
*/
|
|
100
|
+
function domainFrom(values, options = {}) {
|
|
101
|
+
if (values.length === 0) {
|
|
102
|
+
return {
|
|
103
|
+
min: 0,
|
|
104
|
+
max: 1
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
let min = values[0];
|
|
108
|
+
let max = values[0];
|
|
109
|
+
for (const v of values) {
|
|
110
|
+
if (v < min) {
|
|
111
|
+
min = v;
|
|
112
|
+
}
|
|
113
|
+
if (v > max) {
|
|
114
|
+
max = v;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (options.includeZero) {
|
|
118
|
+
min = Math.min(min, 0);
|
|
119
|
+
max = Math.max(max, 0);
|
|
120
|
+
}
|
|
121
|
+
const pad = (max - min) * (options.padFraction ?? 0);
|
|
122
|
+
return {
|
|
123
|
+
min: min - pad,
|
|
124
|
+
max: max + pad
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=scale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["widenDegenerateDomain","domain","max","min","value","pad","Math","abs","linearScale","rangePx","safeDomain","domainSpan","pxSpan","project","invert","px","bandScale","categories","padding","count","length","step","bandWidth","offset","indexOf","Map","forEach","c","i","has","set","category","get","undefined","centerOf","start","floor","timeScale","domainFrom","values","options","v","includeZero","padFraction"],"sourceRoot":"../../../src","sources":["geometry/scale.ts"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAACC,MAAa,EAAS;EAC3D,IAAIA,MAAM,CAACC,GAAG,GAAGD,MAAM,CAACE,GAAG,EAAE;IAC5B,OAAOF,MAAM;EACd;EACA,MAAMG,KAAK,GAAGH,MAAM,CAACE,GAAG;EACxB;EACA;EACA,MAAME,GAAG,GAAGD,KAAK,KAAK,CAAC,GAAG,CAAC,GAAGE,IAAI,CAACC,GAAG,CAACH,KAAK,CAAC,GAAG,GAAG;EACnD,OAAO;IAAED,GAAG,EAAEC,KAAK,GAAGC,GAAG;IAAEH,GAAG,EAAEE,KAAK,GAAGC;EAAI,CAAC;AAC9C;AAEO,SAASG,WAAWA,CAACP,MAAa,EAAEQ,OAAc,EAAe;EACvE,MAAMC,UAAU,GAAGV,qBAAqB,CAACC,MAAM,CAAC;EAChD,MAAMU,UAAU,GAAGD,UAAU,CAACR,GAAG,GAAGQ,UAAU,CAACP,GAAG;EAClD,MAAMS,MAAM,GAAGH,OAAO,CAACP,GAAG,GAAGO,OAAO,CAACN,GAAG;EAExC,OAAO;IACNF,MAAM,EAAES,UAAU;IAClBD,OAAO;IACPI,OAAO,EAAGT,KAAa,IAAKK,OAAO,CAACN,GAAG,GAAI,CAACC,KAAK,GAAGM,UAAU,CAACP,GAAG,IAAIQ,UAAU,GAAIC,MAAM;IAC1FE,MAAM,EAAGC,EAAU,IAAKL,UAAU,CAACP,GAAG,GAAI,CAACY,EAAE,GAAGN,OAAO,CAACN,GAAG,IAAIS,MAAM,GAAID;EAC1E,CAAC;AACF;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,SAASA,CAACC,UAA6B,EAAER,OAAc,EAAES,OAAO,GAAG,GAAG,EAAa;EAClG,MAAMC,KAAK,GAAGb,IAAI,CAACJ,GAAG,CAACe,UAAU,CAACG,MAA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CAACW,CAAC,CAAC,GAAGK,SAAS;IACnE;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACO,SAASI,SAASA,CAACpC,MAAa,EAAEQ,OAAc,EAAe;EACrE,OAAOD,WAAW,CAACP,MAAM,EAAEQ,OAAO,CAAC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS6B,UAAUA,CACzBC,MAAyB,EACzBC,OAAwD,GAAG,CAAC,CAAC,EACrD;EACR,IAAID,MAAM,CAACnB,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO;MAAEjB,GAAG,EAAE,CAAC;MAAED,GAAG,EAAE;IAAE,CAAC;EAC1B;EAEA,IAAIC,GAAG,GAAGoC,MAAM,CAAC,CAAC,CAAC;EACnB,IAAIrC,GAAG,GAAGqC,MAAM,CAAC,CAAC,CAAC;EACnB,KAAK,MAAME,CAAC,IAAIF,MAAM,EAAE;IACvB,IAAIE,CAAC,GAAGtC,GAAG,EAAE;MACZA,GAAG,GAAGsC,CAAC;IACR;IACA,IAAIA,CAAC,GAAGvC,GAAG,EAAE;MACZA,GAAG,GAAGuC,CAAC;IACR;EACD;EAEA,IAAID,OAAO,CAACE,WAAW,EAAE;IACxBvC,GAAG,GAAGG,IAAI,CAACH,GAAG,CAACA,GAAG,EAAE,CAAC,CAAC;IACtBD,GAAG,GAAGI,IAAI,CAACJ,GAAG,CAACA,GAAG,EAAE,CAAC,CAAC;EACvB;EAEA,MAAMG,GAAG,GAAG,CAACH,GAAG,GAAGC,GAAG,KAAKqC,OAAO,CAACG,WAAW,IAAI,CAAC,CAAC;EACpD,OAAO;IAAExC,GAAG,EAAEA,GAAG,GAAGE,GAAG;IAAEH,GAAG,EAAEA,GAAG,GAAGG;EAAI,CAAC;AAC1C","ignoreList":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LABEL_GUTTER = exports.AVERAGE_ADVANCE_RATIO = void 0;
|
|
7
|
+
exports.estimateTextWidth = estimateTextWidth;
|
|
8
|
+
exports.niceTickValues = niceTickValues;
|
|
9
|
+
exports.reserveAxisSpace = reserveAxisSpace;
|
|
10
|
+
exports.thinTicks = thinTicks;
|
|
11
|
+
/**
|
|
12
|
+
* Tick generation and label thinning (FR-070).
|
|
13
|
+
*
|
|
14
|
+
* React Native offers no synchronous text measurement, and an `onLayout`
|
|
15
|
+
* round-trip per label would cost a second layout pass — enough to breach the
|
|
16
|
+
* first-paint budget. So we estimate width from character count and thin ticks
|
|
17
|
+
* to fit.
|
|
18
|
+
*
|
|
19
|
+
* The estimate is deliberately generous: over-estimating drops one tick too
|
|
20
|
+
* many, which is legible. Under-estimating produces overlapping text, which is
|
|
21
|
+
* the failure FR-070 exists to prevent. See research.md R6.
|
|
22
|
+
*
|
|
23
|
+
* PURE. No React, no SVG.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Average glyph advance as a fraction of font size, for the Latin digits and
|
|
28
|
+
* letters that dominate axis labels. Rounded up from the ~0.5-0.55 typical of
|
|
29
|
+
* the platform sans-serif faces.
|
|
30
|
+
*/
|
|
31
|
+
const AVERAGE_ADVANCE_RATIO = exports.AVERAGE_ADVANCE_RATIO = 0.62;
|
|
32
|
+
|
|
33
|
+
/** Minimum breathing room between two adjacent labels, in px. */
|
|
34
|
+
const LABEL_GUTTER = exports.LABEL_GUTTER = 8;
|
|
35
|
+
function estimateTextWidth(text, fontSize) {
|
|
36
|
+
return text.length * fontSize * AVERAGE_ADVANCE_RATIO;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* "Nice" step sizes: 1, 2, 5 and their powers of ten. Standard axis practice —
|
|
40
|
+
* these are the intervals people read fluently.
|
|
41
|
+
*/
|
|
42
|
+
function niceStep(rawStep) {
|
|
43
|
+
if (rawStep <= 0 || !Number.isFinite(rawStep)) {
|
|
44
|
+
return 1;
|
|
45
|
+
}
|
|
46
|
+
const magnitude = Math.pow(10, Math.floor(Math.log10(rawStep)));
|
|
47
|
+
const normalized = rawStep / magnitude;
|
|
48
|
+
if (normalized <= 1) {
|
|
49
|
+
return magnitude;
|
|
50
|
+
}
|
|
51
|
+
if (normalized <= 2) {
|
|
52
|
+
return 2 * magnitude;
|
|
53
|
+
}
|
|
54
|
+
if (normalized <= 5) {
|
|
55
|
+
return 5 * magnitude;
|
|
56
|
+
}
|
|
57
|
+
return 10 * magnitude;
|
|
58
|
+
}
|
|
59
|
+
function niceTickValues(domain, targetCount) {
|
|
60
|
+
const span = domain.max - domain.min;
|
|
61
|
+
if (span <= 0 || targetCount < 1) {
|
|
62
|
+
return [domain.min];
|
|
63
|
+
}
|
|
64
|
+
const step = niceStep(span / targetCount);
|
|
65
|
+
const start = Math.ceil(domain.min / step) * step;
|
|
66
|
+
const values = [];
|
|
67
|
+
// Guard against a pathological step producing an unbounded loop.
|
|
68
|
+
for (let v = start, guard = 0; v <= domain.max && guard < 1000; v += step) {
|
|
69
|
+
// Re-round to kill floating-point drift such as 0.30000000000000004.
|
|
70
|
+
values.push(Number((Math.round(v / step) * step).toFixed(10)));
|
|
71
|
+
guard += 1;
|
|
72
|
+
}
|
|
73
|
+
return values.length > 0 ? values : [domain.min];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Drops ticks until no two labels can overlap.
|
|
78
|
+
*
|
|
79
|
+
* Thinning is preferred over rotation as the default: rotated labels are harder
|
|
80
|
+
* to read on a phone and cost vertical space a mobile chart cannot spare.
|
|
81
|
+
* Rotation stays available as an opt-in for dense category axes.
|
|
82
|
+
*
|
|
83
|
+
* The first tick is always kept, so an axis never renders empty.
|
|
84
|
+
*/
|
|
85
|
+
function thinTicks(ticks, fontSize, axisLengthPx) {
|
|
86
|
+
if (ticks.length <= 1) {
|
|
87
|
+
return [...ticks];
|
|
88
|
+
}
|
|
89
|
+
let widest = 0;
|
|
90
|
+
for (const t of ticks) {
|
|
91
|
+
widest = Math.max(widest, estimateTextWidth(t.label, fontSize));
|
|
92
|
+
}
|
|
93
|
+
const slot = widest + LABEL_GUTTER;
|
|
94
|
+
const maxLabels = Math.max(1, Math.floor(axisLengthPx / slot));
|
|
95
|
+
if (ticks.length <= maxLabels) {
|
|
96
|
+
return [...ticks];
|
|
97
|
+
}
|
|
98
|
+
const stride = Math.ceil(ticks.length / maxLabels);
|
|
99
|
+
return ticks.filter((_, i) => i % stride === 0);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* How much space an axis must reserve for its labels, at the current system
|
|
104
|
+
* font scale (FR-071).
|
|
105
|
+
*/
|
|
106
|
+
function reserveAxisSpace(labels, fontSize, orientation) {
|
|
107
|
+
if (labels.length === 0) {
|
|
108
|
+
return 0;
|
|
109
|
+
}
|
|
110
|
+
if (orientation === 'horizontal') {
|
|
111
|
+
// One line of text plus a gutter.
|
|
112
|
+
return fontSize * 1.4 + LABEL_GUTTER;
|
|
113
|
+
}
|
|
114
|
+
let widest = 0;
|
|
115
|
+
for (const label of labels) {
|
|
116
|
+
widest = Math.max(widest, estimateTextWidth(label, fontSize));
|
|
117
|
+
}
|
|
118
|
+
return widest + LABEL_GUTTER;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=ticks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AVERAGE_ADVANCE_RATIO","exports","LABEL_GUTTER","estimateTextWidth","text","fontSize","length","niceStep","rawStep","Number","isFinite","magnitude","Math","pow","floor","log10","normalized","niceTickValues","domain","targetCount","span","max","min","step","start","ceil","values","v","guard","push","round","toFixed","thinTicks","ticks","axisLengthPx","widest","t","label","slot","maxLabels","stride","filter","_","i","reserveAxisSpace","labels","orientation"],"sourceRoot":"../../../src","sources":["geometry/ticks.ts"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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ClB;EAEA,MAAMO,MAAM,GAAG5B,IAAI,CAACa,IAAI,CAACQ,KAAK,CAAC3B,MAAM,GAAGiC,SAAS,CAAC;EAClD,OAAON,KAAK,CAACQ,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKA,CAAC,GAAGH,MAAM,KAAK,CAAC,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACO,SAASI,gBAAgBA,CAC/BC,MAAyB,EACzBxC,QAAgB,EAChByC,WAAsC,EAC7B;EACT,IAAID,MAAM,CAACvC,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO,CAAC;EACT;EACA,IAAIwC,WAAW,KAAK,YAAY,EAAE;IACjC;IACA,OAAOzC,QAAQ,GAAG,GAAG,GAAGH,YAAY;EACrC;EAEA,IAAIiC,MAAM,GAAG,CAAC;EACd,KAAK,MAAME,KAAK,IAAIQ,MAAM,EAAE;IAC3BV,MAAM,GAAGvB,IAAI,CAACS,GAAG,CAACc,MAAM,EAAEhC,iBAAiB,CAACkC,KAAK,EAAEhC,QAAQ,CAAC,CAAC;EAC9D;EACA,OAAO8B,MAAM,GAAGjC,YAAY;AAC7B","ignoreList":[]}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.buildTimeSeriesGeometry = buildTimeSeriesGeometry;
|
|
7
|
+
var _value = require("../contract/value.js");
|
|
8
|
+
var _layout = require("./layout.js");
|
|
9
|
+
var _markers = require("./markers.js");
|
|
10
|
+
var _path = require("./path.js");
|
|
11
|
+
var _scale = require("./scale.js");
|
|
12
|
+
var _ticks = require("./ticks.js");
|
|
13
|
+
/**
|
|
14
|
+
* Time-series geometry: one stroked path per series over an instant domain.
|
|
15
|
+
*
|
|
16
|
+
* Gaps are the interesting part. A non-known value contributes `null` to the
|
|
17
|
+
* point list, `linePath` lifts the pen there, and the line simply does not
|
|
18
|
+
* exist across the gap (FR-012).
|
|
19
|
+
*
|
|
20
|
+
* PURE. No React, no SVG.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
function visiblePoints(series, range) {
|
|
24
|
+
const points = [...series.points].filter(p => p.position.kind === 'instant')
|
|
25
|
+
// Out-of-order input must still produce a correct axis.
|
|
26
|
+
.sort((a, b) => {
|
|
27
|
+
const at = a.position.kind === 'instant' ? a.position.at : 0;
|
|
28
|
+
const bt = b.position.kind === 'instant' ? b.position.at : 0;
|
|
29
|
+
return at - bt;
|
|
30
|
+
});
|
|
31
|
+
if (!range) {
|
|
32
|
+
return points;
|
|
33
|
+
}
|
|
34
|
+
return points.filter(p => {
|
|
35
|
+
const at = p.position.kind === 'instant' ? p.position.at : 0;
|
|
36
|
+
return at >= range.from && at <= range.to;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function buildTimeSeriesGeometry(datasource, input, options = {}) {
|
|
40
|
+
const instants = [];
|
|
41
|
+
const values = [];
|
|
42
|
+
let excluded = 0;
|
|
43
|
+
|
|
44
|
+
// Sorted and windowed once per series; both passes below read the result.
|
|
45
|
+
const ordered = new Map(datasource.series.map(series => [series, visiblePoints(series, options.range)]));
|
|
46
|
+
for (const series of datasource.series) {
|
|
47
|
+
for (const point of ordered.get(series) ?? []) {
|
|
48
|
+
if (point.position.kind === 'instant') {
|
|
49
|
+
instants.push(point.position.at);
|
|
50
|
+
}
|
|
51
|
+
if ((0, _value.isKnown)(point.value)) {
|
|
52
|
+
values.push(point.value.value);
|
|
53
|
+
} else {
|
|
54
|
+
excluded += 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (instants.length === 0) {
|
|
59
|
+
return {
|
|
60
|
+
plot: input.plot,
|
|
61
|
+
paths: [],
|
|
62
|
+
markers: [],
|
|
63
|
+
labels: [],
|
|
64
|
+
xTicks: [],
|
|
65
|
+
yTicks: [],
|
|
66
|
+
hitRegions: [],
|
|
67
|
+
incomplete: excluded > 0
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Tick labels depend only on the domains, so the plot can make room for
|
|
72
|
+
// them before anything is projected.
|
|
73
|
+
// Widened here, as the scales would, so the ticks label the axes actually drawn.
|
|
74
|
+
const xDomain = (0, _scale.widenDegenerateDomain)((0, _scale.domainFrom)(instants));
|
|
75
|
+
const yDomain = (0, _scale.widenDegenerateDomain)((0, _scale.domainFrom)([...values, ...(0, _markers.markerDomainValues)(datasource.markers)], {
|
|
76
|
+
padFraction: 0.1
|
|
77
|
+
}));
|
|
78
|
+
const xTickValues = (0, _ticks.niceTickValues)(xDomain, 4);
|
|
79
|
+
const yTickValues = (0, _ticks.niceTickValues)(yDomain, 4);
|
|
80
|
+
const plot = (0, _layout.insetForAxes)(input.plot, {
|
|
81
|
+
xLabels: xTickValues.map(input.formatInstant),
|
|
82
|
+
yLabels: yTickValues.map(input.formatValue),
|
|
83
|
+
fontSize: input.fontSize
|
|
84
|
+
});
|
|
85
|
+
const x = (0, _scale.timeScale)(xDomain, {
|
|
86
|
+
min: plot.x,
|
|
87
|
+
max: (0, _layout.plotRight)(plot)
|
|
88
|
+
});
|
|
89
|
+
const y = (0, _scale.linearScale)(yDomain, {
|
|
90
|
+
min: (0, _layout.plotBottom)(plot),
|
|
91
|
+
max: plot.y
|
|
92
|
+
});
|
|
93
|
+
const paths = [];
|
|
94
|
+
const hitRegions = [];
|
|
95
|
+
for (const series of datasource.series) {
|
|
96
|
+
if (series.hidden) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const pts = [];
|
|
100
|
+
for (const point of ordered.get(series) ?? []) {
|
|
101
|
+
const at = point.position.kind === 'instant' ? point.position.at : 0;
|
|
102
|
+
const px = x.project(at);
|
|
103
|
+
if (!(0, _value.isKnown)(point.value)) {
|
|
104
|
+
// The gap. No coordinate is produced, so no segment can span it.
|
|
105
|
+
pts.push(null);
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const py = y.project(point.value.value);
|
|
109
|
+
pts.push({
|
|
110
|
+
x: px,
|
|
111
|
+
y: py
|
|
112
|
+
});
|
|
113
|
+
hitRegions.push({
|
|
114
|
+
seriesId: series.id,
|
|
115
|
+
pointId: point.id,
|
|
116
|
+
x: px,
|
|
117
|
+
y: py,
|
|
118
|
+
// Withheld values are never selectable, so a callback can never
|
|
119
|
+
// carry one (FR-053).
|
|
120
|
+
selectable: !(0, _value.isWithheld)(point.value)
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const d = (0, _path.linePath)(pts);
|
|
124
|
+
if (d.length > 0) {
|
|
125
|
+
paths.push({
|
|
126
|
+
key: `line-${series.id}`,
|
|
127
|
+
seriesId: series.id,
|
|
128
|
+
d,
|
|
129
|
+
color: input.seriesColors[series.id],
|
|
130
|
+
pattern: series.pattern ?? 'solid',
|
|
131
|
+
filled: false
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const xTicks = xTickValues.map(v => ({
|
|
136
|
+
value: v,
|
|
137
|
+
position: x.project(v),
|
|
138
|
+
label: input.formatInstant(v)
|
|
139
|
+
}));
|
|
140
|
+
const yTicks = yTickValues.map(v => ({
|
|
141
|
+
value: v,
|
|
142
|
+
position: y.project(v),
|
|
143
|
+
label: input.formatValue(v)
|
|
144
|
+
}));
|
|
145
|
+
const markers = (0, _markers.horizontalMarkers)(datasource.markers, plot, y.project);
|
|
146
|
+
return {
|
|
147
|
+
plot,
|
|
148
|
+
paths,
|
|
149
|
+
markers: markers.lines,
|
|
150
|
+
labels: markers.labels,
|
|
151
|
+
xTicks: (0, _ticks.thinTicks)(xTicks, input.fontSize, plot.width),
|
|
152
|
+
yTicks,
|
|
153
|
+
hitRegions,
|
|
154
|
+
incomplete: excluded > 0
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=timeSeries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_value","require","_layout","_markers","_path","_scale","_ticks","visiblePoints","series","range","points","filter","p","position","kind","sort","a","b","at","bt","from","to","buildTimeSeriesGeometry","datasource","input","options","instants","values","excluded","ordered","Map","map","point","get","push","isKnown","value","length","plot","paths","markers","labels","xTicks","yTicks","hitRegions","incomplete","xDomain","widenDegenerateDomain","domainFrom","yDomain","markerDomainValues","padFraction","xTickValues","niceTickValues","yTickValues","insetForAxes","xLabels","formatInstant","yLabels","formatValue","fontSize","x","timeScale","min","max","plotRight","y","linearScale","plotBottom","hidden","pts","px","project","py","seriesId","id","pointId","selectable","isWithheld","d","linePath","key","color","seriesColors","pattern","filled","v","label","horizontalMarkers","lines","thinTicks","width"],"sourceRoot":"../../../src","sources":["geometry/timeSeries.ts"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,SAASM,aAAaA,CAAIC,MAAiB,EAAEC,KAAkC,EAAE;EAChF,MAAMC,MAAM,GAAG,CAAC,GAAGF,MAAM,CAACE,MAAM,CAAC,CAC/BC,MAAM,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAACC,IAAI,KAAK,SAAS;EAC1C;EAAA,CACCC,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK;IACf,MAAMC,EAAE,GAAGF,CAAC,CAACH,QAAQ,CAACC,IAAI,KAAK,SAAS,GAAGE,CAAC,CAACH,QAAQ,CAACK,EAAE,GAAG,CAAC;IAC5D,MAAMC,EAAE,GAAGF,CAAC,CAACJ,QAAQ,CAACC,IAAI,KAAK,SAAS,GAAGG,CAAC,CAACJ,QAAQ,CAACK,EAAE,GAAG,CAAC;IAC5D,OAAOA,EAAE,G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