@fundar/data-chart-telling 1.1.0 → 1.2.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 +32 -0
- package/README.md +6 -6
- package/dist/configuration/config.svelte.d.ts +1 -1
- package/dist/configuration/config.svelte.js +165 -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/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 +1 -1
- 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 +20 -3
- 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 +4 -8
- 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 +72 -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.js +1 -1
- 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 +9 -3
- 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/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 +7 -2
- 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.js +1 -1
- package/dist/types/configuration/styling.d.ts +276 -143
- package/dist/types/layout/coordinates.d.ts +5 -4
- package/dist/types/layout/legend.d.ts +21 -5
- package/dist/types/layout/plot.d.ts +44 -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/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 +9 -0
- 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/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 +1 -1
- 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/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 +3 -3
- package/docs/getting-started.md +2 -2
- package/docs/legend.md +13 -11
- package/docs/markers.md +29 -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 +24 -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/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 +22 -11
- package/llms.txt +32 -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
|
@@ -10,6 +10,10 @@ export type ColorScaleConfig = {
|
|
|
10
10
|
* category → color map. Defaults to the theme's own 2-color ramp.
|
|
11
11
|
*/
|
|
12
12
|
scheme?: string | string[] | Record<string, string>;
|
|
13
|
+
/**
|
|
14
|
+
* The part of a named `scheme` ramp to use, as `[from, to]` fractions of it (default `[0, 1]`). `[0.3, 1]` skips the near-white start of a sequential ramp such as `'blues'`, so its first color stays visible. Ignored for a literal `scheme`.
|
|
15
|
+
*/
|
|
16
|
+
schemeRange?: [number, number];
|
|
13
17
|
/** Splits an array `scheme` into two halves meeting at this domain value (diverging). Ignored for a `Record` scheme. */
|
|
14
18
|
pivot?: number;
|
|
15
19
|
/** Fallback color for a missing/unmapped value. Defaults to `'#ccc'`. */
|
|
@@ -49,13 +53,18 @@ export type ChannelScalesConfig<TChannel extends IndependentChannelName = Indepe
|
|
|
49
53
|
/** `r` (radius/size) config - plot-level only, consumed via {@link AxisBasedScalesConfig.r}. */
|
|
50
54
|
export type RScaleConfig = {
|
|
51
55
|
domain?: [number, number];
|
|
56
|
+
/** How a value maps to a radius. Defaults to svelteplot's `'sqrt'`, so an area is proportional to its value; `'linear'` makes the radius (a trail's half-width) proportional instead. */
|
|
57
|
+
type?: 'linear' | 'sqrt';
|
|
58
|
+
/** Includes 0 in the domain, so a size is proportional to its value. On by default; `false` starts the domain at its lowest value, spreading out values that sit close together. */
|
|
59
|
+
zero?: boolean;
|
|
52
60
|
/** Pixel radius range, e.g. `[2, 20]`. Defaults to svelteplot's own. */
|
|
53
61
|
range?: [number, number];
|
|
54
62
|
};
|
|
55
63
|
/** `length` (vector/spike magnitude) config - plot-level only. */
|
|
56
64
|
export type LengthScaleConfig = {
|
|
65
|
+
/** Magnitudes mapped to the two ends of `range`, e.g. `[0, 40]`; values past them extend the line. Defaults to the data's extent. */
|
|
57
66
|
domain?: [number, number];
|
|
58
|
-
/** Pixel
|
|
67
|
+
/** Pixel lengths of the `domain`'s ends, e.g. `[0, 60]`. Defaults to svelteplot's own. */
|
|
59
68
|
range?: [number, number];
|
|
60
69
|
};
|
|
61
70
|
/** Scale types that lay out distinct categories - an axis paired with one plays the "index" role, so the other is the plain magnitude/value axis. */
|
|
@@ -83,11 +92,36 @@ export type BinnedScaleType = (typeof BINNED_SCALE_TYPES)[number];
|
|
|
83
92
|
* `'extend'` widens the axis to the next nice tick past the data.
|
|
84
93
|
*/
|
|
85
94
|
export type EdgeTickCollision = 'drop-nice' | 'drop-edge' | 'extend';
|
|
95
|
+
/**
|
|
96
|
+
* Whether a continuous axis rounds its domain out to round numbers. As an
|
|
97
|
+
* object, it does, and `tolerance` is how far past a tick, as a share of the
|
|
98
|
+
* step, the data may end and still stay on it (default `0.05`; `0` rounds like d3).
|
|
99
|
+
*/
|
|
100
|
+
export type NiceOption = boolean | {
|
|
101
|
+
tolerance?: number;
|
|
102
|
+
};
|
|
86
103
|
/** Whether an axis adds ticks at the data's first and last values, and what it does when one crowds a nice tick. */
|
|
87
104
|
export type EdgeTicksOptions = {
|
|
88
105
|
enabled: boolean;
|
|
89
106
|
collision: EdgeTickCollision;
|
|
90
107
|
};
|
|
108
|
+
/** A scale's `edgeTicks`: `true` or `false`, or an object that turns them on with its own `collision`. */
|
|
109
|
+
export type EdgeTicksOption = boolean | Partial<Omit<EdgeTicksOptions, 'enabled'>>;
|
|
110
|
+
/**
|
|
111
|
+
* A category axis ordered by what each category holds: `'value'` by its value
|
|
112
|
+
* in one `series` (or, without one, the sum of its values) and `'range'` by the
|
|
113
|
+
* spread between its lowest and its highest value (an interval's ends count, on the plots that have them). A category with nothing to
|
|
114
|
+
* sort by goes last.
|
|
115
|
+
*/
|
|
116
|
+
export type CategorySort = {
|
|
117
|
+
by: 'value' | 'range';
|
|
118
|
+
/** For `by: 'value'`: the series whose value orders the categories. */
|
|
119
|
+
series?: string;
|
|
120
|
+
/** Defaults to `'ascending'`. */
|
|
121
|
+
order?: 'ascending' | 'descending';
|
|
122
|
+
/** Sort within each series instead of across all of them: the series stay together, in the order they first appear. */
|
|
123
|
+
grouped?: boolean;
|
|
124
|
+
};
|
|
91
125
|
/**
|
|
92
126
|
* Scale overrides for one plot axis - svelteplot's `ScaleOptions` and
|
|
93
127
|
* `XScaleOptions`, plus this package's own fields. `TData` is the row type
|
|
@@ -105,18 +139,16 @@ export type AxisScale<TData = Record<string, unknown>> = {
|
|
|
105
139
|
titleFontSize?: number;
|
|
106
140
|
interval?: string | number;
|
|
107
141
|
clamp?: boolean;
|
|
108
|
-
nice?:
|
|
109
|
-
|
|
110
|
-
edgeTicks?: boolean | {
|
|
111
|
-
collision?: EdgeTickCollision;
|
|
112
|
-
};
|
|
142
|
+
nice?: NiceOption;
|
|
143
|
+
edgeTicks?: EdgeTicksOption;
|
|
113
144
|
zero?: boolean;
|
|
114
145
|
round?: boolean;
|
|
115
146
|
percent?: boolean;
|
|
116
147
|
align?: number;
|
|
117
148
|
base?: number;
|
|
118
149
|
constant?: number;
|
|
119
|
-
|
|
150
|
+
/** The order of a category axis: a comparator of two rows (each category's first), or a {@link CategorySort} by what the categories hold. Ignored when `domain` is set. */
|
|
151
|
+
sort?: ((a: TData, b: TData) => number) | CategorySort;
|
|
120
152
|
grid?: boolean | {
|
|
121
153
|
stroke?: string;
|
|
122
154
|
strokeWidth?: number;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AreaStyle, FontStyle, StrokeStyle } from '../../plots/styling';
|
|
2
|
+
/** The value a `deviation` statistic centers on. */
|
|
3
|
+
export type DeviationEstimator = 'mean' | 'median' | 'midrange';
|
|
4
|
+
/** How far the band reaches from the estimator, before `k` scales it. */
|
|
5
|
+
export type DeviationSpread = 'stdev' | 'mad';
|
|
6
|
+
/** A label written against the plot's edge, beside the line it names. */
|
|
7
|
+
export type DeviationLabel = {
|
|
8
|
+
/** The text. Defaults to the estimator's name for the rule (`'MEAN'`) and the spread's for the band (`'STDEV'`). */
|
|
9
|
+
text?: string;
|
|
10
|
+
/** `dx`/`dy` here add to the default gap between the label and its line. */
|
|
11
|
+
styles?: FontStyle;
|
|
12
|
+
};
|
|
13
|
+
/** A band label's place: which edge it names and which side of that edge it sits on. */
|
|
14
|
+
export type DeviationBandLabel = DeviationLabel & {
|
|
15
|
+
/** The edge it names. Defaults to `'upper'`. */
|
|
16
|
+
edge?: 'lower' | 'upper';
|
|
17
|
+
/** Whether it sits inside the band or outside it. Defaults to `'inside'`. */
|
|
18
|
+
position?: 'inside' | 'outside';
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Options for `type: 'deviation'` - an estimator of the source's values along
|
|
22
|
+
* the plot's value axis, drawn as a rule, and the band `k` spreads wide on
|
|
23
|
+
* each side of it.
|
|
24
|
+
*/
|
|
25
|
+
export type DeviationStatisticOptions = {
|
|
26
|
+
/** The value the rule sits at. Defaults to `'mean'`. */
|
|
27
|
+
estimator?: DeviationEstimator;
|
|
28
|
+
/** The spread the band measures. `'stdev'` is the sample standard deviation, `'mad'` the median absolute deviation scaled to match it. Defaults to `'stdev'`. */
|
|
29
|
+
spread?: DeviationSpread;
|
|
30
|
+
/** The band's half-width, a multiple of the spread. Defaults to 1. */
|
|
31
|
+
k?: number;
|
|
32
|
+
/** The estimator's rule; `false` omits it. `label` names it - `true` takes the defaults. */
|
|
33
|
+
rule?: false | (StrokeStyle & {
|
|
34
|
+
label?: DeviationLabel | true;
|
|
35
|
+
});
|
|
36
|
+
/** The band around the rule; `false` omits it. `label` names one of its edges - `true` takes the defaults. */
|
|
37
|
+
band?: false | (AreaStyle & {
|
|
38
|
+
label?: DeviationBandLabel | true;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -3,6 +3,8 @@ import type { BollingerStatisticOptions } from './bollinger';
|
|
|
3
3
|
import type { MovingAverageStatisticOptions } from './movingAverage';
|
|
4
4
|
import type { DensityStatisticOptions, Density2DStatisticOptions } from './density';
|
|
5
5
|
import type { BoxStatisticOptions } from './box';
|
|
6
|
+
import type { DeviationStatisticOptions } from './deviation';
|
|
7
|
+
export type { DeviationBandLabel, DeviationEstimator, DeviationLabel, DeviationSpread, DeviationStatisticOptions } from './deviation';
|
|
6
8
|
export type { RegressionType, RegressionStatisticOptions } from './regression';
|
|
7
9
|
export type { BollingerStatisticOptions } from './bollinger';
|
|
8
10
|
export type { StatisticReducer, MovingAverageStatisticOptions } from './movingAverage';
|
|
@@ -29,7 +31,8 @@ export type StatisticScope = {
|
|
|
29
31
|
* `line` marker. `density` (1D) calls svelteplot's own `densityX` transform
|
|
30
32
|
* and wraps the curve into an `area` marker; `density2d` and `box` resolve
|
|
31
33
|
* straight to the same `density` and `box` markers a plot author can write
|
|
32
|
-
* directly
|
|
34
|
+
* directly; `deviation` computes an estimator and its spread over the plot's
|
|
35
|
+
* value axis and draws them as a `rule` and a `rect` marker.
|
|
33
36
|
*/
|
|
34
37
|
export type StatisticConfig = StatisticScope & (({
|
|
35
38
|
type: 'regression';
|
|
@@ -43,4 +46,6 @@ export type StatisticConfig = StatisticScope & (({
|
|
|
43
46
|
type: 'density2d';
|
|
44
47
|
} & Density2DStatisticOptions) | ({
|
|
45
48
|
type: 'box';
|
|
46
|
-
} & BoxStatisticOptions)
|
|
49
|
+
} & BoxStatisticOptions) | ({
|
|
50
|
+
type: 'deviation';
|
|
51
|
+
} & DeviationStatisticOptions));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FrameProp } from './frame';
|
|
2
|
+
import type { ValuesStyle } from './values';
|
|
3
|
+
/**
|
|
4
|
+
* The fields every plot kind's own `styles` shape shares - the common parent
|
|
5
|
+
* of {@link AxisBasedStylesConfig} and {@link GeoStylesConfig}.
|
|
6
|
+
*/
|
|
7
|
+
export type BasePlotStylesConfig = {
|
|
8
|
+
/** Decorative border around the plot's content box - see {@link FrameStyle}. Available on every plot kind. */
|
|
9
|
+
frame?: FrameProp;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Top-level rendering style overrides shared by the non-geo plot kinds.
|
|
13
|
+
* Passed as the `styles` prop. Each plot reads only the fields it cares
|
|
14
|
+
* about.
|
|
15
|
+
*/
|
|
16
|
+
export type AxisBasedStylesConfig = BasePlotStylesConfig & {
|
|
17
|
+
values?: ValuesStyle;
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { GapsAwarePlotStylesConfig } from './gaps';
|
|
2
|
+
import type { BarSegmentStyle } from '../../plots/segments/common';
|
|
3
|
+
/** `BulletPlot`'s `styles`: a bar plot's, with the look of its ranges and its target. Each field falls back to `bullet` in the configuration. */
|
|
4
|
+
export type BulletStylesConfig = GapsAwarePlotStylesConfig<BarSegmentStyle> & {
|
|
5
|
+
/** The bar that shows the value. */
|
|
6
|
+
bar?: {
|
|
7
|
+
/** Its thickness across the category band, in px. */
|
|
8
|
+
thickness?: number;
|
|
9
|
+
};
|
|
10
|
+
/** The bands that grade the value. */
|
|
11
|
+
ranges?: {
|
|
12
|
+
/** Their colors, from the smallest band to the largest; the last one repeats if there are more bands. */
|
|
13
|
+
colors?: string[];
|
|
14
|
+
/** Their thickness, in px. */
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
/** The tick at each target. */
|
|
18
|
+
target?: {
|
|
19
|
+
color?: string;
|
|
20
|
+
/** Its thickness, in px. */
|
|
21
|
+
width?: number;
|
|
22
|
+
/** Its length across the band, in px. */
|
|
23
|
+
length?: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { FontStyle } from '../../plots/styling';
|
|
2
|
+
import type { ColorScaleConfig } from '../scales';
|
|
3
|
+
import type { AxisBasedStylesConfig } from './base';
|
|
4
|
+
/** What a connector styles and labels itself from: where it runs, and what its dots say about the category. */
|
|
5
|
+
export type ConnectorRange = {
|
|
6
|
+
category: unknown;
|
|
7
|
+
/** The lowest value of the category, or the baseline when that is lower. */
|
|
8
|
+
from: number;
|
|
9
|
+
/** The highest value of the category, or the baseline when that is higher. */
|
|
10
|
+
to: number;
|
|
11
|
+
/** How long the connector is: `to - from`. */
|
|
12
|
+
length: number;
|
|
13
|
+
/** The value of the `to` series minus that of the `from` series (see {@link ConnectorStyle}), `undefined` when either has none here. With a baseline, the value minus the baseline. */
|
|
14
|
+
difference: number | undefined;
|
|
15
|
+
/** The stretch between the `from` series' dot and the `to` series' - lowest value first - `undefined` when either has none. */
|
|
16
|
+
span: [number, number] | undefined;
|
|
17
|
+
/** The series of the category's only dot - `undefined` when it has several. */
|
|
18
|
+
series: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* How connectors are colored: one color; a color scale over what each one
|
|
22
|
+
* measures (`'difference'`, which a diverging `scheme` with `pivot: 0` splits
|
|
23
|
+
* into rising and falling; or `'length'`); the sign of its difference
|
|
24
|
+
* (`'sign'`); or a function of the connector.
|
|
25
|
+
*/
|
|
26
|
+
export type ConnectorColor = string | ({
|
|
27
|
+
by: 'difference' | 'length';
|
|
28
|
+
} & ColorScaleConfig) | {
|
|
29
|
+
by: 'sign';
|
|
30
|
+
positive?: string;
|
|
31
|
+
negative?: string;
|
|
32
|
+
zero?: string;
|
|
33
|
+
} | ((range: ConnectorRange) => string);
|
|
34
|
+
/** The text written on each connector. */
|
|
35
|
+
export type ConnectorLabel = {
|
|
36
|
+
/** What it says: the connector's `'difference'` (signed) or `'length'`, or a function of the connector. Defaults to `'difference'`. */
|
|
37
|
+
text?: 'difference' | 'length' | ((range: ConnectorRange) => string);
|
|
38
|
+
/** A number as text, for `text: 'difference'` and `'length'`. Defaults to the bare number, signed for a difference. */
|
|
39
|
+
format?: (value: number, range: ConnectorRange) => string;
|
|
40
|
+
/** `'outside'` writes it beside the connector - above it, or to the right of a vertical one - and `'middle'` on it, along its length, for a connector thick enough to hold it. Defaults to `'outside'`. */
|
|
41
|
+
anchor?: 'outside' | 'middle';
|
|
42
|
+
/** The text's style. */
|
|
43
|
+
fontStyle?: FontStyle;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* `styles.connector` of the Cleveland family: the connector each category
|
|
47
|
+
* draws between its dots, and the label on it.
|
|
48
|
+
*/
|
|
49
|
+
export type ConnectorStyle = {
|
|
50
|
+
/**
|
|
51
|
+
* Where a difference starts: a series by its name, `'first'` or `'last'` for that series, or
|
|
52
|
+
* `'min'` or `'max'` for the category's lowest or highest dot. Defaults to `'first'`. The
|
|
53
|
+
* stretch between `from` and `to` is what `color`, `opacity` and the label are for; the rest
|
|
54
|
+
* of the connector is `outside`.
|
|
55
|
+
*/
|
|
56
|
+
from?: string;
|
|
57
|
+
/** Where a difference ends - the same options as `from`. Defaults to `'last'`. With `from: 'min'` and `to: 'max'`, the stretch is the whole connector. */
|
|
58
|
+
to?: string;
|
|
59
|
+
/** The connector's thickness in px; `'dots'` makes it as thick as the dots are wide, a band. Or a function of the connector. */
|
|
60
|
+
width?: number | 'dots' | ((range: ConnectorRange) => number);
|
|
61
|
+
/** The connector's color - see {@link ConnectorColor}. A segment's own `stroke` wins on a lone dot's stem. */
|
|
62
|
+
color?: ConnectorColor;
|
|
63
|
+
/** The connector's opacity (0-1), or a function of the connector. */
|
|
64
|
+
opacity?: number | ((range: ConnectorRange) => number);
|
|
65
|
+
/**
|
|
66
|
+
* How the part of a connector outside the stretch between `from` and `to` looks - the dots of
|
|
67
|
+
* the other series lie there: a color, or `{ color, opacity }`. Defaults to the neutral
|
|
68
|
+
* connector color at a lower opacity. The stretch between the two keeps `color` and `opacity`.
|
|
69
|
+
*/
|
|
70
|
+
outside?: string | {
|
|
71
|
+
color?: string;
|
|
72
|
+
opacity?: number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Draws the stretch between `from` and `to` as an arrow pointing at the `to` dot - the way
|
|
76
|
+
* the value moved - instead of a line. `true` takes the configuration's head, or give its
|
|
77
|
+
* `headLength` (px) and `headAngle` (degrees). An arrow is as thick as `width` says, else
|
|
78
|
+
* the configuration's `connector.arrow.width`: thinner than a band.
|
|
79
|
+
*/
|
|
80
|
+
arrow?: boolean | {
|
|
81
|
+
headLength?: number;
|
|
82
|
+
headAngle?: number;
|
|
83
|
+
};
|
|
84
|
+
/** Caps - a short tick across the connector - at each end of it: `true`, or `{ length }` in px (the configuration's `connector.capLength`). Defaults to the plot's own: on for a forest plot, off for the rest. */
|
|
85
|
+
caps?: boolean | {
|
|
86
|
+
length?: number;
|
|
87
|
+
};
|
|
88
|
+
/** A label on each connector, centered on the stretch between `from` and `to`: `true` for the difference with its defaults, or its options. */
|
|
89
|
+
label?: boolean | ConnectorLabel;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* `AxisBasedStylesConfig` extended with `connector` - the line each category
|
|
93
|
+
* draws between its dots, on the plots that join them (`ClevelandPlot`,
|
|
94
|
+
* `DumbbellPlot`, `LollipopPlot`) - see {@link ConnectorStyle}.
|
|
95
|
+
*/
|
|
96
|
+
export type ConnectorBasedStylesConfig = AxisBasedStylesConfig & {
|
|
97
|
+
connector?: ConnectorStyle;
|
|
98
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AxisBasedStylesConfig } from './base';
|
|
2
|
+
/** Curve interpolation for a line, area, difference or trail - svelteplot's own `CurveName`. */
|
|
3
|
+
export type CurveName = 'basis' | 'basis-closed' | 'basis-open' | 'bundle' | 'bump-x' | 'bump-y' | 'cardinal' | 'cardinal-closed' | 'cardinal-open' | 'catmull-rom' | 'catmull-rom-closed' | 'catmull-rom-open' | 'linear' | 'linear-closed' | 'monotone-x' | 'monotone-y' | 'natural' | 'step' | 'step-after' | 'step-before';
|
|
4
|
+
/**
|
|
5
|
+
* `styles` of the plots that draw lines: the shared axis-based fields, plus the
|
|
6
|
+
* curve of every line. A segment's own `curve` wins over it.
|
|
7
|
+
*/
|
|
8
|
+
export type CurveAwarePlotStylesConfig = AxisBasedStylesConfig & {
|
|
9
|
+
/** How every line joins its points. Defaults to `'linear'`. */
|
|
10
|
+
curve?: CurveName;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AreaStyle } from '../../plots/styling';
|
|
2
|
+
/**
|
|
3
|
+
* Decorative border around the plot's own content box - svelteplot's
|
|
4
|
+
* `Frame` mark, purely cosmetic (drawn from the box geometry, never from
|
|
5
|
+
* data). `true` enables it with svelteplot's own defaults; an object
|
|
6
|
+
* enables it and overrides its look field-by-field. Insets pull the frame
|
|
7
|
+
* in from the content box's own edges, in pixels.
|
|
8
|
+
*/
|
|
9
|
+
export type FrameStyle = AreaStyle & {
|
|
10
|
+
inset?: number;
|
|
11
|
+
insetTop?: number;
|
|
12
|
+
insetRight?: number;
|
|
13
|
+
insetBottom?: number;
|
|
14
|
+
insetLeft?: number;
|
|
15
|
+
};
|
|
16
|
+
/** Author-facing `styles.frame` prop - see {@link FrameStyle}. */
|
|
17
|
+
export type FrameProp = boolean | FrameStyle;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GapsConfig } from '../../plots/gaps';
|
|
2
|
+
import type { AxisBasedStylesConfig } from './base';
|
|
3
|
+
/**
|
|
4
|
+
* `AxisBasedStylesConfig` extended with `gaps` - the interpolated
|
|
5
|
+
* missing-data bridge fill available to plot kinds with an inherent
|
|
6
|
+
* category/sequence ordering (`LinePlot`, `BarPlot`, `PyramidPlot`).
|
|
7
|
+
* Resolved per series like `segments`, at zone granularity - see
|
|
8
|
+
* {@link GapsConfig}.
|
|
9
|
+
*/
|
|
10
|
+
export type GapsAwarePlotStylesConfig<TSegmentStyle extends object> = AxisBasedStylesConfig & {
|
|
11
|
+
gaps?: GapsConfig<TSegmentStyle>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { GeoFeature } from '../../plots/data/geo';
|
|
2
|
+
import type { FrameProp } from './frame';
|
|
3
|
+
import type { BasePlotStylesConfig } from './base';
|
|
4
|
+
export type GeoTileLayerConfig = {
|
|
5
|
+
/** XYZ tile URL template, e.g. `'https://tile.openstreetmap.org/{z}/{x}/{y}.png'`. */
|
|
6
|
+
url: string;
|
|
7
|
+
attribution?: string;
|
|
8
|
+
opacity?: number;
|
|
9
|
+
minZoom?: number;
|
|
10
|
+
maxZoom?: number;
|
|
11
|
+
/** Tile edge length in pixels. Defaults to `256`. */
|
|
12
|
+
tileSize?: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* `styles` prop for GeoPlot - the geo analog of `AxisBasedStylesConfig`,
|
|
16
|
+
* sharing only {@link BasePlotStylesConfig}'s common ground with it. Unlike
|
|
17
|
+
* the other plot kinds, GeoPlot's styling needs (base map, choropleth ramp,
|
|
18
|
+
* tile background, click handling) are unlike anything x/y plots need, so
|
|
19
|
+
* this is its own type rather than a reuse of `AxisBasedStylesConfig`.
|
|
20
|
+
*/
|
|
21
|
+
export type GeoStylesConfig<TProps extends Record<string, unknown> = Record<string, unknown>> = BasePlotStylesConfig & {
|
|
22
|
+
/** Base map fill, used when a feature isn't styled by `segments` or the choropleth ramp. */
|
|
23
|
+
fill?: string;
|
|
24
|
+
fillOpacity?: number;
|
|
25
|
+
stroke?: string;
|
|
26
|
+
strokeWidth?: number;
|
|
27
|
+
/** Raster XYZ tile basemap under the vector geometry. Mercator-family projections only. */
|
|
28
|
+
tileLayer?: GeoTileLayerConfig;
|
|
29
|
+
/** Fired when a base-map feature is clicked. */
|
|
30
|
+
onFeatureClick?: (feature: GeoFeature<TProps>, event: Event) => void;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* `GeoTileLayerConfig`, plus `features` - never author-facing (the public
|
|
34
|
+
* `styles.tileLayer` shape, {@link GeoTileLayerConfig}, doesn't declare it).
|
|
35
|
+
* `GeoPlot` tacks it onto its own internal copy of `styles` so `StylesLayout`
|
|
36
|
+
* can compute the tile layer's auto-fit bounds without needing raw geometry
|
|
37
|
+
* threaded through as a separate prop.
|
|
38
|
+
*/
|
|
39
|
+
type GeoTileLayerConfigWithFeatures = GeoTileLayerConfig & {
|
|
40
|
+
features?: {
|
|
41
|
+
geometry: GeoJSON.Geometry;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The minimal slice of a plot kind's own `styles` prop `StylesLayout` reads -
|
|
46
|
+
* every concrete `styles` type ({@link AxisBasedStylesConfig},
|
|
47
|
+
* {@link GeoStylesConfig}) structurally satisfies this whether or not it
|
|
48
|
+
* declares `tileLayer` at all (a missing optional field type-checks fine).
|
|
49
|
+
*/
|
|
50
|
+
export type StylesLayoutConfig = {
|
|
51
|
+
tileLayer?: GeoTileLayerConfigWithFeatures;
|
|
52
|
+
frame?: FrameProp;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ValueAnchor } from '../../plots/constants';
|
|
2
|
+
import type { FontStyle, StrokeStyle } from '../../plots/styling';
|
|
3
|
+
/**
|
|
4
|
+
* Which of a group's rows get a value label: its first or last, or the one
|
|
5
|
+
* with the lowest or highest value (read on the plot's value axis). The group
|
|
6
|
+
* is each plot's own: a series for a line or an area, a category for the
|
|
7
|
+
* plots that join several series' dots.
|
|
8
|
+
*/
|
|
9
|
+
export type ValueSelect = 'first' | 'last' | 'min' | 'max';
|
|
10
|
+
/**
|
|
11
|
+
* Controls if and how value labels are rendered on a plot, drawn as a `text`
|
|
12
|
+
* marker over the rows the plot itself draws (after its own `transforms`):
|
|
13
|
+
* one at the end of each series on a line or area plot, one per bar on a bar,
|
|
14
|
+
* pyramid or histogram plot, one per point on a scatter plot and one per cell
|
|
15
|
+
* on a heatmap. The high-level `anchor` sets sensible defaults for placement;
|
|
16
|
+
* `fontStyle` (`dx`, `dy`, `textAnchor`, `lineAnchor`, `lineHeight`, `rotate`,
|
|
17
|
+
* `class`, `textClass`, `fill`, …) overrides those defaults field-by-field when
|
|
18
|
+
* provided - mirrors {@link DeltaConfig}'s `fontStyle`/`strokeStyle` split, so
|
|
19
|
+
* label text and connector-line styling never mix into one flat bag of props.
|
|
20
|
+
*/
|
|
21
|
+
export type ValuesStyle = {
|
|
22
|
+
/** Whether the labels are drawn. Off by default, except on a heatmap. */
|
|
23
|
+
show?: boolean;
|
|
24
|
+
/** Where each label sits on its mark - see {@link ValueAnchor}. */
|
|
25
|
+
anchor?: ValueAnchor;
|
|
26
|
+
/**
|
|
27
|
+
* Which rows of each group are labelled: one selector, or a list of them (a
|
|
28
|
+
* row picked by any is labelled) - see {@link ValueSelect}. Each plot has its
|
|
29
|
+
* own default: a line or an area labels its series' last point, the plots
|
|
30
|
+
* that join dots label them all.
|
|
31
|
+
*/
|
|
32
|
+
select?: ValueSelect | ValueSelect[];
|
|
33
|
+
/** Labels only the rows of these series, by name. Defaults to every series. */
|
|
34
|
+
series?: string | string[];
|
|
35
|
+
/**
|
|
36
|
+
* The labels' color: `'series'` writes each in its series' color, any other
|
|
37
|
+
* CSS color writes them all in it. `fontStyle.fill` wins when it is set.
|
|
38
|
+
*/
|
|
39
|
+
color?: 'series' | (string & {});
|
|
40
|
+
/** A label's text, from its row's own value (a histogram bin's count) and its series - and, on the plots that label one row each, that row, for the other fields of the data. */
|
|
41
|
+
format?: (value: number, seriesName: string, row?: Record<string, unknown>) => string;
|
|
42
|
+
/** Hovering a label dims every other series, like toggling them off in the legend. */
|
|
43
|
+
hoverIsolate?: boolean;
|
|
44
|
+
fontStyle?: FontStyle;
|
|
45
|
+
/** The connectors a line or area plot routes back from labels that had to move apart. */
|
|
46
|
+
strokeStyle?: StrokeStyle;
|
|
47
|
+
};
|
|
@@ -83,6 +83,9 @@ export type TimelineConfig<TRow extends Record<string, unknown>> = TimelineCallb
|
|
|
83
83
|
thickness?: number;
|
|
84
84
|
filterMode?: 'exact' | 'upTo';
|
|
85
85
|
interpolate?: boolean | TimelineInterpolation<TRow>;
|
|
86
|
-
/**
|
|
87
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Which position scales the steps share: `'shared'` (default), where x and y span every step's rows, so the axes hold still while scrubbing; `'free'`,
|
|
88
|
+
* which refits both to each step; or `'free-x'`/`'free-y'` to refit one and keep the other still.
|
|
89
|
+
*/
|
|
90
|
+
scales?: 'shared' | 'free' | 'free-x' | 'free-y';
|
|
88
91
|
};
|
|
@@ -7,6 +7,10 @@ import type { HoverStrategy } from './hover';
|
|
|
7
7
|
export type TooltipAnchorX = 'left' | 'middle' | 'right';
|
|
8
8
|
/** Preferred vertical placement of the tooltip, like {@link TooltipAnchorX}. Defaults to `'bottom'`. */
|
|
9
9
|
export type TooltipAnchorY = 'top' | 'middle' | 'bottom';
|
|
10
|
+
/** A matched row as a tooltip's `content` gets it: the row itself, plus `seriesColor`, the one the plot draws it in (unset on plots without series). */
|
|
11
|
+
export type TooltipRow<TRow> = TRow & {
|
|
12
|
+
seriesColor?: string;
|
|
13
|
+
};
|
|
10
14
|
/** Author-facing tooltip option on the chart kinds. `true` = enable with defaults. */
|
|
11
15
|
export type TooltipOptions<TRow extends Record<string, unknown>> = {
|
|
12
16
|
/** Matching strategy. Defaults to the chart kind's own default. */
|
|
@@ -17,9 +21,9 @@ export type TooltipOptions<TRow extends Record<string, unknown>> = {
|
|
|
17
21
|
format?: (row: TRow) => string;
|
|
18
22
|
/** Named subset of crossing series to include. Omitted = all matched. */
|
|
19
23
|
series?: string[];
|
|
20
|
-
/** Custom tooltip body; replaces `format` when given. */
|
|
24
|
+
/** Custom tooltip body; replaces `format` when given. Its rows carry a `seriesColor` - see {@link TooltipRow}. */
|
|
21
25
|
content?: Snippet<[{
|
|
22
|
-
rows: TRow[];
|
|
26
|
+
rows: TooltipRow<TRow>[];
|
|
23
27
|
}]>;
|
|
24
28
|
/** Preferred horizontal anchor - see {@link TooltipAnchorX}. */
|
|
25
29
|
anchorX?: TooltipAnchorX;
|
|
@@ -2,11 +2,11 @@ import type { AreaStyle } from '../../plots/styling';
|
|
|
2
2
|
import type { CommonMarkerConfigWithArea } from '../channels/commonMarkerConfigWithArea';
|
|
3
3
|
import type { CommonMarkerConfigWithColor } from '../channels/commonMarkerConfigWithColor';
|
|
4
4
|
import type { CommonMarkerConfigWithInterval } from '../channels/commonMarkerConfigWithInterval';
|
|
5
|
-
import type {
|
|
5
|
+
import type { CurveName } from '../../layout/styles/curve';
|
|
6
6
|
/** A filled area under a curve, or a band between two curves (svelteplot's `AreaX`/`AreaY`). */
|
|
7
7
|
export type AreaMarkerConfig = {
|
|
8
8
|
type: 'area';
|
|
9
|
-
curve?:
|
|
9
|
+
curve?: CurveName;
|
|
10
10
|
tension?: number;
|
|
11
11
|
styles?: AreaStyle;
|
|
12
12
|
} & CommonMarkerConfigWithArea & CommonMarkerConfigWithColor & CommonMarkerConfigWithInterval;
|
|
@@ -11,5 +11,8 @@ export type ArrowMarkerConfig = {
|
|
|
11
11
|
insetStart?: number;
|
|
12
12
|
insetEnd?: number;
|
|
13
13
|
sweep?: 1 | 0 | -1 | '+x' | '-x' | '+y' | '-y';
|
|
14
|
+
stroke?: string | ((d: any) => string | undefined);
|
|
15
|
+
strokeWidth?: string | ((d: any) => number);
|
|
16
|
+
strokeOpacity?: string | ((d: any) => number);
|
|
14
17
|
styles?: StrokeStyle;
|
|
15
18
|
} & CommonMarkerConfigWithInterval;
|
|
@@ -21,9 +21,10 @@ import type { RasterMarkerConfig } from './raster';
|
|
|
21
21
|
import type { TickMarkerConfig } from './tick';
|
|
22
22
|
import type { TrailMarkerConfig } from './trail';
|
|
23
23
|
import type { WaffleMarkerConfig } from './waffle';
|
|
24
|
+
import type { ViolinMarkerConfig } from './violin';
|
|
24
25
|
import type { RuleMarkerConfig } from './rule';
|
|
25
26
|
import type { HoverMarkerConfig } from './hover';
|
|
26
27
|
import type { CustomComponentMarkerConfig } from './component';
|
|
27
28
|
import type { DeltaMarkerConfig } from './delta';
|
|
28
29
|
/** Every marker kind an axis-based plot can render. */
|
|
29
|
-
export type AxisBasedMarkersConfig = BasicMarkersConfig | LineMarkerConfig | BarMarkerConfig | CellMarkerConfig | RectMarkerConfig | RegressionMarkerConfig | BollingerMarkerConfig | AreaMarkerConfig | DensityMarkerConfig | BoxMarkerConfig | HullMarkerConfig | DifferenceMarkerConfig | ArrowMarkerConfig | BrushMarkerConfig | DelaunayLinkMarkerConfig | DelaunayMeshMarkerConfig | VoronoiMarkerConfig | VoronoiMeshMarkerConfig | ImageMarkerConfig | RasterMarkerConfig | TickMarkerConfig | TrailMarkerConfig | WaffleMarkerConfig | RuleMarkerConfig | HoverMarkerConfig | CustomComponentMarkerConfig | DeltaMarkerConfig;
|
|
30
|
+
export type AxisBasedMarkersConfig = BasicMarkersConfig | LineMarkerConfig | BarMarkerConfig | CellMarkerConfig | RectMarkerConfig | RegressionMarkerConfig | BollingerMarkerConfig | AreaMarkerConfig | DensityMarkerConfig | BoxMarkerConfig | HullMarkerConfig | DifferenceMarkerConfig | ArrowMarkerConfig | BrushMarkerConfig | DelaunayLinkMarkerConfig | DelaunayMeshMarkerConfig | VoronoiMarkerConfig | VoronoiMeshMarkerConfig | ImageMarkerConfig | RasterMarkerConfig | TickMarkerConfig | TrailMarkerConfig | WaffleMarkerConfig | ViolinMarkerConfig | RuleMarkerConfig | HoverMarkerConfig | CustomComponentMarkerConfig | DeltaMarkerConfig;
|
|
@@ -11,8 +11,8 @@ export type BarMarkerConfig = {
|
|
|
11
11
|
insetBottom?: number;
|
|
12
12
|
insetLeft?: number;
|
|
13
13
|
insetRight?: number;
|
|
14
|
+
thickness?: number;
|
|
14
15
|
styles?: AreaStyle;
|
|
15
16
|
category?: AxisValue;
|
|
16
|
-
/** A `'hitArea'` that matches `data` as the plot's hover while the pointer is over it. */
|
|
17
17
|
hover?: boolean;
|
|
18
18
|
} & CommonMarkerConfigWithColor & CommonMarkerConfigWithInterval;
|
|
@@ -11,4 +11,9 @@ export type BoxMarkerConfig = {
|
|
|
11
11
|
dot?: Record<string, unknown>;
|
|
12
12
|
tickMedian?: boolean | Record<string, unknown>;
|
|
13
13
|
tickMinMax?: boolean | Record<string, unknown>;
|
|
14
|
+
thickness?: number;
|
|
15
|
+
slot?: {
|
|
16
|
+
index: number;
|
|
17
|
+
count: number;
|
|
18
|
+
};
|
|
14
19
|
} & CommonMarkerConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommonMarkerConfigWithInterval } from '../channels/commonMarkerConfigWithInterval';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CurveName } from '../../layout/styles/curve';
|
|
3
3
|
/** Shaded area between two series, colored by which is on top (svelteplot's `DifferenceY`). */
|
|
4
4
|
export type DifferenceMarkerConfig = {
|
|
5
5
|
type: 'difference';
|
|
@@ -7,6 +7,6 @@ export type DifferenceMarkerConfig = {
|
|
|
7
7
|
positiveFillOpacity?: number;
|
|
8
8
|
negativeFill?: string;
|
|
9
9
|
negativeFillOpacity?: number;
|
|
10
|
-
curve?:
|
|
10
|
+
curve?: CurveName;
|
|
11
11
|
tension?: number;
|
|
12
12
|
} & CommonMarkerConfigWithInterval;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { CommonMarkerConfigWithRowOffset } from '../channels/commonMarkerConfigWithRowOffset';
|
|
1
2
|
import type { CommonMarkerConfigWithRadius } from '../channels/commonMarkerConfigWithRadius';
|
|
2
3
|
/** An image per row, centered on `x`/`y` (svelteplot's `Image`). */
|
|
3
|
-
export type ImageMarkerConfig = {
|
|
4
|
+
export type ImageMarkerConfig = CommonMarkerConfigWithRowOffset<{
|
|
4
5
|
type: 'image';
|
|
5
6
|
src: string | ((d: any) => string);
|
|
6
7
|
width?: number | ((d: any) => number);
|
|
@@ -9,4 +10,4 @@ export type ImageMarkerConfig = {
|
|
|
9
10
|
preserveAspectRatio?: string;
|
|
10
11
|
/** A constant opacity; the shared `opacity` channel is a color ramp, not this. */
|
|
11
12
|
opacity?: number;
|
|
12
|
-
} & Omit<CommonMarkerConfigWithRadius, 'opacity'
|
|
13
|
+
} & Omit<CommonMarkerConfigWithRadius, 'opacity'>>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { StrokeStyle } from '../../plots/styling';
|
|
2
|
+
import type { CurveName } from '../../layout/styles/curve';
|
|
2
3
|
import type { CommonMarkerConfigWithColor } from '../channels/commonMarkerConfigWithColor';
|
|
3
4
|
/** A single line-segment stroke; `color` strokes each `grouping`'s line in its own color. */
|
|
4
5
|
export type LineMarkerConfig = {
|
|
5
6
|
type: 'line';
|
|
7
|
+
curve?: CurveName;
|
|
6
8
|
styles?: StrokeStyle;
|
|
7
9
|
} & CommonMarkerConfigWithColor;
|
|
@@ -11,5 +11,14 @@ export type RuleMarkerConfig = {
|
|
|
11
11
|
insetBottom?: number;
|
|
12
12
|
insetLeft?: number;
|
|
13
13
|
insetRight?: number;
|
|
14
|
+
/**
|
|
15
|
+
* A stroke color for each row - a field key or a function of the row - drawn
|
|
16
|
+
* as it is, not mapped through a color scale. Wins over `styles.stroke`.
|
|
17
|
+
*/
|
|
18
|
+
stroke?: string | ((d: any) => string | undefined);
|
|
19
|
+
/** A stroke width for each row - a field key or a function of the row. Wins over `styles.strokeWidth`. */
|
|
20
|
+
strokeWidth?: string | ((d: any) => number);
|
|
21
|
+
/** A stroke opacity for each row - a field key or a function of the row - drawn as it is. Wins over `styles.strokeOpacity`. */
|
|
22
|
+
strokeOpacity?: string | ((d: any) => number);
|
|
14
23
|
styles?: StrokeStyle;
|
|
15
24
|
} & CommonMarkerConfigWithInterval;
|