@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,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Chart status contract (FR-029 to FR-038).
|
|
5
|
+
*
|
|
6
|
+
* Ownership is split on a simple principle: the package derives what only the
|
|
7
|
+
* data can determine, and the app declares what only the app can know.
|
|
8
|
+
*
|
|
9
|
+
* empty, partial -> derived from the datasource
|
|
10
|
+
* loading, stale, -> declared by the app: it alone knows about its own
|
|
11
|
+
* noPermission, fetches, cache age, access rules, and failures
|
|
12
|
+
* error
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** The statuses an app may declare. `empty` and `partial` are derived. */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Resolution precedence, highest first.
|
|
19
|
+
*
|
|
20
|
+
* `noPermission` outranks everything so restricted values can never slip
|
|
21
|
+
* through some other state. `stale` and `partial` sit below the blocking
|
|
22
|
+
* states because they are modifiers on a chart that still draws its data.
|
|
23
|
+
*/
|
|
24
|
+
export const STATUS_PRECEDENCE = ['noPermission', 'error', 'loading', 'empty', 'stale', 'partial', 'ready'];
|
|
25
|
+
export function resolveStatus(inputs) {
|
|
26
|
+
const candidates = new Set(['ready']);
|
|
27
|
+
if (inputs.declared) {
|
|
28
|
+
candidates.add(inputs.declared);
|
|
29
|
+
}
|
|
30
|
+
if (inputs.error) {
|
|
31
|
+
candidates.add('error');
|
|
32
|
+
}
|
|
33
|
+
if (inputs.isEmpty) {
|
|
34
|
+
candidates.add('empty');
|
|
35
|
+
}
|
|
36
|
+
if (inputs.isPartial) {
|
|
37
|
+
candidates.add('partial');
|
|
38
|
+
}
|
|
39
|
+
for (const status of STATUS_PRECEDENCE) {
|
|
40
|
+
if (candidates.has(status)) {
|
|
41
|
+
return status;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return 'ready';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Statuses in which the chart draws its data (possibly with an indicator). */
|
|
48
|
+
export function drawsData(status) {
|
|
49
|
+
return status === 'ready' || status === 'stale' || status === 'partial';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Statuses in which no data-selection callback may fire, because the chart is
|
|
54
|
+
* not displaying the values a callback would carry (FR-053).
|
|
55
|
+
*/
|
|
56
|
+
export function suppressesInteraction(status) {
|
|
57
|
+
return !drawsData(status);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Per-status content the app supplies, replacing any package wording (FR-035). */
|
|
61
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["STATUS_PRECEDENCE","resolveStatus","inputs","candidates","Set","declared","add","error","isEmpty","isPartial","status","has","drawsData","suppressesInteraction"],"sourceRoot":"../../../src","sources":["contract/state.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAyC,GAAG,CACxD,cAAc,EACd,OAAO,EACP,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,OAAO,CACP;AAaD,OAAO,SAASC,aAAaA,CAACC,MAAoB,EAAe;EAChE,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAc,CAAC,OAAO,CAAC,CAAC;EAElD,IAAIF,MAAM,CAACG,QAAQ,EAAE;IACpBF,UAAU,CAACG,GAAG,CAACJ,MAAM,CAACG,QAAQ,CAAC;EAChC;EACA,IAAIH,MAAM,CAACK,KAAK,EAAE;IACjBJ,UAAU,CAACG,GAAG,CAAC,OAAO,CAAC;EACxB;EACA,IAAIJ,MAAM,CAACM,OAAO,EAAE;IACnBL,UAAU,CAACG,GAAG,CAAC,OAAO,CAAC;EACxB;EACA,IAAIJ,MAAM,CAACO,SAAS,EAAE;IACrBN,UAAU,CAACG,GAAG,CAAC,SAAS,CAAC;EAC1B;EAEA,KAAK,MAAMI,MAAM,IAAIV,iBAAiB,EAAE;IACvC,IAAIG,UAAU,CAACQ,GAAG,CAACD,MAAM,CAAC,EAAE;MAC3B,OAAOA,MAAM;IACd;EACD;EACA,OAAO,OAAO;AACf;;AAEA;AACA,OAAO,SAASE,SAASA,CAACF,MAAmB,EAAW;EACvD,OAAOA,MAAM,KAAK,OAAO,IAAIA,MAAM,KAAK,OAAO,IAAIA,MAAM,KAAK,SAAS;AACxE;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASG,qBAAqBA,CAACH,MAAmB,EAAW;EACnE,OAAO,CAACE,SAAS,CAACF,MAAM,CAAC;AAC1B;;AAEA","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Every text the package itself speaks or shows (CHT-05): screen-reader
|
|
5
|
+
* summaries and announcements, adjustable-action labels, built-in state text and
|
|
6
|
+
* legend hints. English defaults; an app translates them by passing `strings`
|
|
7
|
+
* (or by registering `chartStrings.user` with rn-i18n and passing the translated
|
|
8
|
+
* texts). `{name}` marks a variable.
|
|
9
|
+
*/
|
|
10
|
+
import { defineMessages } from '@chipmobilesdk/rn-core';
|
|
11
|
+
export const chartStrings = defineMessages({
|
|
12
|
+
user: {
|
|
13
|
+
'chart.family.progress': 'progress chart',
|
|
14
|
+
'chart.family.distribution': 'distribution chart',
|
|
15
|
+
'chart.family.timeSeries': 'time series chart',
|
|
16
|
+
'chart.family.bar': 'bar chart',
|
|
17
|
+
'chart.family.heatmap': 'heatmap',
|
|
18
|
+
'chart.status.loading': 'Loading data.',
|
|
19
|
+
'chart.status.empty': 'No data yet.',
|
|
20
|
+
'chart.status.error': 'Data could not be shown.',
|
|
21
|
+
'chart.status.stale': 'Showing data that may be out of date.',
|
|
22
|
+
'chart.status.noPermission': 'This data is not available to you.',
|
|
23
|
+
'chart.status.partial': 'Some data is missing.',
|
|
24
|
+
'chart.summary.heading': '{title}, {noun}.',
|
|
25
|
+
'chart.summary.headingUntitled': '{noun}.',
|
|
26
|
+
'chart.summary.scale': '{series} series, {points} points.',
|
|
27
|
+
'chart.summary.scaleSingle': '{points} points.',
|
|
28
|
+
'chart.summary.single': 'Value {value}.',
|
|
29
|
+
'chart.summary.extremes': 'Highest {maxLabel} at {max}. Lowest {minLabel} at {min}.',
|
|
30
|
+
'chart.summary.marker': '{name} {value}',
|
|
31
|
+
'chart.summary.incomplete': 'Some values are missing, so totals are incomplete.',
|
|
32
|
+
'chart.point.withheld': '{position}, {series}, not available.',
|
|
33
|
+
'chart.point.noData': '{position}, {series}, no data.',
|
|
34
|
+
'chart.point.value': '{position}, {series}, {value}.',
|
|
35
|
+
'chart.total': 'Total {value}.',
|
|
36
|
+
'chart.total.incomplete': 'Total {value}, excluding {count} values that are not available.',
|
|
37
|
+
'chart.action.next': 'Next data point',
|
|
38
|
+
'chart.action.previous': 'Previous data point',
|
|
39
|
+
'chart.state.loading': 'Loading…',
|
|
40
|
+
'chart.state.empty': 'No data yet',
|
|
41
|
+
'chart.state.error': 'Unable to show this chart',
|
|
42
|
+
'chart.state.noPermission': 'Not available',
|
|
43
|
+
'chart.legend.hide': 'Hides this series',
|
|
44
|
+
'chart.legend.show': 'Shows this series',
|
|
45
|
+
'chart.legend.scale': 'Colour scale from {min} to {max}',
|
|
46
|
+
'chart.note.incomplete': 'Some values are unavailable, so totals are incomplete.'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["defineMessages","chartStrings","user"],"sourceRoot":"../../../src","sources":["contract/strings.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,wBAAwB;AAEvD,OAAO,MAAMC,YAAY,GAAGD,cAAc,CAAC;EAC1CE,IAAI,EAAE;IACL,uBAAuB,EAAE,gBAAgB;IACzC,2BAA2B,EAAE,oBAAoB;IACjD,yBAAyB,EAAE,mBAAmB;IAC9C,kBAAkB,EAAE,WAAW;IAC/B,sBAAsB,EAAE,SAAS;IACjC,sBAAsB,EAAE,eAAe;IACvC,oBAAoB,EAAE,cAAc;IACpC,oBAAoB,EAAE,0BAA0B;IAChD,oBAAoB,EAAE,uCAAuC;IAC7D,2BAA2B,EAAE,oCAAoC;IACjE,sBAAsB,EAAE,uBAAuB;IAC/C,uBAAuB,EAAE,kBAAkB;IAC3C,+BAA+B,EAAE,SAAS;IAC1C,qBAAqB,EAAE,mCAAmC;IAC1D,2BAA2B,EAAE,kBAAkB;IAC/C,sBAAsB,EAAE,gBAAgB;IACxC,wBAAwB,EAAE,0DAA0D;IACpF,sBAAsB,EAAE,gBAAgB;IACxC,0BAA0B,EAAE,oDAAoD;IAChF,sBAAsB,EAAE,sCAAsC;IAC9D,oBAAoB,EAAE,gCAAgC;IACtD,mBAAmB,EAAE,gCAAgC;IACrD,aAAa,EAAE,gBAAgB;IAC/B,wBAAwB,EAAE,iEAAiE;IAC3F,mBAAmB,EAAE,iBAAiB;IACtC,uBAAuB,EAAE,qBAAqB;IAC9C,qBAAqB,EAAE,UAAU;IACjC,mBAAmB,EAAE,aAAa;IAClC,mBAAmB,EAAE,2BAA2B;IAChD,0BAA0B,EAAE,eAAe;IAC3C,mBAAmB,EAAE,mBAAmB;IACxC,mBAAmB,EAAE,mBAAmB;IACxC,oBAAoB,EAAE,kCAAkC;IACxD,uBAAuB,EAAE;EAC1B;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Theme contract (FR-060 to FR-065).
|
|
5
|
+
*
|
|
6
|
+
* A plain value type rather than a dependency. The package declares what it
|
|
7
|
+
* needs and any design system can satisfy it — which is what keeps
|
|
8
|
+
* `@chipmobilesdk/rn-theme` and `react-native-unistyles` out of this package's
|
|
9
|
+
* dependency list entirely. The demo app owns the mapping adapter.
|
|
10
|
+
*
|
|
11
|
+
* Non-colour encodings are first-class here, because meaning must never ride on
|
|
12
|
+
* hue alone (FR-064).
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** How the three non-value classes are drawn: texture, never a hue difference. */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Eight categorical colours per scheme.
|
|
19
|
+
*
|
|
20
|
+
* Chosen for separation in hue *and* lightness, so they stay distinguishable
|
|
21
|
+
* under both common colour-vision deficiencies and a greyscale review. Colour
|
|
22
|
+
* is never the only carrier of meaning regardless — series also differ by
|
|
23
|
+
* legend label and, for lines, by dash pattern.
|
|
24
|
+
*/
|
|
25
|
+
const LIGHT_PALETTE = ['#2563EB', '#D97706', '#059669', '#DB2777', '#7C3AED', '#0891B2', '#B45309', '#4B5563'];
|
|
26
|
+
const DARK_PALETTE = ['#60A5FA', '#FBBF24', '#34D399', '#F472B6', '#A78BFA', '#22D3EE', '#FCD34D', '#9CA3AF'];
|
|
27
|
+
const NON_VALUE_TEXTURES = {
|
|
28
|
+
unknown: 'gap',
|
|
29
|
+
notApplicable: 'hatch',
|
|
30
|
+
withheld: 'lockedHatch'
|
|
31
|
+
};
|
|
32
|
+
export function defaultChartTheme(colorScheme = 'light') {
|
|
33
|
+
const dark = colorScheme === 'dark';
|
|
34
|
+
const onSurface = dark ? '#F3F4F6' : '#111827';
|
|
35
|
+
const muted = dark ? '#9CA3AF' : '#6B7280';
|
|
36
|
+
return {
|
|
37
|
+
colorScheme,
|
|
38
|
+
palette: dark ? DARK_PALETTE : LIGHT_PALETTE,
|
|
39
|
+
surface: dark ? '#111827' : '#FFFFFF',
|
|
40
|
+
onSurface,
|
|
41
|
+
axis: dark ? '#4B5563' : '#D1D5DB',
|
|
42
|
+
grid: dark ? '#374151' : '#E5E7EB',
|
|
43
|
+
muted,
|
|
44
|
+
typography: {
|
|
45
|
+
axisLabel: {
|
|
46
|
+
fontSize: 11,
|
|
47
|
+
fontWeight: '400',
|
|
48
|
+
color: muted
|
|
49
|
+
},
|
|
50
|
+
legendLabel: {
|
|
51
|
+
fontSize: 12,
|
|
52
|
+
fontWeight: '500',
|
|
53
|
+
color: onSurface
|
|
54
|
+
},
|
|
55
|
+
valueLabel: {
|
|
56
|
+
fontSize: 13,
|
|
57
|
+
fontWeight: '600',
|
|
58
|
+
color: onSurface
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
spacing: {
|
|
62
|
+
xs: 4,
|
|
63
|
+
sm: 8,
|
|
64
|
+
md: 16
|
|
65
|
+
},
|
|
66
|
+
radius: {
|
|
67
|
+
bar: 3,
|
|
68
|
+
cell: 2
|
|
69
|
+
},
|
|
70
|
+
nonValue: NON_VALUE_TEXTURES,
|
|
71
|
+
heatmapRamp: dark ? ['#1F2937', '#1E3A8A', '#1D4ED8', '#3B82F6', '#93C5FD'] : ['#EFF6FF', '#BFDBFE', '#60A5FA', '#2563EB', '#1E3A8A']
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Assigns a colour to a series: explicit override wins, otherwise the palette
|
|
77
|
+
* cycles by index so the remaining series stay distinguishable (FR-062, FR-063).
|
|
78
|
+
*/
|
|
79
|
+
export function resolveSeriesColor(theme, index, override) {
|
|
80
|
+
return override ?? theme.palette[index % theme.palette.length];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Key of one distribution segment: point ids are only unique within a series. */
|
|
84
|
+
export function segmentKey(seriesId, pointId) {
|
|
85
|
+
return `${seriesId}/${pointId}`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Colours for distribution segments, keyed by `segmentKey`. The single source
|
|
90
|
+
* for both the arcs and the legend, so the two cannot disagree (CHT-02).
|
|
91
|
+
*
|
|
92
|
+
* Segments take palette entries in order across the whole datasource, so one
|
|
93
|
+
* series of four points and four series of one point both give four colours.
|
|
94
|
+
* A point's own `color` wins; a series with a single point is that segment, so
|
|
95
|
+
* the series `color` applies to it.
|
|
96
|
+
*/
|
|
97
|
+
export function resolveSegmentColors(datasource, theme) {
|
|
98
|
+
const colors = {};
|
|
99
|
+
let index = 0;
|
|
100
|
+
for (const series of datasource.series) {
|
|
101
|
+
for (const point of series.points) {
|
|
102
|
+
const override = point.color ?? (series.points.length === 1 ? series.color : undefined);
|
|
103
|
+
colors[segmentKey(series.id, point.id)] = resolveSeriesColor(theme, index, override);
|
|
104
|
+
index += 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return colors;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LIGHT_PALETTE","DARK_PALETTE","NON_VALUE_TEXTURES","unknown","notApplicable","withheld","defaultChartTheme","colorScheme","dark","onSurface","muted","palette","surface","axis","grid","typography","axisLabel","fontSize","fontWeight","color","legendLabel","valueLabel","spacing","xs","sm","md","radius","bar","cell","nonValue","heatmapRamp","resolveSeriesColor","theme","index","override","length","segmentKey","seriesId","pointId","resolveSegmentColors","datasource","colors","series","point","points","undefined","id"],"sourceRoot":"../../../src","sources":["contract/theme.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;;AA0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,aAAgC,GAAG,CACxC,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,CACT;AAED,MAAMC,YAA+B,GAAG,CACvC,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,CACT;AAED,MAAMC,kBAAkB,GAAG;EAC1BC,OAAO,EAAE,KAAK;EACdC,aAAa,EAAE,OAAO;EACtBC,QAAQ,EAAE;AACX,CAAU;AAEV,OAAO,SAASC,iBAAiBA,CAACC,WAA6B,GAAG,OAAO,EAAc;EACtF,MAAMC,IAAI,GAAGD,WAAW,KAAK,MAAM;EAEnC,MAAME,SAAS,GAAGD,IAAI,GAAG,SAAS,GAAG,SAAS;EAC9C,MAAME,KAAK,GAAGF,IAAI,GAAG,SAAS,GAAG,SAAS;EAE1C,OAAO;IACND,WAAW;IACXI,OAAO,EAAEH,IAAI,GAAGP,YAAY,GAAGD,aAAa;IAC5CY,OAAO,EAAEJ,IAAI,GAAG,SAAS,GAAG,SAAS;IACrCC,SAAS;IACTI,IAAI,EAAEL,IAAI,GAAG,SAAS,GAAG,SAAS;IAClCM,IAAI,EAAEN,IAAI,GAAG,SAAS,GAAG,SAAS;IAClCE,KAAK;IACLK,UAAU,EAAE;MACXC,SAAS,EAAE;QAAEC,QAAQ,EAAE,EAAE;QAAEC,UAAU,EAAE,KAAK;QAAEC,KAAK,EAAET;MAAM,CAAC;MAC5DU,WAAW,EAA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AK,CAACxB,KAAK,KAAKuB,MAAM,CAACE,MAAM,CAACT,MAAM,KAAK,CAAC,GAAGO,MAAM,CAACvB,KAAK,GAAG0B,SAAS,CAAC;MACvFJ,MAAM,CAACL,UAAU,CAACM,MAAM,CAACI,EAAE,EAAEH,KAAK,CAACG,EAAE,CAAC,CAAC,GAAGf,kBAAkB,CAACC,KAAK,EAAEC,KAAK,EAAEC,QAAQ,CAAC;MACpFD,KAAK,IAAI,CAAC;IACX;EACD;EACA,OAAOQ,MAAM;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Value semantics for @chipmobilesdk/rn-chart.
|
|
5
|
+
*
|
|
6
|
+
* The foundation of the whole contract. Four value classes, carried as a
|
|
7
|
+
* discriminated union with **no numeric field on the three non-value cases**.
|
|
8
|
+
*
|
|
9
|
+
* That shape is deliberate: with a nullable `number`, `value ?? 0` would
|
|
10
|
+
* compile, and turning a gap into a zero is the single most damaging thing a
|
|
11
|
+
* charting library can do to someone's data. Here there is simply no number to
|
|
12
|
+
* read unless the value is known.
|
|
13
|
+
*
|
|
14
|
+
* See specs/007-rn-chart-package/data-model.md §1 (FR-011, FR-012).
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** A real observation, including a genuine `0`. */
|
|
18
|
+
|
|
19
|
+
/** We do not know this value. Never rendered as zero, never interpolated. */
|
|
20
|
+
|
|
21
|
+
/** This value does not apply here. Excluded from totals and proportions. */
|
|
22
|
+
|
|
23
|
+
/** Hidden from this viewer: permission, or not enough data to disclose. */
|
|
24
|
+
|
|
25
|
+
const UNKNOWN = {
|
|
26
|
+
kind: 'unknown'
|
|
27
|
+
};
|
|
28
|
+
const NOT_APPLICABLE = {
|
|
29
|
+
kind: 'notApplicable'
|
|
30
|
+
};
|
|
31
|
+
const WITHHELD = {
|
|
32
|
+
kind: 'withheld'
|
|
33
|
+
};
|
|
34
|
+
export function known(value) {
|
|
35
|
+
return {
|
|
36
|
+
kind: 'known',
|
|
37
|
+
value
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Note: shadows the `unknown` *type* keyword in value position only. TypeScript
|
|
43
|
+
* keeps type and value namespaces separate, so `x: unknown` still means the
|
|
44
|
+
* type even in modules that import this helper.
|
|
45
|
+
*/
|
|
46
|
+
export function unknown() {
|
|
47
|
+
return UNKNOWN;
|
|
48
|
+
}
|
|
49
|
+
export function notApplicable() {
|
|
50
|
+
return NOT_APPLICABLE;
|
|
51
|
+
}
|
|
52
|
+
export function withheld() {
|
|
53
|
+
return WITHHELD;
|
|
54
|
+
}
|
|
55
|
+
export function isKnown(v) {
|
|
56
|
+
return v.kind === 'known';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* True when the value must never reach a rendering, a label, a summary, or an
|
|
61
|
+
* interaction callback (FR-033, FR-053). Withheld values carry no number at
|
|
62
|
+
* all, so this is about intent rather than data hiding.
|
|
63
|
+
*/
|
|
64
|
+
export function isWithheld(v) {
|
|
65
|
+
return v.kind === 'withheld';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* True when the point takes part in totals, proportions, and axis domains.
|
|
70
|
+
* `notApplicable` and `withheld` are excluded; excluding either makes a total
|
|
71
|
+
* incomplete (FR-013).
|
|
72
|
+
*/
|
|
73
|
+
export function participatesInTotals(v) {
|
|
74
|
+
return v.kind === 'known';
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Sums known values and reports whether anything was left out (FR-013).
|
|
78
|
+
*
|
|
79
|
+
* `unknown` also excludes and marks the total incomplete: we cannot claim a sum
|
|
80
|
+
* is complete when part of the data is missing.
|
|
81
|
+
*/
|
|
82
|
+
export function sumKnown(values) {
|
|
83
|
+
let total = 0;
|
|
84
|
+
let counted = 0;
|
|
85
|
+
let excluded = 0;
|
|
86
|
+
for (const v of values) {
|
|
87
|
+
if (v.kind === 'known') {
|
|
88
|
+
total += v.value;
|
|
89
|
+
counted += 1;
|
|
90
|
+
} else {
|
|
91
|
+
excluded += 1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
total,
|
|
96
|
+
incomplete: excluded > 0,
|
|
97
|
+
countedPoints: counted,
|
|
98
|
+
excludedPoints: excluded
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNKNOWN","kind","NOT_APPLICABLE","WITHHELD","known","value","unknown","notApplicable","withheld","isKnown","v","isWithheld","participatesInTotals","sumKnown","values","total","counted","excluded","incomplete","countedPoints","excludedPoints"],"sourceRoot":"../../../src","sources":["contract/value.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAMA;;AAKA;;AAKA;;AASA,MAAMA,OAAqB,GAAG;EAAEC,IAAI,EAAE;AAAU,CAAC;AACjD,MAAMC,cAAkC,GAAG;EAAED,IAAI,EAAE;AAAgB,CAAC;AACpE,MAAME,QAAuB,GAAG;EAAEF,IAAI,EAAE;AAAW,CAAC;AAEpD,OAAO,SAASG,KAAKA,CAACC,KAAa,EAAc;EAChD,OAAO;IAAEJ,IAAI,EAAE,OAAO;IAAEI;EAAM,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CAAA,EAAiB;EACvC,OAAON,OAAO;AACf;AAEA,OAAO,SAASO,aAAaA,CAAA,EAAuB;EACnD,OAAOL,cAAc;AACtB;AAEA,OAAO,SAASM,QAAQA,CAAA,EAAkB;EACzC,OAAOL,QAAQ;AAChB;AAEA,OAAO,SAASM,OAAOA,CAACC,CAAa,EAAmB;EACvD,OAAOA,CAAC,CAACT,IAAI,KAAK,OAAO;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,UAAUA,CAACD,CAAa,EAAsB;EAC7D,OAAOA,CAAC,CAACT,IAAI,KAAK,UAAU;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASW,oBAAoBA,CAACF,CAAa,EAAW;EAC5D,OAAOA,CAAC,CAACT,IAAI,KAAK,OAAO;AAC1B;AAUA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASY,QAAQA,CAACC,MAA6B,EAAe;EACpE,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,OAAO,GAAG,CAAC;EACf,IAAIC,QAAQ,GAAG,CAAC;EAEhB,KAAK,MAAMP,CAAC,IAAII,MAAM,EAAE;IACvB,IAAIJ,CAAC,CAACT,IAAI,KAAK,OAAO,EAAE;MACvBc,KAAK,IAAIL,CAAC,CAACL,KAAK;MAChBW,OAAO,IAAI,CAAC;IACb,CAAC,MAAM;MACNC,QAAQ,IAAI,CAAC;IACd;EACD;EAEA,OAAO;IACNF,KAAK;IACLG,UAAU,EAAED,QAAQ,GAAG,CAAC;IACxBE,aAAa,EAAEH,OAAO;IACtBI,cAAc,EAAEH;EACjB,CAAC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Bar geometry: one batched path per series, grouped or stacked.
|
|
5
|
+
*
|
|
6
|
+
* Bars measure length from zero, so the domain always includes it — otherwise
|
|
7
|
+
* a bar's length means nothing. Negative values place the baseline correctly
|
|
8
|
+
* rather than clamping to the plot floor.
|
|
9
|
+
*
|
|
10
|
+
* PURE. No React, no SVG.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { isKnown, isWithheld } from "../contract/value.js";
|
|
14
|
+
import { insetForAxes, plotBottom, plotRight } from "./layout.js";
|
|
15
|
+
import { horizontalMarkers, markerDomainValues } from "./markers.js";
|
|
16
|
+
import { rectBatchPath } from "./path.js";
|
|
17
|
+
import { bandScale, domainFrom, linearScale, widenDegenerateDomain } from "./scale.js";
|
|
18
|
+
import { niceTickValues, thinTicks } from "./ticks.js";
|
|
19
|
+
/**
|
|
20
|
+
* Bars accept both category and instant positions — that dual acceptance is
|
|
21
|
+
* what makes swapping a time-series chart for a bar chart free. Both collapse
|
|
22
|
+
* to a string key for the band scale.
|
|
23
|
+
*/
|
|
24
|
+
function categoryKey(position) {
|
|
25
|
+
switch (position.kind) {
|
|
26
|
+
case 'category':
|
|
27
|
+
return position.category;
|
|
28
|
+
case 'instant':
|
|
29
|
+
return String(position.at);
|
|
30
|
+
default:
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function countExcluded(datasource) {
|
|
35
|
+
let excluded = 0;
|
|
36
|
+
for (const series of datasource.series) {
|
|
37
|
+
for (const point of series.points) {
|
|
38
|
+
if (!isKnown(point.value)) {
|
|
39
|
+
excluded += 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return excluded;
|
|
44
|
+
}
|
|
45
|
+
function groupedDomainValues(datasource) {
|
|
46
|
+
const values = [];
|
|
47
|
+
for (const series of datasource.series) {
|
|
48
|
+
for (const point of series.points) {
|
|
49
|
+
if (isKnown(point.value)) {
|
|
50
|
+
values.push(point.value.value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return values;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* A stacked axis must fit the stack totals, not the individual values.
|
|
59
|
+
* Positive and negative parts accumulate separately so a stack straddling zero
|
|
60
|
+
* still fits.
|
|
61
|
+
*/
|
|
62
|
+
function stackedDomainValues(categories, visible) {
|
|
63
|
+
const values = [];
|
|
64
|
+
|
|
65
|
+
// One pass over the points instead of a search per category and series.
|
|
66
|
+
const positive = new Map();
|
|
67
|
+
const negative = new Map();
|
|
68
|
+
for (const series of visible) {
|
|
69
|
+
const counted = new Set();
|
|
70
|
+
for (const point of series.points) {
|
|
71
|
+
const category = categoryKey(point.position);
|
|
72
|
+
// The first point of a series in a category is the one drawn there.
|
|
73
|
+
if (counted.has(category) || !isKnown(point.value)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
counted.add(category);
|
|
77
|
+
const sums = point.value.value >= 0 ? positive : negative;
|
|
78
|
+
sums.set(category, (sums.get(category) ?? 0) + point.value.value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
for (const category of categories) {
|
|
82
|
+
values.push(positive.get(category) ?? 0, negative.get(category) ?? 0);
|
|
83
|
+
}
|
|
84
|
+
return values;
|
|
85
|
+
}
|
|
86
|
+
function groupedBarX(bandStart, bandWidth, seriesIndex, seriesCount) {
|
|
87
|
+
const barWidth = bandWidth / Math.max(seriesCount, 1);
|
|
88
|
+
return {
|
|
89
|
+
barX: bandStart + seriesIndex * barWidth,
|
|
90
|
+
barWidth
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Grows from the zero baseline, upward or downward as the sign requires. */
|
|
95
|
+
function groupedBarY(value, zeroY, project) {
|
|
96
|
+
const valueY = project(value);
|
|
97
|
+
return {
|
|
98
|
+
top: Math.min(zeroY, valueY),
|
|
99
|
+
height: Math.abs(valueY - zeroY)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Grows from wherever the running stack for this sign currently ends. */
|
|
104
|
+
function stackedBarY(value, category, stack, project) {
|
|
105
|
+
const base = stack.get(category) ?? 0;
|
|
106
|
+
const from = project(base);
|
|
107
|
+
const to = project(base + value);
|
|
108
|
+
stack.set(category, base + value);
|
|
109
|
+
return {
|
|
110
|
+
top: Math.min(from, to),
|
|
111
|
+
height: Math.abs(to - from)
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export function buildBarGeometry(datasource, input, options = {}) {
|
|
115
|
+
const grouping = options.grouping ?? 'grouped';
|
|
116
|
+
|
|
117
|
+
// Preserve first-seen order rather than sorting: the app chose this order.
|
|
118
|
+
const categories = [];
|
|
119
|
+
const seen = new Set();
|
|
120
|
+
for (const series of datasource.series) {
|
|
121
|
+
for (const point of series.points) {
|
|
122
|
+
const key = categoryKey(point.position);
|
|
123
|
+
if (key && !seen.has(key)) {
|
|
124
|
+
seen.add(key);
|
|
125
|
+
categories.push(key);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Instants have an order of their own. First-seen order put Tuesday before
|
|
131
|
+
// Monday when one series started a day late, and disagreed with the
|
|
132
|
+
// time-series chart drawn from the same datasource (CHT-20).
|
|
133
|
+
if (datasource.positionKind === 'instant') {
|
|
134
|
+
categories.sort((a, b) => Number(a) - Number(b));
|
|
135
|
+
}
|
|
136
|
+
const visible = datasource.series.filter(s => !s.hidden);
|
|
137
|
+
const excluded = countExcluded(datasource);
|
|
138
|
+
const values = [...(grouping === 'stacked' ? stackedDomainValues(categories, visible) : groupedDomainValues(datasource)),
|
|
139
|
+
// A threshold above every bar must still be on the chart.
|
|
140
|
+
...markerDomainValues(datasource.markers)];
|
|
141
|
+
|
|
142
|
+
// Labels depend only on the domain, so they are known before any pixel is,
|
|
143
|
+
// and the plot can make room for them first.
|
|
144
|
+
// Bars grow from zero, so padding past zero on a side no bar reaches only
|
|
145
|
+
// adds a meaningless tick (-5.5 under all-positive data) crowding the 0.
|
|
146
|
+
const padded = domainFrom(values, {
|
|
147
|
+
includeZero: true,
|
|
148
|
+
padFraction: 0.05
|
|
149
|
+
});
|
|
150
|
+
const domain = widenDegenerateDomain({
|
|
151
|
+
min: values.some(v => v < 0) ? padded.min : Math.max(padded.min, 0),
|
|
152
|
+
max: values.some(v => v > 0) ? padded.max : Math.min(padded.max, 0)
|
|
153
|
+
});
|
|
154
|
+
// Round steps a reader can count in, not the padded extremes (105.3).
|
|
155
|
+
const yTickValues = niceTickValues(domain, 4);
|
|
156
|
+
const xLabel = c => datasource.positionKind === 'instant' ? input.formatInstant(Number(c)) : input.formatCategory(c);
|
|
157
|
+
const plot = insetForAxes(input.plot, {
|
|
158
|
+
xLabels: categories.map(xLabel),
|
|
159
|
+
yLabels: yTickValues.map(input.formatValue),
|
|
160
|
+
fontSize: input.fontSize
|
|
161
|
+
});
|
|
162
|
+
const xBand = bandScale(categories, {
|
|
163
|
+
min: plot.x,
|
|
164
|
+
max: plotRight(plot)
|
|
165
|
+
}, 0.25);
|
|
166
|
+
const y = linearScale(domain, {
|
|
167
|
+
min: plotBottom(plot),
|
|
168
|
+
max: plot.y
|
|
169
|
+
});
|
|
170
|
+
const zeroY = y.project(0);
|
|
171
|
+
const paths = [];
|
|
172
|
+
const hitRegions = [];
|
|
173
|
+
|
|
174
|
+
// Running stack offsets, tracked separately per sign so negative bars grow
|
|
175
|
+
// downward from zero while positive bars grow upward.
|
|
176
|
+
const stackUp = new Map();
|
|
177
|
+
const stackDown = new Map();
|
|
178
|
+
visible.forEach((series, seriesIndex) => {
|
|
179
|
+
const rects = [];
|
|
180
|
+
for (const point of series.points) {
|
|
181
|
+
const category = categoryKey(point.position);
|
|
182
|
+
const bandStart = xBand.project(category);
|
|
183
|
+
if (bandStart === undefined || !isKnown(point.value)) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
const value = point.value.value;
|
|
187
|
+
const {
|
|
188
|
+
barX,
|
|
189
|
+
barWidth
|
|
190
|
+
} = grouping === 'grouped' ? groupedBarX(bandStart, xBand.bandWidth, seriesIndex, visible.length) : {
|
|
191
|
+
barX: bandStart,
|
|
192
|
+
barWidth: xBand.bandWidth
|
|
193
|
+
};
|
|
194
|
+
const stack = value >= 0 ? stackUp : stackDown;
|
|
195
|
+
const {
|
|
196
|
+
top,
|
|
197
|
+
height
|
|
198
|
+
} = grouping === 'stacked' ? stackedBarY(value, category, stack, y.project) : groupedBarY(value, zeroY, y.project);
|
|
199
|
+
rects.push({
|
|
200
|
+
x: barX,
|
|
201
|
+
y: top,
|
|
202
|
+
width: barWidth,
|
|
203
|
+
height,
|
|
204
|
+
radius: options.radius ?? input.radius?.bar
|
|
205
|
+
});
|
|
206
|
+
hitRegions.push({
|
|
207
|
+
seriesId: series.id,
|
|
208
|
+
pointId: point.id,
|
|
209
|
+
x: barX + barWidth / 2,
|
|
210
|
+
y: top + height / 2,
|
|
211
|
+
bounds: {
|
|
212
|
+
x: barX,
|
|
213
|
+
y: top,
|
|
214
|
+
width: barWidth,
|
|
215
|
+
height
|
|
216
|
+
},
|
|
217
|
+
selectable: !isWithheld(point.value)
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
if (rects.length > 0) {
|
|
221
|
+
paths.push({
|
|
222
|
+
key: `bars-${series.id}`,
|
|
223
|
+
seriesId: series.id,
|
|
224
|
+
d: rectBatchPath(rects),
|
|
225
|
+
color: input.seriesColors[series.id],
|
|
226
|
+
pattern: series.pattern ?? 'solid',
|
|
227
|
+
filled: true
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
const xTicks = categories.map(c => ({
|
|
232
|
+
value: 0,
|
|
233
|
+
position: xBand.centerOf(c) ?? plot.x,
|
|
234
|
+
label: xLabel(c)
|
|
235
|
+
}));
|
|
236
|
+
const yTicks = yTickValues.map(v => ({
|
|
237
|
+
value: v,
|
|
238
|
+
position: y.project(v),
|
|
239
|
+
label: input.formatValue(v)
|
|
240
|
+
}));
|
|
241
|
+
const markers = horizontalMarkers(datasource.markers, plot, y.project);
|
|
242
|
+
return {
|
|
243
|
+
plot,
|
|
244
|
+
paths,
|
|
245
|
+
markers: markers.lines,
|
|
246
|
+
labels: markers.labels,
|
|
247
|
+
xTicks: thinTicks(xTicks, input.fontSize, plot.width),
|
|
248
|
+
yTicks,
|
|
249
|
+
hitRegions,
|
|
250
|
+
incomplete: excluded > 0
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
//# sourceMappingURL=bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isKnown","isWithheld","insetForAxes","plotBottom","plotRight","horizontalMarkers","markerDomainValues","rectBatchPath","bandScale","domainFrom","linearScale","widenDegenerateDomain","niceTickValues","thinTicks","categoryKey","position","kind","category","String","at","countExcluded","datasource","excluded","series","point","points","value","groupedDomainValues","values","push","stackedDomainValues","categories","visible","positive","Map","negative","counted","Set","has","add","sums","set","get","groupedBarX","bandStart","bandWidth","seriesIndex","seriesCount","barWidth","Math","max","barX","groupedBarY","zeroY","project","valueY","top","min","height","abs","stackedBarY","stack","base","from","to","buildBarGeometry","input","options","grouping","seen","key","positionKind","sort","a","b","Number","filter","s","hidden","markers","padded","includeZero","padFraction","domain","some","v","yTickValues","xLabel","c","formatInstant","formatCategory","plot","xLabels","map","yLabels","formatValue","fontSize","xBand","x","y","paths","hitRegions","stackUp","stackDown","forEach","rects","undefined","length","width","radius","bar","seriesId","id","pointId","bounds","selectable","d","color","seriesColors","pattern","filled","xTicks","centerOf","label","yTicks","lines","labels","incomplete"],"sourceRoot":"../../../src","sources":["geometry/bar.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,EAAEC,UAAU,QAAQ,sBAAmB;AAEvD,SAASC,YAAY,EAAEC,UAAU,EAAEC,SAAS,QAAQ,aAAU;AAC9D,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,cAAW;AACjE,SAASC,aAAa,QAAuB,WAAQ;AACrD,SAASC,SAAS,EAAEC,UAAU,EAAEC,WAAW,EAAEC,qBAAqB,QAAQ,YAAS;AACnF,SAASC,cAAc,EAAEC,SAAS,QAAmB,YAAS;AAU9D;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAACC,QAAkB,EAAU;EAChD,QAAQA,QAAQ,CAACC,IAAI;IACpB,KAAK,UAAU;MACd,OAAOD,QAAQ,CAACE,QAAQ;IACzB,KAAK,SAAS;MACb,OAAOC,MAAM,CAACH,QAAQ,CAACI,EAAE,CAAC;IAC3B;MACC,OAAO,EAAE;EACX;AACD;AAEA,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