@fundar/data-chart-telling 0.0.64 → 1.1.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 +38 -0
- package/LICENSE +21 -0
- package/README.md +112 -553
- package/dist/configuration/config.svelte.d.ts +5 -5
- package/dist/configuration/config.svelte.js +142 -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 +545 -80
- package/dist/configuration/themes/index.js +6 -5
- package/dist/index.d.ts +35 -48
- package/dist/index.js +20 -35
- package/dist/layout/base/BasePlotLayout.svelte +325 -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 +34 -0
- package/dist/layout/hover/HoverSettings.js +52 -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 +363 -351
- 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 +32 -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 +84 -0
- package/dist/layout/legend/LegendState.svelte.js +333 -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 +287 -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 +131 -0
- package/dist/layout/plot/PublicPlotContext.js +240 -0
- package/dist/layout/plot/Slice.d.ts +44 -0
- package/dist/layout/plot/Slice.js +100 -0
- package/dist/layout/plot/usePlot.d.ts +9 -0
- package/dist/layout/plot/usePlot.js +13 -0
- package/dist/layout/scales/EdgeTicks.d.ts +39 -0
- package/dist/layout/scales/EdgeTicks.js +82 -0
- package/dist/layout/scales/NiceTicks.d.ts +40 -0
- package/dist/layout/scales/NiceTicks.js +72 -0
- package/dist/layout/scales/ScalesLayout.svelte +275 -206
- package/dist/layout/scales/ScalesLayout.svelte.d.ts +7 -1
- package/dist/layout/scales/SveltePlotScale.d.ts +15 -0
- package/dist/layout/scales/SveltePlotScale.js +79 -0
- 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 +238 -0
- package/dist/layout/timeline/Timeline.svelte +83 -74
- package/dist/layout/timeline/Timeline.svelte.d.ts +2 -0
- package/dist/layout/timeline/TimelineFrame.svelte +86 -0
- package/dist/layout/timeline/TimelineFrame.svelte.d.ts +16 -0
- package/dist/layout/timeline/TimelineLayout.svelte +140 -169
- package/dist/layout/timeline/TimelineLayout.svelte.d.ts +7 -3
- package/dist/layout/timeline/TimelinePlayer.svelte +195 -0
- package/dist/layout/timeline/TimelinePlayer.svelte.d.ts +7 -0
- package/dist/layout/timeline/TimelineRule.svelte +51 -0
- package/dist/layout/timeline/TimelineRule.svelte.d.ts +7 -0
- package/dist/layout/timeline/TimelineState.svelte.d.ts +90 -0
- package/dist/layout/timeline/TimelineState.svelte.js +260 -0
- package/dist/layout/timeline/TimelineSteps.d.ts +24 -0
- package/dist/layout/timeline/TimelineSteps.js +48 -0
- package/dist/layout/timeline/TimelineTime.d.ts +18 -0
- package/dist/layout/timeline/TimelineTime.js +117 -0
- package/dist/layout/tooltip/Tooltip.svelte +85 -85
- package/dist/layout/tooltip/Tooltip.svelte.d.ts +45 -24
- package/dist/layout/tooltip/TooltipState.svelte.d.ts +67 -0
- package/dist/layout/tooltip/TooltipState.svelte.js +126 -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 +96 -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 +227 -0
- package/dist/phases/data/DataPhase.d.ts +19 -0
- package/dist/phases/data/DataPhase.js +85 -0
- package/dist/phases/data/PlotAxes.d.ts +75 -0
- package/dist/phases/data/PlotAxes.js +151 -0
- package/dist/phases/facet/FacetPanels.d.ts +54 -0
- package/dist/phases/facet/FacetPanels.js +95 -0
- package/dist/phases/facet/FacetPhase.d.ts +11 -0
- package/dist/phases/facet/FacetPhase.js +28 -0
- package/dist/phases/hover/HoverPhase.d.ts +36 -0
- package/dist/phases/hover/HoverPhase.js +109 -0
- package/dist/phases/mapping/MappingPhase.d.ts +17 -0
- package/dist/phases/mapping/MappingPhase.js +40 -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 +29 -0
- package/dist/phases/scales/ScalesPhase.js +153 -0
- package/dist/phases/sharedScales/SharedScalesPhase.d.ts +58 -0
- package/dist/phases/sharedScales/SharedScalesPhase.js +171 -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 +67 -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 +14 -0
- package/dist/phases/tooltip/TooltipPhase.js +17 -0
- package/dist/phases/transforms/ProcessedPositions.d.ts +30 -0
- package/dist/phases/transforms/ProcessedPositions.js +74 -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 +27 -0
- package/dist/phases/transforms/TransformsPhase.js +205 -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 +39 -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 +88 -0
- package/dist/plots/bar/markers.d.ts +45 -0
- package/dist/plots/bar/markers.js +233 -0
- package/dist/plots/box/BoxSummaries.d.ts +19 -0
- package/dist/plots/box/BoxSummaries.js +101 -0
- package/dist/plots/box/Plot.svelte +42 -0
- package/dist/plots/box/Plot.svelte.d.ts +26 -0
- package/dist/plots/box/defaults.d.ts +12 -0
- package/dist/plots/box/defaults.js +34 -0
- package/dist/plots/box/markers.d.ts +12 -0
- package/dist/plots/box/markers.js +34 -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 +75 -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 +59 -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 +142 -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 +199 -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 +87 -0
- package/dist/plots/pyramid/markers.d.ts +21 -0
- package/dist/plots/pyramid/markers.js +156 -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 +80 -0
- package/dist/plots/scatter/markers.d.ts +19 -0
- package/dist/plots/scatter/markers.js +129 -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 +174 -27
- package/dist/types/layout/box.d.ts +24 -0
- package/dist/types/layout/composer.d.ts +39 -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 +256 -55
- 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 +108 -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 +62 -6
- 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 +40 -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 +76 -0
- package/dist/types/phases/state.js +1 -0
- package/dist/types/phases/statistics/phase.d.ts +43 -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 +50 -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/box/props.d.ts +10 -0
- package/dist/types/plots/box/props.js +1 -0
- package/dist/types/plots/box/state.d.ts +23 -0
- package/dist/types/plots/box/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 +145 -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 +99 -0
- package/docs/composer.md +69 -0
- package/docs/concepts.md +99 -0
- package/docs/development.md +103 -0
- package/docs/facets.md +123 -0
- package/docs/geo.md +151 -0
- package/docs/getting-started.md +78 -0
- package/docs/legend.md +153 -0
- package/docs/markers.md +117 -0
- package/docs/plots.md +284 -0
- package/docs/scales.md +95 -0
- package/docs/state.md +71 -0
- package/docs/styles-and-segments.md +269 -0
- package/docs/theming.md +226 -0
- package/docs/timeline.md +128 -0
- package/docs/tooltip-and-hover.md +128 -0
- package/docs/transforms-and-statistics.md +118 -0
- package/examples/BarValues.svelte +14 -0
- package/examples/Box.svelte +7 -0
- package/examples/Chrome.svelte +17 -0
- package/examples/ChromeOrder.svelte +18 -0
- package/examples/Composer.svelte +23 -0
- package/examples/CustomTooltip.svelte +44 -0
- package/examples/Facets.svelte +15 -0
- package/examples/FacetsCarousel.svelte +14 -0
- package/examples/FacetsRowsCols.svelte +23 -0
- package/examples/FirstPlot.svelte +7 -0
- package/examples/Gaps.svelte +21 -0
- package/examples/GroupedBars.svelte +15 -0
- package/examples/Heatmap.svelte +7 -0
- package/examples/HeatmapSegments.svelte +26 -0
- package/examples/Histogram.svelte +14 -0
- package/examples/HorizontalBars.svelte +15 -0
- package/examples/LegendReader.svelte +8 -0
- package/examples/LegendSections.svelte +27 -0
- package/examples/LegendToggle.svelte +25 -0
- package/examples/LineByRegion.svelte +18 -0
- package/examples/LineDates.svelte +15 -0
- package/examples/Markers.svelte +27 -0
- package/examples/MovingAverage.svelte +15 -0
- package/examples/Pyramid.svelte +7 -0
- package/examples/Regression.svelte +14 -0
- package/examples/ResponsiveLine.svelte +37 -0
- package/examples/Scales.svelte +26 -0
- package/examples/Scatter.svelte +16 -0
- package/examples/SegmentHighlight.svelte +22 -0
- package/examples/Segments.svelte +25 -0
- package/examples/SegmentsBySeries.svelte +25 -0
- package/examples/StackedArea.svelte +16 -0
- package/examples/StackedBars.svelte +15 -0
- package/examples/TimelinePlayer.svelte +21 -0
- package/examples/TimelineRule.svelte +19 -0
- package/examples/Tooltip.svelte +19 -0
- package/examples/TooltipCard.svelte +86 -0
- package/examples/ValueLabels.svelte +21 -0
- package/examples/data.ts +324 -0
- package/llms-full.txt +142 -0
- package/llms.txt +77 -0
- package/package.json +42 -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/scales/buildScale.d.ts +0 -25
- package/dist/layout/scales/buildScale.js +0 -90
- package/dist/layout/scales/niceDomain.d.ts +0 -23
- package/dist/layout/scales/niceDomain.js +0 -59
- 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
package/examples/data.ts
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
// Small real datasets shared by the examples and the documentation figures.
|
|
2
|
+
// Each section names its source; values are rounded to one decimal.
|
|
3
|
+
|
|
4
|
+
// ── Monthly inflation by region ─────────────────────────────────────────────
|
|
5
|
+
// INDEC, consumer price index (IPC, base December 2016), via the datos.gob.ar
|
|
6
|
+
// series API. Change from the previous month, in percent, January 2023 to
|
|
7
|
+
// August 2026.
|
|
8
|
+
|
|
9
|
+
export type RegionRow = { date: Date; region: string; value: number };
|
|
10
|
+
|
|
11
|
+
export const MONTHS = Array.from(
|
|
12
|
+
{ length: 44 },
|
|
13
|
+
(_, monthIndex) => new Date(Date.UTC(2023, monthIndex, 1))
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const INFLATION_BY_REGION = [
|
|
17
|
+
{
|
|
18
|
+
region: 'GBA',
|
|
19
|
+
inflation: [
|
|
20
|
+
6, 6.7, 7.8, 8.6, 8, 5.8, 6.2, 12.3, 12.2, 8.6, 12.9, 25.1, 19.6, 15, 11.5, 9.2, 4.3, 4.4, 4,
|
|
21
|
+
4.1, 3.7, 2.8, 2.6, 2.9, 2, 2.2, 3.9, 2.8, 1.5, 2, 1.9, 1.9, 2.1, 2.4, 2.5, 2.8, 2.8, 2.6,
|
|
22
|
+
3.4, 2.8, 2.3, 1.9, 2.3, 1.6
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
region: 'Cuyo',
|
|
27
|
+
inflation: [
|
|
28
|
+
6.4, 6.7, 7.9, 7.2, 7.5, 5.3, 6.3, 12.3, 13.7, 7.4, 12.8, 25.8, 22.3, 13.5, 9.3, 8.1, 4.3,
|
|
29
|
+
5.1, 4.6, 4.5, 3, 2.2, 2.1, 2.3, 2, 2.7, 3.5, 2.9, 1.6, 1, 1.9, 2.1, 2.2, 2.3, 2.8, 3, 3, 3.4,
|
|
30
|
+
3.2, 2.1, 2.1, 1.6, 1.9, 1.7
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
region: 'Northwest',
|
|
35
|
+
inflation: [
|
|
36
|
+
6.3, 7.3, 7.3, 7.7, 8, 6.6, 6.1, 13.7, 13.2, 7.7, 11.8, 25.2, 21.7, 11.7, 8.8, 9.1, 4.2, 4.8,
|
|
37
|
+
3.6, 5, 3.4, 2.6, 1.9, 2.7, 2.6, 2.6, 4.3, 2.9, 1.2, 1.2, 1.7, 2, 2.2, 2.1, 2.3, 2.6, 2.8,
|
|
38
|
+
3.5, 4, 2.5, 2.1, 1.7, 2, 1.8
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
export const REGIONS = INFLATION_BY_REGION.map(({ region }) => region);
|
|
44
|
+
|
|
45
|
+
export const REGION_VALUES: RegionRow[] = INFLATION_BY_REGION.flatMap(({ region, inflation }) =>
|
|
46
|
+
MONTHS.map((date, monthIndex) => ({ date, region, value: inflation[monthIndex] }))
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
// ── International commodity prices ──────────────────────────────────────────
|
|
50
|
+
// IMF, Primary Commodity Prices (PCPS), via DBnomics. Monthly, 2021-2024, as
|
|
51
|
+
// an index with January 2021 = 100 so every commodity shares one axis.
|
|
52
|
+
|
|
53
|
+
export type PriceRow = { date: Date; commodity: string; index: number };
|
|
54
|
+
|
|
55
|
+
const PRICE_INDEX_BY_COMMODITY = [
|
|
56
|
+
{
|
|
57
|
+
commodity: 'Brent oil',
|
|
58
|
+
index: [
|
|
59
|
+
100, 113, 119, 119, 124, 133, 135, 128, 135, 152, 146, 135, 155, 171, 204, 192, 203, 213, 191,
|
|
60
|
+
177, 164, 170, 165, 148, 152, 151, 144, 151, 137, 136, 145, 154, 168, 161, 149, 140, 143, 148,
|
|
61
|
+
154, 161, 150, 150, 152, 143, 132, 136, 133, 133
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
commodity: 'Natural gas',
|
|
66
|
+
index: [
|
|
67
|
+
100, 110, 99, 101, 112, 124, 144, 152, 192, 210, 193, 146, 160, 169, 188, 255, 308, 286, 268,
|
|
68
|
+
331, 296, 230, 245, 217, 131, 92, 91, 83, 87, 94, 100, 100, 102, 120, 115, 96, 103, 68, 66,
|
|
69
|
+
67, 91, 106, 84, 79, 91, 97, 113, 130
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
commodity: 'Coal',
|
|
74
|
+
index: [
|
|
75
|
+
100, 102, 105, 108, 115, 145, 168, 191, 207, 265, 195, 199, 255, 299, 388, 368, 460, 470, 477,
|
|
76
|
+
492, 514, 469, 405, 470, 445, 268, 215, 221, 197, 152, 155, 168, 185, 166, 145, 164, 155, 141,
|
|
77
|
+
151, 151, 163, 158, 156, 167, 163, 168, 165, 154
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
commodity: 'Wheat',
|
|
82
|
+
index: [
|
|
83
|
+
100, 101, 97, 101, 117, 100, 102, 116, 113, 124, 133, 136, 137, 146, 163, 171, 187, 167, 135,
|
|
84
|
+
136, 146, 149, 145, 136, 135, 140, 130, 131, 126, 119, 117, 101, 96, 91, 91, 97, 95, 92, 89,
|
|
85
|
+
88, 96, 86, 77, 74, 79, 83, 78, 78
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
export const PRICES: PriceRow[] = PRICE_INDEX_BY_COMMODITY.flatMap(({ commodity, index }) =>
|
|
91
|
+
index.map((value, monthIndex) => ({
|
|
92
|
+
date: new Date(Date.UTC(2021, monthIndex, 1)),
|
|
93
|
+
commodity,
|
|
94
|
+
index: value
|
|
95
|
+
}))
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
// ── Life expectancy at birth in Argentina, by sex ───────────────────────────
|
|
99
|
+
// INDEC, life tables. Each year stands for the period around it (1947 is
|
|
100
|
+
// 1946-1948, 2001 is 2000-2001, ...).
|
|
101
|
+
|
|
102
|
+
export type LifeRow = { year: number; sex: string; value: number | null };
|
|
103
|
+
|
|
104
|
+
const LIFE_EXPECTANCY = [
|
|
105
|
+
{ year: 1947, female: 61.4, male: 56.9 },
|
|
106
|
+
{ year: 1965, female: 69.5, male: 63.3 },
|
|
107
|
+
{ year: 1972, female: 70.8, male: 64.1 },
|
|
108
|
+
{ year: 1980, female: 72.7, male: 65.5 },
|
|
109
|
+
{ year: 1991, female: 75.6, male: 68.4 },
|
|
110
|
+
{ year: 2001, female: 77.5, male: 70 },
|
|
111
|
+
{ year: 2009, female: 78.8, male: 72.1 },
|
|
112
|
+
{ year: 2019, female: 80.2, male: 74.4 }
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
export const LIFE: LifeRow[] = LIFE_EXPECTANCY.flatMap(({ year, female, male }) => [
|
|
116
|
+
{ year, sex: 'female', value: female },
|
|
117
|
+
{ year, sex: 'male', value: male }
|
|
118
|
+
]);
|
|
119
|
+
|
|
120
|
+
/** The female series with holes: the first year, one in the middle and the last. */
|
|
121
|
+
export const LIFE_GAPS: LifeRow[] = LIFE.filter((row) => row.sex === 'female').map((row) =>
|
|
122
|
+
[1947, 1980, 2019].includes(row.year) ? { ...row, value: null } : row
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
// ── Life expectancy at birth by province, 2019 ──────────────────────────────
|
|
126
|
+
// Same source as above.
|
|
127
|
+
|
|
128
|
+
export type ProvinceRow = { province: string; sex: string; value: number };
|
|
129
|
+
|
|
130
|
+
const LIFE_EXPECTANCY_BY_PROVINCE = [
|
|
131
|
+
{ province: 'Buenos Aires', female: 79.9, male: 74.1 },
|
|
132
|
+
{ province: 'Córdoba', female: 80.8, male: 75.2 },
|
|
133
|
+
{ province: 'Mendoza', female: 81, male: 75.3 },
|
|
134
|
+
{ province: 'Salta', female: 79.5, male: 74 },
|
|
135
|
+
{ province: 'Chubut', female: 82.1, male: 74.9 }
|
|
136
|
+
];
|
|
137
|
+
|
|
138
|
+
export const PROVINCES = LIFE_EXPECTANCY_BY_PROVINCE.map(({ province }) => province);
|
|
139
|
+
|
|
140
|
+
export const PROVINCE_VALUES: ProvinceRow[] = LIFE_EXPECTANCY_BY_PROVINCE.flatMap(
|
|
141
|
+
({ province, female, male }) => [
|
|
142
|
+
{ province, sex: 'female', value: female },
|
|
143
|
+
{ province, sex: 'male', value: male }
|
|
144
|
+
]
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
// ── Population of Buenos Aires City by age and sex ──────────────────────────
|
|
148
|
+
// National censuses 1991-2022. Share of the city's population, in percent.
|
|
149
|
+
|
|
150
|
+
/** The 2022 census: one row per age group and sex, for a pyramid. */
|
|
151
|
+
export type AgeRow = { ageGroup: string; sex: string; share: number };
|
|
152
|
+
|
|
153
|
+
const POPULATION_BY_AGE = [
|
|
154
|
+
{ ageGroup: '0-4', female: 2.3, male: 2.4 },
|
|
155
|
+
{ ageGroup: '5-9', female: 3.1, male: 3.2 },
|
|
156
|
+
{ ageGroup: '10-14', female: 3.1, male: 3.2 },
|
|
157
|
+
{ ageGroup: '15-19', female: 3, male: 3.1 },
|
|
158
|
+
{ ageGroup: '20-24', female: 3.5, male: 3.3 },
|
|
159
|
+
{ ageGroup: '25-29', female: 4, male: 3.7 },
|
|
160
|
+
{ ageGroup: '30-34', female: 3.8, male: 3.6 },
|
|
161
|
+
{ ageGroup: '35-39', female: 3.7, male: 3.5 },
|
|
162
|
+
{ ageGroup: '40-44', female: 3.4, male: 3.1 },
|
|
163
|
+
{ ageGroup: '45-49', female: 3.3, male: 2.8 },
|
|
164
|
+
{ ageGroup: '50-54', female: 3.1, male: 2.5 },
|
|
165
|
+
{ ageGroup: '55-59', female: 2.9, male: 2.4 },
|
|
166
|
+
{ ageGroup: '60-64', female: 2.8, male: 2.2 },
|
|
167
|
+
{ ageGroup: '65-69', female: 2.6, male: 2 },
|
|
168
|
+
{ ageGroup: '70-74', female: 2.6, male: 1.8 },
|
|
169
|
+
{ ageGroup: '75-79', female: 2.3, male: 1.4 },
|
|
170
|
+
{ ageGroup: '80-84', female: 1.8, male: 0.9 },
|
|
171
|
+
{ ageGroup: '85+', female: 2.5, male: 0.9 }
|
|
172
|
+
];
|
|
173
|
+
|
|
174
|
+
export const AGE_GROUPS = POPULATION_BY_AGE.map(({ ageGroup }) => ageGroup);
|
|
175
|
+
|
|
176
|
+
export const AGES: AgeRow[] = POPULATION_BY_AGE.flatMap(({ ageGroup, female, male }) => [
|
|
177
|
+
{ ageGroup, sex: 'Female', share: female },
|
|
178
|
+
{ ageGroup, sex: 'Male', share: male }
|
|
179
|
+
]);
|
|
180
|
+
|
|
181
|
+
/** The same census data over the years, grouped by sex: the share of each broad age group. */
|
|
182
|
+
export type AgeShareRow = { year: number; ageGroup: string; share: number };
|
|
183
|
+
|
|
184
|
+
export const AGE_SHARES: AgeShareRow[] = [
|
|
185
|
+
{ year: 1991, ageGroup: '0-14', share: 19 },
|
|
186
|
+
{ year: 1991, ageGroup: '15-29', share: 21.7 },
|
|
187
|
+
{ year: 1991, ageGroup: '30-44', share: 20.1 },
|
|
188
|
+
{ year: 1991, ageGroup: '45-64', share: 22.8 },
|
|
189
|
+
{ year: 1991, ageGroup: '65+', share: 16.5 },
|
|
190
|
+
{ year: 2001, ageGroup: '0-14', share: 16.9 },
|
|
191
|
+
{ year: 2001, ageGroup: '15-29', share: 23.2 },
|
|
192
|
+
{ year: 2001, ageGroup: '30-44', share: 19.9 },
|
|
193
|
+
{ year: 2001, ageGroup: '45-64', share: 22.3 },
|
|
194
|
+
{ year: 2001, ageGroup: '65+', share: 17.2 },
|
|
195
|
+
{ year: 2010, ageGroup: '0-14', share: 16.4 },
|
|
196
|
+
{ year: 2010, ageGroup: '15-29', share: 22.4 },
|
|
197
|
+
{ year: 2010, ageGroup: '30-44', share: 22.2 },
|
|
198
|
+
{ year: 2010, ageGroup: '45-64', share: 22.9 },
|
|
199
|
+
{ year: 2010, ageGroup: '65+', share: 16.3 },
|
|
200
|
+
{ year: 2022, ageGroup: '0-14', share: 17.4 },
|
|
201
|
+
{ year: 2022, ageGroup: '15-29', share: 20.7 },
|
|
202
|
+
{ year: 2022, ageGroup: '30-44', share: 21.1 },
|
|
203
|
+
{ year: 2022, ageGroup: '45-64', share: 22 },
|
|
204
|
+
{ year: 2022, ageGroup: '65+', share: 18.9 }
|
|
205
|
+
];
|
|
206
|
+
|
|
207
|
+
/** The same census data over the years, grouped by age: the share of each sex. */
|
|
208
|
+
export type SexShareRow = { year: number; sex: string; share: number };
|
|
209
|
+
|
|
210
|
+
export const SEX_SHARES: SexShareRow[] = [
|
|
211
|
+
{ year: 1991, sex: 'Female', share: 54.6 },
|
|
212
|
+
{ year: 1991, sex: 'Male', share: 45.5 },
|
|
213
|
+
{ year: 2001, sex: 'Female', share: 54.2 },
|
|
214
|
+
{ year: 2001, sex: 'Male', share: 45.3 },
|
|
215
|
+
{ year: 2010, sex: 'Female', share: 54.2 },
|
|
216
|
+
{ year: 2010, sex: 'Male', share: 46 },
|
|
217
|
+
{ year: 2022, sex: 'Female', share: 53.8 },
|
|
218
|
+
{ year: 2022, sex: 'Male', share: 46.2 }
|
|
219
|
+
];
|
|
220
|
+
|
|
221
|
+
// ── Countries, 2007 ─────────────────────────────────────────────────────────
|
|
222
|
+
// Gapminder, via plotly/datasets. GDP per capita in US dollars (PPP, 2005
|
|
223
|
+
// prices), life expectancy in years, population in millions. `income` groups
|
|
224
|
+
// the countries by GDP per capita.
|
|
225
|
+
|
|
226
|
+
export type CountryRow = {
|
|
227
|
+
country: string;
|
|
228
|
+
gdp: number;
|
|
229
|
+
life: number;
|
|
230
|
+
population: number;
|
|
231
|
+
continent: string;
|
|
232
|
+
income: string;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const COUNTRY_INDICATORS = [
|
|
236
|
+
{ country: 'Nigeria', continent: 'Africa', gdp: 2014, life: 46.9, population: 135 },
|
|
237
|
+
{ country: 'Egypt', continent: 'Africa', gdp: 5581, life: 71.3, population: 80.3 },
|
|
238
|
+
{ country: 'South Africa', continent: 'Africa', gdp: 9270, life: 49.3, population: 44 },
|
|
239
|
+
{ country: 'Ethiopia', continent: 'Africa', gdp: 691, life: 52.9, population: 76.5 },
|
|
240
|
+
{ country: 'Kenya', continent: 'Africa', gdp: 1463, life: 54.1, population: 35.6 },
|
|
241
|
+
{ country: 'Morocco', continent: 'Africa', gdp: 3820, life: 71.2, population: 33.8 },
|
|
242
|
+
{ country: 'Ghana', continent: 'Africa', gdp: 1328, life: 60, population: 22.9 },
|
|
243
|
+
{ country: 'Argentina', continent: 'Americas', gdp: 12779, life: 75.3, population: 40.3 },
|
|
244
|
+
{ country: 'Brazil', continent: 'Americas', gdp: 9066, life: 72.4, population: 190 },
|
|
245
|
+
{ country: 'Chile', continent: 'Americas', gdp: 13172, life: 78.6, population: 16.3 },
|
|
246
|
+
{ country: 'Mexico', continent: 'Americas', gdp: 11978, life: 76.2, population: 108.7 },
|
|
247
|
+
{ country: 'United States', continent: 'Americas', gdp: 42952, life: 78.2, population: 301.1 },
|
|
248
|
+
{ country: 'Canada', continent: 'Americas', gdp: 36319, life: 80.7, population: 33.4 },
|
|
249
|
+
{ country: 'Bolivia', continent: 'Americas', gdp: 3822, life: 65.6, population: 9.1 },
|
|
250
|
+
{ country: 'China', continent: 'Asia', gdp: 4959, life: 73, population: 1318.7 },
|
|
251
|
+
{ country: 'India', continent: 'Asia', gdp: 2452, life: 64.7, population: 1110.4 },
|
|
252
|
+
{ country: 'Japan', continent: 'Asia', gdp: 31656, life: 82.6, population: 127.5 },
|
|
253
|
+
{ country: 'Indonesia', continent: 'Asia', gdp: 3541, life: 70.7, population: 223.5 },
|
|
254
|
+
{ country: 'Vietnam', continent: 'Asia', gdp: 2442, life: 74.2, population: 85.3 },
|
|
255
|
+
{ country: 'Pakistan', continent: 'Asia', gdp: 2606, life: 65.5, population: 169.3 },
|
|
256
|
+
{ country: 'South Korea', continent: 'Asia', gdp: 23348, life: 78.6, population: 49 },
|
|
257
|
+
{ country: 'Germany', continent: 'Europe', gdp: 32170, life: 79.4, population: 82.4 },
|
|
258
|
+
{ country: 'France', continent: 'Europe', gdp: 30470, life: 80.7, population: 61.1 },
|
|
259
|
+
{ country: 'Spain', continent: 'Europe', gdp: 28821, life: 80.9, population: 40.4 },
|
|
260
|
+
{ country: 'Italy', continent: 'Europe', gdp: 28570, life: 80.5, population: 58.1 },
|
|
261
|
+
{ country: 'United Kingdom', continent: 'Europe', gdp: 33203, life: 79.4, population: 60.8 },
|
|
262
|
+
{ country: 'Poland', continent: 'Europe', gdp: 15390, life: 75.6, population: 38.5 },
|
|
263
|
+
{ country: 'Norway', continent: 'Europe', gdp: 49357, life: 80.2, population: 4.6 }
|
|
264
|
+
];
|
|
265
|
+
|
|
266
|
+
export const COUNTRIES: CountryRow[] = COUNTRY_INDICATORS.map((country) => ({
|
|
267
|
+
...country,
|
|
268
|
+
income: country.gdp >= 20000 ? 'High' : country.gdp >= 5000 ? 'Middle' : 'Low'
|
|
269
|
+
}));
|
|
270
|
+
|
|
271
|
+
// ── Households of Buenos Aires City by rooms and people, 2022 ───────────────
|
|
272
|
+
// 2022 national census. Share of all households, in percent.
|
|
273
|
+
|
|
274
|
+
export type HouseholdRow = { rooms: string; people: string; share: number };
|
|
275
|
+
|
|
276
|
+
export const ROOMS = ['1', '2', '3', '4', '5+'];
|
|
277
|
+
|
|
278
|
+
const HOUSEHOLD_SHARES = [
|
|
279
|
+
{ people: '1', byRooms: [8.8, 14.8, 9.6, 3.7, 2.1] },
|
|
280
|
+
{ people: '2', byRooms: [3, 8.4, 9.3, 4.5, 2.9] },
|
|
281
|
+
{ people: '3', byRooms: [1.2, 3.4, 5.9, 3.2, 2] },
|
|
282
|
+
{ people: '4', byRooms: [0.6, 1.8, 3.8, 3, 2] },
|
|
283
|
+
{ people: '5+', byRooms: [0.3, 1, 1.7, 1.5, 1.6] }
|
|
284
|
+
];
|
|
285
|
+
|
|
286
|
+
export const HOUSEHOLDS: HouseholdRow[] = HOUSEHOLD_SHARES.flatMap(({ people, byRooms }) =>
|
|
287
|
+
ROOMS.map((rooms, roomsIndex) => ({ rooms, people, share: byRooms[roomsIndex] }))
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
// ── Adult heights by sex ────────────────────────────────────────────────────
|
|
291
|
+
// Nancy Howell's census of the !Kung San (Howell1, from the rethinking R
|
|
292
|
+
// package), adults only. Heights in centimeters, sorted.
|
|
293
|
+
|
|
294
|
+
export type HeightRow = { height: number; group: string };
|
|
295
|
+
|
|
296
|
+
const FEMALE_HEIGHTS = [
|
|
297
|
+
137, 137, 138, 139, 140, 140, 140, 141, 142, 142, 142, 142, 142, 142, 143, 143, 143, 143, 143,
|
|
298
|
+
143, 143, 143, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, 145, 145,
|
|
299
|
+
145, 145, 145, 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, 146, 146, 146, 147, 147, 147,
|
|
300
|
+
147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, 148, 148, 148, 148,
|
|
301
|
+
148, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, 150,
|
|
302
|
+
150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 151,
|
|
303
|
+
151, 151, 151, 151, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
|
|
304
|
+
152, 152, 152, 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
|
|
305
|
+
154, 154, 154, 154, 155, 155, 155, 155, 155, 155, 155, 156, 156, 156, 156, 156, 156, 156, 156,
|
|
306
|
+
156, 156, 156, 156, 157, 157, 157, 157, 157, 158, 159, 159, 160, 162, 163, 163
|
|
307
|
+
];
|
|
308
|
+
|
|
309
|
+
const MALE_HEIGHTS = [
|
|
310
|
+
140, 142, 146, 147, 148, 149, 149, 149, 149, 151, 151, 152, 152, 152, 152, 152, 152, 152, 152,
|
|
311
|
+
153, 154, 154, 154, 155, 155, 155, 155, 155, 155, 155, 156, 156, 156, 156, 157, 157, 157, 157,
|
|
312
|
+
157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 159, 159, 159,
|
|
313
|
+
159, 159, 159, 159, 159, 159, 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
|
314
|
+
160, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,
|
|
315
|
+
161, 161, 161, 161, 161, 162, 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, 163, 163, 163,
|
|
316
|
+
163, 163, 163, 163, 163, 163, 163, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 165,
|
|
317
|
+
165, 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, 168, 168, 168, 169,
|
|
318
|
+
169, 169, 170, 170, 170, 170, 171, 171, 171, 171, 173, 173, 179
|
|
319
|
+
];
|
|
320
|
+
|
|
321
|
+
export const HEIGHTS: HeightRow[] = [
|
|
322
|
+
...FEMALE_HEIGHTS.map((height) => ({ height, group: 'female' })),
|
|
323
|
+
...MALE_HEIGHTS.map((height) => ({ height, group: 'male' }))
|
|
324
|
+
];
|
package/llms-full.txt
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# @fundar/data-chart-telling - guide for LLMs and coding agents
|
|
2
|
+
|
|
3
|
+
Svelte 5 plot components on top of svelteplot. This file is checked against the source; the runnable files in `examples/` are type-checked and mounted by the test suite, and `docs/` has one page per topic. If this text and `dist/**/*.d.ts` differ, the types are right - tell the user.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
- Peer dependencies: `svelte@^5`, `svelteplot@^0.14`; `topojson-client` only for GeoPlot with TopoJSON.
|
|
8
|
+
- The package ships Svelte components, so the app builds with `@sveltejs/vite-plugin-svelte` or SvelteKit.
|
|
9
|
+
- Import from the package root: `import { LinePlot } from '@fundar/data-chart-telling'`.
|
|
10
|
+
- Types ship with the package (`dist/index.d.ts`, JSDoc on every config field).
|
|
11
|
+
|
|
12
|
+
## The mental model
|
|
13
|
+
|
|
14
|
+
- A **plot** is one graph (axes + marks). Titles, subtitle, caption, legend, facets and a timeline are props of the plot itself.
|
|
15
|
+
- Plots: `LinePlot AreaPlot BarPlot HistogramPlot BoxPlot HeatmapPlot PyramidPlot ScatterPlot GeoPlot`.
|
|
16
|
+
- `PlotComposer` lays several plots out in one figure with shared hover, legend and timeline.
|
|
17
|
+
- `width` and `height` are pixel numbers on a standalone plot. To fill a container or the window, bind its size (`examples/ResponsiveLine.svelte`) and render the plot once both are > 0.
|
|
18
|
+
|
|
19
|
+
## Data
|
|
20
|
+
|
|
21
|
+
Two ways to give data, one per plot:
|
|
22
|
+
|
|
23
|
+
```svelte
|
|
24
|
+
<LinePlot data={rows} x="year" y="value" color="region" {width} {height} />
|
|
25
|
+
<LinePlot series={[{ name: 'North', x: 'year', y: 'value', data: rowsNorth }]} {width} {height} />
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- `x`, `y`, `color`, `grouping`, `opacity`, `symbol`, `r`, `length` take a field name or an accessor function.
|
|
29
|
+
- `grouping` splits `data` into series. When unset, `color` groups too, so the usual call is `color="region"`: one series per region, each with its own color.
|
|
30
|
+
- Dates are `Date` objects (UTC midnight avoids timezone shifts); numeric years are numbers.
|
|
31
|
+
- Rows are parsed, typed and sorted by the app before they reach the plot (a `?raw` CSV import plus a small parser is enough).
|
|
32
|
+
- A series' name is what the legend, value labels and tooltip show: name values in the data.
|
|
33
|
+
|
|
34
|
+
## Props of every x/y plot
|
|
35
|
+
|
|
36
|
+
| Prop | Purpose |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `title` `subtitle` `caption` | Text chrome. `header` / `footer` snippets replace title+subtitle / caption. |
|
|
39
|
+
| `legend` | unset/`true`: automatic legend; `false`: none; `{ series: { interactive: { enabled: true, disabled: { mode: 'omit' } } } }` adjusts a section. |
|
|
40
|
+
| `order` | Chrome blocks top to bottom, e.g. `['title','subtitle','legend','plot','caption']`; rows as `'(plot, timeline)'`; `'divider'` between blocks. |
|
|
41
|
+
| `scales` | Per channel: `{ x: { label, tickFormat, domain, type, ticks, grid, niceTolerance, edgeTicks }, y: {...}, color: { scheme, domain } }`. Stacked parts adding up to a hair past a tick (`100.2`) stay on it; `niceTolerance` (default `0.05` of a step) tunes that. A continuous x axis also ticks the data's first and last values (y too with `edgeTicks: true`); `edgeTicks: false` or `{ collision: 'drop-nice'\|'drop-edge'\|'extend' }` (global defaults: `axis.edgeTicks.x` / `.y`). |
|
|
42
|
+
| `styles` | `{ values: {...}, frame: true, gaps: {...} }` (shape depends on the kind). |
|
|
43
|
+
| `segments` | Style ranges of the data (rule 1 below). |
|
|
44
|
+
| `markers` | Extra marks, an array of `{ type: '...', ... }`. |
|
|
45
|
+
| `margins` | `{ top, right, bottom, left }`, each a number or `'auto'` (all `'auto'` by default). |
|
|
46
|
+
| `tooltip` | `true` or `{ strategy, sync, format, content, series, anchorX, anchorY }`. The text lists matched rows highest value first; a `content` snippet gets them unsorted. |
|
|
47
|
+
| `timeline` | `{ accessor: 'year' }` steps through the rows by a field, drawn as a player bar (default); `type: 'rule'` draws a rule beside the plot instead. The field may hold numbers, `Date`s or date strings (ISO, or any other with `dateFormat: 'DD/MM/YYYY'`); date steps read as dates, and reach `onvalue`, `player.format` and `useFigure().timeline` (`steps`, `value`, `seekValue`) as `Date`s. |
|
|
48
|
+
| `facet` | `{ by: 'field', columns, gap, scales: 'shared'\|'free', mode: 'grid'\|'carousel'\|'paginated' }` or `{ rows, cols }`. |
|
|
49
|
+
| `transforms` `statistics` | svelteplot transforms / derived summaries (regression, movingAverage, ...). |
|
|
50
|
+
|
|
51
|
+
Per kind: `BarPlot` x = category, y = value (swap for horizontal bars); `PyramidPlot` mirrors two series around zero; `HeatmapPlot` colors cells by `color`; `HistogramPlot` bins one numeric field; `BoxPlot` x = category, y = value, one box per category (its tooltip row is the box summary: `min`, `p25`, `median`, `p75`, `max`, `count`, `outliers`); `ScatterPlot` takes `r` (size) and `symbol`; `GeoPlot` takes GeoJSON/TopoJSON in `data` and `coordinates` for the projection (`docs/geo.md`).
|
|
52
|
+
|
|
53
|
+
## Switches
|
|
54
|
+
|
|
55
|
+
- **Hover and tooltip** are enabled by `tooltip` and/or a hover marker. The usual look: `tooltip={true} markers={[{ type: 'hover' }]}`. `tooltip.strategy` is `'x' | 'y' | 'punctual' | 'series'`.
|
|
56
|
+
- **Value labels**: `styles={{ values: { show: true } }}`. On a LinePlot they sit at the end of each series, spread apart automatically, and the right margin grows to fit them (keep `margins.right` at `'auto'`). Format with `values.format: (value, seriesName) => string`; style with `values.fontStyle`.
|
|
57
|
+
- **Toggling series from the legend**: `interactive.enabled` on the series section.
|
|
58
|
+
- **A frame** around the plot area: `styles={{ frame: true }}`.
|
|
59
|
+
|
|
60
|
+
## Rules that matter
|
|
61
|
+
|
|
62
|
+
1. `segments` is an object keyed by series name or `'default'`: `{ default: [{ areas: [{ x: { from, to } }], styles: { stroke: { strokeDasharray: '6 4' } } }] }`. A segment without `areas` is a baseline for everything; area-specific segments override it.
|
|
63
|
+
2. The global configuration holds data (`setConfiguration(...)` is cloned); functions go in plot props such as `format` and `tickFormat`.
|
|
64
|
+
3. A continuous color ramp is `scales.color.scheme: [colorA, colorB]` (or a named ramp such as `'blues'`); categorical colors come from `palette` or a `scheme` record.
|
|
65
|
+
4. `margins` at `'auto'` (the default) fit value labels and long tick text from the measured text, also when `scales.y.domain` is pinned. A fixed number sets the side exactly.
|
|
66
|
+
5. `tooltip.sync: true` in a `facet` or `PlotComposer` shows the highlight in every panel: that is how panels compare the same x.
|
|
67
|
+
6. On a BarPlot the tooltip triggers anywhere over a bar's whole band (and its series' slice, when grouped).
|
|
68
|
+
7. `r` takes raw values and its sqrt scale makes area follow the value; tune with `scales.r.range`. A literal number is a fixed pixel radius.
|
|
69
|
+
8. Narrow plots with long category or series names: shorten the text in the data, format with `tickFormat` / `values.format`, or give `margins` more room.
|
|
70
|
+
9. In Svelte 5 components, `state` is taken by the `$state` rune: name local variables otherwise.
|
|
71
|
+
10. Stacking is `transforms={[{ type: 'stackY' }]}`, also for horizontal bars (the value channel is the one stacked).
|
|
72
|
+
|
|
73
|
+
## Reading and driving plot state (custom UI)
|
|
74
|
+
|
|
75
|
+
Inside a plot's snippets (`header`, `footer`, tooltip `content`) or any child of a figure, call during component init:
|
|
76
|
+
|
|
77
|
+
- `useFigure()` returns `{ hover, legend, timeline }` for the whole figure.
|
|
78
|
+
- `usePlot()` returns the same plus `margins`, `scales`, `axes`, `data`, `width`, `height`, `svelteplot` (inside a plot, e.g. a `component` marker).
|
|
79
|
+
- `legend.off` (names of hidden series), `legend.isOff(name)`, `legend.toggle(name, action)`, `turnOff`, `turnOn`. `action` is `{ mode: 'dim' | 'hide' | 'omit' }`; `'omit'` removes the series and refits the axes, so the visible domain follows `legend.off`.
|
|
80
|
+
- `timeline.steps`, `value`, `progress`, `playing`, `seek(p)`, `seekValue(v)`, `next()`, `previous()`, `play()`, `pause()`, `toggle()`, `setSpeed()`.
|
|
81
|
+
- `hover.activeX`, `activeY`, `activeSeries`, `source`.
|
|
82
|
+
|
|
83
|
+
The timeline is a player bar by default: `timeline={{ accessor: 'year', player: { controls: ['play','value','slider','speed','loop'], format, autoplay, loop, speed, stepDuration } }}`. `type: 'rule'` draws a guide beside the plot instead, driven by `progress` (a slider or scroll position of your own).
|
|
84
|
+
|
|
85
|
+
## Markers
|
|
86
|
+
|
|
87
|
+
Add with `markers={[{ type: '...' }]}`. For x/y plots:
|
|
88
|
+
`area arrow bar bollinger box brush cell component delaunayLink delaunayMesh delta density difference dot hover hull image line raster rect regression rule text tick trail voronoi voronoiMesh waffle`.
|
|
89
|
+
GeoPlot: `graticule sphere dot text vector link contour inset geo-hover geo-component`.
|
|
90
|
+
|
|
91
|
+
- `delta` annotates the difference between two series at a position: `{ type: 'delta', axis: 'x', at: 2020, from: { type: 'series', series: 'A' }, to: { type: 'series', series: 'B' }, formatDiff: (d) => d.toFixed(1) }`.
|
|
92
|
+
- `rule` (`axis`, `value`), `text` (`text`), `dot` annotate; `component` mounts your own Svelte component inside the plot (it can call `usePlot()`).
|
|
93
|
+
- Each plot kind types its own marker union (`AxisBasedMarkersConfig`, `GeoMarkersConfig`); `satisfies` on a markers array gives completion.
|
|
94
|
+
|
|
95
|
+
## Theming and locale
|
|
96
|
+
|
|
97
|
+
- `setConfiguration(partial)` deep-merges global defaults (colors, fonts, spacing, legend, tooltip, timeline); `resetConfiguration()` restores them. Inside an `$effect`, wrap the call in `untrack`.
|
|
98
|
+
- `THEMES` has `Default Editorial Dark Compact`: `setConfiguration(THEMES.Editorial)`.
|
|
99
|
+
- Number and date text follows `axis.locale` (default `'es-AR'`) in the configuration; per axis, `tickFormat: (d) => new Intl.NumberFormat('en-US').format(d)` or an `Intl.*FormatOptions` object.
|
|
100
|
+
|
|
101
|
+
## Docs (in `docs/`)
|
|
102
|
+
|
|
103
|
+
`getting-started.md`, `concepts.md`, `plots.md`, `scales.md`, `styles-and-segments.md`, `markers.md`, `transforms-and-statistics.md`, `tooltip-and-hover.md`, `legend.md`, `timeline.md`, `chrome.md`, `facets.md`, `composer.md`, `state.md`, `geo.md`, `theming.md`.
|
|
104
|
+
|
|
105
|
+
## Examples (in `examples/`, all runnable)
|
|
106
|
+
|
|
107
|
+
- `LineByRegion.svelte` - one line per region with title, legend, end labels and tooltip.
|
|
108
|
+
- `ResponsiveLine.svelte` - fill the window, end-of-line labels, axis labels.
|
|
109
|
+
- `Tooltip.svelte` - tooltip + hover marker.
|
|
110
|
+
- `Segments.svelte` - styling a range of the data.
|
|
111
|
+
- `LegendToggle.svelte` + `LegendReader.svelte` - interactive legend and reading its state.
|
|
112
|
+
- `TimelinePlayer.svelte` - animated bar chart with a player.
|
|
113
|
+
- `TimelineRule.svelte` - a timeline rule moved by a slider through `progress`.
|
|
114
|
+
- `Facets.svelte` - small multiples with a synced tooltip.
|
|
115
|
+
- `BarValues.svelte` - value labels on bars.
|
|
116
|
+
- `CustomTooltip.svelte` + `TooltipCard.svelte` - a tooltip drawn with your own card (`tooltip.content`).
|
|
117
|
+
- `FirstPlot.svelte` - the smallest plot: rows, fields and a pixel size.
|
|
118
|
+
- `LineDates.svelte` - line per series over a date axis, with end labels.
|
|
119
|
+
- `StackedArea.svelte` - stacked area plot.
|
|
120
|
+
- `GroupedBars.svelte` - vertical bars grouped by color.
|
|
121
|
+
- `HorizontalBars.svelte` - horizontal bars.
|
|
122
|
+
- `Histogram.svelte` - overlapping histograms.
|
|
123
|
+
- `Box.svelte` - box plots per group.
|
|
124
|
+
- `Heatmap.svelte` - heatmap.
|
|
125
|
+
- `Pyramid.svelte` - population pyramid.
|
|
126
|
+
- `Scatter.svelte` - scatter plot sized, colored and shaped by channels.
|
|
127
|
+
- `Scales.svelte` - axis labels, fixed domain, gridlines and series colors.
|
|
128
|
+
- `ValueLabels.svelte` - end-of-line value labels with a custom format.
|
|
129
|
+
- `Gaps.svelte` - filling gaps of missing values.
|
|
130
|
+
- `SegmentHighlight.svelte` - highlighting a range of one series.
|
|
131
|
+
- `SegmentsBySeries.svelte` - segments per series and shared rules.
|
|
132
|
+
- `HeatmapSegments.svelte` - segments on a heatmap.
|
|
133
|
+
- `Markers.svelte` - hover, rule and delta markers.
|
|
134
|
+
- `StackedBars.svelte` - bars stacked with stackY.
|
|
135
|
+
- `MovingAverage.svelte` - moving average with windowY.
|
|
136
|
+
- `Regression.svelte` - linear regression with a confidence band.
|
|
137
|
+
- `LegendSections.svelte` - explicit legend sections.
|
|
138
|
+
- `Chrome.svelte` - title, subtitle and caption.
|
|
139
|
+
- `ChromeOrder.svelte` - ordering chrome blocks with dividers.
|
|
140
|
+
- `FacetsCarousel.svelte` - facets as a carousel.
|
|
141
|
+
- `FacetsRowsCols.svelte` - facets by rows and columns.
|
|
142
|
+
- `Composer.svelte` - several plots in one figure.
|
package/llms.txt
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @fundar/data-chart-telling
|
|
2
|
+
|
|
3
|
+
> Svelte 5 plot components (line, area, bar, histogram, box, heatmap, pyramid, scatter, geo) built on svelteplot, with titles, legends, tooltips, facets, timelines and value labels built in. Plots take pixel `width`/`height`; hover and tooltips are switched on with `tooltip` and a `hover` marker.
|
|
4
|
+
|
|
5
|
+
Start with the full guide: it lists the mental model, the props every plot shares, the switches and the rules that matter. Runnable examples are type-checked, so copy them as a starting point.
|
|
6
|
+
|
|
7
|
+
## Guide
|
|
8
|
+
|
|
9
|
+
- [Full guide](./llms-full.txt): API overview, switches, rules, state hooks (`useFigure`, `usePlot`), markers, theming
|
|
10
|
+
|
|
11
|
+
## Docs
|
|
12
|
+
|
|
13
|
+
- [Getting started](./docs/getting-started.md): install, first plot, sizing, data
|
|
14
|
+
- [Concepts](./docs/concepts.md): plots, figures, rows and series, channels, shared props
|
|
15
|
+
- [Plots](./docs/plots.md): the nine plot kinds
|
|
16
|
+
- [Scales](./docs/scales.md): axes and channel scales
|
|
17
|
+
- [Styles and segments](./docs/styles-and-segments.md): value labels, frame, gaps, ranges of data
|
|
18
|
+
- [Markers](./docs/markers.md): annotations, regions, hover highlight, custom components
|
|
19
|
+
- [Transforms and statistics](./docs/transforms-and-statistics.md): stacking, binning, smoothing, regression
|
|
20
|
+
- [Tooltip and hover](./docs/tooltip-and-hover.md): tooltip options, hover marker, sync
|
|
21
|
+
- [Legend](./docs/legend.md): automatic legend, toggling series, sections
|
|
22
|
+
- [Timeline](./docs/timeline.md): player (default) and rule
|
|
23
|
+
- [Chrome](./docs/chrome.md): title, caption, header, footer, order, dividers
|
|
24
|
+
- [Facets](./docs/facets.md): small multiples
|
|
25
|
+
- [Composer](./docs/composer.md): several plots in one figure
|
|
26
|
+
- [Reading plot state](./docs/state.md): `useFigure`, `usePlot`
|
|
27
|
+
- [Maps](./docs/geo.md): GeoPlot, projections, camera, map markers
|
|
28
|
+
- [Theming](./docs/theming.md): configuration, themes, locale, CSS variables
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
- [Line plot by region with title, legend, end labels and tooltip](./examples/LineByRegion.svelte)
|
|
33
|
+
- [Responsive line chart with end labels](./examples/ResponsiveLine.svelte)
|
|
34
|
+
- [Tooltip and hover marker](./examples/Tooltip.svelte)
|
|
35
|
+
- [Segments (styling a range of data)](./examples/Segments.svelte)
|
|
36
|
+
- [Interactive legend and reading its state](./examples/LegendToggle.svelte)
|
|
37
|
+
- [Timeline player](./examples/TimelinePlayer.svelte)
|
|
38
|
+
- [Timeline rule driven by a slider](./examples/TimelineRule.svelte)
|
|
39
|
+
- [Facets with a synced tooltip](./examples/Facets.svelte)
|
|
40
|
+
- [Bars with value labels](./examples/BarValues.svelte)
|
|
41
|
+
- [Custom tooltip card](./examples/CustomTooltip.svelte)
|
|
42
|
+
- [The smallest plot: rows, fields and a pixel size](./examples/FirstPlot.svelte)
|
|
43
|
+
- [Line per series over a date axis, with end labels](./examples/LineDates.svelte)
|
|
44
|
+
- [Stacked area plot](./examples/StackedArea.svelte)
|
|
45
|
+
- [Vertical bars grouped by color](./examples/GroupedBars.svelte)
|
|
46
|
+
- [Horizontal bars](./examples/HorizontalBars.svelte)
|
|
47
|
+
- [Overlapping histograms](./examples/Histogram.svelte)
|
|
48
|
+
- [Box plots per group](./examples/Box.svelte)
|
|
49
|
+
- [Heatmap](./examples/Heatmap.svelte)
|
|
50
|
+
- [Population pyramid](./examples/Pyramid.svelte)
|
|
51
|
+
- [Scatter plot sized, colored and shaped by channels](./examples/Scatter.svelte)
|
|
52
|
+
- [Axis labels, fixed domain, gridlines and series colors](./examples/Scales.svelte)
|
|
53
|
+
- [End-of-line value labels with a custom format](./examples/ValueLabels.svelte)
|
|
54
|
+
- [Filling gaps of missing values](./examples/Gaps.svelte)
|
|
55
|
+
- [Highlighting a range of one series](./examples/SegmentHighlight.svelte)
|
|
56
|
+
- [Segments per series and shared rules](./examples/SegmentsBySeries.svelte)
|
|
57
|
+
- [Segments on a heatmap](./examples/HeatmapSegments.svelte)
|
|
58
|
+
- [Hover, rule and delta markers](./examples/Markers.svelte)
|
|
59
|
+
- [Bars stacked with stackY](./examples/StackedBars.svelte)
|
|
60
|
+
- [Moving average with windowY](./examples/MovingAverage.svelte)
|
|
61
|
+
- [Linear regression with a confidence band](./examples/Regression.svelte)
|
|
62
|
+
- [Explicit legend sections](./examples/LegendSections.svelte)
|
|
63
|
+
- [Title, subtitle and caption](./examples/Chrome.svelte)
|
|
64
|
+
- [Ordering chrome blocks with dividers](./examples/ChromeOrder.svelte)
|
|
65
|
+
- [Facets as a carousel](./examples/FacetsCarousel.svelte)
|
|
66
|
+
- [Facets by rows and columns](./examples/FacetsRowsCols.svelte)
|
|
67
|
+
- [Several plots in one figure](./examples/Composer.svelte)
|
|
68
|
+
- [Shared example data](./examples/data.ts)
|
|
69
|
+
|
|
70
|
+
## Types
|
|
71
|
+
|
|
72
|
+
- [Public exports](./dist/index.d.ts): every config type, with JSDoc on each field
|
|
73
|
+
|
|
74
|
+
## Optional
|
|
75
|
+
|
|
76
|
+
- [README](./README.md): overview and documentation index
|
|
77
|
+
- [Package manifest](./package.json): peer dependencies (`svelte`, `svelteplot`, optional `topojson-client`)
|
package/package.json
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fundar/data-chart-telling",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Declarative charts, maps and small multiples for Svelte, built on svelteplot.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Ezequiel Puerta",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/datos-Fundar/data-chart-telling.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/datos-Fundar/data-chart-telling#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/datos-Fundar/data-chart-telling/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=20.19"
|
|
20
|
+
},
|
|
4
21
|
"type": "module",
|
|
5
22
|
"files": [
|
|
6
|
-
"
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"CHANGELOG.md",
|
|
25
|
+
"dist",
|
|
26
|
+
"docs",
|
|
27
|
+
"!docs/images",
|
|
28
|
+
"examples",
|
|
29
|
+
"llms.txt",
|
|
30
|
+
"llms-full.txt"
|
|
7
31
|
],
|
|
8
32
|
"sideEffects": [
|
|
9
33
|
"**/*.css"
|
|
@@ -19,8 +43,10 @@
|
|
|
19
43
|
},
|
|
20
44
|
"dependencies": {
|
|
21
45
|
"@types/geojson": "^7946.0.16",
|
|
46
|
+
"d3-array": "^3.2.4",
|
|
22
47
|
"d3-geo": "^3.1.1",
|
|
23
48
|
"d3-interpolate": "^3.0.1",
|
|
49
|
+
"d3-scale-chromatic": "^3.1.0",
|
|
24
50
|
"d3-selection": "^3.0.0",
|
|
25
51
|
"d3-zoom": "^3.0.0"
|
|
26
52
|
},
|
|
@@ -45,8 +71,10 @@
|
|
|
45
71
|
"@storybook/svelte-vite": "^10.4.1",
|
|
46
72
|
"@sveltejs/package": "^2.5.7",
|
|
47
73
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
74
|
+
"@types/d3-array": "^3.2.2",
|
|
48
75
|
"@types/d3-geo": "^3.1.0",
|
|
49
76
|
"@types/d3-interpolate": "^3.0.4",
|
|
77
|
+
"@types/d3-scale-chromatic": "^3.1.0",
|
|
50
78
|
"@types/d3-selection": "^3.0.11",
|
|
51
79
|
"@types/d3-zoom": "^3.0.8",
|
|
52
80
|
"@types/node": "^22",
|
|
@@ -58,8 +86,9 @@
|
|
|
58
86
|
"eslint-plugin-storybook": "^10.4.1",
|
|
59
87
|
"eslint-plugin-svelte": "^3.17.0",
|
|
60
88
|
"globals": "^17.4.0",
|
|
89
|
+
"husky": "^9.1.7",
|
|
61
90
|
"knip": "^6.32.1",
|
|
62
|
-
"playwright": "^1.
|
|
91
|
+
"playwright": "^1.64.0",
|
|
63
92
|
"prettier": "^3.8.1",
|
|
64
93
|
"prettier-plugin-svelte": "^3.5.1",
|
|
65
94
|
"publint": "^0.3.18",
|
|
@@ -75,7 +104,12 @@
|
|
|
75
104
|
"vitest-browser-svelte": "^2.1.1"
|
|
76
105
|
},
|
|
77
106
|
"keywords": [
|
|
78
|
-
"svelte"
|
|
107
|
+
"svelte",
|
|
108
|
+
"svelteplot",
|
|
109
|
+
"charts",
|
|
110
|
+
"data-visualization",
|
|
111
|
+
"maps",
|
|
112
|
+
"small-multiples"
|
|
79
113
|
],
|
|
80
114
|
"scripts": {
|
|
81
115
|
"build": "svelte-package",
|
|
@@ -85,8 +119,11 @@
|
|
|
85
119
|
"lint": "prettier --check . && eslint .",
|
|
86
120
|
"format": "prettier --write .",
|
|
87
121
|
"test": "vitest run --project=unit --project=browser",
|
|
122
|
+
"test:coverage": "node scripts/coverage.mjs",
|
|
88
123
|
"test:stories": "vitest run --project=storybook",
|
|
89
124
|
"storybook": "storybook dev -p 6006",
|
|
90
|
-
"build-storybook": "storybook build"
|
|
125
|
+
"build-storybook": "storybook build",
|
|
126
|
+
"docs:images": "node scripts/docs-images.mjs",
|
|
127
|
+
"docs:examples": "node scripts/sync-examples.mjs"
|
|
91
128
|
}
|
|
92
129
|
}
|