@fundar/data-chart-telling 1.1.0 → 1.3.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 +45 -0
- package/README.md +8 -7
- package/dist/configuration/config.svelte.d.ts +1 -1
- package/dist/configuration/config.svelte.js +177 -100
- package/dist/configuration/themes/index.d.ts +5 -1428
- package/dist/index.d.ts +23 -14
- package/dist/index.js +20 -11
- package/dist/layout/base/BasePlotLayout.svelte +115 -50
- package/dist/layout/base/BasePlotLayout.svelte.d.ts +1 -38
- package/dist/layout/coordinates/CoordinatesLayout.svelte +42 -40
- package/dist/layout/coordinates/CoordinatesLayout.svelte.d.ts +0 -2
- package/dist/layout/coordinates/ProjectionZoom.svelte +48 -0
- package/dist/layout/coordinates/ProjectionZoom.svelte.d.ts +10 -0
- package/dist/layout/coordinates/ZoomedProjection.d.ts +11 -0
- package/dist/layout/coordinates/ZoomedProjection.js +24 -0
- package/dist/layout/coordinates/camera.svelte.js +11 -8
- package/dist/layout/coordinates/projections/argentina.js +1 -1
- package/dist/layout/coordinates/projections/fit.d.ts +1 -1
- package/dist/layout/coordinates/projections/fit.js +1 -1
- package/dist/layout/coordinates/zoom.svelte.d.ts +4 -5
- package/dist/layout/coordinates/zoom.svelte.js +4 -5
- package/dist/layout/facet/FacetLayout.svelte +1 -1
- package/dist/layout/facet/config.js +1 -1
- package/dist/layout/facet/scope.d.ts +40 -0
- package/dist/layout/facet/scope.js +104 -0
- package/dist/layout/figure/Figure.svelte +2 -0
- package/dist/layout/geometry/GeometryLayout.svelte +14 -9
- package/dist/layout/geometry/GeometryLayout.svelte.d.ts +0 -3
- package/dist/layout/geometry/MarkerOffset.svelte +28 -0
- package/dist/layout/geometry/MarkerOffset.svelte.d.ts +13 -0
- package/dist/layout/grid/GridCell.svelte +6 -8
- package/dist/layout/legend/ContinuousSection.svelte +44 -9
- package/dist/layout/legend/DiscreteBadgeItem.svelte +2 -2
- package/dist/layout/legend/DiscreteSection.svelte +2 -2
- package/dist/layout/legend/DiscreteSymbolIcon.svelte +39 -15
- package/dist/layout/legend/LegendChannels.js +36 -12
- package/dist/layout/legend/LegendLayout.svelte +9 -1
- package/dist/layout/legend/LegendState.svelte.d.ts +4 -0
- package/dist/layout/legend/LegendState.svelte.js +23 -8
- package/dist/layout/legend/SizeSection.svelte +1 -1
- package/dist/layout/margins/PlotMargins.svelte.d.ts +2 -5
- package/dist/layout/margins/PlotMargins.svelte.js +35 -8
- package/dist/layout/plot/Plot.svelte +22 -2
- package/dist/layout/plot/Slice.d.ts +5 -1
- package/dist/layout/plot/Slice.js +14 -4
- package/dist/layout/scales/NiceTicks.d.ts +3 -0
- package/dist/layout/scales/NiceTicks.js +4 -0
- package/dist/layout/scales/ScalesLayout.svelte +93 -7
- package/dist/layout/scales/ScalesLayout.svelte.d.ts +5 -0
- package/dist/layout/scales/SveltePlotScale.d.ts +2 -2
- package/dist/layout/scales/SveltePlotScale.js +13 -6
- package/dist/layout/scales/TickLabels.d.ts +32 -0
- package/dist/layout/scales/TickLabels.js +55 -0
- package/dist/layout/styles/StylesLayout.svelte +2 -2
- package/dist/layout/styles/ValueLabels.d.ts +33 -5
- package/dist/layout/styles/ValueLabels.js +80 -21
- package/dist/layout/timeline/TimelineLayout.svelte +1 -1
- package/dist/layout/tooltip/Tooltip.svelte +4 -4
- package/dist/layout/tooltip/Tooltip.svelte.d.ts +4 -4
- package/dist/layout/tooltip/TooltipState.svelte.js +1 -1
- package/dist/markers/MarkerKinds.d.ts +5 -0
- package/dist/markers/MarkerKinds.js +1 -0
- package/dist/markers/area/AreaMarker.svelte +15 -63
- package/dist/markers/arrow/ArrowMarker.svelte +51 -9
- package/dist/markers/bar/BarMarker.svelte +8 -4
- package/dist/markers/bollinger/BollingerMarker.svelte +33 -18
- package/dist/markers/box/BoxMarker.svelte +40 -9
- package/dist/markers/delta/Delta.d.ts +6 -1
- package/dist/markers/delta/Delta.js +16 -1
- package/dist/markers/delta/DeltaMarker.svelte +9 -87
- package/dist/markers/delta/DeltaPoint.svelte +97 -0
- package/dist/markers/delta/DeltaPoint.svelte.d.ts +29 -0
- package/dist/markers/dot/DotMarker.svelte +24 -27
- package/dist/markers/image/ImageMarker.svelte +17 -12
- package/dist/markers/inset/InsetMarker.svelte +2 -2
- package/dist/markers/line/LineMarker.svelte +1 -0
- package/dist/markers/link/LinkMarker.svelte +174 -29
- package/dist/markers/regression/RegressionMarker.svelte +16 -33
- package/dist/markers/rule/RuleMarker.svelte +14 -5
- package/dist/markers/text/Declutter.d.ts +4 -0
- package/dist/markers/text/Declutter.js +26 -11
- package/dist/markers/text/TextMarker.svelte +91 -48
- package/dist/markers/tick/TickMarker.svelte +27 -25
- package/dist/markers/utils/MarkerChannels.d.ts +24 -0
- package/dist/markers/utils/MarkerChannels.js +42 -7
- package/dist/markers/utils/RowOffset.d.ts +23 -0
- package/dist/markers/utils/RowOffset.js +23 -0
- package/dist/markers/utils/RowOffsetMarks.svelte +30 -0
- package/dist/markers/utils/RowOffsetMarks.svelte.d.ts +33 -0
- package/dist/markers/utils/RowStroke.d.ts +31 -0
- package/dist/markers/utils/RowStroke.js +28 -0
- package/dist/markers/violin/ViolinMarker.svelte +75 -0
- package/dist/markers/violin/ViolinMarker.svelte.d.ts +7 -0
- package/dist/markers/violin/ViolinProfiles.d.ts +29 -0
- package/dist/markers/violin/ViolinProfiles.js +55 -0
- package/dist/markers/waffle/WaffleMarker.svelte +17 -37
- package/dist/phases/Pipeline.d.ts +5 -0
- package/dist/phases/Pipeline.js +5 -0
- package/dist/phases/data/DataPhase.js +3 -3
- package/dist/phases/data/PlotAxes.d.ts +10 -0
- package/dist/phases/data/PlotAxes.js +14 -1
- package/dist/phases/facet/FacetPanels.d.ts +1 -0
- package/dist/phases/facet/FacetPanels.js +1 -0
- package/dist/phases/facet/FacetPhase.d.ts +2 -1
- package/dist/phases/facet/FacetPhase.js +19 -4
- package/dist/phases/mapping/MappingPhase.js +1 -1
- package/dist/phases/markers/MarkersPhase.js +2 -1
- package/dist/phases/scales/CategoryOrder.d.ts +23 -0
- package/dist/phases/scales/CategoryOrder.js +73 -0
- package/dist/phases/scales/ScalesPhase.js +21 -7
- package/dist/phases/sharedScales/SharedScalesPhase.d.ts +3 -2
- package/dist/phases/sharedScales/SharedScalesPhase.js +5 -2
- package/dist/phases/statistics/Statistics.d.ts +10 -6
- package/dist/phases/statistics/Statistics.js +20 -10
- package/dist/phases/statistics/StatisticsPhase.js +16 -3
- package/dist/phases/statistics/methods/BollingerStatistic.d.ts +1 -1
- package/dist/phases/statistics/methods/BollingerStatistic.js +13 -11
- package/dist/phases/statistics/methods/BoxStatistic.d.ts +1 -1
- package/dist/phases/statistics/methods/BoxStatistic.js +14 -12
- package/dist/phases/statistics/methods/Density2dStatistic.d.ts +1 -1
- package/dist/phases/statistics/methods/Density2dStatistic.js +13 -11
- package/dist/phases/statistics/methods/DensityStatistic.d.ts +1 -1
- package/dist/phases/statistics/methods/DensityStatistic.js +11 -9
- package/dist/phases/statistics/methods/DeviationStatistic.d.ts +8 -0
- package/dist/phases/statistics/methods/DeviationStatistic.js +111 -0
- package/dist/phases/statistics/methods/MovingAverageStatistic.d.ts +1 -1
- package/dist/phases/statistics/methods/MovingAverageStatistic.js +11 -9
- package/dist/phases/statistics/methods/RegressionStatistic.d.ts +1 -1
- package/dist/phases/statistics/methods/RegressionStatistic.js +16 -14
- package/dist/phases/transforms/ProcessedPositions.js +1 -1
- package/dist/phases/transforms/TransformsPhase.js +49 -3
- package/dist/phases/transforms/ValueSelection.d.ts +30 -0
- package/dist/phases/transforms/ValueSelection.js +53 -0
- package/dist/plots/{heatmap → correlation/heatmap}/Plot.svelte +5 -2
- package/dist/plots/{heatmap → correlation/heatmap}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{heatmap → correlation/heatmap}/defaults.d.ts +2 -2
- package/dist/plots/{heatmap → correlation/heatmap}/defaults.js +5 -5
- package/dist/plots/{heatmap → correlation/heatmap}/markers.d.ts +4 -4
- package/dist/plots/{heatmap → correlation/heatmap}/markers.js +3 -3
- package/dist/plots/{scatter → correlation/scatter}/Plot.svelte +5 -2
- package/dist/plots/{scatter → correlation/scatter}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{scatter → correlation/scatter}/defaults.d.ts +2 -2
- package/dist/plots/{scatter → correlation/scatter}/defaults.js +4 -4
- package/dist/plots/{scatter → correlation/scatter}/markers.d.ts +4 -4
- package/dist/plots/{scatter → correlation/scatter}/markers.js +3 -3
- package/dist/plots/{box → distribution/box}/BoxSummaries.d.ts +2 -2
- package/dist/plots/{box → distribution/box}/BoxSummaries.js +6 -6
- package/dist/plots/{box → distribution/box}/Plot.svelte +2 -2
- package/dist/plots/{box → distribution/box}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{box → distribution/box}/defaults.d.ts +2 -2
- package/dist/plots/{box → distribution/box}/defaults.js +1 -1
- package/dist/plots/{box → distribution/box}/markers.d.ts +2 -2
- package/dist/plots/distribution/density/Plot.svelte +45 -0
- package/dist/plots/distribution/density/Plot.svelte.d.ts +26 -0
- package/dist/plots/distribution/density/defaults.d.ts +9 -0
- package/dist/plots/distribution/density/defaults.js +29 -0
- package/dist/plots/distribution/density/markers.d.ts +9 -0
- package/dist/plots/distribution/density/markers.js +42 -0
- package/dist/plots/{histogram → distribution/histogram}/Plot.svelte +2 -2
- package/dist/plots/{histogram → distribution/histogram}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{histogram → distribution/histogram}/defaults.d.ts +2 -2
- package/dist/plots/{histogram → distribution/histogram}/defaults.js +3 -3
- package/dist/plots/{histogram → distribution/histogram}/markers.d.ts +3 -3
- package/dist/plots/{histogram → distribution/histogram}/markers.js +5 -5
- package/dist/plots/{pyramid → distribution/pyramid}/Plot.svelte +5 -2
- package/dist/plots/{pyramid → distribution/pyramid}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{pyramid → distribution/pyramid}/defaults.d.ts +2 -2
- package/dist/plots/{pyramid → distribution/pyramid}/defaults.js +6 -6
- package/dist/plots/{pyramid → distribution/pyramid}/markers.d.ts +4 -4
- package/dist/plots/{pyramid → distribution/pyramid}/markers.js +6 -6
- package/dist/plots/distribution/violin/Plot.svelte +45 -0
- package/dist/plots/distribution/violin/Plot.svelte.d.ts +26 -0
- package/dist/plots/distribution/violin/defaults.d.ts +10 -0
- package/dist/plots/distribution/violin/defaults.js +58 -0
- package/dist/plots/distribution/violin/markers.d.ts +10 -0
- package/dist/plots/distribution/violin/markers.js +71 -0
- package/dist/plots/{area → evolution/area}/Plot.svelte +2 -2
- package/dist/plots/{area → evolution/area}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{area → evolution/area}/defaults.d.ts +2 -2
- package/dist/plots/{area → evolution/area}/defaults.js +2 -0
- package/dist/plots/{area → evolution/area}/markers.d.ts +2 -2
- package/dist/plots/{area → evolution/area}/markers.js +1 -1
- package/dist/plots/{line → evolution/line}/Plot.svelte +2 -2
- package/dist/plots/{line → evolution/line}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{line → evolution/line}/defaults.d.ts +2 -2
- package/dist/plots/{line → evolution/line}/defaults.js +2 -0
- package/dist/plots/{line → evolution/line}/markers.d.ts +11 -8
- package/dist/plots/{line → evolution/line}/markers.js +6 -4
- package/dist/plots/evolution/slope/Plot.svelte +42 -0
- package/dist/plots/evolution/slope/Plot.svelte.d.ts +26 -0
- package/dist/plots/evolution/slope/defaults.d.ts +8 -0
- package/dist/plots/evolution/slope/defaults.js +31 -0
- package/dist/plots/evolution/slope/markers.d.ts +16 -0
- package/dist/plots/evolution/slope/markers.js +79 -0
- package/dist/plots/evolution/sparkline/Plot.svelte +45 -0
- package/dist/plots/evolution/sparkline/Plot.svelte.d.ts +26 -0
- package/dist/plots/evolution/sparkline/defaults.d.ts +7 -0
- package/dist/plots/evolution/sparkline/defaults.js +23 -0
- package/dist/plots/evolution/sparkline/markers.d.ts +7 -0
- package/dist/plots/evolution/sparkline/markers.js +56 -0
- package/dist/plots/{geo → map/geo}/Core.svelte +11 -10
- package/dist/plots/{geo → map/geo}/Core.svelte.d.ts +1 -1
- package/dist/plots/map/geo/GeoFeatures.svelte.d.ts +9 -0
- package/dist/plots/map/geo/GeoFeatures.svelte.js +55 -0
- package/dist/plots/map/geo/GeoGeometry.d.ts +27 -0
- package/dist/plots/map/geo/GeoGeometry.js +142 -0
- package/dist/plots/map/geo/GeoSegments.d.ts +16 -0
- package/dist/plots/map/geo/GeoSegments.js +23 -0
- package/dist/plots/{geo → map/geo}/Plot.svelte +10 -10
- package/dist/plots/{geo → map/geo}/Plot.svelte.d.ts +2 -2
- package/dist/plots/{geo → map/geo}/defaults.d.ts +2 -2
- package/dist/plots/{geo → map/geo}/defaults.js +1 -1
- package/dist/plots/{geo → map/geo}/phases/data.d.ts +1 -1
- package/dist/plots/{geo → map/geo}/phases/data.js +7 -6
- package/dist/plots/{geo → map/geo}/phases/hover.d.ts +1 -1
- package/dist/plots/{geo → map/geo}/phases/hover.js +2 -2
- package/dist/plots/{geo → map/geo}/phases/markers.d.ts +1 -1
- package/dist/plots/{geo → map/geo}/phases/markers.js +6 -10
- package/dist/plots/{geo → map/geo}/phases/scales.d.ts +2 -2
- package/dist/plots/{geo → map/geo}/phases/scales.js +28 -12
- package/dist/plots/{geo → map/geo}/phases/tooltip.d.ts +1 -1
- package/dist/plots/map/geo/phases/tooltip.js +5 -0
- package/dist/plots/{geo → map/geo}/slices.d.ts +2 -2
- package/dist/plots/{geo → map/geo}/slices.js +2 -2
- package/dist/plots/{bar → ranking/bar}/Plot.svelte +2 -2
- package/dist/plots/{bar → ranking/bar}/Plot.svelte.d.ts +2 -2
- package/dist/plots/ranking/bar/defaults.d.ts +16 -0
- package/dist/plots/{bar → ranking/bar}/defaults.js +15 -9
- package/dist/plots/{bar → ranking/bar}/markers.d.ts +8 -8
- package/dist/plots/{bar → ranking/bar}/markers.js +8 -17
- package/dist/plots/ranking/bullet/Plot.svelte +42 -0
- package/dist/plots/ranking/bullet/Plot.svelte.d.ts +26 -0
- package/dist/plots/ranking/bullet/defaults.d.ts +8 -0
- package/dist/plots/ranking/bullet/defaults.js +24 -0
- package/dist/plots/ranking/bullet/markers.d.ts +10 -0
- package/dist/plots/ranking/bullet/markers.js +90 -0
- package/dist/plots/ranking/cleveland/ClevelandConnector.d.ts +48 -0
- package/dist/plots/ranking/cleveland/ClevelandConnector.js +140 -0
- package/dist/plots/ranking/cleveland/ClevelandMarkers.d.ts +33 -0
- package/dist/plots/ranking/cleveland/ClevelandMarkers.js +375 -0
- package/dist/plots/ranking/cleveland/ClevelandRanges.d.ts +31 -0
- package/dist/plots/ranking/cleveland/ClevelandRanges.js +116 -0
- package/dist/plots/ranking/cleveland/Plot.svelte +45 -0
- package/dist/plots/ranking/cleveland/Plot.svelte.d.ts +26 -0
- package/dist/plots/ranking/cleveland/defaults.d.ts +13 -0
- package/dist/plots/ranking/cleveland/defaults.js +66 -0
- package/dist/plots/ranking/dumbbell/Plot.svelte +45 -0
- package/dist/plots/ranking/dumbbell/Plot.svelte.d.ts +26 -0
- package/dist/plots/ranking/dumbbell/defaults.d.ts +9 -0
- package/dist/plots/ranking/dumbbell/defaults.js +19 -0
- package/dist/plots/ranking/forest/Plot.svelte +42 -0
- package/dist/plots/ranking/forest/Plot.svelte.d.ts +26 -0
- package/dist/plots/ranking/forest/defaults.d.ts +11 -0
- package/dist/plots/ranking/forest/defaults.js +20 -0
- package/dist/plots/ranking/lollipop/Plot.svelte +45 -0
- package/dist/plots/ranking/lollipop/Plot.svelte.d.ts +26 -0
- package/dist/plots/ranking/lollipop/defaults.d.ts +9 -0
- package/dist/plots/ranking/lollipop/defaults.js +18 -0
- package/dist/plots/utils/RowNumbers.d.ts +16 -0
- package/dist/plots/utils/RowNumbers.js +24 -0
- package/dist/plots/utils/gaps.js +1 -1
- package/dist/plots/utils/segments.d.ts +4 -1
- package/dist/plots/utils/segments.js +20 -7
- package/dist/types/configuration/styling.d.ts +284 -143
- package/dist/types/layout/coordinates.d.ts +5 -4
- package/dist/types/layout/facet.d.ts +18 -0
- package/dist/types/layout/legend.d.ts +23 -5
- package/dist/types/layout/plot.d.ts +46 -1
- package/dist/types/layout/scales.d.ts +39 -7
- package/dist/types/layout/statistics/deviation.d.ts +40 -0
- package/dist/types/layout/statistics/index.d.ts +7 -2
- package/dist/types/layout/styles/base.d.ts +18 -0
- package/dist/types/layout/styles/bullet.d.ts +25 -0
- package/dist/types/layout/styles/connector.d.ts +98 -0
- package/dist/types/layout/styles/curve.d.ts +11 -0
- package/dist/types/layout/styles/frame.d.ts +17 -0
- package/dist/types/layout/styles/gaps.d.ts +12 -0
- package/dist/types/layout/styles/geo.d.ts +55 -0
- package/dist/types/layout/styles/index.d.ts +8 -0
- package/dist/types/layout/styles/index.js +8 -0
- package/dist/types/layout/styles/values.d.ts +47 -0
- package/dist/types/layout/timeline.d.ts +5 -2
- package/dist/types/layout/tooltip.d.ts +6 -2
- package/dist/types/markers/axis/area.d.ts +2 -2
- package/dist/types/markers/axis/arrow.d.ts +3 -0
- package/dist/types/markers/axis/axisBasedMarkersConfig.d.ts +2 -1
- package/dist/types/markers/axis/bar.d.ts +1 -1
- package/dist/types/markers/axis/box.d.ts +5 -0
- package/dist/types/markers/axis/delta.d.ts +15 -2
- package/dist/types/markers/axis/difference.d.ts +2 -2
- package/dist/types/markers/axis/image.d.ts +3 -2
- package/dist/types/markers/axis/line.d.ts +2 -0
- package/dist/types/markers/axis/rule.d.ts +18 -2
- package/dist/types/markers/axis/trail.d.ts +2 -3
- package/dist/types/markers/axis/violin.d.ts +25 -0
- package/dist/types/markers/basic/dot.d.ts +3 -2
- package/dist/types/markers/basic/text.d.ts +13 -3
- package/dist/types/markers/channels/commonMarkerConfig.d.ts +7 -3
- package/dist/types/markers/channels/commonMarkerConfigWithRowOffset.d.ts +13 -0
- package/dist/types/markers/common.d.ts +1 -1
- package/dist/types/markers/common.js +1 -0
- package/dist/types/markers/geo/link.d.ts +5 -1
- package/dist/types/phases/facet/phase.d.ts +4 -0
- package/dist/types/phases/index.d.ts +1 -1
- package/dist/types/phases/scales/phase.d.ts +5 -1
- package/dist/types/phases/state.d.ts +15 -2
- package/dist/types/phases/statistics/source.d.ts +3 -1
- package/dist/types/phases/transforms/phase.d.ts +22 -0
- package/dist/types/plots/{heatmap → correlation/heatmap}/props.d.ts +6 -6
- package/dist/types/plots/{heatmap → correlation/heatmap}/state.d.ts +4 -4
- package/dist/types/plots/{scatter → correlation/scatter}/props.d.ts +6 -6
- package/dist/types/plots/{scatter → correlation/scatter}/state.d.ts +2 -2
- package/dist/types/plots/{box → distribution/box}/props.d.ts +6 -6
- package/dist/types/plots/{box → distribution/box}/state.d.ts +3 -3
- package/dist/types/plots/distribution/density/props.d.ts +23 -0
- package/dist/types/plots/distribution/density/state.d.ts +6 -0
- package/dist/types/plots/{histogram → distribution/histogram}/props.d.ts +7 -7
- package/dist/types/plots/{histogram → distribution/histogram}/state.d.ts +2 -2
- package/dist/types/plots/distribution/histogram/state.js +1 -0
- package/dist/types/plots/{pyramid → distribution/pyramid}/props.d.ts +6 -6
- package/dist/types/plots/distribution/pyramid/props.js +1 -0
- package/dist/types/plots/{pyramid → distribution/pyramid}/state.d.ts +3 -3
- package/dist/types/plots/distribution/pyramid/state.js +1 -0
- package/dist/types/plots/distribution/violin/props.d.ts +23 -0
- package/dist/types/plots/distribution/violin/props.js +1 -0
- package/dist/types/plots/distribution/violin/state.d.ts +6 -0
- package/dist/types/plots/distribution/violin/state.js +1 -0
- package/dist/types/plots/{area → evolution/area}/props.d.ts +6 -6
- package/dist/types/plots/evolution/area/props.js +1 -0
- package/dist/types/plots/{area → evolution/area}/state.d.ts +2 -2
- package/dist/types/plots/evolution/area/state.js +1 -0
- package/dist/types/plots/evolution/line/props.d.ts +10 -0
- package/dist/types/plots/evolution/line/props.js +1 -0
- package/dist/types/plots/{line → evolution/line}/state.d.ts +3 -3
- package/dist/types/plots/evolution/line/state.js +1 -0
- package/dist/types/plots/evolution/slope/props.d.ts +5 -0
- package/dist/types/plots/evolution/slope/props.js +1 -0
- package/dist/types/plots/evolution/slope/state.d.ts +5 -0
- package/dist/types/plots/evolution/slope/state.js +1 -0
- package/dist/types/plots/evolution/sparkline/props.d.ts +5 -0
- package/dist/types/plots/evolution/sparkline/props.js +1 -0
- package/dist/types/plots/evolution/sparkline/state.d.ts +5 -0
- package/dist/types/plots/evolution/sparkline/state.js +1 -0
- package/dist/types/plots/{geo → map/geo}/props.d.ts +8 -8
- package/dist/types/plots/map/geo/props.js +1 -0
- package/dist/types/plots/{geo → map/geo}/state.d.ts +18 -11
- package/dist/types/plots/map/geo/state.js +1 -0
- package/dist/types/plots/props.d.ts +7 -4
- package/dist/types/plots/{bar → ranking/bar}/props.d.ts +6 -6
- package/dist/types/plots/ranking/bar/props.js +1 -0
- package/dist/types/plots/{bar → ranking/bar}/state.d.ts +2 -2
- package/dist/types/plots/ranking/bar/state.js +1 -0
- package/dist/types/plots/ranking/bullet/props.d.ts +22 -0
- package/dist/types/plots/ranking/bullet/props.js +1 -0
- package/dist/types/plots/ranking/bullet/state.d.ts +5 -0
- package/dist/types/plots/ranking/bullet/state.js +1 -0
- package/dist/types/plots/ranking/cleveland/props.d.ts +10 -0
- package/dist/types/plots/ranking/cleveland/props.js +1 -0
- package/dist/types/plots/ranking/cleveland/state.d.ts +49 -0
- package/dist/types/plots/ranking/cleveland/state.js +1 -0
- package/dist/types/plots/ranking/dumbbell/props.d.ts +10 -0
- package/dist/types/plots/ranking/dumbbell/props.js +1 -0
- package/dist/types/plots/ranking/dumbbell/state.d.ts +5 -0
- package/dist/types/plots/ranking/dumbbell/state.js +1 -0
- package/dist/types/plots/ranking/forest/props.d.ts +23 -0
- package/dist/types/plots/ranking/forest/props.js +1 -0
- package/dist/types/plots/ranking/forest/state.d.ts +5 -0
- package/dist/types/plots/ranking/forest/state.js +1 -0
- package/dist/types/plots/ranking/lollipop/props.d.ts +10 -0
- package/dist/types/plots/ranking/lollipop/props.js +1 -0
- package/dist/types/plots/ranking/lollipop/state.d.ts +5 -0
- package/dist/types/plots/ranking/lollipop/state.js +1 -0
- package/dist/types/plots/segments/common.d.ts +4 -1
- package/dist/types/plots/segments/config.d.ts +4 -2
- package/dist/utils/OpacityScale.d.ts +14 -0
- package/dist/utils/OpacityScale.js +43 -0
- package/dist/utils/{symbol.d.ts → SymbolPath.d.ts} +0 -12
- package/dist/utils/{symbol.js → SymbolPath.js} +0 -24
- package/dist/utils/SymbolScale.d.ts +18 -0
- package/dist/utils/SymbolScale.js +29 -0
- package/dist/utils/color/ColorRamp.d.ts +27 -0
- package/dist/utils/color/ColorRamp.js +120 -0
- package/dist/utils/color/CssColor.d.ts +19 -0
- package/dist/utils/color/CssColor.js +114 -0
- package/dist/utils/color/Palette.d.ts +21 -0
- package/dist/utils/color/Palette.js +52 -0
- package/dist/utils/color/index.d.ts +11 -3
- package/dist/utils/color/index.js +14 -3
- package/dist/utils/grouping.js +1 -1
- package/docs/architecture.md +1 -1
- package/docs/chrome.md +2 -2
- package/docs/composer.md +2 -2
- package/docs/concepts.md +1 -1
- package/docs/development.md +1 -1
- package/docs/facets.md +50 -3
- package/docs/getting-started.md +2 -2
- package/docs/legend.md +13 -11
- package/docs/markers.md +57 -27
- package/docs/plots/correlation/heatmap.md +26 -0
- package/docs/plots/correlation/scatter.md +35 -0
- package/docs/plots/distribution/box.md +28 -0
- package/docs/plots/distribution/density.md +26 -0
- package/docs/plots/distribution/histogram.md +33 -0
- package/docs/plots/distribution/pyramid.md +31 -0
- package/docs/plots/distribution/violin.md +35 -0
- package/docs/plots/evolution/area.md +32 -0
- package/docs/plots/evolution/line.md +93 -0
- package/docs/plots/evolution/slope.md +39 -0
- package/docs/plots/evolution/sparkline.md +34 -0
- package/docs/plots/ranking/bar.md +59 -0
- package/docs/plots/ranking/bullet.md +37 -0
- package/docs/plots/ranking/cleveland.md +54 -0
- package/docs/plots/ranking/dumbbell.md +39 -0
- package/docs/plots/ranking/forest.md +40 -0
- package/docs/plots/ranking/lollipop.md +39 -0
- package/docs/plots.md +22 -280
- package/docs/scales.md +30 -24
- package/docs/styles-and-segments.md +25 -21
- package/docs/theming.md +23 -20
- package/docs/timeline.md +3 -3
- package/docs/tooltip-and-hover.md +10 -10
- package/docs/transforms-and-statistics.md +13 -12
- package/examples/BarValues.svelte +1 -1
- package/examples/Box.svelte +1 -1
- package/examples/Bullet.svelte +17 -0
- package/examples/Chrome.svelte +1 -1
- package/examples/ChromeOrder.svelte +1 -1
- package/examples/Cleveland.svelte +15 -0
- package/examples/Composer.svelte +2 -2
- package/examples/CustomTooltip.svelte +1 -1
- package/examples/Density.svelte +7 -0
- package/examples/Dumbbell.svelte +16 -0
- package/examples/Facets.svelte +1 -1
- package/examples/FacetsCarousel.svelte +1 -1
- package/examples/FacetsRowsCols.svelte +1 -1
- package/examples/FacetsScoped.svelte +26 -0
- package/examples/FirstPlot.svelte +1 -1
- package/examples/Forest.svelte +17 -0
- package/examples/Gaps.svelte +2 -2
- package/examples/GroupedBars.svelte +1 -1
- package/examples/Heatmap.svelte +3 -3
- package/examples/HeatmapSegments.svelte +8 -8
- package/examples/Histogram.svelte +1 -1
- package/examples/HorizontalBars.svelte +1 -1
- package/examples/LegendSections.svelte +1 -1
- package/examples/LegendToggle.svelte +1 -1
- package/examples/LineByRegion.svelte +1 -1
- package/examples/LineDates.svelte +1 -1
- package/examples/LineStep.svelte +16 -0
- package/examples/LineStepSegment.svelte +18 -0
- package/examples/Lollipop.svelte +17 -0
- package/examples/Markers.svelte +1 -1
- package/examples/MovingAverage.svelte +1 -1
- package/examples/Pyramid.svelte +9 -2
- package/examples/Regression.svelte +2 -2
- package/examples/ResponsiveLine.svelte +1 -1
- package/examples/Scales.svelte +1 -1
- package/examples/Scatter.svelte +2 -2
- package/examples/SegmentHighlight.svelte +1 -1
- package/examples/Segments.svelte +1 -1
- package/examples/SegmentsBySeries.svelte +1 -1
- package/examples/Slope.svelte +17 -0
- package/examples/Sparkline.svelte +14 -0
- package/examples/StackedArea.svelte +1 -1
- package/examples/StackedBars.svelte +1 -1
- package/examples/TimelinePlayer.svelte +1 -1
- package/examples/TimelineRule.svelte +1 -1
- package/examples/Tooltip.svelte +1 -1
- package/examples/ValueLabels.svelte +1 -1
- package/examples/Violin.svelte +14 -0
- package/examples/datasets/argentina-chile-trends.ts +34 -0
- package/examples/datasets/commodity-prices.ts +48 -0
- package/examples/datasets/countries-over-time.ts +368 -0
- package/examples/datasets/daily-temperature.ts +121 -0
- package/examples/datasets/earthquakes.ts +977 -0
- package/examples/datasets/flight-routes.ts +29 -0
- package/examples/datasets/height-density.ts +37 -0
- package/examples/datasets/heights.ts +370 -0
- package/examples/datasets/index.ts +24 -0
- package/examples/datasets/inflation-by-region.ts +44 -0
- package/examples/datasets/inflation-ranges.ts +34 -0
- package/examples/datasets/iris-flower.ts +207 -0
- package/examples/datasets/life-expectancy.ts +95 -0
- package/examples/datasets/napoleons-march.ts +182 -0
- package/examples/datasets/penguins.ts +54 -0
- package/examples/datasets/population-by-age-with-gaps.ts +23 -0
- package/examples/datasets/population-by-age.ts +890 -0
- package/examples/datasets/province-population.ts +521 -0
- package/examples/datasets/stock-prices.ts +63 -0
- package/examples/datasets/weather-stations-over-time.ts +31 -0
- package/examples/datasets/weather-stations.ts +22 -0
- package/examples/datasets/wind-vectors.ts +30 -0
- package/examples/datasets/world-temperature.ts +400 -0
- package/llms-full.txt +27 -14
- package/llms.txt +33 -4
- package/package.json +10 -1
- package/dist/plots/bar/defaults.d.ts +0 -9
- package/dist/plots/geo/features.svelte.d.ts +0 -5
- package/dist/plots/geo/features.svelte.js +0 -44
- package/dist/plots/geo/phases/tooltip.js +0 -5
- package/dist/plots/utils/geoAccessors.d.ts +0 -72
- package/dist/plots/utils/geoAccessors.js +0 -220
- package/dist/plots/utils/geoSegments.d.ts +0 -29
- package/dist/plots/utils/geoSegments.js +0 -37
- package/dist/types/layout/styles.d.ts +0 -122
- package/dist/types/markers/axis/curveName.d.ts +0 -2
- package/dist/types/plots/line/props.d.ts +0 -10
- package/dist/utils/color/contrast.d.ts +0 -9
- package/dist/utils/color/contrast.js +0 -40
- package/dist/utils/color/cssColor.d.ts +0 -4
- package/dist/utils/color/cssColor.js +0 -77
- package/dist/utils/color/ramp.d.ts +0 -17
- package/dist/utils/color/ramp.js +0 -110
- package/dist/utils/opacity.d.ts +0 -9
- package/dist/utils/opacity.js +0 -38
- package/examples/data.ts +0 -324
- /package/dist/plots/{box → distribution/box}/markers.js +0 -0
- /package/dist/types/layout/{styles.js → statistics/deviation.js} +0 -0
- /package/dist/types/{markers/axis/curveName.js → layout/styles/base.js} +0 -0
- /package/dist/types/{plots/area/props.js → layout/styles/bullet.js} +0 -0
- /package/dist/types/{plots/area/state.js → layout/styles/connector.js} +0 -0
- /package/dist/types/{plots/bar/props.js → layout/styles/curve.js} +0 -0
- /package/dist/types/{plots/bar/state.js → layout/styles/frame.js} +0 -0
- /package/dist/types/{plots/box/props.js → layout/styles/gaps.js} +0 -0
- /package/dist/types/{plots/box/state.js → layout/styles/geo.js} +0 -0
- /package/dist/types/{plots/geo/props.js → layout/styles/values.js} +0 -0
- /package/dist/types/{plots/geo/state.js → markers/axis/violin.js} +0 -0
- /package/dist/types/{plots/heatmap/props.js → markers/channels/commonMarkerConfigWithRowOffset.js} +0 -0
- /package/dist/types/plots/{histogram → correlation/heatmap}/props.js +0 -0
- /package/dist/types/plots/{heatmap → correlation/heatmap}/state.js +0 -0
- /package/dist/types/plots/{line → correlation/scatter}/props.js +0 -0
- /package/dist/types/plots/{histogram → correlation/scatter}/state.js +0 -0
- /package/dist/types/plots/{pyramid → distribution/box}/props.js +0 -0
- /package/dist/types/plots/{line → distribution/box}/state.js +0 -0
- /package/dist/types/plots/{scatter → distribution/density}/props.js +0 -0
- /package/dist/types/plots/{pyramid → distribution/density}/state.js +0 -0
- /package/dist/types/plots/{scatter/state.js → distribution/histogram/props.js} +0 -0
- /package/dist/{plots/utils → utils}/accessors.d.ts +0 -0
- /package/dist/{plots/utils → utils}/accessors.js +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { ColorRamp } from '../../../utils/color';
|
|
2
|
+
/**
|
|
3
|
+
* The connectors of a Cleveland-style plot as `styles.connector` styles them:
|
|
4
|
+
* what each one measures, its color, its thickness and its label. The plot's
|
|
5
|
+
* marks read each category's connector through it.
|
|
6
|
+
*/
|
|
7
|
+
export class ClevelandConnector {
|
|
8
|
+
style;
|
|
9
|
+
#defaults;
|
|
10
|
+
#colorOf;
|
|
11
|
+
constructor(style, defaults, entries) {
|
|
12
|
+
this.style = style ?? {};
|
|
13
|
+
this.#defaults = defaults;
|
|
14
|
+
this.#colorOf = ClevelandConnector.#colors(this.style.color, defaults, entries);
|
|
15
|
+
}
|
|
16
|
+
/** The series a plot's differences run between, from `styles.connector`. */
|
|
17
|
+
static ends(state) {
|
|
18
|
+
const { from, to } = state.styles?.connector ?? {};
|
|
19
|
+
return { from, to };
|
|
20
|
+
}
|
|
21
|
+
/** `styles.connector` of a plot's state, over the configuration's defaults and what `entries` measure. */
|
|
22
|
+
static of(state, defaults, entries) {
|
|
23
|
+
const style = state.styles?.connector;
|
|
24
|
+
return new ClevelandConnector(style, defaults, entries);
|
|
25
|
+
}
|
|
26
|
+
/** What `entry`'s connector measures, which every other setting reads. */
|
|
27
|
+
rangeOf(entry) {
|
|
28
|
+
return {
|
|
29
|
+
category: entry.category,
|
|
30
|
+
from: entry.from,
|
|
31
|
+
to: entry.to,
|
|
32
|
+
length: entry.to - entry.from,
|
|
33
|
+
difference: entry.difference,
|
|
34
|
+
span: entry.span,
|
|
35
|
+
series: entry.dots.length === 1 ? entry.dots[0].series : undefined
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** The color the author asks for `range`'s connector, if they do. */
|
|
39
|
+
color(range) {
|
|
40
|
+
return this.#colorOf?.(range);
|
|
41
|
+
}
|
|
42
|
+
/** The thickness the author asks for `range`'s connector, if they do, given the dots' radius. */
|
|
43
|
+
width(range, dotRadius) {
|
|
44
|
+
const { width } = this.style;
|
|
45
|
+
if (width === undefined)
|
|
46
|
+
return undefined;
|
|
47
|
+
if (width === 'dots')
|
|
48
|
+
return dotRadius * 2;
|
|
49
|
+
return typeof width === 'function' ? width(range) : width;
|
|
50
|
+
}
|
|
51
|
+
/** The opacity the author asks for `range`'s connector, if they do. */
|
|
52
|
+
opacity(range) {
|
|
53
|
+
const { opacity } = this.style;
|
|
54
|
+
return typeof opacity === 'function' ? opacity(range) : opacity;
|
|
55
|
+
}
|
|
56
|
+
/** How the part of a connector outside the `from`-`to` stretch looks, over the plot's neutral `fallback` color. */
|
|
57
|
+
outside(fallback) {
|
|
58
|
+
const { outside } = this.style;
|
|
59
|
+
const own = typeof outside === 'string' ? { color: outside } : (outside ?? {});
|
|
60
|
+
return {
|
|
61
|
+
stroke: own.color ?? fallback,
|
|
62
|
+
strokeOpacity: own.opacity ?? this.#defaults.outsideOpacity
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** The head of the arrow a connector is drawn as, `undefined` when it is a line. */
|
|
66
|
+
get arrow() {
|
|
67
|
+
const { arrow } = this.style;
|
|
68
|
+
if (!arrow)
|
|
69
|
+
return undefined;
|
|
70
|
+
const own = arrow === true ? {} : arrow;
|
|
71
|
+
return { ...this.#defaults.arrow, ...own };
|
|
72
|
+
}
|
|
73
|
+
/** The length (px) of the caps a connector draws at its ends, `undefined` when it draws none, given whether the plot draws them unless told otherwise. */
|
|
74
|
+
caps(byDefault) {
|
|
75
|
+
const { caps } = this.style;
|
|
76
|
+
const on = caps === undefined ? (byDefault ?? false) : caps !== false;
|
|
77
|
+
if (!on)
|
|
78
|
+
return undefined;
|
|
79
|
+
return (typeof caps === 'object' ? caps.length : undefined) ?? this.#defaults.capLength;
|
|
80
|
+
}
|
|
81
|
+
/** The label options: `undefined` without a label. */
|
|
82
|
+
get label() {
|
|
83
|
+
const { label } = this.style;
|
|
84
|
+
return label === undefined || label === false ? undefined : label === true ? {} : label;
|
|
85
|
+
}
|
|
86
|
+
/** What the label of `range`'s connector says, `undefined` when it has nothing to say (no difference). */
|
|
87
|
+
text(range) {
|
|
88
|
+
const label = this.label ?? {};
|
|
89
|
+
const what = label.text ?? 'difference';
|
|
90
|
+
if (typeof what === 'function')
|
|
91
|
+
return what(range);
|
|
92
|
+
const value = what === 'length' ? range.length : range.difference;
|
|
93
|
+
if (value === undefined || !Number.isFinite(value))
|
|
94
|
+
return undefined;
|
|
95
|
+
if (label.format)
|
|
96
|
+
return label.format(value, range);
|
|
97
|
+
const rounded = Math.round(value * 100) / 100;
|
|
98
|
+
return what === 'difference' && rounded > 0 ? `+${rounded}` : String(rounded);
|
|
99
|
+
}
|
|
100
|
+
/** The color function for `by`, over what `entries` measure, or `undefined` when no color is asked for. */
|
|
101
|
+
static #colors(color, defaults, entries) {
|
|
102
|
+
if (color === undefined)
|
|
103
|
+
return undefined;
|
|
104
|
+
if (typeof color === 'string')
|
|
105
|
+
return () => color;
|
|
106
|
+
if (typeof color === 'function')
|
|
107
|
+
return color;
|
|
108
|
+
if (color.by === 'sign') {
|
|
109
|
+
const { positive, negative, zero } = { ...defaults.sign, ...color };
|
|
110
|
+
return ({ difference }) => difference === undefined
|
|
111
|
+
? zero
|
|
112
|
+
: difference > 0
|
|
113
|
+
? positive
|
|
114
|
+
: difference < 0
|
|
115
|
+
? negative
|
|
116
|
+
: zero;
|
|
117
|
+
}
|
|
118
|
+
const { by, ...config } = color;
|
|
119
|
+
const read = (range) => (by === 'length' ? range.length : range.difference);
|
|
120
|
+
const values = entries
|
|
121
|
+
.map((entry) => (by === 'length' ? entry.to - entry.from : entry.difference))
|
|
122
|
+
.filter((value) => value !== undefined && Number.isFinite(value));
|
|
123
|
+
if (values.length === 0)
|
|
124
|
+
return undefined;
|
|
125
|
+
const lo = Math.min(...values);
|
|
126
|
+
const hi = Math.max(...values);
|
|
127
|
+
const diverging = by === 'difference' && config.scheme === undefined;
|
|
128
|
+
const scale = ColorRamp.resolve({
|
|
129
|
+
...(diverging ? { scheme: defaults.differenceScheme, pivot: 0 } : {}),
|
|
130
|
+
...(by === 'length' && config.scheme === undefined
|
|
131
|
+
? { scheme: defaults.lengthScheme }
|
|
132
|
+
: {}),
|
|
133
|
+
...config
|
|
134
|
+
}, by === 'difference' ? [Math.min(lo, 0), Math.max(hi, 0)] : [lo, hi], by === 'length' ? defaults.lengthScheme : defaults.differenceScheme);
|
|
135
|
+
return (range) => {
|
|
136
|
+
const value = read(range);
|
|
137
|
+
return value === undefined ? undefined : scale(value);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ValueLabels } from '../../../layout/styles/ValueLabels';
|
|
2
|
+
import type { ClevelandPlotState, ClevelandPlotCtx, ClevelandOptions } from '../../../types/plots/ranking/cleveland/state';
|
|
3
|
+
import type { AxisBasedMarkersConfig, TextMarkerConfig } from '../../../types/markers/common';
|
|
4
|
+
import type { EdgeBox } from '../../../types/layout/box';
|
|
5
|
+
/**
|
|
6
|
+
* The marks of the Cleveland family of plots, which differ only by their
|
|
7
|
+
* {@link ClevelandOptions}: per category, a connector from its lowest to its
|
|
8
|
+
* highest value (from the baseline, for a lollipop) with a dot at each value.
|
|
9
|
+
* A category with one dot gets a stem in that dot's series color, restyled by
|
|
10
|
+
* the segment its dot belongs to; a category with several gets one neutral
|
|
11
|
+
* connector. The "markers" phase takes its `marks`, `valueLabels` and `reach`.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ClevelandMarkers {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(options: ClevelandOptions);
|
|
16
|
+
/** Forgets what was warned about; for tests. */
|
|
17
|
+
static resetWarnings(): void;
|
|
18
|
+
/** The plot's connectors, then its dots, which draw on top of them. */
|
|
19
|
+
marks: <TData extends Record<string, unknown>>(state: ClevelandPlotState<TData>, ctx: ClevelandPlotCtx) => AxisBasedMarkersConfig[];
|
|
20
|
+
/**
|
|
21
|
+
* The value labels of the dots `styles.values.of` picks, one `'text'` marker
|
|
22
|
+
* per place a dot can hold in its range - past the top end (above, or right
|
|
23
|
+
* of it), past the bottom end (below, or left of it) and, for the dots
|
|
24
|
+
* between, beside it - and per series, when they take their series' color.
|
|
25
|
+
*/
|
|
26
|
+
valueLabels: <TData extends Record<string, unknown>>(labels: ValueLabels, state: ClevelandPlotState<TData>, ctx: ClevelandPlotCtx) => TextMarkerConfig[];
|
|
27
|
+
/**
|
|
28
|
+
* Room for the labels past the dots at the end of the value axis, so the
|
|
29
|
+
* farthest one fits inside the figure instead of crossing its edge. Only the
|
|
30
|
+
* dots at the top end of their range reach there, and only the picked ones.
|
|
31
|
+
*/
|
|
32
|
+
reach: <TData extends Record<string, unknown>>(labels: ValueLabels, state: ClevelandPlotState<TData>) => EdgeBox[];
|
|
33
|
+
}
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { PlotAxes } from '../../../phases/data/PlotAxes';
|
|
2
|
+
import { ProcessedPositions } from '../../../phases/transforms/ProcessedPositions';
|
|
3
|
+
import { SERIES_KEY } from '../../../phases/transforms/TransformsPhase';
|
|
4
|
+
import { ValueLabels } from '../../../layout/styles/ValueLabels';
|
|
5
|
+
import { ClevelandRanges } from './ClevelandRanges';
|
|
6
|
+
import { ClevelandConnector } from './ClevelandConnector';
|
|
7
|
+
/** The messages already warned about, so a plot that redraws warns once. */
|
|
8
|
+
const warned = new Set();
|
|
9
|
+
/**
|
|
10
|
+
* The marks of the Cleveland family of plots, which differ only by their
|
|
11
|
+
* {@link ClevelandOptions}: per category, a connector from its lowest to its
|
|
12
|
+
* highest value (from the baseline, for a lollipop) with a dot at each value.
|
|
13
|
+
* A category with one dot gets a stem in that dot's series color, restyled by
|
|
14
|
+
* the segment its dot belongs to; a category with several gets one neutral
|
|
15
|
+
* connector. The "markers" phase takes its `marks`, `valueLabels` and `reach`.
|
|
16
|
+
*/
|
|
17
|
+
export class ClevelandMarkers {
|
|
18
|
+
#options;
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.#options = options;
|
|
21
|
+
}
|
|
22
|
+
/** Forgets what was warned about; for tests. */
|
|
23
|
+
static resetWarnings() {
|
|
24
|
+
warned.clear();
|
|
25
|
+
}
|
|
26
|
+
/** The plot's connectors, then its dots, which draw on top of them. */
|
|
27
|
+
marks = (state, ctx) => {
|
|
28
|
+
const { cfg, interaction } = ctx;
|
|
29
|
+
const style = cfg[this.#options.config];
|
|
30
|
+
const { isHorizontal } = ClevelandMarkers.#geometry(state);
|
|
31
|
+
const ranges = ClevelandRanges.of(state, this.#options.fromBaseline ?? false, ClevelandConnector.ends(state), this.#options.interval ?? false);
|
|
32
|
+
this.#validate(ranges);
|
|
33
|
+
const connector = ClevelandConnector.of(state, cfg.connector, ranges.entries);
|
|
34
|
+
const groups = state.processedGroups ?? [];
|
|
35
|
+
const segmentOf = new Map();
|
|
36
|
+
for (const group of groups) {
|
|
37
|
+
for (const segment of group.visualSegments) {
|
|
38
|
+
for (const row of segment.data) {
|
|
39
|
+
segmentOf.set(row, { series: group.series.name, styles: segment.styles });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Each category's connector: a row of its own look. A lone dot's stem takes its series'
|
|
44
|
+
// color and its segment's style; the legend dims it with the series.
|
|
45
|
+
const size = state.channels?.r;
|
|
46
|
+
const dotRadius = typeof size === 'number' ? size : style.dotRadius;
|
|
47
|
+
const neutral = style.connectorColor ?? cfg.axis.color;
|
|
48
|
+
const looks = ranges.entries.map((entry) => {
|
|
49
|
+
const range = connector.rangeOf(entry);
|
|
50
|
+
const owner = range.series === undefined ? undefined : segmentOf.get(entry.dots[0].row);
|
|
51
|
+
const stem = owner?.styles.stroke;
|
|
52
|
+
const disabled = owner && interaction?.strokeFor(owner.series);
|
|
53
|
+
const strokeWidth = disabled?.strokeWidth ??
|
|
54
|
+
stem?.strokeWidth ??
|
|
55
|
+
connector.width(range, dotRadius) ??
|
|
56
|
+
(style.stemWidth === 'dots' ? dotRadius * 2 : style.stemWidth);
|
|
57
|
+
// The stretch between the `from` and `to` dots, in the connector's look...
|
|
58
|
+
const [start, end] = range.span ?? [entry.from, entry.to];
|
|
59
|
+
const category = entry.category;
|
|
60
|
+
const span = {
|
|
61
|
+
category,
|
|
62
|
+
from: start,
|
|
63
|
+
to: end,
|
|
64
|
+
mid: (start + end) / 2,
|
|
65
|
+
stroke: disabled?.stroke ??
|
|
66
|
+
stem?.stroke ??
|
|
67
|
+
connector.color(range) ??
|
|
68
|
+
(owner ? state.colorForSeries(owner.series) : neutral),
|
|
69
|
+
strokeWidth,
|
|
70
|
+
strokeOpacity: disabled?.strokeOpacity ?? stem?.strokeOpacity ?? connector.opacity(range) ?? 1
|
|
71
|
+
};
|
|
72
|
+
// ...as an arrow from one dot to the other, when the connector asks for one...
|
|
73
|
+
const arrow = connector.arrow;
|
|
74
|
+
const way = arrow && entry.change && entry.change[0] !== entry.change[1] ? entry.change : undefined;
|
|
75
|
+
const drawn = way
|
|
76
|
+
? {
|
|
77
|
+
category,
|
|
78
|
+
start: way[0],
|
|
79
|
+
end: way[1],
|
|
80
|
+
stroke: span.stroke,
|
|
81
|
+
strokeWidth: connector.width(range, dotRadius) ?? arrow.width,
|
|
82
|
+
strokeOpacity: span.strokeOpacity
|
|
83
|
+
}
|
|
84
|
+
: undefined;
|
|
85
|
+
// ...and what runs on past either end of it, to the other series' dots.
|
|
86
|
+
const outside = connector.outside(neutral);
|
|
87
|
+
const beyond = [
|
|
88
|
+
[entry.from, start],
|
|
89
|
+
[end, entry.to]
|
|
90
|
+
]
|
|
91
|
+
.filter(([from, to]) => to > from)
|
|
92
|
+
.map(([from, to]) => ({
|
|
93
|
+
category,
|
|
94
|
+
from,
|
|
95
|
+
to,
|
|
96
|
+
mid: (from + to) / 2,
|
|
97
|
+
...outside,
|
|
98
|
+
strokeWidth
|
|
99
|
+
}));
|
|
100
|
+
return {
|
|
101
|
+
range,
|
|
102
|
+
row: span,
|
|
103
|
+
// A stretch drawn as an arrow is not one of the lines.
|
|
104
|
+
rows: drawn ? beyond : [span, ...beyond],
|
|
105
|
+
arrow: drawn,
|
|
106
|
+
dash: disabled?.strokeDasharray ?? stem?.strokeDasharray
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
// One rule marker per dash pattern, which a marker takes once for all its rows.
|
|
110
|
+
const byDash = new Map();
|
|
111
|
+
for (const look of looks)
|
|
112
|
+
byDash.set(look.dash, [...(byDash.get(look.dash) ?? []), look]);
|
|
113
|
+
const rules = [...byDash].map(([dash, group]) => ({
|
|
114
|
+
type: 'rule',
|
|
115
|
+
// A connector is not what the series look like: its dots are.
|
|
116
|
+
legend: false,
|
|
117
|
+
axis: isHorizontal ? 'y' : 'x',
|
|
118
|
+
data: group.flatMap((look) => look.rows),
|
|
119
|
+
value: 'category',
|
|
120
|
+
...(isHorizontal ? { x1: 'from', x2: 'to' } : { y1: 'from', y2: 'to' }),
|
|
121
|
+
stroke: 'stroke',
|
|
122
|
+
strokeWidth: 'strokeWidth',
|
|
123
|
+
strokeOpacity: 'strokeOpacity',
|
|
124
|
+
...(dash ? { styles: { strokeDasharray: dash } } : {})
|
|
125
|
+
}));
|
|
126
|
+
// The arrows, one marker per dash pattern like the lines, each from its `from` dot to its `to` dot.
|
|
127
|
+
const head = connector.arrow;
|
|
128
|
+
const arrows = [...byDash].flatMap(([dash, group]) => {
|
|
129
|
+
const rows = group.flatMap((look) => (look.arrow ? [look.arrow] : []));
|
|
130
|
+
if (rows.length === 0 || !head)
|
|
131
|
+
return [];
|
|
132
|
+
return [
|
|
133
|
+
{
|
|
134
|
+
type: 'arrow',
|
|
135
|
+
legend: false,
|
|
136
|
+
data: rows,
|
|
137
|
+
...(isHorizontal
|
|
138
|
+
? { x1: 'start', x2: 'end', y1: 'category', y2: 'category' }
|
|
139
|
+
: { y1: 'start', y2: 'end', x1: 'category', x2: 'category' }),
|
|
140
|
+
headLength: head.headLength,
|
|
141
|
+
headAngle: head.headAngle,
|
|
142
|
+
// The shaft starts and ends at the edge of its dots, not under them.
|
|
143
|
+
insetStart: dotRadius,
|
|
144
|
+
insetEnd: dotRadius,
|
|
145
|
+
stroke: 'stroke',
|
|
146
|
+
strokeWidth: 'strokeWidth',
|
|
147
|
+
strokeOpacity: 'strokeOpacity',
|
|
148
|
+
...(dash ? { styles: { strokeDasharray: dash } } : {})
|
|
149
|
+
}
|
|
150
|
+
];
|
|
151
|
+
});
|
|
152
|
+
// Caps: a tick across each end of a connector, in its look - one marker per look, which a marker takes once for all its ticks.
|
|
153
|
+
const capLength = connector.caps(style.caps);
|
|
154
|
+
const caps = capLength === undefined ? [] : this.#caps(ranges.entries, looks, capLength, isHorizontal);
|
|
155
|
+
const { category, value } = ClevelandMarkers.#channels(state);
|
|
156
|
+
// A number is a literal pixel radius; a field or function sizes each dot by its row.
|
|
157
|
+
const r = size === undefined || typeof size === 'number' ? size : size.accessor;
|
|
158
|
+
const dots = groups.flatMap((group) => {
|
|
159
|
+
const name = group.series.name;
|
|
160
|
+
const color = state.colorForSeries(name);
|
|
161
|
+
const disabled = interaction?.dotsFor(name);
|
|
162
|
+
return group.visualSegments.map((segment) => {
|
|
163
|
+
const stem = segment.styles.stroke;
|
|
164
|
+
const dot = segment.styles.dots;
|
|
165
|
+
return {
|
|
166
|
+
type: 'dot',
|
|
167
|
+
series: name,
|
|
168
|
+
data: segment.data,
|
|
169
|
+
...(isHorizontal ? { x: value, y: category } : { x: category, y: value }),
|
|
170
|
+
r,
|
|
171
|
+
styles: {
|
|
172
|
+
dotRadius: disabled?.dotRadius ?? dot?.dotRadius ?? style.dotRadius,
|
|
173
|
+
dotFill: disabled?.dotFill ?? dot?.dotFill ?? stem?.stroke ?? color,
|
|
174
|
+
dotFillOpacity: disabled?.dotFillOpacity ?? dot?.dotFillOpacity,
|
|
175
|
+
dotSymbol: disabled?.dotSymbol ?? dot?.dotSymbol,
|
|
176
|
+
dotStroke: disabled?.dotStroke ?? dot?.dotStroke ?? 'none',
|
|
177
|
+
dotStrokeWidth: disabled?.dotStrokeWidth ?? dot?.dotStrokeWidth,
|
|
178
|
+
dotStrokeOpacity: disabled?.dotStrokeOpacity ?? dot?.dotStrokeOpacity
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
return [
|
|
184
|
+
...rules,
|
|
185
|
+
...caps,
|
|
186
|
+
...arrows,
|
|
187
|
+
...dots,
|
|
188
|
+
...this.#connectorLabels(state, ctx, connector, looks, isHorizontal)
|
|
189
|
+
];
|
|
190
|
+
};
|
|
191
|
+
/** The caps of the connectors: a tick at each end of those that have a length, one marker per stroke look. */
|
|
192
|
+
#caps(entries, looks, length, isHorizontal) {
|
|
193
|
+
const byLook = new Map();
|
|
194
|
+
entries.forEach((entry, index) => {
|
|
195
|
+
if (!(entry.to > entry.from))
|
|
196
|
+
return;
|
|
197
|
+
const look = looks[index].row;
|
|
198
|
+
const key = [look.stroke, look.strokeWidth, look.strokeOpacity].join('|');
|
|
199
|
+
const group = byLook.get(key) ?? { look, rows: [] };
|
|
200
|
+
group.rows.push({ category: entry.category, end: entry.from }, { category: entry.category, end: entry.to });
|
|
201
|
+
byLook.set(key, group);
|
|
202
|
+
});
|
|
203
|
+
return [...byLook.values()].map(({ look, rows }) => ({
|
|
204
|
+
type: 'tick',
|
|
205
|
+
legend: false,
|
|
206
|
+
data: rows,
|
|
207
|
+
...(isHorizontal ? { x: 'end', y: 'category' } : { x: 'category', y: 'end' }),
|
|
208
|
+
tickLength: length,
|
|
209
|
+
styles: {
|
|
210
|
+
stroke: look.stroke,
|
|
211
|
+
strokeWidth: look.strokeWidth,
|
|
212
|
+
strokeOpacity: look.strokeOpacity
|
|
213
|
+
}
|
|
214
|
+
}));
|
|
215
|
+
}
|
|
216
|
+
/** The label on each connector, when `styles.connector.label` asks for one: written at its middle, beside it or on it. */
|
|
217
|
+
#connectorLabels(state, ctx, connector, looks, isHorizontal) {
|
|
218
|
+
const label = connector.label;
|
|
219
|
+
if (!label)
|
|
220
|
+
return [];
|
|
221
|
+
const data = looks.flatMap(({ range, row }) => {
|
|
222
|
+
const text = connector.text(range);
|
|
223
|
+
return text === undefined ? [] : [{ ...row, text }];
|
|
224
|
+
});
|
|
225
|
+
if (data.length === 0)
|
|
226
|
+
return [];
|
|
227
|
+
const font = label.fontStyle;
|
|
228
|
+
// Beside a connector: clear of half its thickest, and a few px.
|
|
229
|
+
const clear = Math.max(...data.map((row) => Number(row.strokeWidth))) / 2 + ctx.cfg.connector.labelGap;
|
|
230
|
+
const inside = label.anchor === 'middle';
|
|
231
|
+
const at = inside
|
|
232
|
+
? { dx: 0, dy: 0, textAnchor: 'middle', lineAnchor: 'middle' }
|
|
233
|
+
: isHorizontal
|
|
234
|
+
? { dx: 0, dy: -clear, textAnchor: 'middle', lineAnchor: 'bottom' }
|
|
235
|
+
: { dx: clear, dy: 0, textAnchor: 'start', lineAnchor: 'middle' };
|
|
236
|
+
return [
|
|
237
|
+
{
|
|
238
|
+
type: 'text',
|
|
239
|
+
data,
|
|
240
|
+
...(isHorizontal ? { x: 'mid', y: 'category' } : { x: 'category', y: 'mid' }),
|
|
241
|
+
text: 'text',
|
|
242
|
+
styles: {
|
|
243
|
+
...font,
|
|
244
|
+
fill: font?.fill ?? ctx.cfg.axis.color,
|
|
245
|
+
fontSize: font?.fontSize ?? ctx.cfg.connector.labelFontSize,
|
|
246
|
+
dx: font?.dx ?? at.dx,
|
|
247
|
+
dy: font?.dy ?? at.dy,
|
|
248
|
+
textAnchor: font?.textAnchor && font.textAnchor !== 'outside' ? font.textAnchor : at.textAnchor,
|
|
249
|
+
lineAnchor: font?.lineAnchor ?? at.lineAnchor
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
];
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* The value labels of the dots `styles.values.of` picks, one `'text'` marker
|
|
256
|
+
* per place a dot can hold in its range - past the top end (above, or right
|
|
257
|
+
* of it), past the bottom end (below, or left of it) and, for the dots
|
|
258
|
+
* between, beside it - and per series, when they take their series' color.
|
|
259
|
+
*/
|
|
260
|
+
valueLabels = (labels, state, ctx) => {
|
|
261
|
+
if (!state.processedData?.data.length)
|
|
262
|
+
return [];
|
|
263
|
+
const { isHorizontal } = ClevelandMarkers.#geometry(state);
|
|
264
|
+
const { category, value } = ClevelandMarkers.#channels(state);
|
|
265
|
+
const { font, format } = labels;
|
|
266
|
+
const read = ValueLabels.valueOf(state);
|
|
267
|
+
const valueOf = ProcessedPositions.of(state.processedData, PlotAxes.valueOf(state))[PlotAxes.valueOf(state)];
|
|
268
|
+
const gap = labels.offset(isHorizontal ? 'x' : 'y', ctx.cfg[this.#options.config].labelGap);
|
|
269
|
+
const nameOf = (d) => String(d[SERIES_KEY]);
|
|
270
|
+
const picked = this.#picked(state);
|
|
271
|
+
// Where a label sits from its dot, by role: along the range (past an end) or across it (between).
|
|
272
|
+
const placement = {
|
|
273
|
+
max: isHorizontal
|
|
274
|
+
? { dx: gap, dy: 0, textAnchor: 'start', lineAnchor: 'middle' }
|
|
275
|
+
: { dx: 0, dy: -gap, textAnchor: 'middle', lineAnchor: 'bottom' },
|
|
276
|
+
min: isHorizontal
|
|
277
|
+
? { dx: -gap, dy: 0, textAnchor: 'end', lineAnchor: 'middle' }
|
|
278
|
+
: { dx: 0, dy: gap, textAnchor: 'middle', lineAnchor: 'top' },
|
|
279
|
+
between: isHorizontal
|
|
280
|
+
? { dx: 0, dy: -gap, textAnchor: 'middle', lineAnchor: 'bottom' }
|
|
281
|
+
: { dx: gap, dy: 0, textAnchor: 'start', lineAnchor: 'middle' }
|
|
282
|
+
};
|
|
283
|
+
// What fills the labels of a series: the one fill all share, its own color, or the axis'.
|
|
284
|
+
const fillOf = (series) => labels.fill ??
|
|
285
|
+
(labels.color === 'series' ? state.colorForSeries(series) : undefined) ??
|
|
286
|
+
ctx.cfg.axis.color;
|
|
287
|
+
const names = labels.color === 'series' && !labels.fill
|
|
288
|
+
? (state.resolvedSeries ?? []).map((s) => s.name)
|
|
289
|
+
: [''];
|
|
290
|
+
return ['max', 'min', 'between'].flatMap((role) => names.flatMap((name) => {
|
|
291
|
+
const data = picked
|
|
292
|
+
.filter(({ entry, dot }) => ClevelandRanges.roleOf(entry, dot.value) === role &&
|
|
293
|
+
(name === '' || dot.series === name))
|
|
294
|
+
.map(({ dot }) => dot.row);
|
|
295
|
+
if (data.length === 0)
|
|
296
|
+
return [];
|
|
297
|
+
const at = placement[role];
|
|
298
|
+
return [
|
|
299
|
+
{
|
|
300
|
+
type: 'text',
|
|
301
|
+
data,
|
|
302
|
+
...(isHorizontal ? { x: value, y: category } : { x: category, y: value }),
|
|
303
|
+
text: (d) => format(Number(read(d) ?? valueOf(d)), nameOf(d), d),
|
|
304
|
+
styles: {
|
|
305
|
+
...font,
|
|
306
|
+
fill: fillOf(name),
|
|
307
|
+
fontSize: font?.fontSize ?? 12,
|
|
308
|
+
dx: font?.dx ?? at.dx,
|
|
309
|
+
dy: font?.dy ?? at.dy,
|
|
310
|
+
textAnchor: labels.textAnchor ?? at.textAnchor,
|
|
311
|
+
lineAnchor: font?.lineAnchor ?? at.lineAnchor
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
];
|
|
315
|
+
}));
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Room for the labels past the dots at the end of the value axis, so the
|
|
319
|
+
* farthest one fits inside the figure instead of crossing its edge. Only the
|
|
320
|
+
* dots at the top end of their range reach there, and only the picked ones.
|
|
321
|
+
*/
|
|
322
|
+
reach = (labels, state) => {
|
|
323
|
+
const gap = labels.config[this.#options.config].labelGap;
|
|
324
|
+
const top = this.#picked(state).filter(({ entry, dot }) => ClevelandRanges.roleOf(entry, dot.value) === 'max');
|
|
325
|
+
if (top.length === 0)
|
|
326
|
+
return [];
|
|
327
|
+
if (!state.axes?.isHorizontal) {
|
|
328
|
+
const at = { y: -labels.offset('y', gap) };
|
|
329
|
+
return [labels.edgeBox('0', { x: 'middle', y: 'before' }, at, ['top'])];
|
|
330
|
+
}
|
|
331
|
+
const at = { x: labels.offset('x', gap) };
|
|
332
|
+
const texts = new Set(top.map(({ dot }) => labels.format(dot.value, dot.series, dot.row)));
|
|
333
|
+
return [...texts].map((text) => labels.edgeBox(text, { x: 'after', y: 'middle' }, at, ['right']));
|
|
334
|
+
};
|
|
335
|
+
/**
|
|
336
|
+
* The dots `styles.values` labels, each with the category it sits in: the rows
|
|
337
|
+
* the "transforms" phase picked (`labelled`), traced back to the dots of each
|
|
338
|
+
* category by the series they belong to.
|
|
339
|
+
*/
|
|
340
|
+
#picked(state) {
|
|
341
|
+
const categoryAxis = PlotAxes.categoryOf(state);
|
|
342
|
+
const position = ProcessedPositions.of(state.processedData, PlotAxes.valueOf(state));
|
|
343
|
+
const ranges = ClevelandRanges.of(state, this.#options.fromBaseline ?? false, {}, this.#options.interval ?? false);
|
|
344
|
+
const keyOf = (category, series) => `${String(category)}\u0000${series}`;
|
|
345
|
+
const chosen = new Set((state.labelled ?? []).map((row) => keyOf(position[categoryAxis](row), String(row[SERIES_KEY]))));
|
|
346
|
+
return ranges.entries.flatMap((entry) => entry.dots
|
|
347
|
+
.filter((dot) => chosen.has(keyOf(entry.category, dot.series)))
|
|
348
|
+
.map((dot) => ({ entry, dot })));
|
|
349
|
+
}
|
|
350
|
+
/** Warns, once, when the series layout is not one this plot is for. */
|
|
351
|
+
#validate(ranges) {
|
|
352
|
+
const problem = this.#options.validate?.(ranges.layout);
|
|
353
|
+
if (!problem)
|
|
354
|
+
return;
|
|
355
|
+
const message = `${this.#options.name}: ${problem}`;
|
|
356
|
+
if (warned.has(message))
|
|
357
|
+
return;
|
|
358
|
+
warned.add(message);
|
|
359
|
+
console.warn(message);
|
|
360
|
+
}
|
|
361
|
+
static #geometry(state) {
|
|
362
|
+
return { isHorizontal: state.axes?.isHorizontal ?? false };
|
|
363
|
+
}
|
|
364
|
+
/** How the plot hands its category and value to the marks: raw when the transforms left a plain channel (a field key keeps feeding svelteplot's axis-title inference), through the positions otherwise. */
|
|
365
|
+
static #channels(state) {
|
|
366
|
+
const valueAxis = PlotAxes.valueOf(state);
|
|
367
|
+
const categoryAxis = PlotAxes.categoryOf(state);
|
|
368
|
+
const { channels } = state.processedData;
|
|
369
|
+
const position = ProcessedPositions.of(state.processedData, valueAxis);
|
|
370
|
+
return {
|
|
371
|
+
category: (channels[categoryAxis] ?? position[categoryAxis]),
|
|
372
|
+
value: (channels[valueAxis] ?? position[valueAxis])
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PlotAxes } from '../../../phases/data/PlotAxes';
|
|
2
|
+
import type { ProcessedData, ProcessedRow } from '../../../types/phases';
|
|
3
|
+
import type { ClevelandPlotState, ClevelandEntry, ClevelandLayout, ClevelandRole } from '../../../types/plots/ranking/cleveland/state';
|
|
4
|
+
/**
|
|
5
|
+
* Where the dots of a Cleveland-style plot sit category by category: each
|
|
6
|
+
* category's values - across every series that has one - and the range they
|
|
7
|
+
* span, with the baseline counted as one end when the plot asks for it.
|
|
8
|
+
* Built from the rows the "transforms" phase left, so a series the legend
|
|
9
|
+
* omits is not in it.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ClevelandRanges {
|
|
12
|
+
readonly entries: readonly ClevelandEntry[];
|
|
13
|
+
readonly layout: ClevelandLayout;
|
|
14
|
+
private constructor();
|
|
15
|
+
/**
|
|
16
|
+
* The ranges of `state`'s rows; `fromBaseline` adds the plot's baseline to each
|
|
17
|
+
* category's values. A category's difference runs from the series `ends.from`
|
|
18
|
+
* to `ends.to` - by default the first and the last one the plot draws.
|
|
19
|
+
*/
|
|
20
|
+
static of<TData extends Record<string, unknown>>(state: ClevelandPlotState<TData>, fromBaseline: boolean, ends?: {
|
|
21
|
+
from?: string;
|
|
22
|
+
to?: string;
|
|
23
|
+
}, interval?: boolean): ClevelandRanges;
|
|
24
|
+
/** The rows that cannot be labelled, because they have no value: for the "transforms" phase's `labels.skip`. */
|
|
25
|
+
static skipGaps(state: {
|
|
26
|
+
processedData?: ProcessedData;
|
|
27
|
+
axes?: PlotAxes;
|
|
28
|
+
}): (row: ProcessedRow) => boolean;
|
|
29
|
+
/** Where `value` sits in its category's range: the top end when it is the largest (or the only one), the bottom end when the smallest, else between. */
|
|
30
|
+
static roleOf(entry: ClevelandEntry, value: number): ClevelandRole;
|
|
31
|
+
}
|