@fundar/data-chart-telling 0.0.63 → 1.0.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 +17 -0
- package/LICENSE +21 -0
- package/README.md +81 -558
- package/dist/configuration/config.svelte.d.ts +5 -5
- package/dist/configuration/config.svelte.js +133 -46
- package/dist/configuration/fonts.d.ts +6 -0
- package/dist/configuration/fonts.js +6 -0
- package/dist/configuration/themes/compact.d.ts +2 -2
- package/dist/configuration/themes/compact.js +1 -1
- package/dist/configuration/themes/dark.d.ts +2 -2
- package/dist/configuration/themes/dark.js +5 -4
- package/dist/configuration/themes/default.d.ts +8 -3
- package/dist/configuration/themes/default.js +8 -2
- package/dist/configuration/themes/editorial.d.ts +2 -2
- package/dist/configuration/themes/editorial.js +2 -2
- package/dist/configuration/themes/index.d.ts +433 -80
- package/dist/configuration/themes/index.js +6 -5
- package/dist/index.d.ts +34 -48
- package/dist/index.js +19 -35
- package/dist/layout/base/BasePlotLayout.svelte +312 -0
- package/dist/layout/base/BasePlotLayout.svelte.d.ts +111 -0
- package/dist/layout/composer/PlotComposer.svelte +94 -0
- package/dist/layout/composer/PlotComposer.svelte.d.ts +13 -0
- package/dist/layout/coordinates/CameraFit.svelte +4 -4
- package/dist/layout/coordinates/CoordinatesLayout.svelte +11 -3
- package/dist/layout/coordinates/CoordinatesLayout.svelte.d.ts +6 -2
- package/dist/layout/coordinates/camera.svelte.d.ts +1 -1
- package/dist/layout/coordinates/camera.svelte.js +6 -6
- package/dist/layout/coordinates/projections/argentina.js +3 -3
- package/dist/layout/coordinates/projections/fit.js +1 -1
- package/dist/layout/coordinates/resolveCameraTarget.d.ts +1 -1
- package/dist/layout/coordinates/resolveProjection.d.ts +1 -1
- package/dist/layout/coordinates/resolveProjection.js +2 -2
- package/dist/layout/coordinates/rotate.svelte.d.ts +3 -3
- package/dist/layout/coordinates/rotate.svelte.js +8 -8
- package/dist/layout/coordinates/zoom.svelte.d.ts +1 -1
- package/dist/layout/facet/FacetIndicator.svelte +23 -23
- package/dist/layout/facet/FacetLayout.svelte +435 -398
- package/dist/layout/facet/FacetLayout.svelte.d.ts +9 -3
- package/dist/layout/facet/axes.d.ts +16 -0
- package/dist/layout/facet/axes.js +25 -0
- package/dist/layout/facet/config.d.ts +32 -0
- package/dist/layout/facet/config.js +82 -0
- package/dist/layout/figure/Figure.svelte +177 -0
- package/dist/layout/figure/Figure.svelte.d.ts +14 -0
- package/dist/layout/figure/FigureChrome.svelte +341 -0
- package/dist/layout/figure/FigureChrome.svelte.d.ts +21 -0
- package/dist/layout/geometry/FrameClip.svelte +45 -0
- package/dist/layout/geometry/FrameClip.svelte.d.ts +8 -0
- package/dist/layout/geometry/FrameClipping.d.ts +24 -0
- package/dist/layout/geometry/FrameClipping.js +40 -0
- package/dist/layout/geometry/GeometryLayout.svelte +287 -224
- package/dist/layout/geometry/GeometryLayout.svelte.d.ts +10 -10
- package/dist/layout/grid/Grid.svelte +194 -0
- package/dist/layout/grid/Grid.svelte.d.ts +26 -0
- package/dist/layout/grid/GridAlignment.svelte.d.ts +31 -0
- package/dist/layout/grid/GridAlignment.svelte.js +56 -0
- package/dist/layout/grid/GridCell.svelte +141 -0
- package/dist/layout/grid/GridCell.svelte.d.ts +17 -0
- package/dist/layout/grid/GridCellsRegistry.svelte.d.ts +52 -0
- package/dist/layout/grid/GridCellsRegistry.svelte.js +70 -0
- package/dist/layout/grid/GridPlan.d.ts +49 -0
- package/dist/layout/grid/GridPlan.js +167 -0
- package/dist/layout/grid/Tags.d.ts +8 -0
- package/dist/layout/grid/Tags.js +39 -0
- package/dist/layout/hover/HoverScope.svelte +11 -0
- package/dist/layout/hover/HoverScope.svelte.d.ts +8 -0
- package/dist/layout/hover/HoverSettings.d.ts +20 -0
- package/dist/layout/hover/HoverSettings.js +27 -0
- package/dist/layout/hover/HoverState.svelte.d.ts +47 -0
- package/dist/layout/hover/HoverState.svelte.js +99 -0
- package/dist/layout/hover/PlotHover.svelte.d.ts +63 -0
- package/dist/layout/hover/PlotHover.svelte.js +133 -0
- package/dist/layout/interaction/PlotInteraction.svelte.d.ts +38 -0
- package/dist/layout/interaction/PlotInteraction.svelte.js +56 -0
- package/dist/layout/legend/AxisNumberFormat.d.ts +12 -0
- package/dist/layout/legend/AxisNumberFormat.js +25 -0
- package/dist/layout/legend/ContinuousSection.svelte +365 -335
- package/dist/layout/legend/DisabledStyle.d.ts +19 -0
- package/dist/layout/legend/DisabledStyle.js +57 -0
- package/dist/layout/legend/DiscreteBadgeItem.svelte +6 -3
- package/dist/layout/legend/DiscreteSection.svelte +39 -32
- package/dist/layout/legend/DiscreteSwatchItem.svelte +4 -1
- package/dist/layout/legend/DiscreteSymbolIcon.svelte +14 -9
- package/dist/layout/legend/LegendChannels.d.ts +21 -0
- package/dist/layout/legend/LegendChannels.js +221 -0
- package/dist/layout/legend/LegendLayout.svelte +49 -43
- package/dist/layout/legend/LegendState.svelte.d.ts +79 -0
- package/dist/layout/legend/LegendState.svelte.js +329 -0
- package/dist/layout/legend/LegendText.d.ts +12 -0
- package/dist/layout/legend/LegendText.js +22 -0
- package/dist/layout/legend/SizeSection.svelte +84 -0
- package/dist/layout/legend/SizeSection.svelte.d.ts +7 -0
- package/dist/layout/legend/SymbolSection.svelte +31 -0
- package/dist/layout/legend/SymbolSection.svelte.d.ts +8 -0
- package/dist/layout/margins/Box.d.ts +84 -0
- package/dist/layout/margins/Box.js +138 -0
- package/dist/layout/margins/Margins.d.ts +37 -0
- package/dist/layout/margins/Margins.js +71 -0
- package/dist/layout/margins/PlotMargins.svelte.d.ts +101 -0
- package/dist/layout/margins/PlotMargins.svelte.js +219 -0
- package/dist/layout/plot/Core.svelte +61 -0
- package/dist/layout/plot/Core.svelte.d.ts +41 -0
- package/dist/layout/plot/PanelRun.svelte +28 -0
- package/dist/{charts/heatmap/Chart.svelte.d.ts → layout/plot/PanelRun.svelte.d.ts} +11 -7
- package/dist/layout/plot/Plot.svelte +284 -0
- package/dist/layout/plot/Plot.svelte.d.ts +49 -0
- package/dist/layout/plot/PlotContext.d.ts +41 -0
- package/dist/layout/plot/PlotContext.js +46 -0
- package/dist/layout/plot/PublicPlotContext.d.ts +130 -0
- package/dist/layout/plot/PublicPlotContext.js +236 -0
- package/dist/layout/plot/Slice.d.ts +44 -0
- package/dist/layout/plot/Slice.js +98 -0
- package/dist/layout/plot/usePlot.d.ts +9 -0
- package/dist/layout/plot/usePlot.js +13 -0
- package/dist/layout/scales/ScalesLayout.svelte +241 -206
- package/dist/layout/scales/ScalesLayout.svelte.d.ts +2 -1
- package/dist/layout/scales/buildScale.d.ts +5 -22
- package/dist/layout/scales/buildScale.js +11 -34
- package/dist/layout/scales/niceDomain.d.ts +3 -3
- package/dist/layout/scales/niceDomain.js +4 -4
- package/dist/layout/styles/StylesLayout.svelte +65 -65
- package/dist/layout/styles/TileLayer.svelte +78 -76
- package/dist/layout/styles/TileLayer.svelte.d.ts +1 -1
- package/dist/layout/styles/ValueLabels.d.ts +97 -0
- package/dist/layout/styles/ValueLabels.js +237 -0
- package/dist/layout/timeline/Timeline.svelte +80 -74
- package/dist/layout/timeline/TimelineFrame.svelte +86 -0
- package/dist/layout/timeline/TimelineFrame.svelte.d.ts +16 -0
- package/dist/layout/timeline/TimelineLayout.svelte +114 -169
- package/dist/layout/timeline/TimelineLayout.svelte.d.ts +2 -0
- package/dist/layout/timeline/TimelinePlayer.svelte +195 -0
- package/dist/layout/timeline/TimelinePlayer.svelte.d.ts +7 -0
- package/dist/layout/timeline/TimelineRule.svelte +50 -0
- package/dist/layout/timeline/TimelineRule.svelte.d.ts +7 -0
- package/dist/layout/timeline/TimelineState.svelte.d.ts +82 -0
- package/dist/layout/timeline/TimelineState.svelte.js +226 -0
- package/dist/layout/timeline/TimelineSteps.d.ts +24 -0
- package/dist/layout/timeline/TimelineSteps.js +48 -0
- package/dist/layout/tooltip/Tooltip.svelte +82 -85
- package/dist/layout/tooltip/Tooltip.svelte.d.ts +43 -24
- package/dist/layout/tooltip/TooltipState.svelte.d.ts +61 -0
- package/dist/layout/tooltip/TooltipState.svelte.js +107 -0
- package/dist/markers/MarkerKinds.d.ts +173 -0
- package/dist/markers/MarkerKinds.js +51 -0
- package/dist/markers/area/AreaMarker.svelte +110 -0
- package/dist/markers/area/AreaMarker.svelte.d.ts +7 -0
- package/dist/markers/arrow/ArrowMarker.svelte +28 -0
- package/dist/markers/arrow/ArrowMarker.svelte.d.ts +7 -0
- package/dist/markers/{BarMarker.svelte → bar/BarMarker.svelte} +54 -52
- package/dist/markers/{BarMarker.svelte.d.ts → bar/BarMarker.svelte.d.ts} +1 -1
- package/dist/markers/bollinger/BollingerMarker.svelte +44 -0
- package/dist/markers/bollinger/BollingerMarker.svelte.d.ts +7 -0
- package/dist/markers/box/BoxMarker.svelte +143 -0
- package/dist/markers/box/BoxMarker.svelte.d.ts +7 -0
- package/dist/markers/brush/BrushMarker.svelte +32 -0
- package/dist/markers/brush/BrushMarker.svelte.d.ts +7 -0
- package/dist/markers/cell/CellMarker.svelte +27 -0
- package/dist/markers/{CellMarker.svelte.d.ts → cell/CellMarker.svelte.d.ts} +1 -1
- package/dist/markers/contour/ContourClipMarker.svelte +83 -0
- package/dist/markers/{ContourClipMarker.svelte.d.ts → contour/ContourClipMarker.svelte.d.ts} +1 -1
- package/dist/markers/contour/ContourMarker.svelte +28 -0
- package/dist/markers/{ContourMarker.svelte.d.ts → contour/ContourMarker.svelte.d.ts} +1 -1
- package/dist/markers/delaunay/DelaunayLinkMarker.svelte +26 -0
- package/dist/markers/delaunay/DelaunayLinkMarker.svelte.d.ts +7 -0
- package/dist/markers/delaunay/DelaunayMeshMarker.svelte +26 -0
- package/dist/markers/delaunay/DelaunayMeshMarker.svelte.d.ts +7 -0
- package/dist/markers/delta/Delta.d.ts +21 -0
- package/dist/markers/delta/Delta.js +60 -0
- package/dist/markers/delta/DeltaMarker.svelte +94 -0
- package/dist/markers/{DeltaMarker.svelte.d.ts → delta/DeltaMarker.svelte.d.ts} +2 -2
- package/dist/markers/density/DensityMarker.svelte +63 -0
- package/dist/markers/density/DensityMarker.svelte.d.ts +7 -0
- package/dist/markers/difference/DifferenceMarker.svelte +30 -0
- package/dist/markers/difference/DifferenceMarker.svelte.d.ts +7 -0
- package/dist/markers/dot/DotMarker.svelte +102 -0
- package/dist/markers/{DotMarker.svelte.d.ts → dot/DotMarker.svelte.d.ts} +5 -17
- package/dist/markers/geo/GeoFeaturesMarker.svelte +39 -0
- package/dist/markers/{GeoFeaturesMarker.svelte.d.ts → geo/GeoFeaturesMarker.svelte.d.ts} +1 -1
- package/dist/markers/geo/GeoHoverMarker.svelte +28 -0
- package/dist/markers/{GeoHoverMarker.svelte.d.ts → geo/GeoHoverMarker.svelte.d.ts} +2 -2
- package/dist/markers/geo/GraticuleMarker.svelte +18 -0
- package/dist/markers/{GraticuleMarker.svelte.d.ts → geo/GraticuleMarker.svelte.d.ts} +1 -1
- package/dist/markers/geo/SphereMarker.svelte +15 -0
- package/dist/markers/{SphereMarker.svelte.d.ts → geo/SphereMarker.svelte.d.ts} +1 -1
- package/dist/markers/hover/HoverMarker.svelte +252 -0
- package/dist/markers/{HoverMarker.svelte.d.ts → hover/HoverMarker.svelte.d.ts} +10 -10
- package/dist/markers/hull/HullMarker.svelte +25 -0
- package/dist/markers/hull/HullMarker.svelte.d.ts +7 -0
- package/dist/markers/image/ImageMarker.svelte +22 -0
- package/dist/markers/image/ImageMarker.svelte.d.ts +7 -0
- package/dist/markers/inset/InsetMarker.svelte +184 -150
- package/dist/markers/inset/InsetMarker.svelte.d.ts +4 -4
- package/dist/markers/inset/insetLayout.d.ts +1 -1
- package/dist/markers/inset/insetLayout.js +6 -2
- package/dist/markers/inset/insetProjection.d.ts +1 -1
- package/dist/markers/inset/insetProjection.js +3 -3
- package/dist/markers/line/LineMarker.svelte +30 -0
- package/dist/markers/{LineMarker.svelte.d.ts → line/LineMarker.svelte.d.ts} +1 -1
- package/dist/markers/link/LinkMarker.svelte +47 -0
- package/dist/markers/{LinkMarker.svelte.d.ts → link/LinkMarker.svelte.d.ts} +1 -1
- package/dist/markers/raster/RasterMarker.svelte +31 -0
- package/dist/markers/raster/RasterMarker.svelte.d.ts +7 -0
- package/dist/markers/rect/RectMarker.svelte +62 -0
- package/dist/markers/rect/RectMarker.svelte.d.ts +7 -0
- package/dist/markers/regression/RegressionMarker.svelte +60 -0
- package/dist/markers/regression/RegressionMarker.svelte.d.ts +7 -0
- package/dist/markers/rule/RuleMarker.svelte +47 -0
- package/dist/markers/{RuleMarker.svelte.d.ts → rule/RuleMarker.svelte.d.ts} +2 -5
- package/dist/markers/text/Declutter.d.ts +35 -0
- package/dist/markers/text/Declutter.js +157 -0
- package/dist/markers/text/TextMarker.svelte +244 -0
- package/dist/markers/{TextMarker.svelte.d.ts → text/TextMarker.svelte.d.ts} +5 -9
- package/dist/markers/tick/TickMarker.svelte +44 -0
- package/dist/markers/tick/TickMarker.svelte.d.ts +7 -0
- package/dist/markers/trail/TrailMarker.svelte +27 -0
- package/dist/markers/trail/TrailMarker.svelte.d.ts +7 -0
- package/dist/markers/utils/BandNudge.d.ts +22 -0
- package/dist/markers/utils/BandNudge.js +23 -0
- package/dist/markers/utils/MarkerChannels.d.ts +49 -0
- package/dist/markers/utils/MarkerChannels.js +97 -0
- package/dist/markers/vector/VectorMarker.svelte +29 -0
- package/dist/markers/{VectorMarker.svelte.d.ts → vector/VectorMarker.svelte.d.ts} +1 -1
- package/dist/markers/voronoi/VoronoiMarker.svelte +26 -0
- package/dist/markers/voronoi/VoronoiMarker.svelte.d.ts +7 -0
- package/dist/markers/voronoi/VoronoiMeshMarker.svelte +26 -0
- package/dist/markers/voronoi/VoronoiMeshMarker.svelte.d.ts +7 -0
- package/dist/markers/waffle/WaffleMarker.svelte +56 -0
- package/dist/markers/waffle/WaffleMarker.svelte.d.ts +7 -0
- package/dist/phases/Pipeline.d.ts +108 -0
- package/dist/phases/Pipeline.js +226 -0
- package/dist/phases/data/DataPhase.d.ts +25 -0
- package/dist/phases/data/DataPhase.js +82 -0
- package/dist/phases/data/PlotAxes.d.ts +75 -0
- package/dist/phases/data/PlotAxes.js +151 -0
- package/dist/phases/facet/FacetPhase.d.ts +52 -0
- package/dist/phases/facet/FacetPhase.js +114 -0
- package/dist/phases/hover/HoverPhase.d.ts +73 -0
- package/dist/phases/hover/HoverPhase.js +144 -0
- package/dist/phases/mapping/MappingPhase.d.ts +17 -0
- package/dist/phases/mapping/MappingPhase.js +42 -0
- package/dist/phases/markers/MarkersPhase.d.ts +14 -0
- package/dist/phases/markers/MarkersPhase.js +27 -0
- package/dist/phases/scales/MarkerAxisValues.d.ts +12 -0
- package/dist/phases/scales/MarkerAxisValues.js +34 -0
- package/dist/phases/scales/ScalesPhase.d.ts +31 -0
- package/dist/phases/scales/ScalesPhase.js +157 -0
- package/dist/phases/sharedScales/SharedScalesPhase.d.ts +55 -0
- package/dist/phases/sharedScales/SharedScalesPhase.js +168 -0
- package/dist/phases/statistics/AuthorMarkers.d.ts +43 -0
- package/dist/phases/statistics/AuthorMarkers.js +69 -0
- package/dist/phases/statistics/MarkerGrouping.d.ts +48 -0
- package/dist/phases/statistics/MarkerGrouping.js +113 -0
- package/dist/phases/statistics/Statistics.d.ts +53 -0
- package/dist/phases/statistics/Statistics.js +156 -0
- package/dist/phases/statistics/StatisticsPhase.d.ts +18 -0
- package/dist/phases/statistics/StatisticsPhase.js +68 -0
- package/dist/phases/statistics/methods/BollingerStatistic.d.ts +9 -0
- package/dist/phases/statistics/methods/BollingerStatistic.js +18 -0
- package/dist/phases/statistics/methods/BoxStatistic.d.ts +9 -0
- package/dist/phases/statistics/methods/BoxStatistic.js +18 -0
- package/dist/phases/statistics/methods/Density2dStatistic.d.ts +9 -0
- package/dist/phases/statistics/methods/Density2dStatistic.js +18 -0
- package/dist/phases/statistics/methods/DensityStatistic.d.ts +12 -0
- package/dist/phases/statistics/methods/DensityStatistic.js +29 -0
- package/dist/phases/statistics/methods/MovingAverageStatistic.d.ts +12 -0
- package/dist/phases/statistics/methods/MovingAverageStatistic.js +30 -0
- package/dist/phases/statistics/methods/RegressionStatistic.d.ts +9 -0
- package/dist/phases/statistics/methods/RegressionStatistic.js +21 -0
- package/dist/phases/styles/StylesPhase.d.ts +13 -0
- package/dist/phases/styles/StylesPhase.js +17 -0
- package/dist/phases/tooltip/TooltipPhase.d.ts +12 -0
- package/dist/phases/tooltip/TooltipPhase.js +10 -0
- package/dist/phases/transforms/Transforms.d.ts +42 -0
- package/dist/phases/transforms/Transforms.js +130 -0
- package/dist/phases/transforms/TransformsPhase.d.ts +64 -0
- package/dist/phases/transforms/TransformsPhase.js +242 -0
- package/dist/phases/transforms/methods/AnchorBar.d.ts +13 -0
- package/dist/phases/transforms/methods/AnchorBar.js +21 -0
- package/dist/phases/transforms/methods/BinTransform.d.ts +7 -0
- package/dist/phases/transforms/methods/BinTransform.js +48 -0
- package/dist/phases/transforms/methods/DensityTransform.d.ts +6 -0
- package/dist/phases/transforms/methods/DensityTransform.js +13 -0
- package/dist/phases/transforms/methods/GroupTransform.d.ts +8 -0
- package/dist/phases/transforms/methods/GroupTransform.js +39 -0
- package/dist/phases/transforms/methods/NormalizeTransform.d.ts +10 -0
- package/dist/phases/transforms/methods/NormalizeTransform.js +30 -0
- package/dist/phases/transforms/methods/OrderTransform.d.ts +16 -0
- package/dist/phases/transforms/methods/OrderTransform.js +43 -0
- package/dist/phases/transforms/methods/PerGroup.d.ts +11 -0
- package/dist/phases/transforms/methods/PerGroup.js +39 -0
- package/dist/phases/transforms/methods/PositionTransform.d.ts +15 -0
- package/dist/phases/transforms/methods/PositionTransform.js +74 -0
- package/dist/phases/transforms/methods/StackTransform.d.ts +8 -0
- package/dist/phases/transforms/methods/StackTransform.js +29 -0
- package/dist/phases/transforms/methods/WindowTransform.d.ts +8 -0
- package/dist/phases/transforms/methods/WindowTransform.js +23 -0
- package/dist/plots/area/Plot.svelte +42 -0
- package/dist/plots/{heatmap/ValueLabels.svelte.d.ts → area/Plot.svelte.d.ts} +8 -16
- package/dist/plots/area/defaults.d.ts +4 -0
- package/dist/plots/area/defaults.js +21 -0
- package/dist/plots/area/markers.d.ts +14 -0
- package/dist/plots/area/markers.js +40 -0
- package/dist/plots/bar/Plot.svelte +33 -438
- package/dist/plots/bar/Plot.svelte.d.ts +5 -8
- package/dist/plots/bar/defaults.d.ts +9 -0
- package/dist/plots/bar/defaults.js +92 -0
- package/dist/plots/bar/markers.d.ts +45 -0
- package/dist/plots/bar/markers.js +232 -0
- package/dist/plots/geo/Core.svelte +151 -0
- package/dist/plots/geo/Core.svelte.d.ts +25 -0
- package/dist/plots/geo/Plot.svelte +103 -324
- package/dist/plots/geo/Plot.svelte.d.ts +5 -9
- package/dist/plots/geo/defaults.d.ts +4 -0
- package/dist/plots/geo/defaults.js +16 -0
- package/dist/plots/geo/features.svelte.d.ts +5 -0
- package/dist/plots/geo/features.svelte.js +44 -0
- package/dist/plots/geo/phases/data.d.ts +6 -0
- package/dist/plots/geo/phases/data.js +26 -0
- package/dist/plots/geo/phases/hover.d.ts +9 -0
- package/dist/plots/geo/phases/hover.js +45 -0
- package/dist/plots/geo/phases/markers.d.ts +9 -0
- package/dist/plots/geo/phases/markers.js +76 -0
- package/dist/plots/geo/phases/scales.d.ts +10 -0
- package/dist/plots/geo/phases/scales.js +85 -0
- package/dist/plots/geo/phases/tooltip.d.ts +3 -0
- package/dist/plots/geo/phases/tooltip.js +5 -0
- package/dist/plots/geo/slices.d.ts +18 -0
- package/dist/plots/geo/slices.js +56 -0
- package/dist/plots/heatmap/Plot.svelte +55 -249
- package/dist/plots/heatmap/Plot.svelte.d.ts +5 -8
- package/dist/plots/heatmap/defaults.d.ts +11 -0
- package/dist/plots/heatmap/defaults.js +91 -0
- package/dist/plots/heatmap/markers.d.ts +17 -0
- package/dist/plots/heatmap/markers.js +141 -0
- package/dist/plots/histogram/Plot.svelte +45 -0
- package/dist/plots/histogram/Plot.svelte.d.ts +26 -0
- package/dist/plots/histogram/defaults.d.ts +9 -0
- package/dist/plots/histogram/defaults.js +87 -0
- package/dist/plots/histogram/markers.d.ts +18 -0
- package/dist/plots/histogram/markers.js +89 -0
- package/dist/plots/line/Plot.svelte +37 -268
- package/dist/plots/line/Plot.svelte.d.ts +3 -7
- package/dist/plots/line/defaults.d.ts +4 -0
- package/dist/plots/line/defaults.js +29 -0
- package/dist/plots/line/markers.d.ts +49 -0
- package/dist/plots/line/markers.js +200 -0
- package/dist/plots/pyramid/Plot.svelte +34 -362
- package/dist/plots/pyramid/Plot.svelte.d.ts +5 -8
- package/dist/plots/pyramid/defaults.d.ts +13 -0
- package/dist/plots/pyramid/defaults.js +86 -0
- package/dist/plots/pyramid/markers.d.ts +21 -0
- package/dist/plots/pyramid/markers.js +159 -0
- package/dist/plots/scatter/Plot.svelte +34 -288
- package/dist/plots/scatter/Plot.svelte.d.ts +5 -8
- package/dist/plots/scatter/defaults.d.ts +4 -0
- package/dist/plots/scatter/defaults.js +79 -0
- package/dist/plots/scatter/markers.d.ts +19 -0
- package/dist/plots/scatter/markers.js +128 -0
- package/dist/plots/utils/ChannelName.d.ts +9 -0
- package/dist/plots/utils/ChannelName.js +14 -0
- package/dist/plots/utils/accessors.d.ts +1 -1
- package/dist/plots/utils/accessors.js +4 -2
- package/dist/plots/utils/gaps.d.ts +14 -19
- package/dist/plots/utils/gaps.js +38 -18
- package/dist/plots/utils/geoAccessors.d.ts +8 -8
- package/dist/plots/utils/geoAccessors.js +16 -12
- package/dist/plots/utils/geoSegments.d.ts +24 -9
- package/dist/plots/utils/geoSegments.js +31 -11
- package/dist/plots/utils/segments.d.ts +5 -16
- package/dist/plots/utils/segments.js +40 -52
- package/dist/plots/utils/tiles.d.ts +9 -9
- package/dist/plots/utils/tiles.js +35 -25
- package/dist/plots/utils/topojson.d.ts +1 -1
- package/dist/plots/utils/topojson.js +3 -3
- package/dist/stores/device.js +2 -4
- package/dist/types/configuration/styling.d.ts +158 -27
- package/dist/types/layout/box.d.ts +24 -0
- package/dist/types/layout/composer.d.ts +36 -0
- package/dist/types/layout/coordinates.d.ts +14 -14
- package/dist/types/layout/facet.d.ts +44 -22
- package/dist/types/layout/figure.d.ts +7 -0
- package/dist/types/layout/geometry.d.ts +6 -2
- package/dist/types/layout/grid.d.ts +66 -0
- package/dist/types/layout/hover.d.ts +48 -0
- package/dist/types/layout/legend.d.ts +258 -54
- package/dist/types/layout/mapping.d.ts +68 -0
- package/dist/types/layout/plot.d.ts +41 -0
- package/dist/types/layout/scales.d.ts +92 -24
- package/dist/types/layout/scales.js +19 -1
- package/dist/types/layout/statistics/bollinger.d.ts +18 -0
- package/dist/types/layout/statistics/box.d.ts +8 -0
- package/dist/types/layout/statistics/box.js +1 -0
- package/dist/types/layout/statistics/density.d.ts +27 -0
- package/dist/types/layout/statistics/density.js +1 -0
- package/dist/types/layout/statistics/index.d.ts +46 -0
- package/dist/types/layout/statistics/index.js +1 -0
- package/dist/types/layout/statistics/movingAverage.d.ts +12 -0
- package/dist/types/layout/statistics/movingAverage.js +1 -0
- package/dist/types/layout/statistics/regression.d.ts +20 -0
- package/dist/types/layout/statistics/regression.js +1 -0
- package/dist/types/layout/styles.d.ts +24 -35
- package/dist/types/layout/timeline.d.ts +51 -4
- package/dist/types/layout/tooltip.d.ts +7 -85
- package/dist/types/markers/all.d.ts +3 -4
- package/dist/types/markers/axis/area.d.ts +12 -0
- package/dist/types/markers/axis/area.js +1 -0
- package/dist/types/markers/axis/arrow.d.ts +15 -0
- package/dist/types/markers/axis/arrow.js +1 -0
- package/dist/types/markers/axis/axisBasedMarkersConfig.d.ts +29 -0
- package/dist/types/markers/axis/axisBasedMarkersConfig.js +1 -0
- package/dist/types/markers/axis/bar.d.ts +18 -0
- package/dist/types/markers/axis/bar.js +1 -0
- package/dist/types/markers/axis/bollinger.d.ts +6 -0
- package/dist/types/markers/axis/bollinger.js +1 -0
- package/dist/types/markers/axis/box.d.ts +14 -0
- package/dist/types/markers/axis/box.js +1 -0
- package/dist/types/markers/axis/brush.d.ts +28 -0
- package/dist/types/markers/axis/brush.js +1 -0
- package/dist/types/markers/axis/cell.d.ts +9 -0
- package/dist/types/markers/axis/cell.js +1 -0
- package/dist/types/markers/axis/component.d.ts +9 -0
- package/dist/types/markers/axis/component.js +1 -0
- package/dist/types/markers/axis/curveName.d.ts +2 -0
- package/dist/types/markers/axis/curveName.js +1 -0
- package/dist/types/markers/axis/delaunayLink.d.ts +7 -0
- package/dist/types/markers/axis/delaunayLink.js +1 -0
- package/dist/types/markers/axis/delaunayMesh.d.ts +7 -0
- package/dist/types/markers/axis/delaunayMesh.js +1 -0
- package/dist/types/markers/axis/delta.d.ts +27 -0
- package/dist/types/markers/axis/delta.js +1 -0
- package/dist/types/markers/axis/density.d.ts +12 -0
- package/dist/types/markers/axis/density.js +1 -0
- package/dist/types/markers/axis/difference.d.ts +12 -0
- package/dist/types/markers/axis/difference.js +1 -0
- package/dist/types/markers/axis/hover.d.ts +21 -0
- package/dist/types/markers/axis/hover.js +1 -0
- package/dist/types/markers/axis/hull.d.ts +7 -0
- package/dist/types/markers/axis/hull.js +1 -0
- package/dist/types/markers/axis/image.d.ts +12 -0
- package/dist/types/markers/axis/image.js +1 -0
- package/dist/types/markers/axis/line.d.ts +7 -0
- package/dist/types/markers/axis/line.js +1 -0
- package/dist/types/markers/axis/raster.d.ts +18 -0
- package/dist/types/markers/axis/raster.js +1 -0
- package/dist/types/markers/axis/rect.d.ts +15 -0
- package/dist/types/markers/axis/rect.js +1 -0
- package/dist/types/markers/axis/regression.d.ts +6 -0
- package/dist/types/markers/axis/regression.js +1 -0
- package/dist/types/markers/axis/rule.d.ts +15 -0
- package/dist/types/markers/axis/rule.js +1 -0
- package/dist/types/markers/axis/tick.d.ts +8 -0
- package/dist/types/markers/axis/tick.js +1 -0
- package/dist/types/markers/axis/trail.d.ts +14 -0
- package/dist/types/markers/axis/trail.js +1 -0
- package/dist/types/markers/axis/voronoi.d.ts +7 -0
- package/dist/types/markers/axis/voronoi.js +1 -0
- package/dist/types/markers/axis/voronoiMesh.d.ts +7 -0
- package/dist/types/markers/axis/voronoiMesh.js +1 -0
- package/dist/types/markers/axis/waffle.d.ts +13 -0
- package/dist/types/markers/axis/waffle.js +1 -0
- package/dist/types/markers/basic/basicMarkersConfig.d.ts +4 -0
- package/dist/types/markers/basic/basicMarkersConfig.js +1 -0
- package/dist/types/markers/basic/dot.d.ts +9 -0
- package/dist/types/markers/basic/dot.js +1 -0
- package/dist/types/markers/basic/text.d.ts +60 -0
- package/dist/types/markers/basic/text.js +1 -0
- package/dist/types/markers/basic.d.ts +4 -0
- package/dist/types/markers/basic.js +1 -0
- package/dist/types/markers/channels/commonMarkerConfig.d.ts +26 -0
- package/dist/types/markers/channels/commonMarkerConfig.js +1 -0
- package/dist/types/markers/channels/commonMarkerConfigWithArea.d.ts +6 -0
- package/dist/types/markers/channels/commonMarkerConfigWithArea.js +1 -0
- package/dist/types/markers/channels/commonMarkerConfigWithColor.d.ts +5 -0
- package/dist/types/markers/channels/commonMarkerConfigWithColor.js +1 -0
- package/dist/types/markers/channels/commonMarkerConfigWithInterval.d.ts +9 -0
- package/dist/types/markers/channels/commonMarkerConfigWithInterval.js +1 -0
- package/dist/types/markers/channels/commonMarkerConfigWithRadius.d.ts +5 -0
- package/dist/types/markers/channels/commonMarkerConfigWithRadius.js +1 -0
- package/dist/types/markers/channels/commonMarkerConfigWithSymbol.d.ts +5 -0
- package/dist/types/markers/channels/commonMarkerConfigWithSymbol.js +1 -0
- package/dist/types/markers/channels/commonMarkerConfigWithWeight.d.ts +5 -0
- package/dist/types/markers/channels/commonMarkerConfigWithWeight.js +1 -0
- package/dist/types/markers/common.d.ts +30 -103
- package/dist/types/markers/common.js +29 -1
- package/dist/types/markers/geo/contour.d.ts +27 -0
- package/dist/types/markers/geo/contour.js +1 -0
- package/dist/types/markers/geo/features.d.ts +12 -0
- package/dist/types/markers/geo/features.js +1 -0
- package/dist/types/markers/geo/geoComponent.d.ts +7 -0
- package/dist/types/markers/geo/geoComponent.js +1 -0
- package/dist/types/markers/geo/geoHover.d.ts +6 -0
- package/dist/types/markers/geo/geoHover.js +1 -0
- package/dist/types/markers/geo/geoMarkersConfig.d.ts +11 -0
- package/dist/types/markers/geo/geoMarkersConfig.js +1 -0
- package/dist/types/markers/geo/graticule.d.ts +11 -0
- package/dist/types/markers/geo/graticule.js +1 -0
- package/dist/types/markers/geo/inset.d.ts +50 -0
- package/dist/types/markers/geo/inset.js +1 -0
- package/dist/types/markers/geo/link.d.ts +13 -0
- package/dist/types/markers/geo/link.js +1 -0
- package/dist/types/markers/geo/sphere.d.ts +11 -0
- package/dist/types/markers/geo/sphere.js +1 -0
- package/dist/types/markers/geo/vector.d.ts +17 -0
- package/dist/types/markers/geo/vector.js +1 -0
- package/dist/types/markers/geo.d.ts +10 -212
- package/dist/types/markers/geo.js +10 -1
- package/dist/types/markers/traits.d.ts +22 -0
- package/dist/types/markers/traits.js +1 -0
- package/dist/types/misc/easing.js +1 -0
- package/dist/types/misc/viewport.js +1 -0
- package/dist/types/phases/data/axes.d.ts +18 -0
- package/dist/types/phases/data/axes.js +1 -0
- package/dist/types/phases/data/phase.d.ts +26 -0
- package/dist/types/phases/data/phase.js +2 -0
- package/dist/types/phases/facet/phase.d.ts +18 -0
- package/dist/types/phases/facet/phase.js +1 -0
- package/dist/types/phases/hover/phase.d.ts +34 -0
- package/dist/types/phases/hover/phase.js +1 -0
- package/dist/types/phases/index.d.ts +14 -0
- package/dist/types/phases/index.js +1 -0
- package/dist/types/phases/kind.d.ts +59 -0
- package/dist/types/phases/kind.js +1 -0
- package/dist/types/phases/mapping/phase.d.ts +5 -0
- package/dist/types/phases/mapping/phase.js +1 -0
- package/dist/types/phases/markers/phase.d.ts +13 -0
- package/dist/types/phases/markers/phase.js +1 -0
- package/dist/types/phases/pipeline.d.ts +10 -0
- package/dist/types/phases/pipeline.js +1 -0
- package/dist/types/phases/scales/phase.d.ts +26 -0
- package/dist/types/phases/scales/phase.js +1 -0
- package/dist/types/phases/sharedScales/phase.d.ts +12 -0
- package/dist/types/phases/sharedScales/phase.js +1 -0
- package/dist/types/phases/stage.d.ts +12 -0
- package/dist/types/phases/stage.js +1 -0
- package/dist/types/phases/state.d.ts +73 -0
- package/dist/types/phases/state.js +1 -0
- package/dist/types/phases/statistics/phase.d.ts +41 -0
- package/dist/types/phases/statistics/phase.js +1 -0
- package/dist/types/phases/statistics/source.d.ts +20 -0
- package/dist/types/phases/statistics/source.js +7 -0
- package/dist/types/phases/styles/phase.d.ts +24 -0
- package/dist/types/phases/styles/phase.js +1 -0
- package/dist/types/phases/transforms/adapter.d.ts +27 -0
- package/dist/types/phases/transforms/adapter.js +1 -0
- package/dist/types/phases/transforms/phase.d.ts +40 -0
- package/dist/types/phases/transforms/phase.js +1 -0
- package/dist/types/plots/area/props.d.ts +10 -0
- package/dist/types/plots/area/props.js +1 -0
- package/dist/types/plots/area/state.d.ts +6 -0
- package/dist/types/plots/area/state.js +1 -0
- package/dist/types/plots/bar/props.d.ts +10 -0
- package/dist/types/plots/bar/props.js +1 -0
- package/dist/types/plots/bar/state.d.ts +6 -0
- package/dist/types/plots/bar/state.js +1 -0
- package/dist/types/plots/camera.d.ts +7 -17
- package/dist/types/plots/constants.d.ts +16 -8
- package/dist/types/plots/data/common.d.ts +25 -17
- package/dist/types/plots/data/geo.d.ts +26 -12
- package/dist/types/plots/gaps.d.ts +19 -38
- package/dist/types/plots/geo/props.d.ts +23 -0
- package/dist/types/plots/geo/props.js +1 -0
- package/dist/types/plots/geo/state.d.ts +82 -0
- package/dist/types/plots/geo/state.js +1 -0
- package/dist/types/plots/heatmap/props.d.ts +10 -0
- package/dist/types/plots/heatmap/props.js +1 -0
- package/dist/types/plots/heatmap/state.d.ts +28 -0
- package/dist/types/plots/heatmap/state.js +1 -0
- package/dist/types/plots/histogram/props.d.ts +18 -0
- package/dist/types/plots/histogram/props.js +1 -0
- package/dist/types/plots/histogram/state.d.ts +6 -0
- package/dist/types/plots/histogram/state.js +1 -0
- package/dist/types/plots/line/props.d.ts +10 -0
- package/dist/types/plots/line/props.js +1 -0
- package/dist/types/plots/line/state.d.ts +9 -0
- package/dist/types/plots/line/state.js +1 -0
- package/dist/types/plots/props.d.ts +143 -35
- package/dist/types/plots/pyramid/props.d.ts +10 -0
- package/dist/types/plots/pyramid/props.js +1 -0
- package/dist/types/plots/pyramid/state.d.ts +16 -0
- package/dist/types/plots/pyramid/state.js +1 -0
- package/dist/types/plots/scatter/props.d.ts +10 -0
- package/dist/types/plots/scatter/props.js +1 -0
- package/dist/types/plots/scatter/state.d.ts +6 -0
- package/dist/types/plots/scatter/state.js +1 -0
- package/dist/types/plots/segments/common.d.ts +1 -1
- package/dist/types/plots/segments/config.d.ts +12 -6
- package/dist/types/plots/styling.d.ts +5 -5
- package/dist/types/transforms/bin.d.ts +84 -0
- package/dist/types/transforms/bin.js +28 -0
- package/dist/types/transforms/bollinger.d.ts +21 -0
- package/dist/types/transforms/bollinger.js +1 -0
- package/dist/types/transforms/common.d.ts +29 -0
- package/dist/types/transforms/common.js +16 -0
- package/dist/types/transforms/density.d.ts +45 -0
- package/dist/types/transforms/density.js +10 -0
- package/dist/types/transforms/filter.d.ts +12 -0
- package/dist/types/transforms/filter.js +14 -0
- package/dist/types/transforms/group.d.ts +70 -0
- package/dist/types/transforms/group.js +8 -0
- package/dist/types/transforms/index.d.ts +36 -0
- package/dist/types/transforms/index.js +1 -0
- package/dist/types/transforms/interval.d.ts +21 -0
- package/dist/types/transforms/interval.js +14 -0
- package/dist/types/transforms/jitter.d.ts +34 -0
- package/dist/types/transforms/jitter.js +1 -0
- package/dist/types/transforms/map.d.ts +24 -0
- package/dist/types/transforms/map.js +1 -0
- package/dist/types/transforms/normalize.d.ts +36 -0
- package/dist/types/transforms/normalize.js +1 -0
- package/dist/types/transforms/select.d.ts +15 -0
- package/dist/types/transforms/select.js +1 -0
- package/dist/types/transforms/shift.d.ts +20 -0
- package/dist/types/transforms/shift.js +1 -0
- package/dist/types/transforms/sort.d.ts +31 -0
- package/dist/types/transforms/sort.js +14 -0
- package/dist/types/transforms/stack.d.ts +64 -0
- package/dist/types/transforms/stack.js +12 -0
- package/dist/types/transforms/window.d.ts +29 -0
- package/dist/types/transforms/window.js +1 -0
- package/dist/utils/ContinuousDomain.d.ts +12 -0
- package/dist/utils/ContinuousDomain.js +19 -0
- package/dist/utils/Interpolation.d.ts +26 -0
- package/dist/utils/Interpolation.js +65 -0
- package/dist/utils/{color.d.ts → color/contrast.d.ts} +0 -5
- package/dist/utils/color/contrast.js +40 -0
- package/dist/utils/color/cssColor.d.ts +4 -0
- package/dist/utils/color/cssColor.js +77 -0
- package/dist/utils/color/index.d.ts +3 -0
- package/dist/utils/color/index.js +3 -0
- package/dist/utils/color/ramp.d.ts +17 -0
- package/dist/utils/color/ramp.js +110 -0
- package/dist/utils/grouping.d.ts +9 -5
- package/dist/utils/grouping.js +19 -10
- package/dist/utils/merge.d.ts +7 -0
- package/dist/utils/merge.js +17 -0
- package/dist/utils/opacity.d.ts +9 -0
- package/dist/utils/opacity.js +38 -0
- package/dist/utils/symbol.d.ts +31 -0
- package/dist/utils/symbol.js +92 -0
- package/docs/architecture.md +137 -0
- package/docs/chrome.md +68 -0
- package/docs/composer.md +53 -0
- package/docs/concepts.md +99 -0
- package/docs/development.md +94 -0
- package/docs/facets.md +69 -0
- package/docs/geo.md +151 -0
- package/docs/getting-started.md +79 -0
- package/docs/legend.md +106 -0
- package/docs/markers.md +106 -0
- package/docs/plots.md +158 -0
- package/docs/scales.md +78 -0
- package/docs/state.md +71 -0
- package/docs/styles-and-segments.md +215 -0
- package/docs/theming.md +215 -0
- package/docs/timeline.md +94 -0
- package/docs/tooltip-and-hover.md +80 -0
- package/docs/transforms-and-statistics.md +88 -0
- package/examples/BarValues.svelte +14 -0
- package/examples/CustomTooltip.svelte +37 -0
- package/examples/Facets.svelte +15 -0
- package/examples/LegendReader.svelte +8 -0
- package/examples/LegendToggle.svelte +25 -0
- package/examples/ResponsiveLine.svelte +37 -0
- package/examples/Segments.svelte +17 -0
- package/examples/TimelinePlayer.svelte +20 -0
- package/examples/Tooltip.svelte +19 -0
- package/examples/TooltipCard.svelte +86 -0
- package/examples/data.ts +12 -0
- package/llms-full.txt +114 -0
- package/llms.txt +49 -0
- package/package.json +41 -5
- package/dist/charts/BaseChart.svelte +0 -149
- package/dist/charts/BaseChart.svelte.d.ts +0 -47
- package/dist/charts/bar/Chart.svelte +0 -110
- package/dist/charts/bar/Chart.svelte.d.ts +0 -26
- package/dist/charts/container/ChartContainer.svelte +0 -137
- package/dist/charts/container/ChartContainer.svelte.d.ts +0 -16
- package/dist/charts/heatmap/Chart.svelte +0 -114
- package/dist/charts/line/Chart.svelte +0 -112
- package/dist/charts/line/Chart.svelte.d.ts +0 -26
- package/dist/charts/pyramid/Chart.svelte +0 -134
- package/dist/charts/pyramid/Chart.svelte.d.ts +0 -30
- package/dist/charts/scatter/Chart.svelte +0 -95
- package/dist/charts/scatter/Chart.svelte.d.ts +0 -28
- package/dist/layout/coordinates/margins.d.ts +0 -16
- package/dist/layout/coordinates/margins.js +0 -11
- package/dist/layout/legend/interaction.svelte.d.ts +0 -15
- package/dist/layout/legend/interaction.svelte.js +0 -32
- package/dist/layout/plot/BasePlotLayout.svelte +0 -332
- package/dist/layout/plot/BasePlotLayout.svelte.d.ts +0 -122
- package/dist/layout/plot/margins.d.ts +0 -18
- package/dist/layout/plot/margins.js +0 -15
- package/dist/layout/plot/measureText.d.ts +0 -4
- package/dist/layout/plot/measureText.js +0 -19
- package/dist/layout/tooltip/TooltipLayout.svelte +0 -51
- package/dist/layout/tooltip/TooltipLayout.svelte.d.ts +0 -45
- package/dist/layout/tooltip/controller.svelte.d.ts +0 -61
- package/dist/layout/tooltip/controller.svelte.js +0 -173
- package/dist/layout/tooltip/hover.svelte.d.ts +0 -7
- package/dist/layout/tooltip/hover.svelte.js +0 -28
- package/dist/layout/tooltip/resolveTooltipPlacement.d.ts +0 -24
- package/dist/layout/tooltip/resolveTooltipPlacement.js +0 -49
- package/dist/layout/tooltip/utils.d.ts +0 -49
- package/dist/layout/tooltip/utils.js +0 -82
- package/dist/markers/CellMarker.svelte +0 -21
- package/dist/markers/ContourClipMarker.svelte +0 -77
- package/dist/markers/ContourMarker.svelte +0 -28
- package/dist/markers/DeltaMarker.svelte +0 -109
- package/dist/markers/DotMarker.svelte +0 -70
- package/dist/markers/GeoFeaturesMarker.svelte +0 -19
- package/dist/markers/GeoHoverMarker.svelte +0 -25
- package/dist/markers/GraticuleMarker.svelte +0 -18
- package/dist/markers/HoverMarker.svelte +0 -212
- package/dist/markers/LineMarker.svelte +0 -19
- package/dist/markers/LinkMarker.svelte +0 -42
- package/dist/markers/PeakMarker.svelte +0 -80
- package/dist/markers/PeakMarker.svelte.d.ts +0 -13
- package/dist/markers/RuleMarker.svelte +0 -24
- package/dist/markers/SphereMarker.svelte +0 -15
- package/dist/markers/TextMarker.svelte +0 -62
- package/dist/markers/VectorMarker.svelte +0 -20
- package/dist/plots/bar/ValueLabels.svelte +0 -149
- package/dist/plots/bar/ValueLabels.svelte.d.ts +0 -58
- package/dist/plots/bar/buildBarMarkers.d.ts +0 -27
- package/dist/plots/bar/buildBarMarkers.js +0 -151
- package/dist/plots/bar/hoverPoints.d.ts +0 -15
- package/dist/plots/bar/hoverPoints.js +0 -37
- package/dist/plots/bar/layout.svelte.d.ts +0 -42
- package/dist/plots/bar/layout.svelte.js +0 -182
- package/dist/plots/geo/buildGeoMarkers.d.ts +0 -33
- package/dist/plots/geo/buildGeoMarkers.js +0 -47
- package/dist/plots/heatmap/ValueLabels.svelte +0 -56
- package/dist/plots/heatmap/buildCellMarkers.d.ts +0 -21
- package/dist/plots/heatmap/buildCellMarkers.js +0 -25
- package/dist/plots/line/ValueLabels.svelte +0 -269
- package/dist/plots/line/ValueLabels.svelte.d.ts +0 -52
- package/dist/plots/line/buildGapMarkers.d.ts +0 -28
- package/dist/plots/line/buildGapMarkers.js +0 -74
- package/dist/plots/line/buildLineMarkers.d.ts +0 -16
- package/dist/plots/line/buildLineMarkers.js +0 -56
- package/dist/plots/line/valueLabelMargin.d.ts +0 -19
- package/dist/plots/line/valueLabelMargin.js +0 -65
- package/dist/plots/pyramid/ValueLabels.svelte +0 -139
- package/dist/plots/pyramid/ValueLabels.svelte.d.ts +0 -56
- package/dist/plots/pyramid/buildPyramidBarMarkers.d.ts +0 -26
- package/dist/plots/pyramid/buildPyramidBarMarkers.js +0 -72
- package/dist/plots/scatter/ValueLabels.svelte +0 -163
- package/dist/plots/scatter/ValueLabels.svelte.d.ts +0 -52
- package/dist/plots/scatter/buildScatterMarkers.d.ts +0 -12
- package/dist/plots/scatter/buildScatterMarkers.js +0 -36
- package/dist/plots/scatter/resolveRadiusPaddedDomain.d.ts +0 -10
- package/dist/plots/scatter/resolveRadiusPaddedDomain.js +0 -23
- package/dist/plots/utils/categoricalAxisMargin.d.ts +0 -14
- package/dist/plots/utils/categoricalAxisMargin.js +0 -20
- package/dist/plots/utils/declutter.d.ts +0 -120
- package/dist/plots/utils/declutter.js +0 -240
- package/dist/plots/utils/labelOverflow.svelte.d.ts +0 -107
- package/dist/plots/utils/labelOverflow.svelte.js +0 -257
- package/dist/plots/utils/legendDisabled.d.ts +0 -27
- package/dist/plots/utils/legendDisabled.js +0 -68
- package/dist/plots/utils/valueLabelMargin.d.ts +0 -67
- package/dist/plots/utils/valueLabelMargin.js +0 -60
- package/dist/types/charts/common.d.ts +0 -22
- package/dist/types/charts/props.d.ts +0 -50
- package/dist/types/markers/base.d.ts +0 -45
- package/dist/types/markers/line.d.ts +0 -34
- package/dist/types/markers/props.d.ts +0 -11
- package/dist/types/plots/data/scatter.d.ts +0 -13
- package/dist/utils/color.js +0 -141
- package/dist/utils/delta.d.ts +0 -12
- package/dist/utils/delta.js +0 -69
- package/dist/utils/edgeAwareAnchor.d.ts +0 -34
- package/dist/utils/edgeAwareAnchor.js +0 -60
- package/dist/utils/interpolate.d.ts +0 -31
- package/dist/utils/interpolate.js +0 -71
- /package/dist/types/{charts/common.js → layout/box.js} +0 -0
- /package/dist/types/{charts/interpolate.js → layout/composer.js} +0 -0
- /package/dist/types/{charts/props.js → layout/figure.js} +0 -0
- /package/dist/types/{markers/base.js → layout/grid.js} +0 -0
- /package/dist/types/{markers/line.js → layout/hover.js} +0 -0
- /package/dist/types/{markers/props.js → layout/mapping.js} +0 -0
- /package/dist/types/{plots/data/scatter.js → layout/plot.js} +0 -0
- /package/dist/types/{viewport.js → layout/statistics/bollinger.js} +0 -0
- /package/dist/types/{charts/interpolate.d.ts → misc/easing.d.ts} +0 -0
- /package/dist/types/{viewport.d.ts → misc/viewport.d.ts} +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { Series } from '../../types/plots/data/common';
|
|
2
|
-
import type { ValuesStyle } from '../../types/layout/styles';
|
|
3
|
-
import type { ValueAnchor } from '../../types/plots/constants';
|
|
4
|
-
import type { BarSegmentStyle } from '../../types/plots/segments/common';
|
|
5
|
-
import type { VisualGroup } from '../../types/plots/segments/config';
|
|
6
|
-
import type { LegendDisabledStyle } from '../../types/layout/legend';
|
|
7
|
-
import type { MarginOverflow } from '../utils/labelOverflow.svelte';
|
|
8
|
-
import type { BarLayout } from './layout.svelte';
|
|
9
|
-
declare function $$render<TData extends Record<string, unknown>>(): {
|
|
10
|
-
props: {
|
|
11
|
-
group: VisualGroup<Series<TData>, BarSegmentStyle>;
|
|
12
|
-
seriesIndex: number;
|
|
13
|
-
barLayout: BarLayout<TData>;
|
|
14
|
-
isHorizontal: boolean;
|
|
15
|
-
valAnchor: ValueAnchor;
|
|
16
|
-
formatValue: (value: number, seriesName: string) => string;
|
|
17
|
-
values: ValuesStyle | undefined;
|
|
18
|
-
axisColor: string;
|
|
19
|
-
/** Resolved legend/hover-isolate dimming style for this group's series, if any. */
|
|
20
|
-
disabled?: LegendDisabledStyle;
|
|
21
|
-
/** The plot's own pixel size — together with `numericMargins`, the ground truth for its content box (see `bounds()` below). */
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
/** `BasePlotLayout`'s resolved margins, already numeric on every side. */
|
|
25
|
-
numericMargins: {
|
|
26
|
-
top: number;
|
|
27
|
-
right: number;
|
|
28
|
-
bottom: number;
|
|
29
|
-
left: number;
|
|
30
|
-
};
|
|
31
|
-
/** Fired when the pointer enters this series' label — only wired when hover-isolate is enabled. */
|
|
32
|
-
onHoverSeries?: () => void;
|
|
33
|
-
onHoverEnd?: () => void;
|
|
34
|
-
/** Reports how far this label overflows the plot's own content box, in pixels, on each side (0 = no overflow). */
|
|
35
|
-
onOverflow?: (overflow: MarginOverflow) => void;
|
|
36
|
-
};
|
|
37
|
-
exports: {};
|
|
38
|
-
bindings: "";
|
|
39
|
-
slots: {};
|
|
40
|
-
events: {};
|
|
41
|
-
};
|
|
42
|
-
declare class __sveltets_Render<TData extends Record<string, unknown>> {
|
|
43
|
-
props(): ReturnType<typeof $$render<TData>>['props'];
|
|
44
|
-
events(): ReturnType<typeof $$render<TData>>['events'];
|
|
45
|
-
slots(): ReturnType<typeof $$render<TData>>['slots'];
|
|
46
|
-
bindings(): "";
|
|
47
|
-
exports(): {};
|
|
48
|
-
}
|
|
49
|
-
interface $$IsomorphicComponent {
|
|
50
|
-
new <TData extends Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<TData>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<TData>['props']>, ReturnType<__sveltets_Render<TData>['events']>, ReturnType<__sveltets_Render<TData>['slots']>> & {
|
|
51
|
-
$$bindings?: ReturnType<__sveltets_Render<TData>['bindings']>;
|
|
52
|
-
} & ReturnType<__sveltets_Render<TData>['exports']>;
|
|
53
|
-
<TData extends Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<TData>['props']> & {}): ReturnType<__sveltets_Render<TData>['exports']>;
|
|
54
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
55
|
-
}
|
|
56
|
-
declare const ValueLabels: $$IsomorphicComponent;
|
|
57
|
-
type ValueLabels<TData extends Record<string, unknown>> = InstanceType<typeof ValueLabels<TData>>;
|
|
58
|
-
export default ValueLabels;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Series } from '../../types/plots/data/common';
|
|
2
|
-
import type { BarSegmentStyle } from '../../types/plots/segments/common';
|
|
3
|
-
import type { VisualGroup } from '../../types/plots/segments/config';
|
|
4
|
-
import type { HoverPoint } from '../../types/layout/tooltip';
|
|
5
|
-
import type { BarMarkerConfig } from '../../types/markers/common';
|
|
6
|
-
import type { BarLayout } from './layout.svelte';
|
|
7
|
-
import type { DiscreteGapFill } from '../utils/gaps';
|
|
8
|
-
/**
|
|
9
|
-
* Every `'bar'` marker for one BarPlot render: visible `role: 'segment'`
|
|
10
|
-
* bars (real data + gap fills) plus one `role: 'hitArea'` hit region per row,
|
|
11
|
-
* sized to that row's own segment.
|
|
12
|
-
*/
|
|
13
|
-
export declare function buildBarMarkers<TData extends Record<string, unknown>>(args: {
|
|
14
|
-
groupedSeries: VisualGroup<Series<TData>, BarSegmentStyle>[];
|
|
15
|
-
barLayout: BarLayout<TData>;
|
|
16
|
-
isHorizontal: boolean;
|
|
17
|
-
hoverPoints: HoverPoint<TData>[];
|
|
18
|
-
colorFor: (seriesName: string) => string;
|
|
19
|
-
disabledFillFor: (seriesName: string) => {
|
|
20
|
-
fill?: string;
|
|
21
|
-
fillOpacity?: number;
|
|
22
|
-
} | undefined;
|
|
23
|
-
active: boolean;
|
|
24
|
-
setHoverMatch: (rows: TData[]) => void;
|
|
25
|
-
clearHoverMatch: () => void;
|
|
26
|
-
gapFillMaps: Map<string, Map<TData, DiscreteGapFill<BarSegmentStyle>>>;
|
|
27
|
-
}): BarMarkerConfig[];
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { resolveAccessor } from '../utils/accessors';
|
|
2
|
-
import { getConfiguration } from '../../configuration/config.svelte';
|
|
3
|
-
import { isGapValue, resolveGapAreaStyle } from '../utils/gaps';
|
|
4
|
-
const GAP_KINDS = ['start', 'middle', 'end'];
|
|
5
|
-
/**
|
|
6
|
-
* Every `'bar'` marker for one BarPlot render: visible `role: 'segment'`
|
|
7
|
-
* bars (real data + gap fills) plus one `role: 'hitArea'` hit region per row,
|
|
8
|
-
* sized to that row's own segment.
|
|
9
|
-
*/
|
|
10
|
-
export function buildBarMarkers(args) {
|
|
11
|
-
const { groupedSeries, barLayout, isHorizontal, hoverPoints, colorFor, disabledFillFor, active, setHoverMatch, clearHoverMatch, gapFillMaps } = args;
|
|
12
|
-
const gapDefaults = getConfiguration().bar.gap;
|
|
13
|
-
// Series names eligible for hover (excludes legend-disabled ones).
|
|
14
|
-
const hoverEligibleSeries = new Set(hoverPoints.map((p) => p.series));
|
|
15
|
-
const segmentMarkers = [];
|
|
16
|
-
const hitAreaMarkers = [];
|
|
17
|
-
groupedSeries.forEach((group, seriesIndex) => {
|
|
18
|
-
const xFn = resolveAccessor(group.series.x);
|
|
19
|
-
const yFn = resolveAccessor(group.series.y);
|
|
20
|
-
const defaultColor = colorFor(group.series.name);
|
|
21
|
-
const disabledFill = disabledFillFor(group.series.name);
|
|
22
|
-
// Builds one series' visible bar geometry (real or gap-fill data).
|
|
23
|
-
function makeMarker(data, valueFn, style) {
|
|
24
|
-
if (data.length === 0)
|
|
25
|
-
return null;
|
|
26
|
-
const marker = { type: 'bar', role: 'segment', isHorizontal, data, style };
|
|
27
|
-
if (barLayout.layout === 'stacked') {
|
|
28
|
-
const baselineFn = (d) => barLayout.stackedBaseline(xFn(d), seriesIndex);
|
|
29
|
-
const topFn = (d) => baselineFn(d) + valueFn(d);
|
|
30
|
-
if (isHorizontal) {
|
|
31
|
-
marker.y = xFn;
|
|
32
|
-
marker.x1 = baselineFn;
|
|
33
|
-
marker.x2 = topFn;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
marker.x = xFn;
|
|
37
|
-
marker.y1 = baselineFn;
|
|
38
|
-
marker.y2 = topFn;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
if (isHorizontal) {
|
|
43
|
-
marker.y = xFn;
|
|
44
|
-
marker.x1 = barLayout.valueBaseline;
|
|
45
|
-
marker.x2 = valueFn;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
marker.x = xFn;
|
|
49
|
-
marker.y1 = barLayout.valueBaseline;
|
|
50
|
-
marker.y2 = valueFn;
|
|
51
|
-
}
|
|
52
|
-
if (barLayout.layout === 'grouped') {
|
|
53
|
-
const { start, end } = barLayout.groupInsetFraction(seriesIndex);
|
|
54
|
-
if (isHorizontal) {
|
|
55
|
-
marker.insetTop = start;
|
|
56
|
-
marker.insetBottom = end;
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
marker.insetLeft = start;
|
|
60
|
-
marker.insetRight = end;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return marker;
|
|
65
|
-
}
|
|
66
|
-
// Builds one row's hit-test geometry — same shape as `makeMarker`, for one row.
|
|
67
|
-
function makeHitAreaMarker(d, valueFn) {
|
|
68
|
-
const marker = {
|
|
69
|
-
type: 'bar',
|
|
70
|
-
role: 'hitArea',
|
|
71
|
-
isHorizontal,
|
|
72
|
-
data: [d],
|
|
73
|
-
category: xFn(d)
|
|
74
|
-
};
|
|
75
|
-
if (barLayout.layout === 'stacked') {
|
|
76
|
-
const baseline = barLayout.stackedBaseline(xFn(d), seriesIndex);
|
|
77
|
-
const top = baseline + valueFn(d);
|
|
78
|
-
if (isHorizontal) {
|
|
79
|
-
marker.x1 = baseline;
|
|
80
|
-
marker.x2 = top;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
marker.y1 = baseline;
|
|
84
|
-
marker.y2 = top;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
if (isHorizontal) {
|
|
89
|
-
marker.x1 = barLayout.valueBaseline;
|
|
90
|
-
marker.x2 = valueFn(d);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
marker.y1 = barLayout.valueBaseline;
|
|
94
|
-
marker.y2 = valueFn(d);
|
|
95
|
-
}
|
|
96
|
-
if (barLayout.layout === 'grouped') {
|
|
97
|
-
const { start, end } = barLayout.groupInsetFraction(seriesIndex);
|
|
98
|
-
if (isHorizontal) {
|
|
99
|
-
marker.insetTop = start;
|
|
100
|
-
marker.insetBottom = end;
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
marker.insetLeft = start;
|
|
104
|
-
marker.insetRight = end;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return marker;
|
|
109
|
-
}
|
|
110
|
-
for (const seg of group.visualSegments) {
|
|
111
|
-
const realData = seg.data.filter((d) => !isGapValue(yFn(d)));
|
|
112
|
-
const style = {
|
|
113
|
-
fill: disabledFill?.fill ?? seg.style.fill ?? defaultColor,
|
|
114
|
-
fillOpacity: disabledFill?.fillOpacity ?? seg.style.fillOpacity ?? 1
|
|
115
|
-
};
|
|
116
|
-
const valueFn = barLayout.layout === 'stacked' ? (d) => Number(yFn(d)) : yFn;
|
|
117
|
-
const marker = makeMarker(realData, valueFn, style);
|
|
118
|
-
if (marker)
|
|
119
|
-
segmentMarkers.push(marker);
|
|
120
|
-
if (hoverEligibleSeries.has(group.series.name)) {
|
|
121
|
-
for (const d of realData) {
|
|
122
|
-
const hitMarker = makeHitAreaMarker(d, valueFn);
|
|
123
|
-
hitMarker.onpointerenter = active ? () => setHoverMatch([d]) : undefined;
|
|
124
|
-
hitMarker.onpointerleave = active ? clearHoverMatch : undefined;
|
|
125
|
-
hitAreaMarkers.push(hitMarker);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const fillMap = gapFillMaps.get(group.series.name) ?? new Map();
|
|
130
|
-
for (const kind of GAP_KINDS) {
|
|
131
|
-
const filledRows = group.series.data.filter((d) => fillMap.get(d)?.kind === kind);
|
|
132
|
-
if (filledRows.length === 0)
|
|
133
|
-
continue;
|
|
134
|
-
const base = resolveGapAreaStyle(fillMap.get(filledRows[0]).style, defaultColor, gapDefaults);
|
|
135
|
-
const gapStyle = {
|
|
136
|
-
...base,
|
|
137
|
-
fill: disabledFill?.fill ?? base.fill,
|
|
138
|
-
fillOpacity: disabledFill?.fillOpacity ?? base.fillOpacity
|
|
139
|
-
};
|
|
140
|
-
// Tags each row with its resolved gap-fill value as a plain field.
|
|
141
|
-
const taggedData = filledRows.map((d) => ({
|
|
142
|
-
...d,
|
|
143
|
-
__gapValue: fillMap.get(d).value
|
|
144
|
-
}));
|
|
145
|
-
const marker = makeMarker(taggedData, (d) => d.__gapValue, gapStyle);
|
|
146
|
-
if (marker)
|
|
147
|
-
segmentMarkers.push(marker);
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
return [...segmentMarkers, ...hitAreaMarkers];
|
|
151
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Series } from '../../types/plots/data/common';
|
|
2
|
-
import type { HoverPoint } from '../../types/layout/tooltip';
|
|
3
|
-
import type { BarLayout } from './layout.svelte';
|
|
4
|
-
/**
|
|
5
|
-
* Builds hover-marker candidate points for every row across every series.
|
|
6
|
-
*
|
|
7
|
-
* `x`/`y` (the values matching is keyed off) stay the raw category/value so
|
|
8
|
-
* every series at the same category still matches together under the 'x'
|
|
9
|
-
* strategy; `dx`/`dy` only nudge where the matched point is *drawn* — see
|
|
10
|
-
* {@link import('../../types/layout/tooltip').HoverDisplayPoint}. For
|
|
11
|
-
* 'stacked' layout, `value` itself is adjusted to the series' cumulative
|
|
12
|
-
* height instead of `dx`/`dy`, since that offset is representable as a
|
|
13
|
-
* regular data value (unlike 'grouped''s pixel-only slice offset).
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildHoverPoints<TData extends Record<string, unknown>>(resolvedSeries: Series<TData>[], isHorizontal: boolean, geometry: Pick<BarLayout<TData>, 'layout' | 'stackedBaseline' | 'groupOffset' | 'groupInsetFraction'>, colorFor: (seriesName: string) => string): HoverPoint<TData>[];
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { resolveAccessor } from '../utils/accessors';
|
|
2
|
-
import { isGapValue } from '../utils/gaps';
|
|
3
|
-
/**
|
|
4
|
-
* Builds hover-marker candidate points for every row across every series.
|
|
5
|
-
*
|
|
6
|
-
* `x`/`y` (the values matching is keyed off) stay the raw category/value so
|
|
7
|
-
* every series at the same category still matches together under the 'x'
|
|
8
|
-
* strategy; `dx`/`dy` only nudge where the matched point is *drawn* — see
|
|
9
|
-
* {@link import('../../types/layout/tooltip').HoverDisplayPoint}. For
|
|
10
|
-
* 'stacked' layout, `value` itself is adjusted to the series' cumulative
|
|
11
|
-
* height instead of `dx`/`dy`, since that offset is representable as a
|
|
12
|
-
* regular data value (unlike 'grouped''s pixel-only slice offset).
|
|
13
|
-
*/
|
|
14
|
-
export function buildHoverPoints(resolvedSeries, isHorizontal, geometry, colorFor) {
|
|
15
|
-
return resolvedSeries.flatMap((s, idx) => {
|
|
16
|
-
const sx = resolveAccessor(s.x);
|
|
17
|
-
const sy = resolveAccessor(s.y);
|
|
18
|
-
const areaInset = geometry.layout === 'grouped' ? geometry.groupInsetFraction(idx) : undefined;
|
|
19
|
-
return s.data.filter((d) => !isGapValue(sy(d))).map((d) => {
|
|
20
|
-
const category = sx(d);
|
|
21
|
-
const rawValue = Number(sy(d));
|
|
22
|
-
const value = geometry.layout === 'stacked' ? geometry.stackedBaseline(category, idx) + rawValue : rawValue;
|
|
23
|
-
const { dx, dy } = geometry.groupOffset(idx);
|
|
24
|
-
return {
|
|
25
|
-
x: isHorizontal ? value : category,
|
|
26
|
-
y: isHorizontal ? category : value,
|
|
27
|
-
dx,
|
|
28
|
-
dy,
|
|
29
|
-
areaInset,
|
|
30
|
-
row: d,
|
|
31
|
-
label: String(sy(d)),
|
|
32
|
-
series: s.name,
|
|
33
|
-
color: colorFor(s.name),
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { AxisValue, AxisBasedScalesConfig } from '../../types/layout/scales';
|
|
2
|
-
import type { Series } from '../../types/plots/data/common';
|
|
3
|
-
import type { BarSegmentStyle } from '../../types/plots/segments/common';
|
|
4
|
-
import type { VisualGroup } from '../../types/plots/segments/config';
|
|
5
|
-
import type { MarginConfig } from '../../types/plots/props';
|
|
6
|
-
import type { DiscreteGapFill } from '../utils/gaps';
|
|
7
|
-
export type BarSeriesLayout = 'overlap' | 'grouped' | 'stacked';
|
|
8
|
-
/**
|
|
9
|
-
* Reactive geometry for BarPlot's series-layout modes — the single source of
|
|
10
|
-
* truth for "where does series N's bar actually sit," shared by bar-segment
|
|
11
|
-
* rendering, value labels, and hover markers. Centralized here after a bug
|
|
12
|
-
* where hover markers reproduced (and initially missed) the same grouped/
|
|
13
|
-
* stacked math value labels already accounted for.
|
|
14
|
-
*/
|
|
15
|
-
export declare function createBarLayout<TData extends Record<string, unknown>>(args: {
|
|
16
|
-
scales: () => AxisBasedScalesConfig<TData>;
|
|
17
|
-
isHorizontal: () => boolean;
|
|
18
|
-
width: () => number;
|
|
19
|
-
height: () => number;
|
|
20
|
-
margins: () => MarginConfig | undefined;
|
|
21
|
-
flat: () => TData[];
|
|
22
|
-
xAcc: () => (d: TData) => AxisValue;
|
|
23
|
-
groupedSeries: () => VisualGroup<Series<TData>, BarSegmentStyle>[];
|
|
24
|
-
gapFillMaps: () => Map<string, Map<TData, DiscreteGapFill<BarSegmentStyle>>>;
|
|
25
|
-
}): {
|
|
26
|
-
readonly layout: BarSeriesLayout;
|
|
27
|
-
readonly valueBaseline: number;
|
|
28
|
-
readonly estimatedBandwidth: number;
|
|
29
|
-
readonly seriesCount: number;
|
|
30
|
-
readonly seriesStep: number;
|
|
31
|
-
readonly seriesGap: number;
|
|
32
|
-
stackedBaseline: (category: AxisValue, seriesIndex: number) => number;
|
|
33
|
-
groupOffset: (seriesIndex: number) => {
|
|
34
|
-
dx: number;
|
|
35
|
-
dy: number;
|
|
36
|
-
};
|
|
37
|
-
groupInsetFraction: (seriesIndex: number) => {
|
|
38
|
-
start: number;
|
|
39
|
-
end: number;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export type BarLayout<TData extends Record<string, unknown>> = ReturnType<typeof createBarLayout<TData>>;
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
|
2
|
-
import { getConfiguration } from '../../configuration/config.svelte';
|
|
3
|
-
import { resolveAccessor } from '../utils/accessors';
|
|
4
|
-
import { numericMargin } from '../../layout/plot/margins';
|
|
5
|
-
import { isGapValue } from '../utils/gaps';
|
|
6
|
-
/**
|
|
7
|
-
* Reactive geometry for BarPlot's series-layout modes — the single source of
|
|
8
|
-
* truth for "where does series N's bar actually sit," shared by bar-segment
|
|
9
|
-
* rendering, value labels, and hover markers. Centralized here after a bug
|
|
10
|
-
* where hover markers reproduced (and initially missed) the same grouped/
|
|
11
|
-
* stacked math value labels already accounted for.
|
|
12
|
-
*/
|
|
13
|
-
export function createBarLayout(args) {
|
|
14
|
-
const cfg = $derived(getConfiguration());
|
|
15
|
-
/**
|
|
16
|
-
* How series sharing the same category are arranged — see
|
|
17
|
-
* {@link import('../../types/layout/scales').AxisScale.seriesLayout}. Read
|
|
18
|
-
* off `scales.z` since it's the grouping axis, not the category axis itself.
|
|
19
|
-
*/
|
|
20
|
-
const layout = $derived(args.scales().z?.seriesLayout ?? 'overlap');
|
|
21
|
-
const categoricalScale = $derived(args.isHorizontal() ? args.scales().y : args.scales().x);
|
|
22
|
-
const valueScale = $derived(args.isHorizontal() ? args.scales().x : args.scales().y);
|
|
23
|
-
/**
|
|
24
|
-
* Bars default to a 0 baseline. When the value axis's domain is set and
|
|
25
|
-
* excludes 0 (e.g. `[75, 85]`, to zoom in on a tight range), a literal 0
|
|
26
|
-
* baseline sits way outside the visible domain — the scale still maps it
|
|
27
|
-
* linearly, so the bar's "start" lands far past the plot's own edge and
|
|
28
|
-
* the bar overflows into the margin instead of appearing to end at the
|
|
29
|
-
* frame. Clamping the baseline to whichever domain bound is closest to 0
|
|
30
|
-
* makes bars cut off exactly at the visible edge instead, which is the
|
|
31
|
-
* point of setting a truncated domain in the first place. Left as 0 (no
|
|
32
|
-
* clamp) when the domain isn't set or already straddles 0 naturally.
|
|
33
|
-
*/
|
|
34
|
-
const valueBaseline = $derived.by(() => {
|
|
35
|
-
const domain = valueScale?.domain;
|
|
36
|
-
if (!domain || domain.length < 2)
|
|
37
|
-
return 0;
|
|
38
|
-
const lo = Number(domain[0]);
|
|
39
|
-
const hi = Number(domain[domain.length - 1]);
|
|
40
|
-
if (Number.isNaN(lo) || Number.isNaN(hi))
|
|
41
|
-
return 0;
|
|
42
|
-
const min = Math.min(lo, hi);
|
|
43
|
-
const max = Math.max(lo, hi);
|
|
44
|
-
if (min > 0)
|
|
45
|
-
return min;
|
|
46
|
-
if (max < 0)
|
|
47
|
-
return max;
|
|
48
|
-
return 0;
|
|
49
|
-
});
|
|
50
|
-
/**
|
|
51
|
-
* Approximate per-category band size in pixels (width for vertical bars,
|
|
52
|
-
* height for horizontal ones), used only to size each series' slice in
|
|
53
|
-
* 'grouped' layout via inset props. Derived from this plot's own
|
|
54
|
-
* `width`/`height`/`margins` rather than svelteplot's actual measured
|
|
55
|
-
* scale (not part of its public API) — close enough for a grouped look,
|
|
56
|
-
* though it can be slightly off when an 'auto' margin ends up wider than
|
|
57
|
-
* the estimate (e.g. unusually long tick labels). Follows the same
|
|
58
|
-
* band-scale formula (and 0.15 default padding) svelteplot itself uses,
|
|
59
|
-
* so the category axis's own `paddingInner`/`paddingOuter` — the space
|
|
60
|
-
* *between* categories — is reflected here too, not just svelteplot's
|
|
61
|
-
* real render. In practice `categoricalScale` always carries a resolved
|
|
62
|
-
* `paddingInner`/`paddingOuter` by the time it gets here — `Plot.svelte`
|
|
63
|
-
* backs its own category axis with the theme's `bar.paddingInner`/
|
|
64
|
-
* `paddingOuter` before either this estimate or the real svelteplot
|
|
65
|
-
* scale sees it, so the two stay in sync; the literal fallback below is
|
|
66
|
-
* only a defensive last resort.
|
|
67
|
-
*/
|
|
68
|
-
const estimatedBandwidth = $derived.by(() => {
|
|
69
|
-
const categoryCount = new SvelteSet(args.flat().map((d) => args.xAcc()(d))).size;
|
|
70
|
-
if (categoryCount === 0)
|
|
71
|
-
return 0;
|
|
72
|
-
const baseMargins = { ...cfg.margins, ...args.margins() };
|
|
73
|
-
const innerSize = args.isHorizontal()
|
|
74
|
-
? Math.max(0, args.height() -
|
|
75
|
-
numericMargin('top', baseMargins.top) -
|
|
76
|
-
numericMargin('bottom', baseMargins.bottom))
|
|
77
|
-
: Math.max(0, args.width() -
|
|
78
|
-
numericMargin('left', baseMargins.left) -
|
|
79
|
-
numericMargin('right', baseMargins.right));
|
|
80
|
-
const paddingInner = categoricalScale?.paddingInner ?? categoricalScale?.padding ?? 0.15;
|
|
81
|
-
const paddingOuter = categoricalScale?.paddingOuter ?? categoricalScale?.padding ?? 0.15;
|
|
82
|
-
const step = innerSize / (categoryCount - paddingInner + 2 * paddingOuter);
|
|
83
|
-
return step * (1 - paddingInner);
|
|
84
|
-
});
|
|
85
|
-
const seriesCount = $derived(args.groupedSeries().length);
|
|
86
|
-
// `seriesPadding` (0–1, space *within* a group, between its series)
|
|
87
|
-
// reserves a fraction of each series' own slice as a gap split evenly on
|
|
88
|
-
// either side of the bar.
|
|
89
|
-
const seriesGapFraction = $derived(Math.max(0, Math.min(1, args.scales().z?.seriesPadding ?? cfg.bar.seriesPadding)));
|
|
90
|
-
// Each series gets an equal slice of the band.
|
|
91
|
-
const seriesStep = $derived(seriesCount > 0 ? estimatedBandwidth / seriesCount : 0);
|
|
92
|
-
const seriesGap = $derived(seriesGapFraction * seriesStep);
|
|
93
|
-
/**
|
|
94
|
-
* Per-category cumulative sums for 'stacked' layout — `stackedPrefixSums.get(category)[i]`
|
|
95
|
-
* is the sum of series `0..i-1`'s value at that category, i.e. series `i`'s
|
|
96
|
-
* own segment spans `[prefix, prefix + value]`. Computed by hand (rather
|
|
97
|
-
* than svelteplot's `stackY`/`stackX` transform, which needs every series'
|
|
98
|
-
* rows in one call to line up cumulative offsets) so the same numbers can
|
|
99
|
-
* position the bar segment, its middle-anchored label, and its hover marker.
|
|
100
|
-
*/
|
|
101
|
-
const stackedPrefixSums = $derived.by(() => {
|
|
102
|
-
const sums = new SvelteMap();
|
|
103
|
-
if (layout !== 'stacked')
|
|
104
|
-
return sums;
|
|
105
|
-
for (const category of new SvelteSet(args.flat().map((d) => args.xAcc()(d)))) {
|
|
106
|
-
let running = 0;
|
|
107
|
-
const prefix = [];
|
|
108
|
-
for (const group of args.groupedSeries()) {
|
|
109
|
-
prefix.push(running);
|
|
110
|
-
const seriesXFn = resolveAccessor(group.series.x);
|
|
111
|
-
const seriesYFn = resolveAccessor(group.series.y);
|
|
112
|
-
const row = group.series.data.find((d) => seriesXFn(d) === category);
|
|
113
|
-
if (row) {
|
|
114
|
-
const raw = seriesYFn(row);
|
|
115
|
-
const fill = args.gapFillMaps().get(group.series.name)?.get(row);
|
|
116
|
-
running += fill ? fill.value : isGapValue(raw) ? 0 : Number(raw);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
sums.set(category, prefix);
|
|
120
|
-
}
|
|
121
|
-
return sums;
|
|
122
|
-
});
|
|
123
|
-
function stackedBaseline(category, seriesIndex) {
|
|
124
|
-
return stackedPrefixSums.get(category)?.[seriesIndex] ?? 0;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Pixel offset for a 'grouped' series' own slice of the category band —
|
|
128
|
-
* shared by bar segments, value labels, and hover markers. `dy` is
|
|
129
|
-
* negated for horizontal bars, matching how `insetBottom` positions them.
|
|
130
|
-
*/
|
|
131
|
-
function groupOffset(seriesIndex) {
|
|
132
|
-
if (layout !== 'grouped')
|
|
133
|
-
return { dx: 0, dy: 0 };
|
|
134
|
-
const offset = -(estimatedBandwidth / 2) + seriesIndex * seriesStep + seriesStep / 2;
|
|
135
|
-
return args.isHorizontal() ? { dx: 0, dy: -offset } : { dx: offset, dy: 0 };
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* A 'grouped' series' own slice of the category band, as fractions (0–1)
|
|
139
|
-
* of the *whole* band rather than pixels — unlike {@link groupOffset},
|
|
140
|
-
* which bakes in `estimatedBandwidth`'s own guess, these stay exact
|
|
141
|
-
* regardless of how far off that guess ends up: `BarMarker` multiplies
|
|
142
|
-
* them by the band's real, svelteplot-measured width at render time
|
|
143
|
-
* (only available once mounted inside the actual `<Plot>`, which this
|
|
144
|
-
* module isn't), so a bar's own visible width/position is never off by
|
|
145
|
-
* the estimate's error the way `estimatedBandwidth`-derived pixels can be
|
|
146
|
-
* — most noticeable in a small faceted cell, where a fixed margin
|
|
147
|
-
* estimate is proportionally least accurate.
|
|
148
|
-
*/
|
|
149
|
-
function groupInsetFraction(seriesIndex) {
|
|
150
|
-
if (layout !== 'grouped' || seriesCount === 0)
|
|
151
|
-
return { start: 0, end: 0 };
|
|
152
|
-
const sliceFraction = 1 / seriesCount;
|
|
153
|
-
const gapFraction = (seriesGapFraction * sliceFraction) / 2;
|
|
154
|
-
return {
|
|
155
|
-
start: seriesIndex * sliceFraction + gapFraction,
|
|
156
|
-
end: (seriesCount - 1 - seriesIndex) * sliceFraction + gapFraction
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
return {
|
|
160
|
-
get layout() {
|
|
161
|
-
return layout;
|
|
162
|
-
},
|
|
163
|
-
get valueBaseline() {
|
|
164
|
-
return valueBaseline;
|
|
165
|
-
},
|
|
166
|
-
get estimatedBandwidth() {
|
|
167
|
-
return estimatedBandwidth;
|
|
168
|
-
},
|
|
169
|
-
get seriesCount() {
|
|
170
|
-
return seriesCount;
|
|
171
|
-
},
|
|
172
|
-
get seriesStep() {
|
|
173
|
-
return seriesStep;
|
|
174
|
-
},
|
|
175
|
-
get seriesGap() {
|
|
176
|
-
return seriesGap;
|
|
177
|
-
},
|
|
178
|
-
stackedBaseline,
|
|
179
|
-
groupOffset,
|
|
180
|
-
groupInsetFraction
|
|
181
|
-
};
|
|
182
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { MarkerConfig } from '../../types/markers/all';
|
|
2
|
-
import type { GeoMarkersConfig } from '../../types/markers/geo';
|
|
3
|
-
import type { GeoSegmentStyle } from '../../types/plots/segments/common';
|
|
4
|
-
/** One resolved-style bucket of features, as grouped by `GeoPlot`'s own `styleGroups`. */
|
|
5
|
-
export type GeoStyleGroup<TRow> = {
|
|
6
|
-
style: GeoSegmentStyle;
|
|
7
|
-
data: TRow[];
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Every marker for one `GeoPlot` render, in final draw order: any authored
|
|
11
|
-
* marker with `behind: true`, then the base map itself (one `'geo'` marker
|
|
12
|
-
* per resolved feature style), then the rest of the authored markers in
|
|
13
|
-
* order, with any `hover` marker moved last.
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildGeoMarkers<TRow extends Record<string, unknown> & {
|
|
16
|
-
__id: string;
|
|
17
|
-
}>(args: {
|
|
18
|
-
styleGroups: GeoStyleGroup<TRow>[];
|
|
19
|
-
resolveBaseFill: (d: TRow) => string;
|
|
20
|
-
fillOpacity?: number;
|
|
21
|
-
stroke?: string;
|
|
22
|
-
strokeWidth?: number;
|
|
23
|
-
axisColor: string;
|
|
24
|
-
onFeatureClick?: (d: TRow, e: Event) => void;
|
|
25
|
-
markers: GeoMarkersConfig[];
|
|
26
|
-
hoverActive: boolean;
|
|
27
|
-
hoverPointById: Map<string, {
|
|
28
|
-
row: TRow;
|
|
29
|
-
}>;
|
|
30
|
-
isOverInset: (e: PointerEvent) => boolean;
|
|
31
|
-
setHoverMatch: (rows: TRow[]) => void;
|
|
32
|
-
clearHoverMatch: () => void;
|
|
33
|
-
}): MarkerConfig[];
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `graticule`/`sphere`/`contour` opt into drawing underneath the base map's
|
|
3
|
-
* own fill/stroke instead of on top of it — see each config's own `behind`
|
|
4
|
-
* doc comment.
|
|
5
|
-
*/
|
|
6
|
-
function isBehindMarker(marker) {
|
|
7
|
-
return ((marker.type === 'graticule' || marker.type === 'sphere' || marker.type === 'contour') &&
|
|
8
|
-
marker.behind === true);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Every marker for one `GeoPlot` render, in final draw order: any authored
|
|
12
|
-
* marker with `behind: true`, then the base map itself (one `'geo'` marker
|
|
13
|
-
* per resolved feature style), then the rest of the authored markers in
|
|
14
|
-
* order, with any `hover` marker moved last.
|
|
15
|
-
*/
|
|
16
|
-
export function buildGeoMarkers(args) {
|
|
17
|
-
const { styleGroups, resolveBaseFill, fillOpacity, stroke, strokeWidth, axisColor, onFeatureClick, markers, hoverActive, hoverPointById, isOverInset, setHoverMatch, clearHoverMatch, } = args;
|
|
18
|
-
const featureMarkers = styleGroups.map((group) => ({
|
|
19
|
-
type: 'geo',
|
|
20
|
-
data: group.data,
|
|
21
|
-
fill: (d) => group.style.fill ?? resolveBaseFill(d),
|
|
22
|
-
fillOpacity: group.style.fillOpacity ?? fillOpacity ?? 1,
|
|
23
|
-
stroke: group.style.stroke ?? stroke ?? axisColor,
|
|
24
|
-
strokeWidth: group.style.strokeWidth ?? strokeWidth ?? 0.5,
|
|
25
|
-
onclick: onFeatureClick ? (e, d) => onFeatureClick(d, e) : undefined,
|
|
26
|
-
onpointerenter: hoverActive
|
|
27
|
-
? (e, d) => {
|
|
28
|
-
if (isOverInset(e))
|
|
29
|
-
return;
|
|
30
|
-
const hp = hoverPointById.get(d.__id);
|
|
31
|
-
if (hp)
|
|
32
|
-
setHoverMatch([hp.row]);
|
|
33
|
-
}
|
|
34
|
-
: undefined,
|
|
35
|
-
onpointerleave: hoverActive
|
|
36
|
-
? (e) => {
|
|
37
|
-
if (isOverInset(e))
|
|
38
|
-
return;
|
|
39
|
-
clearHoverMatch();
|
|
40
|
-
}
|
|
41
|
-
: undefined,
|
|
42
|
-
}));
|
|
43
|
-
const behindMarkers = markers.filter(isBehindMarker);
|
|
44
|
-
const frontMarkers = markers.filter((m) => !isBehindMarker(m) && m.type !== 'geo-hover');
|
|
45
|
-
const hoverMarker = markers.find((m) => m.type === 'geo-hover');
|
|
46
|
-
return [...behindMarkers, ...featureMarkers, ...frontMarkers, ...(hoverMarker ? [hoverMarker] : [])];
|
|
47
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="TData extends Record<string, unknown>">
|
|
2
|
-
import { Text } from 'svelteplot';
|
|
3
|
-
import type { AxisValue } from '../../types/layout/scales';
|
|
4
|
-
import type { ValuesStyle } from '../../types/layout/styles';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Renders every cell's value label in one mark — heatmaps have no
|
|
8
|
-
* per-series concept to loop over, so unlike bar/line/pyramid this covers
|
|
9
|
-
* the whole flat dataset at once. Centered by default, overridable
|
|
10
|
-
* per-field via `styles.values.fontStyle`.
|
|
11
|
-
*/
|
|
12
|
-
let {
|
|
13
|
-
data,
|
|
14
|
-
getX,
|
|
15
|
-
getY,
|
|
16
|
-
getZ,
|
|
17
|
-
formatValue,
|
|
18
|
-
values,
|
|
19
|
-
defaultColor,
|
|
20
|
-
}: {
|
|
21
|
-
data: TData[];
|
|
22
|
-
getX: (d: TData) => AxisValue;
|
|
23
|
-
getY: (d: TData) => AxisValue;
|
|
24
|
-
getZ: (d: TData) => unknown;
|
|
25
|
-
formatValue: (value: number, seriesName: string) => string;
|
|
26
|
-
values: ValuesStyle | undefined;
|
|
27
|
-
defaultColor: string;
|
|
28
|
-
} = $props();
|
|
29
|
-
|
|
30
|
-
const font = $derived(values?.fontStyle);
|
|
31
|
-
// 'outside' is a per-point escape hatch resolved by HoverMarker; heatmaps
|
|
32
|
-
// have no signed axis to resolve it against, so treat it as unset.
|
|
33
|
-
const resolvedTextAnchor = $derived(font?.textAnchor === 'outside' ? undefined : font?.textAnchor);
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<Text
|
|
37
|
-
{data}
|
|
38
|
-
x={getX}
|
|
39
|
-
y={getY}
|
|
40
|
-
text={(d: TData) => formatValue(Number(getZ(d)), '')}
|
|
41
|
-
fill={font?.fill ?? defaultColor}
|
|
42
|
-
fontSize={font?.fontSize ?? 12}
|
|
43
|
-
fontWeight={font?.fontWeight ?? 600}
|
|
44
|
-
fontStyle={font?.fontStyle}
|
|
45
|
-
textAnchor={resolvedTextAnchor ?? 'middle'}
|
|
46
|
-
lineAnchor={font?.lineAnchor ?? 'middle'}
|
|
47
|
-
dx={font?.dx ?? 0}
|
|
48
|
-
dy={font?.dy ?? 0}
|
|
49
|
-
lineHeight={font?.lineHeight}
|
|
50
|
-
rotate={font?.rotate}
|
|
51
|
-
stroke={font?.stroke}
|
|
52
|
-
strokeWidth={font?.strokeWidth}
|
|
53
|
-
paintOrder={font?.paintOrder}
|
|
54
|
-
class={font?.class}
|
|
55
|
-
textClass={font?.textClass}
|
|
56
|
-
/>
|