layerchart 2.0.0-next.5 → 2.0.0-next.51
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/LICENSE +1 -1
- package/dist/bench/ComposableLineChart.svelte +56 -0
- package/dist/bench/ComposableLineChart.svelte.d.ts +16 -0
- package/dist/bench/GeoBench.svelte +31 -0
- package/dist/bench/GeoBench.svelte.d.ts +11 -0
- package/dist/bench/PrimitiveBench.svelte +66 -0
- package/dist/bench/PrimitiveBench.svelte.d.ts +10 -0
- package/dist/bench/composable-vs-linechart.svelte.bench.d.ts +1 -0
- package/dist/bench/composable-vs-linechart.svelte.bench.js +100 -0
- package/dist/bench/generateData.d.ts +29 -0
- package/dist/bench/generateData.js +93 -0
- package/dist/bench/primitives.svelte.bench.d.ts +1 -0
- package/dist/bench/primitives.svelte.bench.js +42 -0
- package/dist/bench/svg-vs-canvas.svelte.bench.d.ts +1 -0
- package/dist/bench/svg-vs-canvas.svelte.bench.js +431 -0
- package/dist/components/AnnotationLine.svelte +16 -3
- package/dist/components/AnnotationPoint.svelte +30 -12
- package/dist/components/AnnotationRange.svelte +32 -17
- package/dist/components/Arc.svelte +25 -25
- package/dist/components/Arc.svelte.d.ts +5 -6
- package/dist/components/Arc.svelte.test.d.ts +1 -0
- package/dist/components/Arc.svelte.test.js +858 -0
- package/dist/components/Area.svelte +95 -100
- package/dist/components/Area.svelte.d.ts +7 -3
- package/dist/components/Axis.svelte +244 -58
- package/dist/components/Axis.svelte.d.ts +34 -6
- package/dist/components/Bar.svelte +178 -31
- package/dist/components/Bar.svelte.d.ts +22 -2
- package/dist/components/Bars.svelte +33 -7
- package/dist/components/Bars.svelte.d.ts +9 -1
- package/dist/components/Blur.svelte +10 -9
- package/dist/components/Blur.svelte.d.ts +2 -5
- package/dist/components/Bounds.svelte +1 -1
- package/dist/components/BoxPlot.svelte +397 -0
- package/dist/components/BoxPlot.svelte.d.ts +40 -0
- package/dist/components/BrushContext.svelte +149 -329
- package/dist/components/BrushContext.svelte.d.ts +17 -45
- package/dist/components/BrushContext.svelte.test.d.ts +1 -0
- package/dist/components/BrushContext.svelte.test.js +301 -0
- package/dist/components/Calendar.svelte +45 -20
- package/dist/components/Calendar.svelte.d.ts +4 -4
- package/dist/components/Cell.svelte +59 -0
- package/dist/components/Cell.svelte.d.ts +25 -0
- package/dist/components/Chart.svelte +505 -768
- package/dist/components/Chart.svelte.d.ts +127 -101
- package/dist/components/ChartChildren.svelte +290 -0
- package/dist/components/ChartChildren.svelte.d.ts +147 -0
- package/dist/components/ChartClipPath.svelte +2 -2
- package/dist/components/Chord.svelte +114 -0
- package/dist/components/Chord.svelte.d.ts +53 -0
- package/dist/components/Circle.svelte +350 -72
- package/dist/components/Circle.svelte.d.ts +34 -9
- package/dist/components/Circle.svelte.test.d.ts +1 -0
- package/dist/components/Circle.svelte.test.js +141 -0
- package/dist/components/CircleClipPath.svelte +18 -2
- package/dist/components/ClipPath.svelte +36 -6
- package/dist/components/ClipPath.svelte.d.ts +10 -0
- package/dist/components/ColorRamp.svelte +1 -1
- package/dist/components/ComputedStyles.svelte +9 -2
- package/dist/components/Connector.svelte +7 -7
- package/dist/components/Connector.svelte.d.ts +4 -4
- package/dist/components/Contour.svelte +301 -0
- package/dist/components/Contour.svelte.d.ts +48 -0
- package/dist/components/Dagre.svelte +5 -0
- package/dist/components/Density.svelte +146 -0
- package/dist/components/Density.svelte.d.ts +21 -0
- package/dist/components/Ellipse.svelte +464 -0
- package/dist/components/Ellipse.svelte.d.ts +89 -0
- package/dist/components/Ellipse.svelte.test.d.ts +1 -0
- package/dist/components/Ellipse.svelte.test.js +126 -0
- package/dist/components/ForceSimulation.svelte +184 -50
- package/dist/components/ForceSimulation.svelte.d.ts +95 -21
- package/dist/components/Frame.svelte +2 -2
- package/dist/components/GeoCircle.svelte +1 -1
- package/dist/components/GeoEdgeFade.svelte +4 -5
- package/dist/components/GeoPath.svelte +62 -98
- package/dist/components/GeoPath.svelte.d.ts +6 -6
- package/dist/components/GeoPoint.svelte +22 -13
- package/dist/components/GeoProjection.svelte +30 -0
- package/dist/components/GeoProjection.svelte.d.ts +8 -0
- package/dist/components/GeoRaster.svelte +311 -0
- package/dist/components/GeoRaster.svelte.d.ts +61 -0
- package/dist/components/GeoSpline.svelte +26 -30
- package/dist/components/GeoSpline.svelte.d.ts +3 -3
- package/dist/components/GeoTile.svelte +12 -13
- package/dist/components/GeoVisible.svelte +3 -3
- package/dist/components/Graticule.svelte +9 -12
- package/dist/components/Graticule.svelte.d.ts +2 -1
- package/dist/components/Grid.svelte +79 -64
- package/dist/components/Grid.svelte.d.ts +5 -0
- package/dist/components/Group.svelte +182 -65
- package/dist/components/Group.svelte.d.ts +34 -9
- package/dist/components/Group.svelte.test.d.ts +1 -0
- package/dist/components/Group.svelte.test.js +63 -0
- package/dist/components/Highlight.svelte +384 -159
- package/dist/components/Highlight.svelte.d.ts +12 -0
- package/dist/components/Hull.svelte +21 -11
- package/dist/components/Image.svelte +546 -0
- package/dist/components/Image.svelte.d.ts +127 -0
- package/dist/components/Image.svelte.test.d.ts +1 -0
- package/dist/components/Image.svelte.test.js +220 -0
- package/dist/components/Labels.svelte +105 -25
- package/dist/components/Labels.svelte.d.ts +19 -7
- package/dist/components/Legend.svelte +237 -81
- package/dist/components/Legend.svelte.d.ts +23 -12
- package/dist/components/Line.svelte +361 -84
- package/dist/components/Line.svelte.d.ts +39 -14
- package/dist/components/Line.svelte.test.d.ts +1 -0
- package/dist/components/Line.svelte.test.js +121 -0
- package/dist/components/LinearGradient.svelte +43 -13
- package/dist/components/Link.svelte +1 -1
- package/dist/components/Marker.svelte +43 -27
- package/dist/components/Marker.svelte.d.ts +1 -1
- package/dist/components/Month.svelte +273 -0
- package/dist/components/Month.svelte.d.ts +70 -0
- package/dist/components/MonthPath.svelte +32 -18
- package/dist/components/MonthPath.svelte.d.ts +8 -3
- package/dist/components/MotionPath.svelte +1 -1
- package/dist/components/Pack.svelte +4 -6
- package/dist/components/Pack.svelte.d.ts +12 -7
- package/dist/components/Partition.svelte +4 -3
- package/dist/components/Partition.svelte.d.ts +12 -4
- package/dist/components/Path.svelte +361 -0
- package/dist/components/Path.svelte.d.ts +72 -0
- package/dist/components/Pattern.svelte +15 -14
- package/dist/components/Pie.svelte +6 -8
- package/dist/components/Pie.svelte.d.ts +2 -3
- package/dist/components/Point.svelte +1 -1
- package/dist/components/Points.svelte +76 -84
- package/dist/components/Points.svelte.d.ts +7 -8
- package/dist/components/Polygon.svelte +538 -0
- package/dist/components/Polygon.svelte.d.ts +136 -0
- package/dist/components/Polygon.svelte.test.d.ts +1 -0
- package/dist/components/Polygon.svelte.test.js +121 -0
- package/dist/components/RadialGradient.svelte +12 -16
- package/dist/components/Raster.svelte +335 -0
- package/dist/components/Raster.svelte.d.ts +48 -0
- package/dist/components/Rect.svelte +551 -89
- package/dist/components/Rect.svelte.d.ts +82 -8
- package/dist/components/Rect.svelte.test.d.ts +1 -0
- package/dist/components/Rect.svelte.test.js +179 -0
- package/dist/components/RectClipPath.svelte +16 -4
- package/dist/components/RectClipPath.svelte.d.ts +2 -2
- package/dist/components/Ribbon.svelte +141 -0
- package/dist/components/Ribbon.svelte.d.ts +51 -0
- package/dist/components/Rule.svelte +170 -78
- package/dist/components/Rule.svelte.d.ts +7 -2
- package/dist/components/Sankey.svelte +1 -3
- package/dist/components/Spline.svelte +181 -279
- package/dist/components/Spline.svelte.d.ts +28 -56
- package/dist/components/Text.svelte +579 -215
- package/dist/components/Text.svelte.d.ts +54 -14
- package/dist/components/Text.svelte.test.d.ts +1 -0
- package/dist/components/Text.svelte.test.js +152 -0
- package/dist/components/Threshold.svelte +6 -3
- package/dist/components/TileImage.svelte +19 -4
- package/dist/components/Trail.svelte +256 -0
- package/dist/components/Trail.svelte.d.ts +88 -0
- package/dist/components/TransformContext.svelte +132 -428
- package/dist/components/TransformContext.svelte.d.ts +22 -0
- package/dist/components/TransformContext.svelte.test.d.ts +1 -0
- package/dist/components/TransformContext.svelte.test.js +166 -0
- package/dist/components/Tree.svelte +4 -3
- package/dist/components/Tree.svelte.d.ts +12 -4
- package/dist/components/Treemap.svelte +67 -29
- package/dist/components/Treemap.svelte.d.ts +23 -15
- package/dist/components/Vector.svelte +376 -0
- package/dist/components/Vector.svelte.d.ts +109 -0
- package/dist/components/Violin.svelte +319 -0
- package/dist/components/Violin.svelte.d.ts +47 -0
- package/dist/components/Voronoi.svelte +17 -18
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-full-circle--360-degree-range--1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-full-circle--360-degree-range--2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-innerRadius-of-0--pie-slice--1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-innerRadius-of-0--pie-slice--2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-negative-domain-values-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-negative-domain-values-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-partial-arc--e-g---180-degrees--1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-partial-arc--e-g---180-degrees--2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-at-max-domain-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-at-max-domain-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-below-domain-min-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-below-domain-min-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-exceeding-domain-max-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-exceeding-domain-max-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-of-0-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-edge-cases-should-handle-value-of-0-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-events-should-handle-pointer-enter-events-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-events-should-handle-pointer-enter-events-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-events-should-handle-pointer-move-events-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-events-should-handle-pointer-move-events-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-apply-offset-to-arc-position-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-apply-offset-to-arc-position-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-call-tooltip-hide-on-pointer-leave-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-call-tooltip-hide-on-pointer-leave-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-call-tooltip-show-on-pointer-enter-with-data-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-call-tooltip-show-on-pointer-enter-with-data-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-handle-custom-start-angle-in-range-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-handle-custom-start-angle-in-range-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-an-arc-path-with-value-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-an-arc-path-with-value-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-when-track-prop-is-provided-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-when-track-prop-is-provided-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackEndAngle-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackEndAngle-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackInnerRadius-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackInnerRadius-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackPadAngle-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackPadAngle-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackStartAngle-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackStartAngle-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackStartAngle-and-trackEndAngle-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-track-with-trackStartAngle-and-trackEndAngle-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-both-startAngle-and-endAngle-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-both-startAngle-and-endAngle-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-cornerRadius-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-cornerRadius-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-custom-domain-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-custom-domain-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-custom-domain-and-range-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-custom-domain-and-range-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-custom-range-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-custom-range-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-endAngle-in-radians-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-endAngle-in-radians-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-innerRadius-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-innerRadius-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-padAngle-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-padAngle-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-startAngle-in-radians-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-props-should-render-with-startAngle-in-radians-2.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-snippets-should-render-text-inner--middle--outer-Text-children-1.png +0 -0
- package/dist/components/__screenshots__/Arc.svelte.test.ts/Arc-snippets-should-render-text-inner--middle--outer-Text-children-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-clear-brush-when-x-prop-changes-to--null--null--1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-clear-brush-when-x-prop-changes-to--null--null--2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-not-show-brush-when-x-prop-is-null-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-not-show-brush-when-x-prop-is-null-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-not-show-brush-when-x-prop-matches-full-domain-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-not-show-brush-when-x-prop-matches-full-domain-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-show-brush-when-x-prop-is-provided-with-a-sub-domain-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-show-brush-when-x-prop-is-provided-with-a-sub-domain-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-update-brush-width-when-x-prop-changes-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-external-sync--x-y-props--should-update-brush-width-when-x-prop-changes-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-clear-brush-when-reset-programmatically-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-clear-brush-when-reset-programmatically-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-compute-correct-pixel-width-for-brush-move---1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-compute-correct-pixel-width-for-brush-move---2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-move-only-y-when-x-is-not-specified-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-move-only-y-when-x-is-not-specified-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-select-full-domain-with-selectAll-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-select-full-domain-with-selectAll-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-show-brush-when-moved-programmatically-via-context-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-show-brush-when-moved-programmatically-via-context-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-update-width-when-brush-move---is-called-again-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-programmatic-control-should-update-width-when-brush-move---is-called-again-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-rendering-should-not-render-brush-UI-when-brush-is-disabled-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-rendering-should-not-render-brush-UI-when-brush-is-disabled-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-rendering-should-not-render-range-or-handles-initially-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-rendering-should-not-render-range-or-handles-initially-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-rendering-should-render-brush-context-when-brush-is-enabled-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-rendering-should-render-brush-context-when-brush-is-enabled-2.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-zoomOnBrush-with-onBrushEnd-should-pass-brush-domain-values-to-onBrushEnd-before-resetting-1.png +0 -0
- package/dist/components/__screenshots__/BrushContext.svelte.test.ts/BrushContext-zoomOnBrush-with-onBrushEnd-should-pass-brush-domain-values-to-onBrushEnd-before-resetting-2.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-render-one-circle-per-data-item-with-string-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-render-one-circle-per-data-item-with-string-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-render-with-function-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-render-with-function-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-resolve-data-driven-fill-through-cScale-1.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-resolve-data-driven-fill-through-cScale-2.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-use-explicit-data-prop-over-chart-context-data-1.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-data-mode-should-use-explicit-data-prop-over-chart-context-data-2.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-pixel-mode-should-render-a-circle-with-pixel-values-1.png +0 -0
- package/dist/components/__screenshots__/Circle.svelte.test.ts/Circle-pixel-mode-should-render-a-circle-with-pixel-values-2.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-render-one-ellipse-per-data-item-with-string-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-render-one-ellipse-per-data-item-with-string-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-resolve-data-driven-fill-through-cScale-1.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-resolve-data-driven-fill-through-cScale-2.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-use-explicit-data-prop-over-chart-context-data-1.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-data-mode-should-use-explicit-data-prop-over-chart-context-data-2.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-pixel-mode-should-render-an-ellipse-with-pixel-values-1.png +0 -0
- package/dist/components/__screenshots__/Ellipse.svelte.test.ts/Ellipse-pixel-mode-should-render-an-ellipse-with-pixel-values-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-apply-circular-clipping-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-apply-circular-clipping-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-pass-literal-URL-through-unchanged-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-pass-literal-URL-through-unchanged-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-render-one-image-per-data-item-with-string-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-render-one-image-per-data-item-with-string-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-render-with-function-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-render-with-function-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-resolve-data-driven-href-from-data-property-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-resolve-data-driven-href-from-data-property-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-use-explicit-data-prop-over-chart-context-data-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-data-mode-should-use-explicit-data-prop-over-chart-context-data-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-apply-circular-clipping-when-r-is-set-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-apply-circular-clipping-when-r-is-set-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-apply-preserveAspectRatio-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-apply-preserveAspectRatio-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-apply-rotation-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-apply-rotation-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-default-width-and-height-to-16-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-default-width-and-height-to-16-2.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-render-an-image-with-pixel-values-1.png +0 -0
- package/dist/components/__screenshots__/Image.svelte.test.ts/Image-pixel-mode-should-render-an-image-with-pixel-values-2.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-render-one-line-per-data-item-with-string-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-render-one-line-per-data-item-with-string-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-resolve-data-driven-stroke-through-cScale-1.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-resolve-data-driven-stroke-through-cScale-2.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-use-explicit-data-prop-over-chart-context-data-1.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-data-mode-should-use-explicit-data-prop-over-chart-context-data-2.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-pixel-mode-should-render-a-line-with-pixel-values-1.png +0 -0
- package/dist/components/__screenshots__/Line.svelte.test.ts/Line-pixel-mode-should-render-a-line-with-pixel-values-2.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-render-one-polygon-per-data-item-with-string-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-render-one-polygon-per-data-item-with-string-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-resolve-data-driven-fill-through-cScale-1.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-resolve-data-driven-fill-through-cScale-2.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-use-explicit-data-prop-over-chart-context-data-1.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-data-mode-should-use-explicit-data-prop-over-chart-context-data-2.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-pixel-mode-should-render-a-polygon-with-pixel-values-1.png +0 -0
- package/dist/components/__screenshots__/Polygon.svelte.test.ts/Polygon-pixel-mode-should-render-a-polygon-with-pixel-values-2.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---colors-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---colors-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---colors-should-resolve-data-driven-fill-through-cScale-1.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---colors-should-resolve-data-driven-fill-through-cScale-2.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---edge-based-should-render-rects-from-edge-props-1.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---edge-based-should-render-rects-from-edge-props-2.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---edge-based-should-render-rects-with-insets-1.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---edge-based-should-render-rects-with-insets-2.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---edge-based-should-use-explicit-data-prop-over-chart-context-data-1.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---edge-based-should-use-explicit-data-prop-over-chart-context-data-2.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---standard-should-render-one-rect-per-data-item-with-string-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-data-mode---standard-should-render-one-rect-per-data-item-with-string-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-pixel-mode-should-render-a-rect-with-pixel-values-1.png +0 -0
- package/dist/components/__screenshots__/Rect.svelte.test.ts/Rect-pixel-mode-should-render-a-rect-with-pixel-values-2.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-pass-literal-CSS-colors-through-unchanged-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-render-one-text-per-data-item-with-string-accessors-1.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-render-one-text-per-data-item-with-string-accessors-2.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-resolve-data-driven-fill-through-cScale-1.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-resolve-data-driven-fill-through-cScale-2.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-resolve-value-as-data-property-name-in-data-mode-1.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-resolve-value-as-data-property-name-in-data-mode-2.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-use-explicit-data-prop-over-chart-context-data-1.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-data-mode-should-use-explicit-data-prop-over-chart-context-data-2.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-pixel-mode-should-preserve-CSS-like-string-values-as-SVG-values-1.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-pixel-mode-should-preserve-CSS-like-string-values-as-SVG-values-2.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-pixel-mode-should-render-text-with-pixel-values-1.png +0 -0
- package/dist/components/__screenshots__/Text.svelte.test.ts/Text-pixel-mode-should-render-text-with-pixel-values-2.png +0 -0
- package/dist/components/charts/ArcChart.svelte +148 -221
- package/dist/components/charts/ArcChart.svelte.d.ts +44 -18
- package/dist/components/charts/ArcChart.svelte.test.d.ts +1 -0
- package/dist/components/charts/ArcChart.svelte.test.js +24 -0
- package/dist/components/charts/AreaChart.svelte +86 -529
- package/dist/components/charts/AreaChart.svelte.d.ts +36 -37
- package/dist/components/charts/AreaChart.svelte.test.d.ts +1 -0
- package/dist/components/charts/AreaChart.svelte.test.js +154 -0
- package/dist/components/charts/BarChart.svelte +128 -507
- package/dist/components/charts/BarChart.svelte.d.ts +39 -32
- package/dist/components/charts/BarChart.svelte.test.d.ts +1 -0
- package/dist/components/charts/BarChart.svelte.test.js +449 -0
- package/dist/components/charts/BarChartFixedWidthTest.svelte +47 -0
- package/dist/components/charts/BarChartFixedWidthTest.svelte.d.ts +11 -0
- package/dist/components/charts/ChartAnnotations.svelte +8 -7
- package/dist/components/charts/ChartAnnotations.svelte.d.ts +1 -3
- package/dist/components/charts/DefaultTooltip.svelte +98 -33
- package/dist/components/charts/DefaultTooltip.svelte.d.ts +2 -4
- package/dist/components/charts/DefaultTooltip.svelte.test.d.ts +1 -0
- package/dist/components/charts/DefaultTooltip.svelte.test.js +231 -0
- package/dist/components/charts/LineChart.svelte +94 -433
- package/dist/components/charts/LineChart.svelte.bench.d.ts +1 -0
- package/dist/components/charts/LineChart.svelte.bench.js +189 -0
- package/dist/components/charts/LineChart.svelte.d.ts +36 -31
- package/dist/components/charts/LineChart.svelte.test.d.ts +1 -0
- package/dist/components/charts/LineChart.svelte.test.js +45 -0
- package/dist/components/charts/PieChart.svelte +292 -362
- package/dist/components/charts/PieChart.svelte.d.ts +62 -33
- package/dist/components/charts/PieChart.svelte.test.d.ts +1 -0
- package/dist/components/charts/PieChart.svelte.test.js +36 -0
- package/dist/components/charts/ScatterChart.svelte +53 -376
- package/dist/components/charts/ScatterChart.svelte.d.ts +27 -23
- package/dist/components/charts/__fixtures__/ArcChartTooltip.svelte +39 -0
- package/dist/{docs/Blockquote.svelte.d.ts → components/charts/__fixtures__/ArcChartTooltip.svelte.d.ts} +4 -6
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-multiple-area-paths-for-each-series-1.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-multiple-area-paths-for-each-series-2.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-multiple-area-paths-for-each-series-with-separate-data-1.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-multiple-area-paths-for-each-series-with-separate-data-2.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-multiple-area-paths-for-each-series-with-separate-data-and-stack-layout-1.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-multiple-area-paths-for-each-series-with-separate-data-and-stack-layout-2.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-with-single-series-when-no-series-prop-provided-1.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-basic-should-render-with-single-series-when-no-series-prop-provided-2.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-series-layout-should-render-with-overlap-layout-1.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-series-layout-should-render-with-overlap-layout-2.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-series-layout-should-render-with-stack-layout-1.png +0 -0
- package/dist/components/charts/__screenshots__/AreaChart.svelte.test.ts/AreaChart-series-layout-should-render-with-stack-layout-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-basic-should-render-horizontal-bars-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-basic-should-render-horizontal-bars-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-basic-should-render-vertical-bars-without-NaN-attributes-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-basic-should-render-vertical-bars-without-NaN-attributes-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-basic-should-render-with-default-series-when-no-series-prop-provided-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-basic-should-render-with-default-series-when-no-series-prop-provided-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-fixed-width-height-should-center-fixed-width-bars-within-their-band-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-fixed-width-height-should-center-fixed-width-bars-within-their-band-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-fixed-width-height-should-render-horizontal-bars-with-fixed-height-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-fixed-width-height-should-render-horizontal-bars-with-fixed-height-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-fixed-width-height-should-render-vertical-bars-with-fixed-width-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-fixed-width-height-should-render-vertical-bars-with-fixed-width-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-legend-series-toggle-adjusts-group-scale-should-adjust-grouped-bar-widths-when-series-are-toggled-via-legend-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-legend-series-toggle-adjusts-group-scale-should-adjust-grouped-bar-widths-when-series-are-toggled-via-legend-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-no-series-prop--transition-example-pattern--should-render-without-series-prop-and-not-produce-NaN-rect-attributes-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-no-series-prop--transition-example-pattern--should-render-without-series-prop-and-not-produce-NaN-rect-attributes-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-separate-data-per-series-should-render-overlapping-series-with-separate-data-arrays-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-separate-data-per-series-should-render-overlapping-series-with-separate-data-arrays-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-separate-data-per-series-should-render-stacked-series-with-separate-data-arrays-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-separate-data-per-series-should-render-stacked-series-with-separate-data-arrays-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-grouped-series-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-grouped-series-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-multiple-Bars-groups-for-each-series-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-multiple-Bars-groups-for-each-series-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stackDiverging-series-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stackDiverging-series-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stackExpand-series-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stackExpand-series-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stacked-series-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stacked-series-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stacked-series-horizontally-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-should-render-stacked-series-horizontally-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-stackDiverging-edge-rounding-should-round-both-tips-when-there-is-one-positive-and-one-negative-series-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-stackDiverging-edge-rounding-should-round-both-tips-when-there-is-one-positive-and-one-negative-series-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-stackDiverging-edge-rounding-should-round-the-tip-of-each-direction--not-inner-layers-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-stackDiverging-edge-rounding-should-round-the-tip-of-each-direction--not-inner-layers-2.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-tooltip-should-use-explicit-series-colors--not-color-scale-1.png +0 -0
- package/dist/components/charts/__screenshots__/BarChart.svelte.test.ts/BarChart-series-tooltip-should-use-explicit-series-colors--not-color-scale-2.png +0 -0
- package/dist/components/charts/__screenshots__/DefaultTooltip.svelte.test.ts/DefaultTooltip-AreaChart--multi-series--quadtree-x-mode--should-fade-non-highlighted-tooltip-series-items-on-hover-1.png +0 -0
- package/dist/components/charts/__screenshots__/DefaultTooltip.svelte.test.ts/DefaultTooltip-AreaChart--multi-series--quadtree-x-mode--should-fade-non-highlighted-tooltip-series-items-on-hover-2.png +0 -0
- package/dist/components/charts/__screenshots__/DefaultTooltip.svelte.test.ts/DefaultTooltip-AreaChart--multi-series--quadtree-x-mode--should-show-header-and-all-series-items-1.png +0 -0
- package/dist/components/charts/__screenshots__/DefaultTooltip.svelte.test.ts/DefaultTooltip-AreaChart--multi-series--quadtree-x-mode--should-show-header-and-all-series-items-2.png +0 -0
- package/dist/components/charts/__screenshots__/DefaultTooltip.svelte.test.ts/DefaultTooltip-LineChart--multi-series--quadtree-x-mode--should-show-header-and-all-series-items-1.png +0 -0
- package/dist/components/charts/__screenshots__/DefaultTooltip.svelte.test.ts/DefaultTooltip-LineChart--multi-series--quadtree-x-mode--should-show-header-and-all-series-items-2.png +0 -0
- package/dist/components/charts/types.d.ts +6 -211
- package/dist/components/index.d.ts +45 -13
- package/dist/components/index.js +45 -14
- package/dist/components/layers/Canvas.svelte +502 -0
- package/dist/components/{layout → layers}/Canvas.svelte.d.ts +17 -37
- package/dist/components/{layout → layers}/Html.svelte +34 -16
- package/dist/components/{layout → layers}/Html.svelte.d.ts +7 -0
- package/dist/components/layers/Layer.svelte +85 -0
- package/dist/components/layers/Layer.svelte.d.ts +23 -0
- package/dist/components/{layout → layers}/Svg.svelte +38 -18
- package/dist/components/{layout → layers}/Svg.svelte.d.ts +7 -0
- package/dist/components/{layout → layers}/WebGL.svelte +27 -7
- package/dist/components/{layout → layers}/WebGL.svelte.d.ts +8 -5
- package/dist/components/tests/BrushTestHarness.svelte +27 -0
- package/dist/components/tests/BrushTestHarness.svelte.d.ts +8 -0
- package/dist/components/tests/TestHarness.svelte +87 -0
- package/dist/components/tests/TestHarness.svelte.d.ts +21 -0
- package/dist/components/tests/TransformTestHarness.svelte +27 -0
- package/dist/components/tests/TransformTestHarness.svelte.d.ts +8 -0
- package/dist/components/tooltip/Tooltip.svelte +97 -61
- package/dist/components/tooltip/Tooltip.svelte.d.ts +12 -14
- package/dist/components/tooltip/TooltipContext.svelte +321 -173
- package/dist/components/tooltip/TooltipContext.svelte.d.ts +23 -21
- package/dist/components/tooltip/TooltipHeader.svelte +32 -18
- package/dist/components/tooltip/TooltipHeader.svelte.d.ts +3 -3
- package/dist/components/tooltip/TooltipItem.svelte +57 -37
- package/dist/components/tooltip/TooltipItem.svelte.d.ts +3 -3
- package/dist/components/tooltip/TooltipList.svelte +12 -10
- package/dist/components/tooltip/TooltipSeparator.svelte +18 -10
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/contexts/canvas.d.ts +34 -0
- package/dist/contexts/canvas.js +14 -0
- package/dist/contexts/chart.d.ts +6 -0
- package/dist/contexts/chart.js +48 -0
- package/dist/contexts/componentTree.test.d.ts +1 -0
- package/dist/contexts/componentTree.test.js +83 -0
- package/dist/contexts/geo.d.ts +4 -0
- package/dist/contexts/geo.js +11 -0
- package/dist/contexts/index.d.ts +5 -0
- package/dist/contexts/index.js +5 -0
- package/dist/contexts/layer.d.ts +3 -0
- package/dist/contexts/layer.js +8 -0
- package/dist/contexts/settings.d.ts +4 -0
- package/dist/contexts/settings.js +10 -0
- package/dist/contexts/transform.d.ts +96 -0
- package/dist/contexts/transform.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/server/ContextCapture.svelte +30 -0
- package/dist/server/ContextCapture.svelte.d.ts +8 -0
- package/dist/server/ServerChart.svelte +26 -0
- package/dist/server/ServerChart.svelte.d.ts +11 -0
- package/dist/server/TestBarChart.svelte +35 -0
- package/dist/server/TestBarChart.svelte.d.ts +14 -0
- package/dist/server/TestLineChart.svelte +35 -0
- package/dist/server/TestLineChart.svelte.d.ts +14 -0
- package/dist/server/captureStore.d.ts +8 -0
- package/dist/server/captureStore.js +18 -0
- package/dist/server/index.d.ts +137 -0
- package/dist/server/index.js +141 -0
- package/dist/server/renderChart.ssr.test.d.ts +1 -0
- package/dist/server/renderChart.ssr.test.js +205 -0
- package/dist/server/renderTree.d.ts +8 -0
- package/dist/server/renderTree.js +29 -0
- package/dist/states/__fixtures__/ComponentNodeLifecycleChild.svelte +13 -0
- package/dist/{docs/Json.svelte.d.ts → states/__fixtures__/ComponentNodeLifecycleChild.svelte.d.ts} +4 -8
- package/dist/states/__fixtures__/ComponentNodeLifecycleHarness.svelte +48 -0
- package/dist/states/__fixtures__/ComponentNodeLifecycleHarness.svelte.d.ts +8 -0
- package/dist/states/__fixtures__/ComponentNodeLifecycleParent.svelte +26 -0
- package/dist/states/__fixtures__/ComponentNodeLifecycleParent.svelte.d.ts +9 -0
- package/dist/states/__screenshots__/chart.component-node.svelte.test.ts/ChartState-registerComponent-cleans-up-child-nodes-and-mark-registrations-when-components-unmount-1.png +0 -0
- package/dist/states/__screenshots__/chart.component-node.svelte.test.ts/ChartState-registerComponent-cleans-up-child-nodes-and-mark-registrations-when-components-unmount-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-baseline-domain-multi-series-should-work-without-baseline--no-forced-0--1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-baseline-domain-multi-series-should-work-without-baseline--no-forced-0--2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-degenerate-domain-should-expand-degenerate-y-domain--5--5--to--5--6--1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-degenerate-domain-should-expand-degenerate-y-domain--5--5--to--5--6--2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-geo-projection-skips-markInfo-should-not-derive-x-y-accessors-from-marks-when-geo-projection-is-active-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-geo-projection-skips-markInfo-should-not-derive-x-y-accessors-from-marks-when-geo-projection-is-active-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-series-domain-update-on-visibility-toggle-should-update-y-domain-when-hiding-an-explicit-series-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-series-domain-update-on-visibility-toggle-should-update-y-domain-when-hiding-an-explicit-series-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-series-domain-update-on-visibility-toggle-should-update-y-domain-when-hiding-an-implicit-series-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-series-domain-update-on-visibility-toggle-should-update-y-domain-when-hiding-an-implicit-series-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-x-y-from-marks--no-x-y-on-Chart--should-deduplicate-repeated-mark-x-keys-into-a-single-accessor-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-x-y-from-marks--no-x-y-on-Chart--should-deduplicate-repeated-mark-x-keys-into-a-single-accessor-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-x-y-from-marks--no-x-y-on-Chart--should-derive-correct-y-domain-across-two-marks-with-different-data-and-no-y-prop-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-x-y-from-marks--no-x-y-on-Chart--should-derive-correct-y-domain-across-two-marks-with-different-data-and-no-y-prop-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-x-y-from-marks--no-x-y-on-Chart--should-derive-x-accessor-from-marks-when-x-prop-is-absent-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-implicit-x-y-from-marks--no-x-y-on-Chart--should-derive-x-accessor-from-marks-when-x-prop-is-absent-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-aggregate-y-accessor-from-implicit-series-into-resolveAccessor-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-aggregate-y-accessor-from-implicit-series-into-resolveAccessor-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-calculate-correct-y-domain-from-two-marks-with-same-y-accessor-but-different-data-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-calculate-correct-y-domain-from-two-marks-with-same-y-accessor-but-different-data-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-deduplicate-implicit-series-with-the-same-key-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-deduplicate-implicit-series-with-the-same-key-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-generate-implicit-series-from-marks-with-seriesKey-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-generate-implicit-series-from-marks-with-seriesKey-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-generate-implicit-series-from-marks-with-string-y-accessors-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-generate-implicit-series-from-marks-with-string-y-accessors-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-generate-implicit-series-from-x-accessor-for-vertical-charts--valueAxis-x--1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-generate-implicit-series-from-x-accessor-for-vertical-charts--valueAxis-x--2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-data-from-two-marks-with-same-y-accessor-but-different-data-arrays-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-data-from-two-marks-with-same-y-accessor-but-different-data-arrays-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-implicit-series-label-when-provided-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-implicit-series-label-when-provided-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-mark-data-in-flatData-for-domain-calculation-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-mark-data-in-flatData-for-domain-calculation-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-per-mark-data-in-domain-via-implicit-series-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-include-per-mark-data-in-domain-via-implicit-series-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-not-double-include-data-when-mark-data-matches-series-data-reference-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-not-double-include-data-when-mark-data-matches-series-data-reference-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-register-and-unregister-marks-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-register-and-unregister-marks-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-revert-flatData-after-all-marks-unregister-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-revert-flatData-after-all-marks-unregister-2.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-skip-marks-without-a-derivable-key-for-implicit-series-1.png +0 -0
- package/dist/states/__screenshots__/chart.svelte.test.ts/ChartState-mark-registration-should-skip-marks-without-a-derivable-key-for-implicit-series-2.png +0 -0
- package/dist/states/__screenshots__/series.svelte.test.ts/SeriesState-visibility-should-allow-toggling-after-initial-selected--false-1.png +0 -0
- package/dist/states/__screenshots__/series.svelte.test.ts/SeriesState-visibility-should-allow-toggling-after-initial-selected--false-2.png +0 -0
- package/dist/states/__screenshots__/series.svelte.test.ts/SeriesState-visibility-should-respect-selected--false-on-series-items-1.png +0 -0
- package/dist/states/__screenshots__/series.svelte.test.ts/SeriesState-visibility-should-respect-selected--false-on-series-items-2.png +0 -0
- package/dist/states/brush.svelte.d.ts +99 -0
- package/dist/states/brush.svelte.js +246 -0
- package/dist/states/brush.svelte.test.d.ts +1 -0
- package/dist/states/brush.svelte.test.js +417 -0
- package/dist/states/chart.component-node.svelte.test.d.ts +1 -0
- package/dist/states/chart.component-node.svelte.test.js +28 -0
- package/dist/states/chart.svelte.d.ts +264 -0
- package/dist/states/chart.svelte.js +1066 -0
- package/dist/states/chart.svelte.test.d.ts +1 -0
- package/dist/states/chart.svelte.test.js +1403 -0
- package/dist/states/geo.svelte.d.ts +49 -0
- package/dist/states/geo.svelte.js +100 -0
- package/dist/states/series.svelte.d.ts +83 -0
- package/dist/states/series.svelte.js +248 -0
- package/dist/states/series.svelte.test.d.ts +1 -0
- package/dist/states/series.svelte.test.js +333 -0
- package/dist/states/settings.svelte.d.ts +12 -0
- package/dist/states/settings.svelte.js +10 -0
- package/dist/states/tooltip.svelte.d.ts +22 -0
- package/dist/states/tooltip.svelte.js +16 -0
- package/dist/states/transform.svelte.d.ts +175 -0
- package/dist/states/transform.svelte.js +408 -0
- package/dist/styles/daisyui-5.css +6 -0
- package/dist/styles/shadcn-svelte.css +11 -0
- package/dist/styles/skeleton-3.css +15 -0
- package/dist/styles/skeleton-4.css +15 -0
- package/dist/utils/__screenshots__/canvas.svelte.test.ts/clearCanvasContext-clears-with-zero-padding--no-offset--1.png +0 -0
- package/dist/utils/__screenshots__/canvas.svelte.test.ts/clearCanvasContext-clears-with-zero-padding--no-offset--2.png +0 -0
- package/dist/utils/__screenshots__/canvas.svelte.test.ts/renderPathData-inline-style-overrides-styles-object-1.png +0 -0
- package/dist/utils/__screenshots__/canvas.svelte.test.ts/renderPathData-inline-style-overrides-styles-object-2.png +0 -0
- package/dist/utils/arcText.svelte.d.ts +1 -1
- package/dist/utils/arcText.svelte.js +4 -4
- package/dist/utils/array.d.ts +11 -0
- package/dist/utils/array.js +23 -0
- package/dist/utils/array.test.d.ts +1 -0
- package/dist/utils/array.test.js +200 -0
- package/dist/utils/attributes.d.ts +3 -13
- package/dist/utils/attributes.js +4 -18
- package/dist/utils/canvas.d.ts +83 -0
- package/dist/utils/canvas.js +228 -55
- package/dist/utils/canvas.svelte.test.d.ts +1 -0
- package/dist/utils/canvas.svelte.test.js +703 -0
- package/dist/utils/chart.js +8 -0
- package/dist/utils/color.js +11 -8
- package/dist/utils/common.d.ts +19 -3
- package/dist/utils/common.js +29 -10
- package/dist/utils/common.test.js +35 -1
- package/dist/utils/dataProp.d.ts +112 -0
- package/dist/utils/dataProp.js +125 -0
- package/dist/utils/dataProp.test.d.ts +1 -0
- package/dist/utils/dataProp.test.js +128 -0
- package/dist/utils/download.d.ts +98 -0
- package/dist/utils/download.js +250 -0
- package/dist/utils/genData.d.ts +22 -8
- package/dist/utils/genData.js +34 -14
- package/dist/utils/graph/dagre.js +5 -7
- package/dist/utils/graph/sankey.js +9 -7
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/math.d.ts +17 -0
- package/dist/utils/math.js +17 -0
- package/dist/utils/motion.svelte.d.ts +26 -2
- package/dist/utils/motion.svelte.js +99 -2
- package/dist/utils/motion.test.js +49 -1
- package/dist/utils/path.d.ts +54 -1
- package/dist/utils/path.js +147 -17
- package/dist/utils/rasterBounds.d.ts +18 -0
- package/dist/utils/rasterBounds.js +98 -0
- package/dist/utils/rasterBounds.test.d.ts +1 -0
- package/dist/utils/rasterBounds.test.js +63 -0
- package/dist/utils/rasterInterpolate.d.ts +11 -0
- package/dist/utils/rasterInterpolate.js +103 -0
- package/dist/utils/rect.svelte.d.ts +11 -4
- package/dist/utils/rect.svelte.js +87 -7
- package/dist/utils/scales.svelte.d.ts +10 -4
- package/dist/utils/scales.svelte.js +60 -13
- package/dist/utils/scales.svelte.test.d.ts +1 -0
- package/dist/utils/scales.svelte.test.js +67 -0
- package/dist/utils/shape.d.ts +43 -0
- package/dist/utils/shape.js +59 -0
- package/dist/utils/stack.js +1 -1
- package/dist/utils/stats.d.ts +33 -0
- package/dist/utils/stats.js +79 -0
- package/dist/utils/string.d.ts +51 -0
- package/dist/utils/string.js +4 -2
- package/dist/utils/ticks.d.ts +15 -4
- package/dist/utils/ticks.js +147 -162
- package/dist/utils/ticks.test.js +26 -26
- package/dist/utils/trail.d.ts +36 -0
- package/dist/utils/trail.js +341 -0
- package/dist/utils/treemap.d.ts +1 -1
- package/dist/utils/types.d.ts +28 -2
- package/package.json +54 -57
- package/README.md +0 -41
- package/dist/components/GeoContext.svelte +0 -176
- package/dist/components/GeoContext.svelte.d.ts +0 -52
- package/dist/components/TransformControls.svelte +0 -179
- package/dist/components/TransformControls.svelte.d.ts +0 -28
- package/dist/components/charts/utils.svelte.d.ts +0 -30
- package/dist/components/charts/utils.svelte.js +0 -55
- package/dist/components/layout/Canvas.svelte +0 -505
- package/dist/components/layout/Layer.svelte +0 -39
- package/dist/components/layout/Layer.svelte.d.ts +0 -17
- package/dist/components/tooltip/tooltipMetaContext.d.ts +0 -79
- package/dist/components/tooltip/tooltipMetaContext.js +0 -139
- package/dist/docs/Blockquote.svelte +0 -15
- package/dist/docs/Code.svelte +0 -38
- package/dist/docs/Code.svelte.d.ts +0 -29
- package/dist/docs/ConnectorSweepMenuField.svelte +0 -17
- package/dist/docs/ConnectorSweepMenuField.svelte.d.ts +0 -7
- package/dist/docs/ConnectorTypeMenuField.svelte +0 -17
- package/dist/docs/ConnectorTypeMenuField.svelte.d.ts +0 -7
- package/dist/docs/CurveMenuField.svelte +0 -44
- package/dist/docs/CurveMenuField.svelte.d.ts +0 -9
- package/dist/docs/GeoDebug.svelte +0 -60
- package/dist/docs/GeoDebug.svelte.d.ts +0 -4
- package/dist/docs/Header1.svelte +0 -14
- package/dist/docs/Header1.svelte.d.ts +0 -29
- package/dist/docs/Json.svelte +0 -28
- package/dist/docs/Layout.svelte +0 -18
- package/dist/docs/Layout.svelte.d.ts +0 -23
- package/dist/docs/Link.svelte +0 -5
- package/dist/docs/Link.svelte.d.ts +0 -39
- package/dist/docs/PathDataMenuField.svelte +0 -78
- package/dist/docs/PathDataMenuField.svelte.d.ts +0 -9
- package/dist/docs/Preview.svelte +0 -105
- package/dist/docs/Preview.svelte.d.ts +0 -14
- package/dist/docs/TilesetField.svelte +0 -135
- package/dist/docs/TilesetField.svelte.d.ts +0 -23
- package/dist/docs/TransformDebug.svelte +0 -22
- package/dist/docs/TransformDebug.svelte.d.ts +0 -20
- package/dist/docs/ViewSourceButton.svelte +0 -50
- package/dist/docs/ViewSourceButton.svelte.d.ts +0 -25
- package/dist/utils/graph/dagre.d.ts +0 -34
- package/dist/utils/object.js +0 -2
- /package/dist/{utils → contexts}/legendPayload.d.ts +0 -0
- /package/dist/{utils → contexts}/legendPayload.js +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Delaunay } from 'd3-delaunay';
|
|
2
|
+
/**
|
|
3
|
+
* Interpolate scattered 2D points onto a regular grid.
|
|
4
|
+
*
|
|
5
|
+
* @param points - Array of [x, y, value] triples in grid coordinates
|
|
6
|
+
* @param width - Grid width (columns)
|
|
7
|
+
* @param height - Grid height (rows)
|
|
8
|
+
* @param method - Interpolation method
|
|
9
|
+
* @returns Flat Float64Array of grid values (row-major, length = width * height)
|
|
10
|
+
*/
|
|
11
|
+
export function interpolateGrid(points, width, height, method = 'barycentric') {
|
|
12
|
+
const n = width * height;
|
|
13
|
+
const grid = new Float64Array(n);
|
|
14
|
+
if (points.length === 0) {
|
|
15
|
+
grid.fill(NaN);
|
|
16
|
+
return grid;
|
|
17
|
+
}
|
|
18
|
+
// Need at least 3 points for triangulation
|
|
19
|
+
if (points.length < 3) {
|
|
20
|
+
return interpolateNearest(points, width, height, grid);
|
|
21
|
+
}
|
|
22
|
+
switch (method) {
|
|
23
|
+
case 'none':
|
|
24
|
+
return interpolateNone(points, width, height, grid);
|
|
25
|
+
case 'nearest':
|
|
26
|
+
return interpolateNearest(points, width, height, grid);
|
|
27
|
+
case 'barycentric':
|
|
28
|
+
return interpolateBarycentric(points, width, height, grid);
|
|
29
|
+
default:
|
|
30
|
+
return interpolateBarycentric(points, width, height, grid);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** Only fill grid cells that directly contain a data point */
|
|
34
|
+
function interpolateNone(points, width, _height, grid) {
|
|
35
|
+
grid.fill(NaN);
|
|
36
|
+
for (const [x, y, value] of points) {
|
|
37
|
+
const ix = Math.round(x);
|
|
38
|
+
const iy = Math.round(y);
|
|
39
|
+
if (ix >= 0 && ix < width && iy >= 0 && iy < grid.length / width) {
|
|
40
|
+
grid[iy * width + ix] = value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return grid;
|
|
44
|
+
}
|
|
45
|
+
/** Assign each grid cell the value of its nearest data point (Voronoi) */
|
|
46
|
+
function interpolateNearest(points, width, height, grid) {
|
|
47
|
+
const delaunay = Delaunay.from(points, (d) => d[0], (d) => d[1]);
|
|
48
|
+
for (let j = 0; j < height; j++) {
|
|
49
|
+
for (let i = 0; i < width; i++) {
|
|
50
|
+
const idx = delaunay.find(i + 0.5, j + 0.5);
|
|
51
|
+
grid[j * width + i] = points[idx][2];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return grid;
|
|
55
|
+
}
|
|
56
|
+
/** Delaunay triangulation with barycentric interpolation within triangles */
|
|
57
|
+
function interpolateBarycentric(points, width, height, grid) {
|
|
58
|
+
const delaunay = Delaunay.from(points, (d) => d[0], (d) => d[1]);
|
|
59
|
+
const { triangles } = delaunay;
|
|
60
|
+
const numTriangles = triangles.length / 3;
|
|
61
|
+
// Build per-point triangle adjacency for fast lookup
|
|
62
|
+
const pointTriangles = Array.from({ length: points.length }, () => []);
|
|
63
|
+
for (let t = 0; t < numTriangles; t++) {
|
|
64
|
+
pointTriangles[triangles[t * 3]].push(t);
|
|
65
|
+
pointTriangles[triangles[t * 3 + 1]].push(t);
|
|
66
|
+
pointTriangles[triangles[t * 3 + 2]].push(t);
|
|
67
|
+
}
|
|
68
|
+
for (let j = 0; j < height; j++) {
|
|
69
|
+
for (let i = 0; i < width; i++) {
|
|
70
|
+
const px = i + 0.5;
|
|
71
|
+
const py = j + 0.5;
|
|
72
|
+
const nearest = delaunay.find(px, py);
|
|
73
|
+
let value = NaN;
|
|
74
|
+
// Check triangles incident to the nearest point
|
|
75
|
+
for (const t of pointTriangles[nearest]) {
|
|
76
|
+
const i0 = triangles[t * 3];
|
|
77
|
+
const i1 = triangles[t * 3 + 1];
|
|
78
|
+
const i2 = triangles[t * 3 + 2];
|
|
79
|
+
const x0 = points[i0][0], y0 = points[i0][1];
|
|
80
|
+
const x1 = points[i1][0], y1 = points[i1][1];
|
|
81
|
+
const x2 = points[i2][0], y2 = points[i2][1];
|
|
82
|
+
// Barycentric coordinates
|
|
83
|
+
const denom = (y1 - y2) * (x0 - x2) + (x2 - x1) * (y0 - y2);
|
|
84
|
+
if (Math.abs(denom) < 1e-10)
|
|
85
|
+
continue;
|
|
86
|
+
const w0 = ((y1 - y2) * (px - x2) + (x2 - x1) * (py - y2)) / denom;
|
|
87
|
+
const w1 = ((y2 - y0) * (px - x2) + (x0 - x2) * (py - y2)) / denom;
|
|
88
|
+
const w2 = 1 - w0 - w1;
|
|
89
|
+
// Point is inside triangle (with small epsilon for edge cases)
|
|
90
|
+
if (w0 >= -1e-6 && w1 >= -1e-6 && w2 >= -1e-6) {
|
|
91
|
+
value = w0 * points[i0][2] + w1 * points[i1][2] + w2 * points[i2][2];
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Fallback for points outside convex hull
|
|
96
|
+
if (isNaN(value)) {
|
|
97
|
+
value = points[nearest][2];
|
|
98
|
+
}
|
|
99
|
+
grid[j * width + i] = value;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return grid;
|
|
103
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChartState } from '../states/chart.svelte.js';
|
|
2
2
|
import { type Accessor } from './common.js';
|
|
3
3
|
/**
|
|
4
4
|
* A set of inset distances, applied to a rectangle to shrink or expand
|
|
@@ -31,15 +31,22 @@ type DimensionGetterOptions = {
|
|
|
31
31
|
y1?: Accessor;
|
|
32
32
|
insets?: Insets;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type ResolvedInsets = {
|
|
35
|
+
left: number;
|
|
36
|
+
right: number;
|
|
37
|
+
top: number;
|
|
38
|
+
bottom: number;
|
|
39
|
+
};
|
|
40
|
+
export declare function resolveInsets(insets?: Insets): ResolvedInsets;
|
|
41
|
+
export declare function createDimensionGetter<TData>(ctx: ChartState<TData>, getOptions?: () => DimensionGetterOptions): (item: TData) => {
|
|
35
42
|
x: any;
|
|
36
43
|
y: any;
|
|
37
44
|
width: number;
|
|
38
45
|
height: number;
|
|
39
|
-
};
|
|
46
|
+
} | undefined;
|
|
40
47
|
/**
|
|
41
48
|
* If value is an array, returns first item, else returns original value
|
|
42
49
|
* Useful when x/y getters for band scale are an array (such as for histograms)
|
|
43
50
|
*/
|
|
44
|
-
export declare function firstValue(value: number | number[]): number;
|
|
51
|
+
export declare function firstValue(value: number | number[] | undefined): number | undefined;
|
|
45
52
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { max, min } from 'd3-array';
|
|
1
2
|
import { accessor } from './common.js';
|
|
2
3
|
import { isScaleBand } from './scales.svelte.js';
|
|
3
|
-
|
|
4
|
-
function resolveInsets(insets) {
|
|
4
|
+
export function resolveInsets(insets) {
|
|
5
5
|
const all = insets?.all ?? 0;
|
|
6
6
|
const x = insets?.x ?? all;
|
|
7
7
|
const y = insets?.y ?? all;
|
|
@@ -22,13 +22,15 @@ export function createDimensionGetter(ctx, getOptions) {
|
|
|
22
22
|
const _y = accessor(options?.y ?? ctx.y);
|
|
23
23
|
const _x1 = accessor(options?.x1 ?? ctx.x1);
|
|
24
24
|
const _y1 = accessor(options?.y1 ?? ctx.y1);
|
|
25
|
+
const hasX1 = (options?.x1 ?? ctx.config.x1) != null;
|
|
26
|
+
const hasY1 = (options?.y1 ?? ctx.config.y1) != null;
|
|
25
27
|
if (isScaleBand(ctx.yScale)) {
|
|
26
28
|
// Horizontal band
|
|
27
29
|
const y = firstValue(ctx.yScale(_y(item)) ?? 0) +
|
|
28
|
-
(ctx.y1Scale ? ctx.y1Scale(_y1(item)) : 0) +
|
|
30
|
+
(hasY1 && ctx.y1Scale ? ctx.y1Scale(_y1(item)) : 0) +
|
|
29
31
|
insets.top;
|
|
30
32
|
const height = Math.max(0, ctx.yScale.bandwidth
|
|
31
|
-
? (ctx.y1Scale ? (ctx.y1Scale.bandwidth?.() ?? 0) : ctx.yScale.bandwidth()) -
|
|
33
|
+
? (hasY1 && ctx.y1Scale ? (ctx.y1Scale.bandwidth?.() ?? 0) : ctx.yScale.bandwidth()) -
|
|
32
34
|
insets.bottom -
|
|
33
35
|
insets.top
|
|
34
36
|
: 0);
|
|
@@ -59,11 +61,13 @@ export function createDimensionGetter(ctx, getOptions) {
|
|
|
59
61
|
const width = Math.max(0, ctx.xScale(right) - ctx.xScale(left) - insets.left - insets.right);
|
|
60
62
|
return { x, y, width, height };
|
|
61
63
|
}
|
|
62
|
-
else {
|
|
64
|
+
else if (isScaleBand(ctx.xScale)) {
|
|
63
65
|
// Vertical band or linear
|
|
64
|
-
const x = firstValue(ctx.xScale(_x(item))) +
|
|
66
|
+
const x = firstValue(ctx.xScale(_x(item))) +
|
|
67
|
+
(hasX1 && ctx.x1Scale ? ctx.x1Scale(_x1(item)) : 0) +
|
|
68
|
+
insets.left;
|
|
65
69
|
const width = Math.max(0, ctx.xScale.bandwidth
|
|
66
|
-
? (ctx.x1Scale ? (ctx.x1Scale.bandwidth?.() ?? 0) : ctx.xScale.bandwidth()) -
|
|
70
|
+
? (hasX1 && ctx.x1Scale ? (ctx.x1Scale.bandwidth?.() ?? 0) : ctx.xScale.bandwidth()) -
|
|
67
71
|
insets.left -
|
|
68
72
|
insets.right
|
|
69
73
|
: 0);
|
|
@@ -90,10 +94,86 @@ export function createDimensionGetter(ctx, getOptions) {
|
|
|
90
94
|
top = min([0, yDomainMinMax[1]]);
|
|
91
95
|
bottom = yValue;
|
|
92
96
|
}
|
|
97
|
+
// If yRange is inverted (drawing from top), swap top and bottom
|
|
98
|
+
if (ctx.yRange[0] < ctx.yRange[1]) {
|
|
99
|
+
[top, bottom] = [bottom, top];
|
|
100
|
+
}
|
|
101
|
+
const y = ctx.yScale(top) + insets.top;
|
|
102
|
+
const height = ctx.yScale(bottom) - ctx.yScale(top) - insets.bottom - insets.top;
|
|
103
|
+
return { x, y, width, height };
|
|
104
|
+
}
|
|
105
|
+
else if (ctx.xInterval) {
|
|
106
|
+
// x-axis time scale with interval
|
|
107
|
+
const xValue = _x(item);
|
|
108
|
+
const start = ctx.xInterval.floor(xValue);
|
|
109
|
+
const end = ctx.xInterval.offset(start);
|
|
110
|
+
const xStart = ctx.xScale(start);
|
|
111
|
+
const xEnd = ctx.xScale(end);
|
|
112
|
+
const x = Math.min(xStart, xEnd) + insets.left;
|
|
113
|
+
const width = Math.abs(xEnd - xStart) - insets.left - insets.right;
|
|
114
|
+
const yValue = _y(item);
|
|
115
|
+
let top = 0;
|
|
116
|
+
let bottom = 0;
|
|
117
|
+
if (Array.isArray(yValue)) {
|
|
118
|
+
// Array contains both top and bottom values (stack, etc);
|
|
119
|
+
top = max(yValue);
|
|
120
|
+
bottom = min(yValue);
|
|
121
|
+
}
|
|
122
|
+
else if (yValue == null) {
|
|
123
|
+
// null/undefined value
|
|
124
|
+
top = 0;
|
|
125
|
+
bottom = 0;
|
|
126
|
+
}
|
|
127
|
+
else if (yValue > 0) {
|
|
128
|
+
// Positive value
|
|
129
|
+
top = yValue;
|
|
130
|
+
bottom = max([0, yDomainMinMax[0]]);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
// Negative value
|
|
134
|
+
top = min([0, yDomainMinMax[1]]);
|
|
135
|
+
bottom = yValue;
|
|
136
|
+
}
|
|
93
137
|
const y = ctx.yScale(top) + insets.top;
|
|
94
138
|
const height = ctx.yScale(bottom) - ctx.yScale(top) - insets.bottom - insets.top;
|
|
95
139
|
return { x, y, width, height };
|
|
96
140
|
}
|
|
141
|
+
else if (ctx.yInterval) {
|
|
142
|
+
// y-axis time scale with interval
|
|
143
|
+
const yValue = _y(item);
|
|
144
|
+
const start = ctx.yInterval.floor(yValue);
|
|
145
|
+
const end = ctx.yInterval.offset(start);
|
|
146
|
+
const yStart = ctx.yScale(start);
|
|
147
|
+
const yEnd = ctx.yScale(end);
|
|
148
|
+
const y = Math.min(yStart, yEnd) + insets.top;
|
|
149
|
+
const height = Math.abs(yEnd - yStart) - insets.top - insets.bottom;
|
|
150
|
+
const xValue = _x(item);
|
|
151
|
+
let left = 0;
|
|
152
|
+
let right = 0;
|
|
153
|
+
if (Array.isArray(xValue)) {
|
|
154
|
+
// Array contains both top and bottom values (stack, etc);
|
|
155
|
+
left = min(xValue);
|
|
156
|
+
right = max(xValue);
|
|
157
|
+
}
|
|
158
|
+
else if (xValue == null) {
|
|
159
|
+
// null/undefined value
|
|
160
|
+
left = 0;
|
|
161
|
+
right = 0;
|
|
162
|
+
}
|
|
163
|
+
else if (xValue > 0) {
|
|
164
|
+
// Positive value
|
|
165
|
+
left = max([0, xDomainMinMax[0]]);
|
|
166
|
+
right = xValue;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
// Negative value
|
|
170
|
+
left = xValue;
|
|
171
|
+
right = min([0, xDomainMinMax[1]]);
|
|
172
|
+
}
|
|
173
|
+
const x = ctx.xScale(left) + insets.left;
|
|
174
|
+
const width = ctx.xScale(right) - x - insets.right;
|
|
175
|
+
return { x, y, width, height };
|
|
176
|
+
}
|
|
97
177
|
};
|
|
98
178
|
}
|
|
99
179
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ScaleBand } from 'd3-scale';
|
|
1
|
+
import { type ScaleBand, type ScaleTime } from 'd3-scale';
|
|
2
2
|
import { type MotionProp, type MotionOptions, type SpringOptions, type TweenOptions } from './motion.svelte.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type Accessor } from './common.js';
|
|
4
4
|
import type { OnlyObjects } from './types.js';
|
|
5
5
|
export type AnyScale<TInput extends SingleDomainType = any, TOutput extends SingleDomainType = any, TScaleArgs extends any[] | readonly any[] = any[]> = {
|
|
6
6
|
(value: TInput): TOutput;
|
|
@@ -23,6 +23,9 @@ export type AnyScale<TInput extends SingleDomainType = any, TOutput extends Sing
|
|
|
23
23
|
thresholds?: () => TInput[];
|
|
24
24
|
quantiles?: () => TInput[];
|
|
25
25
|
};
|
|
26
|
+
export declare function isScaleBand(scale: AnyScale<any, any>): scale is ScaleBand<any>;
|
|
27
|
+
export declare function isScaleTime(scale: AnyScale<any, any>): scale is ScaleTime<any, any>;
|
|
28
|
+
export declare function isScaleNumeric(scale: AnyScale<any, any>): scale is ScaleTime<any, any>;
|
|
26
29
|
export declare function getRange(scale: any): any[];
|
|
27
30
|
export type SingleDomainType = number | string | Date | null | undefined;
|
|
28
31
|
export type DomainType = (number | string | Date | null | undefined)[] | null | undefined;
|
|
@@ -45,14 +48,17 @@ export declare function createMotionScale<Domain, Range>(scale: AnyScale, motion
|
|
|
45
48
|
* https://gist.github.com/LuisSevillano/d53a1dc529eef518780c6df99613e2fd
|
|
46
49
|
*/
|
|
47
50
|
export declare function scaleBandInvert(scale: ScaleBand<any>): (value: number) => any;
|
|
48
|
-
export declare function isScaleBand(scale: AnyScale<any, any>): scale is ScaleBand<any>;
|
|
49
51
|
/**
|
|
50
52
|
* Generic way to invert a scale value, handling scaleBand and continuous scales (linear, time, etc).
|
|
51
53
|
* Useful to map mouse event location (x,y) to domain value
|
|
52
54
|
*/
|
|
53
55
|
export declare function scaleInvert(scale: AnyScale<any, any>, value: number): any;
|
|
54
56
|
/** Create new copy of scale with domain and range */
|
|
55
|
-
export declare function createScale(scale: AnyScale, domain: DomainType, range
|
|
57
|
+
export declare function createScale(scale: AnyScale, domain: DomainType, range?: any[] | readonly any[] | Function, context?: Record<any, any>): AnyScale<any, any, any[]>;
|
|
58
|
+
/**
|
|
59
|
+
* Auto-detect scale type based on domain values or data values
|
|
60
|
+
*/
|
|
61
|
+
export declare function autoScale(domain?: DomainType, data?: any[], propAccessor?: Accessor<any>): AnyScale;
|
|
56
62
|
/**
|
|
57
63
|
* Create a `scaleBand()` within another scaleBand()'s bandwidth
|
|
58
64
|
* (typically a x1 of an x0 scale, used for grouping)
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { unique } from '@layerstack/utils';
|
|
2
|
-
import { scaleBand } from 'd3-scale';
|
|
2
|
+
import { scaleBand, scaleLinear, scaleTime } from 'd3-scale';
|
|
3
3
|
import { createControlledMotion, } from './motion.svelte.js';
|
|
4
4
|
import { Spring, Tween } from 'svelte/motion';
|
|
5
|
+
import { accessor } from './common.js';
|
|
5
6
|
function isAnyScale(scale) {
|
|
6
7
|
return typeof scale === 'function' && typeof scale.range === 'function';
|
|
7
8
|
}
|
|
9
|
+
export function isScaleBand(scale) {
|
|
10
|
+
return typeof scale.bandwidth === 'function';
|
|
11
|
+
}
|
|
12
|
+
export function isScaleTime(scale) {
|
|
13
|
+
const domain = scale.domain();
|
|
14
|
+
return domain[0] instanceof Date || domain[1] instanceof Date;
|
|
15
|
+
}
|
|
16
|
+
export function isScaleNumeric(scale) {
|
|
17
|
+
const domain = scale.domain();
|
|
18
|
+
return typeof domain[0] === 'number' || typeof domain[1] === 'number';
|
|
19
|
+
}
|
|
8
20
|
export function getRange(scale) {
|
|
9
21
|
if (isAnyScale(scale)) {
|
|
10
22
|
return scale.range();
|
|
@@ -48,15 +60,14 @@ export function createMotionScale(scale, motion, options) {
|
|
|
48
60
|
export function scaleBandInvert(scale) {
|
|
49
61
|
const domain = scale.domain();
|
|
50
62
|
const eachBand = scale.step();
|
|
51
|
-
const
|
|
63
|
+
const rangeStart = scale.range()[0];
|
|
64
|
+
const paddingOuter = scale.paddingOuter?.() ?? scale.padding(); // `scaleBand` uses paddingOuter(), while `scalePoint` uses padding() for outer paddding - https://github.com/d3/d3-scale#point_padding
|
|
52
65
|
return function (value) {
|
|
53
|
-
|
|
66
|
+
// band[i] = rangeStart + step * (paddingOuter + i), so: i = (value - rangeStart) / step - paddingOuter
|
|
67
|
+
const index = Math.floor((value - rangeStart) / eachBand - paddingOuter);
|
|
54
68
|
return domain[Math.max(0, Math.min(index, domain.length - 1))];
|
|
55
69
|
};
|
|
56
70
|
}
|
|
57
|
-
export function isScaleBand(scale) {
|
|
58
|
-
return typeof scale.bandwidth === 'function';
|
|
59
|
-
}
|
|
60
71
|
/**
|
|
61
72
|
* Generic way to invert a scale value, handling scaleBand and continuous scales (linear, time, etc).
|
|
62
73
|
* Useful to map mouse event location (x,y) to domain value
|
|
@@ -75,14 +86,50 @@ export function createScale(scale, domain, range, context) {
|
|
|
75
86
|
if (domain) {
|
|
76
87
|
scaleCopy.domain(domain);
|
|
77
88
|
}
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
if (range != null) {
|
|
90
|
+
if (typeof range === 'function') {
|
|
91
|
+
scaleCopy.range(range(context));
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
scaleCopy.range(range);
|
|
95
|
+
}
|
|
83
96
|
}
|
|
84
97
|
return scaleCopy;
|
|
85
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Auto-detect scale type based on domain values or data values
|
|
101
|
+
*/
|
|
102
|
+
export function autoScale(domain, data, propAccessor) {
|
|
103
|
+
let values = null;
|
|
104
|
+
if (domain && domain.length > 0 && domain.some((d) => d != null)) {
|
|
105
|
+
// Determine based on non-null domain values
|
|
106
|
+
values = domain.filter((d) => d != null);
|
|
107
|
+
}
|
|
108
|
+
else if (data && data.length > 0 && propAccessor) {
|
|
109
|
+
// Determine based on data values
|
|
110
|
+
const value = accessor(propAccessor)(data[0]);
|
|
111
|
+
// If accessor defined with an array (ex. `x={['start', 'end']}`) use both values
|
|
112
|
+
if (Array.isArray(value)) {
|
|
113
|
+
values = value;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
values = [value];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (values) {
|
|
120
|
+
if (values.some((v) => v instanceof Date)) {
|
|
121
|
+
return scaleTime();
|
|
122
|
+
}
|
|
123
|
+
else if (values.some((v) => typeof v === 'number')) {
|
|
124
|
+
return scaleLinear();
|
|
125
|
+
}
|
|
126
|
+
else if (values.some((v) => typeof v === 'string')) {
|
|
127
|
+
return scaleBand();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// fallback to linear scale
|
|
131
|
+
return scaleLinear();
|
|
132
|
+
}
|
|
86
133
|
/**
|
|
87
134
|
* Create a `scaleBand()` within another scaleBand()'s bandwidth
|
|
88
135
|
* (typically a x1 of an x0 scale, used for grouping)
|
|
@@ -107,7 +154,7 @@ export function groupScaleBand(scale, flatData, groupBy, padding) {
|
|
|
107
154
|
export function tweenedScale(scale, tweenedOptions = {}) {
|
|
108
155
|
const tweenedDomain = new Tween(undefined, tweenedOptions);
|
|
109
156
|
const tweenedRange = new Tween(undefined, tweenedOptions);
|
|
110
|
-
const
|
|
157
|
+
const _tweenedScale = $derived.by(() => {
|
|
111
158
|
const scaledInstance = scale.domain ? scale : scale();
|
|
112
159
|
if (tweenedDomain.current) {
|
|
113
160
|
scaledInstance.domain(tweenedDomain.current);
|
|
@@ -119,7 +166,7 @@ export function tweenedScale(scale, tweenedOptions = {}) {
|
|
|
119
166
|
});
|
|
120
167
|
return {
|
|
121
168
|
get current() {
|
|
122
|
-
return
|
|
169
|
+
return _tweenedScale;
|
|
123
170
|
},
|
|
124
171
|
domain: (values) => tweenedDomain.set(values),
|
|
125
172
|
range: (values) => tweenedRange.set(values),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { scaleBand } from 'd3-scale';
|
|
3
|
+
import { scaleBandInvert, scaleInvert } from './scales.svelte.js';
|
|
4
|
+
describe('scaleBandInvert', () => {
|
|
5
|
+
const domain = ['A', 'B', 'C', 'D', 'E'];
|
|
6
|
+
it('should return correct category for standard range [0, width]', () => {
|
|
7
|
+
const scale = scaleBand().domain(domain).range([0, 500]).padding(0.1);
|
|
8
|
+
const invert = scaleBandInvert(scale);
|
|
9
|
+
// Each category should map back from its center
|
|
10
|
+
for (const category of domain) {
|
|
11
|
+
const x = scale(category) + scale.bandwidth() / 2;
|
|
12
|
+
expect(invert(x)).toBe(category);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
it('should clamp to first category for values before range', () => {
|
|
16
|
+
const scale = scaleBand().domain(domain).range([0, 500]).padding(0.1);
|
|
17
|
+
const invert = scaleBandInvert(scale);
|
|
18
|
+
expect(invert(-50)).toBe('A');
|
|
19
|
+
});
|
|
20
|
+
it('should clamp to last category for values after range', () => {
|
|
21
|
+
const scale = scaleBand().domain(domain).range([0, 500]).padding(0.1);
|
|
22
|
+
const invert = scaleBandInvert(scale);
|
|
23
|
+
expect(invert(600)).toBe('E');
|
|
24
|
+
});
|
|
25
|
+
it('should handle offset range (non-zero start)', () => {
|
|
26
|
+
// Simulates a zoomed band scale where the range is shifted
|
|
27
|
+
const scale = scaleBand().domain(domain).range([-200, 800]).padding(0.1);
|
|
28
|
+
const invert = scaleBandInvert(scale);
|
|
29
|
+
// Each category should still map correctly
|
|
30
|
+
for (const category of domain) {
|
|
31
|
+
const x = scale(category) + scale.bandwidth() / 2;
|
|
32
|
+
expect(invert(x)).toBe(category);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
it('should return correct category at viewport edges with offset range', () => {
|
|
36
|
+
// Range [-400, 600] means categories span 1000px but viewport is [0, ~500]
|
|
37
|
+
const scale = scaleBand().domain(domain).range([-400, 600]).padding(0.4);
|
|
38
|
+
const invert = scaleBandInvert(scale);
|
|
39
|
+
// At x=0, we should get whichever category is nearest that pixel position
|
|
40
|
+
const categoryAtZero = invert(0);
|
|
41
|
+
expect(domain).toContain(categoryAtZero);
|
|
42
|
+
// The returned category should be close to x=0 (within one step)
|
|
43
|
+
const pos = scale(categoryAtZero);
|
|
44
|
+
expect(Math.abs(pos)).toBeLessThan(scale.step());
|
|
45
|
+
});
|
|
46
|
+
it('should work with no padding', () => {
|
|
47
|
+
const scale = scaleBand().domain(domain).range([0, 500]);
|
|
48
|
+
const invert = scaleBandInvert(scale);
|
|
49
|
+
// bandwidth = 100, each category is 100px wide
|
|
50
|
+
expect(invert(50)).toBe('A');
|
|
51
|
+
expect(invert(150)).toBe('B');
|
|
52
|
+
expect(invert(450)).toBe('E');
|
|
53
|
+
});
|
|
54
|
+
it('should work with single-element domain', () => {
|
|
55
|
+
const scale = scaleBand().domain(['X']).range([0, 500]).padding(0.1);
|
|
56
|
+
const invert = scaleBandInvert(scale);
|
|
57
|
+
expect(invert(250)).toBe('X');
|
|
58
|
+
expect(invert(0)).toBe('X');
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
describe('scaleInvert', () => {
|
|
62
|
+
it('should use scaleBandInvert for band scales', () => {
|
|
63
|
+
const scale = scaleBand().domain(['A', 'B', 'C']).range([0, 300]).padding(0.1);
|
|
64
|
+
const center = scale('B') + scale.bandwidth() / 2;
|
|
65
|
+
expect(scaleInvert(scale, center)).toBe('B');
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Get points to create a polygon with given number of points and radius
|
|
2
|
+
*
|
|
3
|
+
* @param count - Number of points
|
|
4
|
+
* @param radius - Radius of the polygon
|
|
5
|
+
* @returns Array of points (angle, radius)
|
|
6
|
+
*/
|
|
7
|
+
export declare function polygonPoints(count: number, radius: number, rotate?: number): {
|
|
8
|
+
angle: number;
|
|
9
|
+
radius: number;
|
|
10
|
+
}[];
|
|
11
|
+
/** Create polygon
|
|
12
|
+
*
|
|
13
|
+
* @param cx - Center x coordinate
|
|
14
|
+
* @param cy - Center y coordinate
|
|
15
|
+
* @param count - Number of points
|
|
16
|
+
* @param radius - Radius of the polygon
|
|
17
|
+
* @param rotate - Rotation of the polygon (degrees)
|
|
18
|
+
* @param inset - Percent to inset odd points (<1 inset, >1 outset)
|
|
19
|
+
* @param scaleX - Horizontal stretch factor
|
|
20
|
+
* @param scaleY - Vertical stretch factor
|
|
21
|
+
* @param skewX - Skew angle in degrees along the X axis
|
|
22
|
+
* @param skewY - Skew angle in degrees along the Y axis
|
|
23
|
+
* @param tiltX - Tilt factor for x-coordinates (0 = no tilt, positive moves points top => down, negative moves points bottom => up)
|
|
24
|
+
* @param tiltY - Tilt factor for y-coordinates (0 = no tilt, positive moves points left => right, negative moves points right => left)
|
|
25
|
+
* @returns Array of points (x, y)
|
|
26
|
+
*/
|
|
27
|
+
export declare function polygon(options: {
|
|
28
|
+
cx: number;
|
|
29
|
+
cy: number;
|
|
30
|
+
count: number;
|
|
31
|
+
radius: number;
|
|
32
|
+
rotate?: number;
|
|
33
|
+
inset?: number;
|
|
34
|
+
scaleX?: number;
|
|
35
|
+
scaleY?: number;
|
|
36
|
+
skewX?: number;
|
|
37
|
+
skewY?: number;
|
|
38
|
+
tiltX?: number;
|
|
39
|
+
tiltY?: number;
|
|
40
|
+
}): {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
}[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { range } from 'd3-array';
|
|
2
|
+
import { degreesToRadians } from './math.js';
|
|
3
|
+
/** Get points to create a polygon with given number of points and radius
|
|
4
|
+
*
|
|
5
|
+
* @param count - Number of points
|
|
6
|
+
* @param radius - Radius of the polygon
|
|
7
|
+
* @returns Array of points (angle, radius)
|
|
8
|
+
*/
|
|
9
|
+
export function polygonPoints(count, radius, rotate = 0) {
|
|
10
|
+
const angle = 360 / count;
|
|
11
|
+
return range(count).map((index) => {
|
|
12
|
+
return {
|
|
13
|
+
angle: degreesToRadians(angle * index) + degreesToRadians(rotate),
|
|
14
|
+
radius,
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/** Create polygon
|
|
19
|
+
*
|
|
20
|
+
* @param cx - Center x coordinate
|
|
21
|
+
* @param cy - Center y coordinate
|
|
22
|
+
* @param count - Number of points
|
|
23
|
+
* @param radius - Radius of the polygon
|
|
24
|
+
* @param rotate - Rotation of the polygon (degrees)
|
|
25
|
+
* @param inset - Percent to inset odd points (<1 inset, >1 outset)
|
|
26
|
+
* @param scaleX - Horizontal stretch factor
|
|
27
|
+
* @param scaleY - Vertical stretch factor
|
|
28
|
+
* @param skewX - Skew angle in degrees along the X axis
|
|
29
|
+
* @param skewY - Skew angle in degrees along the Y axis
|
|
30
|
+
* @param tiltX - Tilt factor for x-coordinates (0 = no tilt, positive moves points top => down, negative moves points bottom => up)
|
|
31
|
+
* @param tiltY - Tilt factor for y-coordinates (0 = no tilt, positive moves points left => right, negative moves points right => left)
|
|
32
|
+
* @returns Array of points (x, y)
|
|
33
|
+
*/
|
|
34
|
+
export function polygon(options) {
|
|
35
|
+
const { cx, cy, count, radius, rotate = 0, inset = 1, scaleX = 1, scaleY = 1, skewX = 0, skewY = 0, tiltX = 0, tiltY = 0, } = options;
|
|
36
|
+
const skewXRad = degreesToRadians(skewX);
|
|
37
|
+
const skewYRad = degreesToRadians(skewY);
|
|
38
|
+
return polygonPoints(count, radius, rotate).map(({ angle, radius }, i) => {
|
|
39
|
+
// inset
|
|
40
|
+
const insetScale = i % 2 == 0 ? 1 : 1 - inset;
|
|
41
|
+
// scale
|
|
42
|
+
let x = radius * insetScale * Math.cos(angle) * scaleX;
|
|
43
|
+
let y = radius * insetScale * Math.sin(angle) * scaleY;
|
|
44
|
+
// tilt
|
|
45
|
+
const normalizedY = (y + radius) / (2 * radius);
|
|
46
|
+
const normalizedX = (x + radius) / (2 * radius);
|
|
47
|
+
const tiltScaleX = tiltX > 0 ? 1 + tiltX * (1 - normalizedY) : 1 - tiltX * normalizedY;
|
|
48
|
+
const tiltScaleY = tiltY > 0 ? 1 + tiltY * (1 - normalizedX) : 1 - tiltY * normalizedX;
|
|
49
|
+
x *= tiltScaleX;
|
|
50
|
+
y *= tiltScaleY;
|
|
51
|
+
// skew
|
|
52
|
+
const xSkewed = x + Math.tan(skewXRad) * y;
|
|
53
|
+
const ySkewed = y + Math.tan(skewYRad) * x;
|
|
54
|
+
return {
|
|
55
|
+
x: cx + xSkewed,
|
|
56
|
+
y: cy + ySkewed,
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
package/dist/utils/stack.js
CHANGED
|
@@ -91,7 +91,7 @@ export function stackOffsetSeparated(series, order) {
|
|
|
91
91
|
return;
|
|
92
92
|
// Standard series
|
|
93
93
|
for (var i = 1, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
|
|
94
|
-
(s0 = s1), (s1 = series[order[i]]);
|
|
94
|
+
((s0 = s1), (s1 = series[order[i]]));
|
|
95
95
|
// @ts-expect-error
|
|
96
96
|
let base = max(s0, (d) => d[1]) + gap; // here is where you calculate the maximum of the previous layer
|
|
97
97
|
for (var j = 0; j < m; ++j) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface BoxStats {
|
|
2
|
+
min: number;
|
|
3
|
+
q1: number;
|
|
4
|
+
median: number;
|
|
5
|
+
q3: number;
|
|
6
|
+
max: number;
|
|
7
|
+
outliers: number[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Compute box plot statistics (five-number summary + outliers) from raw numeric values.
|
|
11
|
+
* Uses the standard Tukey method: outliers are values beyond `k * IQR` from Q1/Q3.
|
|
12
|
+
*
|
|
13
|
+
* @param values - Array of numeric values
|
|
14
|
+
* @param k - IQR multiplier for outlier detection (default: 1.5)
|
|
15
|
+
*/
|
|
16
|
+
export declare function computeBoxStats(values: number[], k?: number): BoxStats;
|
|
17
|
+
/**
|
|
18
|
+
* Compute kernel density estimation (KDE) for a set of numeric values.
|
|
19
|
+
* Returns an array of [value, density] pairs suitable for rendering violin plots.
|
|
20
|
+
*
|
|
21
|
+
* @param values - Array of numeric values
|
|
22
|
+
* @param options - KDE configuration
|
|
23
|
+
*/
|
|
24
|
+
export declare function kde(values: number[], options?: {
|
|
25
|
+
/** KDE bandwidth. Defaults to Silverman's rule of thumb. */
|
|
26
|
+
bandwidth?: number;
|
|
27
|
+
/** Number of evaluation points, or explicit array of thresholds. Default: 50 */
|
|
28
|
+
thresholds?: number | number[];
|
|
29
|
+
/** Kernel function factory. Default: Epanechnikov */
|
|
30
|
+
kernel?: (bandwidth: number) => (x: number) => number;
|
|
31
|
+
/** Domain extent [min, max]. Defaults to data extent. */
|
|
32
|
+
extent?: [number, number];
|
|
33
|
+
}): [number, number][];
|