@d3plus/core 3.1.6 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9922 -78537
- package/es/index.js +8 -0
- package/es/index.js.map +1 -1
- package/es/internal.js +54 -0
- package/es/internal.js.map +1 -0
- package/es/src/charts/AreaPlot/index.js +36 -0
- package/es/src/charts/AreaPlot/index.js.map +1 -0
- package/es/src/charts/BarChart/index.js +48 -0
- package/es/src/charts/BarChart/index.js.map +1 -0
- package/es/src/charts/BoxWhisker/index.js +52 -0
- package/es/src/charts/BoxWhisker/index.js.map +1 -0
- package/es/src/charts/BumpChart/index.js +81 -0
- package/es/src/charts/BumpChart/index.js.map +1 -0
- package/es/src/charts/Donut/index.js +42 -0
- package/es/src/charts/Donut/index.js.map +1 -0
- package/es/src/charts/Geomap/applyLayout.js +208 -0
- package/es/src/charts/Geomap/applyLayout.js.map +1 -0
- package/es/src/charts/Geomap/emit.js +169 -0
- package/es/src/charts/Geomap/emit.js.map +1 -0
- package/es/src/charts/Geomap/index.js +521 -0
- package/es/src/charts/Geomap/index.js.map +1 -0
- package/es/src/charts/LinePlot/index.js +32 -0
- package/es/src/charts/LinePlot/index.js.map +1 -0
- package/es/src/charts/Matrix/applyLayout.js +92 -0
- package/es/src/charts/Matrix/applyLayout.js.map +1 -0
- package/es/src/charts/Matrix/emit.js +44 -0
- package/es/src/charts/Matrix/emit.js.map +1 -0
- package/es/src/charts/Matrix/index.js +154 -0
- package/es/src/charts/Matrix/index.js.map +1 -0
- package/es/src/charts/Network/applyLayout.js +322 -0
- package/es/src/charts/Network/applyLayout.js.map +1 -0
- package/es/src/charts/Network/emit.js +273 -0
- package/es/src/charts/Network/emit.js.map +1 -0
- package/es/src/charts/Network/index.js +422 -0
- package/es/src/charts/Network/index.js.map +1 -0
- package/es/src/charts/Pack/applyLayout.js +46 -0
- package/es/src/charts/Pack/applyLayout.js.map +1 -0
- package/es/src/charts/Pack/emit.js +116 -0
- package/es/src/charts/Pack/emit.js.map +1 -0
- package/es/src/charts/Pack/index.js +194 -0
- package/es/src/charts/Pack/index.js.map +1 -0
- package/es/src/charts/Pack/recursionCircles.js +18 -0
- package/es/src/charts/Pack/recursionCircles.js.map +1 -0
- package/es/src/charts/Pie/applyLayout.js +44 -0
- package/es/src/charts/Pie/applyLayout.js.map +1 -0
- package/es/src/charts/Pie/emit.js +111 -0
- package/es/src/charts/Pie/emit.js.map +1 -0
- package/es/src/charts/Pie/index.js +134 -0
- package/es/src/charts/Pie/index.js.map +1 -0
- package/es/src/charts/Plot/draw.js +424 -0
- package/es/src/charts/Plot/draw.js.map +1 -0
- package/es/src/charts/Plot/index.js +827 -0
- package/es/src/charts/Plot/index.js.map +1 -0
- package/es/src/charts/Plot/labelPlacement.js +36 -0
- package/es/src/charts/Plot/labelPlacement.js.map +1 -0
- package/es/src/charts/Plot/pipeline.js +594 -0
- package/es/src/charts/Plot/pipeline.js.map +1 -0
- package/es/src/charts/Plot/pipelineDomains.js +254 -0
- package/es/src/charts/Plot/pipelineDomains.js.map +1 -0
- package/es/src/charts/Plot/pipelineLineLabels.js +210 -0
- package/es/src/charts/Plot/pipelineLineLabels.js.map +1 -0
- package/es/src/charts/Plot/shapeDefaults.js +189 -0
- package/es/src/charts/Plot/shapeDefaults.js.map +1 -0
- package/es/src/charts/Plot/stackHelpers.js +52 -0
- package/es/src/charts/Plot/stackHelpers.js.map +1 -0
- package/es/src/charts/Priestley/applyLayout.js +121 -0
- package/es/src/charts/Priestley/applyLayout.js.map +1 -0
- package/es/src/charts/Priestley/emit.js +129 -0
- package/es/src/charts/Priestley/emit.js.map +1 -0
- package/es/src/charts/Priestley/index.js +97 -0
- package/es/src/charts/Priestley/index.js.map +1 -0
- package/es/src/charts/Radar/applyLayout.js +326 -0
- package/es/src/charts/Radar/applyLayout.js.map +1 -0
- package/es/src/charts/Radar/emit.js +28 -0
- package/es/src/charts/Radar/emit.js.map +1 -0
- package/es/src/charts/Radar/index.js +98 -0
- package/es/src/charts/Radar/index.js.map +1 -0
- package/es/src/charts/RadialMatrix/applyLayout.js +132 -0
- package/es/src/charts/RadialMatrix/applyLayout.js.map +1 -0
- package/es/src/charts/RadialMatrix/emit.js +33 -0
- package/es/src/charts/RadialMatrix/emit.js.map +1 -0
- package/es/src/charts/RadialMatrix/index.js +144 -0
- package/es/src/charts/RadialMatrix/index.js.map +1 -0
- package/es/src/charts/Rings/applyLayout.js +508 -0
- package/es/src/charts/Rings/applyLayout.js.map +1 -0
- package/es/src/charts/Rings/emit.js +222 -0
- package/es/src/charts/Rings/emit.js.map +1 -0
- package/es/src/charts/Rings/index.js +245 -0
- package/es/src/charts/Rings/index.js.map +1 -0
- package/es/src/charts/Sankey/applyLayout.js +107 -0
- package/es/src/charts/Sankey/applyLayout.js.map +1 -0
- package/es/src/charts/Sankey/emit.js +134 -0
- package/es/src/charts/Sankey/emit.js.map +1 -0
- package/es/src/charts/Sankey/index.js +219 -0
- package/es/src/charts/Sankey/index.js.map +1 -0
- package/es/src/charts/StackedArea/index.js +27 -0
- package/es/src/charts/StackedArea/index.js.map +1 -0
- package/es/src/charts/Tree/applyLayout.js +233 -0
- package/es/src/charts/Tree/applyLayout.js.map +1 -0
- package/es/src/charts/Tree/emit.js +257 -0
- package/es/src/charts/Tree/emit.js.map +1 -0
- package/es/src/charts/Tree/index.js +105 -0
- package/es/src/charts/Tree/index.js.map +1 -0
- package/es/src/charts/Treemap/applyLayout.js +85 -0
- package/es/src/charts/Treemap/applyLayout.js.map +1 -0
- package/es/src/charts/Treemap/emit.js +141 -0
- package/es/src/charts/Treemap/emit.js.map +1 -0
- package/es/src/charts/Treemap/index.js +177 -0
- package/es/src/charts/Treemap/index.js.map +1 -0
- package/es/src/charts/Treemap/thresholdFunction.js +112 -0
- package/es/src/charts/Treemap/thresholdFunction.js.map +1 -0
- package/es/src/charts/definition/ChartDefinition.js +12 -0
- package/es/src/charts/definition/ChartDefinition.js.map +1 -0
- package/es/src/charts/definition/applyDefinition.js +107 -0
- package/es/src/charts/definition/applyDefinition.js.map +1 -0
- package/es/src/charts/definition/makeChart.js +153 -0
- package/es/src/charts/definition/makeChart.js.map +1 -0
- package/es/src/charts/drawSteps/zoomControls.js +231 -96
- package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
- package/es/src/charts/events/click.legend.js +2 -2
- package/es/src/charts/events/click.legend.js.map +1 -1
- package/es/src/charts/events/click.shape.js +5 -5
- package/es/src/charts/events/click.shape.js.map +1 -1
- package/es/src/charts/events/mouseenter.js +20 -1
- package/es/src/charts/events/mouseenter.js.map +1 -1
- package/es/src/charts/events/mouseleave.js +19 -4
- package/es/src/charts/events/mouseleave.js.map +1 -1
- package/es/src/charts/events/mousemove.legend.js +10 -10
- package/es/src/charts/events/mousemove.legend.js.map +1 -1
- package/es/src/charts/events/mousemove.shape.js +14 -8
- package/es/src/charts/events/mousemove.shape.js.map +1 -1
- package/es/src/charts/events/touchstart.body.js.map +1 -1
- package/es/src/charts/features/axes.js +432 -0
- package/es/src/charts/features/axes.js.map +1 -0
- package/es/src/charts/features/chartGeometry.js +66 -0
- package/es/src/charts/features/chartGeometry.js.map +1 -0
- package/es/src/charts/features/colorScaleBucket.js +92 -0
- package/es/src/charts/features/colorScaleBucket.js.map +1 -0
- package/es/src/charts/features/emitHelpers.js +217 -0
- package/es/src/charts/features/emitHelpers.js.map +1 -0
- package/es/src/charts/features/ensureZoomDom.js +71 -0
- package/es/src/charts/features/ensureZoomDom.js.map +1 -0
- package/es/src/charts/features/features.js +650 -0
- package/es/src/charts/features/features.js.map +1 -0
- package/es/src/charts/features/featuresLegend.js +180 -0
- package/es/src/charts/features/featuresLegend.js.map +1 -0
- package/es/src/charts/features/legendLabel.js +12 -0
- package/es/src/charts/features/legendLabel.js.map +1 -0
- package/es/src/charts/features/lineLabels.js +154 -0
- package/es/src/charts/features/lineLabels.js.map +1 -0
- package/es/src/charts/features/plotPaint.js +512 -0
- package/es/src/charts/features/plotPaint.js.map +1 -0
- package/es/src/charts/features/shapeEmit.js +273 -0
- package/es/src/charts/features/shapeEmit.js.map +1 -0
- package/es/src/charts/helpers/matrixData.js +3 -3
- package/es/src/charts/helpers/matrixData.js.map +1 -1
- package/es/src/charts/index.js +21 -21
- package/es/src/charts/index.js.map +1 -1
- package/es/src/charts/pipeline/resolveSpec.js +44 -0
- package/es/src/charts/pipeline/resolveSpec.js.map +1 -0
- package/es/src/charts/pipeline/runChartDraw.js +109 -0
- package/es/src/charts/pipeline/runChartDraw.js.map +1 -0
- package/es/src/charts/pipeline/runVizPipeline.js +84 -0
- package/es/src/charts/pipeline/runVizPipeline.js.map +1 -0
- package/es/src/charts/pipeline/stages.js +103 -0
- package/es/src/charts/pipeline/stages.js.map +1 -0
- package/es/src/charts/pipeline/vizContext.js +29 -0
- package/es/src/charts/pipeline/vizContext.js.map +1 -0
- package/es/src/charts/pipeline/vizDraw.js +37 -0
- package/es/src/charts/pipeline/vizDraw.js.map +1 -0
- package/es/src/charts/pipeline/vizDrawPure.js +174 -0
- package/es/src/charts/pipeline/vizDrawPure.js.map +1 -0
- package/es/src/charts/pipeline/vizPreDraw.js +145 -0
- package/es/src/charts/pipeline/vizPreDraw.js.map +1 -0
- package/es/src/charts/pipeline/vizPreDrawPure.js +279 -0
- package/es/src/charts/pipeline/vizPreDrawPure.js.map +1 -0
- package/es/src/charts/plotBuffers/Bar.js +4 -4
- package/es/src/charts/plotBuffers/Bar.js.map +1 -1
- package/es/src/charts/plotBuffers/Box.js +4 -4
- package/es/src/charts/plotBuffers/Box.js.map +1 -1
- package/es/src/charts/plotBuffers/Circle.js +2 -2
- package/es/src/charts/plotBuffers/Circle.js.map +1 -1
- package/es/src/charts/plotBuffers/Line.js +5 -5
- package/es/src/charts/plotBuffers/Line.js.map +1 -1
- package/es/src/charts/plotBuffers/Rect.js +2 -2
- package/es/src/charts/plotBuffers/Rect.js.map +1 -1
- package/es/src/charts/plotBuffers/discreteBuffer.js +1 -2
- package/es/src/charts/plotBuffers/discreteBuffer.js.map +1 -1
- package/es/src/charts/plotBuffers/numericBuffer.js +1 -2
- package/es/src/charts/plotBuffers/numericBuffer.js.map +1 -1
- package/es/src/charts/viz/Viz.js +985 -0
- package/es/src/charts/viz/Viz.js.map +1 -0
- package/es/src/charts/viz/VizBase.js +447 -0
- package/es/src/charts/viz/VizBase.js.map +1 -0
- package/es/src/charts/viz/VizBaseConfig.js +504 -0
- package/es/src/charts/viz/VizBaseConfig.js.map +1 -0
- package/es/src/charts/viz/interactionOpacity.js +247 -0
- package/es/src/charts/viz/interactionOpacity.js.map +1 -0
- package/es/src/charts/viz/ordinalColor.js +71 -0
- package/es/src/charts/viz/ordinalColor.js.map +1 -0
- package/es/src/charts/viz/trailCatchup.js +127 -0
- package/es/src/charts/viz/trailCatchup.js.map +1 -0
- package/es/src/charts/viz/vizDefaults.js +602 -0
- package/es/src/charts/viz/vizDefaults.js.map +1 -0
- package/es/src/charts/viz/vizRender.js +251 -0
- package/es/src/charts/viz/vizRender.js.map +1 -0
- package/es/src/charts/viz/vizTypes.js +28 -0
- package/es/src/charts/viz/vizTypes.js.map +1 -0
- package/es/src/components/Axis/Axis.js +691 -0
- package/es/src/components/Axis/Axis.js.map +1 -0
- package/es/src/components/Axis/AxisBottom.js.map +1 -0
- package/es/src/components/Axis/AxisLeft.js.map +1 -0
- package/es/src/components/Axis/AxisRight.js.map +1 -0
- package/es/src/components/Axis/AxisTop.js.map +1 -0
- package/es/src/components/Axis/axisLayout.js +208 -0
- package/es/src/components/Axis/axisLayout.js.map +1 -0
- package/es/src/components/Axis/axisLayoutLabels.js +177 -0
- package/es/src/components/Axis/axisLayoutLabels.js.map +1 -0
- package/es/src/components/Axis/axisLayoutScale.js +374 -0
- package/es/src/components/Axis/axisLayoutScale.js.map +1 -0
- package/es/src/components/Axis/axisRender.js +535 -0
- package/es/src/components/Axis/axisRender.js.map +1 -0
- package/es/src/components/ColorScale/ColorScale.js +506 -0
- package/es/src/components/ColorScale/ColorScale.js.map +1 -0
- package/es/src/components/ColorScale/colorScaleRender.js +277 -0
- package/es/src/components/ColorScale/colorScaleRender.js.map +1 -0
- package/es/src/components/ColorScale/colorScaleScale.js +274 -0
- package/es/src/components/ColorScale/colorScaleScale.js.map +1 -0
- package/es/src/components/Legend/Legend.js +445 -0
- package/es/src/components/Legend/Legend.js.map +1 -0
- package/es/src/components/Legend/legendConfig.js +87 -0
- package/es/src/components/Legend/legendConfig.js.map +1 -0
- package/es/src/components/Legend/legendRender.js +245 -0
- package/es/src/components/Legend/legendRender.js.map +1 -0
- package/es/src/components/Message.js.map +1 -1
- package/es/src/components/TextBox.js +639 -453
- package/es/src/components/TextBox.js.map +1 -1
- package/es/src/components/Timeline/Timeline.js +674 -0
- package/es/src/components/Timeline/Timeline.js.map +1 -0
- package/es/src/components/Timeline/timelineConfig.js +115 -0
- package/es/src/components/Timeline/timelineConfig.js.map +1 -0
- package/es/src/components/Timeline/timelineRender.js +267 -0
- package/es/src/components/Timeline/timelineRender.js.map +1 -0
- package/es/src/components/Tooltip.js +288 -249
- package/es/src/components/Tooltip.js.map +1 -1
- package/es/src/components/index.js +8 -8
- package/es/src/components/index.js.map +1 -1
- package/es/src/fluent.js +265 -0
- package/es/src/fluent.js.map +1 -0
- package/es/src/shapes/Area.js +96 -114
- package/es/src/shapes/Area.js.map +1 -1
- package/es/src/shapes/Bar.js +71 -86
- package/es/src/shapes/Bar.js.map +1 -1
- package/es/src/shapes/Box.js +295 -190
- package/es/src/shapes/Box.js.map +1 -1
- package/es/src/shapes/Circle.js +72 -31
- package/es/src/shapes/Circle.js.map +1 -1
- package/es/src/shapes/Image.js +164 -85
- package/es/src/shapes/Image.js.map +1 -1
- package/es/src/shapes/Line.js +51 -94
- package/es/src/shapes/Line.js.map +1 -1
- package/es/src/shapes/Path.js +33 -41
- package/es/src/shapes/Path.js.map +1 -1
- package/es/src/shapes/Rect.js +86 -37
- package/es/src/shapes/Rect.js.map +1 -1
- package/es/src/shapes/Shape.js +655 -678
- package/es/src/shapes/Shape.js.map +1 -1
- package/es/src/shapes/Whisker.js +156 -61
- package/es/src/shapes/Whisker.js.map +1 -1
- package/es/src/shapes/buildLabelData.js +70 -0
- package/es/src/shapes/buildLabelData.js.map +1 -0
- package/es/src/shapes/emitLabels.js +84 -0
- package/es/src/shapes/emitLabels.js.map +1 -0
- package/es/src/shapes/hitAreaNode.js +37 -0
- package/es/src/shapes/hitAreaNode.js.map +1 -0
- package/es/src/shapes/sceneSort.js +57 -0
- package/es/src/shapes/sceneSort.js.map +1 -0
- package/es/src/shapes/shapeConfig.js +31 -0
- package/es/src/shapes/shapeConfig.js.map +1 -0
- package/es/src/utils/BaseClass.js +35 -19
- package/es/src/utils/BaseClass.js.map +1 -1
- package/es/src/utils/D3Scale.js +16 -0
- package/es/src/utils/D3Scale.js.map +1 -0
- package/es/src/utils/D3plusConfig.js.map +1 -1
- package/es/src/utils/configPrep.js +8 -3
- package/es/src/utils/configPrep.js.map +1 -1
- package/es/src/utils/getProp.js +1 -1
- package/es/src/utils/getProp.js.map +1 -1
- package/es/src/utils/index.js +1 -0
- package/es/src/utils/index.js.map +1 -1
- package/es/src/utils/paintComponentScene.js +59 -0
- package/es/src/utils/paintComponentScene.js.map +1 -0
- package/es/umd-entry.js +16 -0
- package/es/umd-entry.js.map +1 -0
- package/package.json +14 -9
- package/types/index.d.ts +3 -1
- package/types/internal.d.ts +54 -0
- package/types/src/charts/AreaPlot/index.d.ts +10 -0
- package/types/src/charts/BarChart/index.d.ts +10 -0
- package/types/src/charts/BoxWhisker/index.d.ts +11 -0
- package/types/src/charts/BumpChart/index.d.ts +11 -0
- package/types/src/charts/ChartDefinition.d.ts +75 -0
- package/types/src/charts/Donut/index.d.ts +13 -0
- package/types/src/charts/Geomap/applyLayout.d.ts +7 -0
- package/types/src/charts/Geomap/emit.d.ts +7 -0
- package/types/src/charts/Geomap/index.d.ts +14 -0
- package/types/src/charts/Geomap.d.ts +6 -0
- package/types/src/charts/LinePlot/index.d.ts +10 -0
- package/types/src/charts/Matrix/applyLayout.d.ts +9 -0
- package/types/src/charts/Matrix/emit.d.ts +6 -0
- package/types/src/charts/Matrix/index.d.ts +14 -0
- package/types/src/charts/Matrix.d.ts +0 -26
- package/types/src/charts/Network/applyLayout.d.ts +10 -0
- package/types/src/charts/Network/emit.d.ts +6 -0
- package/types/src/charts/Network/index.d.ts +7 -0
- package/types/src/charts/Network.d.ts +0 -24
- package/types/src/charts/Pack/applyLayout.d.ts +16 -0
- package/types/src/charts/Pack/emit.d.ts +6 -0
- package/types/src/charts/Pack/index.d.ts +15 -0
- package/types/src/charts/Pack/recursionCircles.d.ts +7 -0
- package/types/src/charts/Pack.d.ts +0 -13
- package/types/src/charts/Pie/applyLayout.d.ts +8 -0
- package/types/src/charts/Pie/emit.d.ts +5 -0
- package/types/src/charts/Pie/index.d.ts +14 -0
- package/types/src/charts/Pie.d.ts +0 -27
- package/types/src/charts/Plot/draw.d.ts +2 -0
- package/types/src/charts/Plot/index.d.ts +167 -0
- package/types/src/charts/Plot/labelPlacement.d.ts +15 -0
- package/types/src/charts/Plot/pipeline.d.ts +70 -0
- package/types/src/charts/Plot/pipelineDomains.d.ts +2 -0
- package/types/src/charts/Plot/pipelineLineLabels.d.ts +2 -0
- package/types/src/charts/Plot/shapeDefaults.d.ts +64 -0
- package/types/src/charts/Plot/stackHelpers.d.ts +24 -0
- package/types/src/charts/Plot.d.ts +23 -72
- package/types/src/charts/Priestley/applyLayout.d.ts +21 -0
- package/types/src/charts/Priestley/emit.d.ts +6 -0
- package/types/src/charts/Priestley/index.d.ts +14 -0
- package/types/src/charts/Radar/applyLayout.d.ts +10 -0
- package/types/src/charts/Radar/emit.d.ts +7 -0
- package/types/src/charts/Radar/index.d.ts +14 -0
- package/types/src/charts/RadialMatrix/applyLayout.d.ts +11 -0
- package/types/src/charts/RadialMatrix/emit.d.ts +6 -0
- package/types/src/charts/RadialMatrix/index.d.ts +14 -0
- package/types/src/charts/RadialMatrix.d.ts +0 -15
- package/types/src/charts/Rings/applyLayout.d.ts +2 -0
- package/types/src/charts/Rings/emit.d.ts +7 -0
- package/types/src/charts/Rings/index.d.ts +15 -0
- package/types/src/charts/Rings.d.ts +0 -13
- package/types/src/charts/Sankey/applyLayout.d.ts +7 -0
- package/types/src/charts/Sankey/emit.d.ts +6 -0
- package/types/src/charts/Sankey/index.d.ts +7 -0
- package/types/src/charts/Sankey.d.ts +0 -4
- package/types/src/charts/StackedArea/index.d.ts +10 -0
- package/types/src/charts/Tree/applyLayout.d.ts +2 -0
- package/types/src/charts/Tree/emit.d.ts +7 -0
- package/types/src/charts/Tree/index.d.ts +14 -0
- package/types/src/charts/Tree.d.ts +0 -16
- package/types/src/charts/Treemap/applyLayout.d.ts +16 -0
- package/types/src/charts/Treemap/emit.d.ts +6 -0
- package/types/src/charts/Treemap/index.d.ts +18 -0
- package/types/src/charts/Treemap/thresholdFunction.d.ts +25 -0
- package/types/src/charts/Treemap.d.ts +4 -13
- package/types/src/charts/Viz.d.ts +49 -361
- package/types/src/charts/VizBase.d.ts +158 -0
- package/types/src/charts/VizBaseConfig.d.ts +148 -0
- package/types/src/charts/applyDefinition.d.ts +13 -0
- package/types/src/charts/axes.d.ts +134 -0
- package/types/src/charts/chartGeometry.d.ts +58 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +84 -0
- package/types/src/charts/definition/applyDefinition.d.ts +13 -0
- package/types/src/charts/definition/makeChart.d.ts +22 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +25 -5
- package/types/src/charts/emitHelpers.d.ts +122 -0
- package/types/src/charts/ensureZoomDom.d.ts +39 -0
- package/types/src/charts/events/click.legend.d.ts +1 -1
- package/types/src/charts/events/click.shape.d.ts +1 -1
- package/types/src/charts/events/mouseenter.d.ts +1 -1
- package/types/src/charts/events/mouseleave.d.ts +1 -1
- package/types/src/charts/events/mousemove.legend.d.ts +1 -1
- package/types/src/charts/events/mousemove.shape.d.ts +1 -1
- package/types/src/charts/events/touchstart.body.d.ts +1 -1
- package/types/src/charts/factories.d.ts +73 -0
- package/types/src/charts/features/axes.d.ts +134 -0
- package/types/src/charts/features/chartGeometry.d.ts +58 -0
- package/types/src/charts/features/colorScaleBucket.d.ts +43 -0
- package/types/src/charts/features/colorScaleBucketShare.d.ts +16 -0
- package/types/src/charts/features/emitHelpers.d.ts +123 -0
- package/types/src/charts/features/ensureZoomDom.d.ts +39 -0
- package/types/src/charts/features/features.d.ts +152 -0
- package/types/src/charts/features/featuresLegend.d.ts +12 -0
- package/types/src/charts/features/legendLabel.d.ts +11 -0
- package/types/src/charts/features/lineLabels.d.ts +40 -0
- package/types/src/charts/features/plotPaint.d.ts +233 -0
- package/types/src/charts/features/shapeEmit.d.ts +61 -0
- package/types/src/charts/features.d.ts +152 -0
- package/types/src/charts/featuresLegend.d.ts +12 -0
- package/types/src/charts/helpers/matrixData.d.ts +1 -1
- package/types/src/charts/index.d.ts +21 -21
- package/types/src/charts/legendLabel.d.ts +11 -0
- package/types/src/charts/lineLabels.d.ts +40 -0
- package/types/src/charts/makeChart.d.ts +22 -0
- package/types/src/charts/pipeline/resolveSpec.d.ts +51 -0
- package/types/src/charts/pipeline/runChartDraw.d.ts +38 -0
- package/types/src/charts/pipeline/runVizPipeline.d.ts +31 -0
- package/types/src/charts/pipeline/stages.d.ts +160 -0
- package/types/src/charts/pipeline/vizContext.d.ts +45 -0
- package/types/src/charts/pipeline/vizDraw.d.ts +25 -0
- package/types/src/charts/pipeline/vizDrawPure.d.ts +46 -0
- package/types/src/charts/pipeline/vizPreDraw.d.ts +22 -0
- package/types/src/charts/pipeline/vizPreDrawPure.d.ts +68 -0
- package/types/src/charts/plotBuffers/Bar.d.ts +6 -5
- package/types/src/charts/plotBuffers/Box.d.ts +6 -5
- package/types/src/charts/plotBuffers/Circle.d.ts +6 -5
- package/types/src/charts/plotBuffers/Line.d.ts +6 -5
- package/types/src/charts/plotBuffers/Rect.d.ts +6 -5
- package/types/src/charts/plotBuffers/discreteBuffer.d.ts +2 -1
- package/types/src/charts/plotBuffers/numericBuffer.d.ts +2 -1
- package/types/src/charts/plotPaint.d.ts +233 -0
- package/types/src/charts/resolveSpec.d.ts +50 -0
- package/types/src/charts/runChartDraw.d.ts +38 -0
- package/types/src/charts/runVizPipeline.d.ts +31 -0
- package/types/src/charts/shapeEmit.d.ts +61 -0
- package/types/src/charts/stages.d.ts +117 -0
- package/types/src/charts/viz/Viz.d.ts +111 -0
- package/types/src/charts/viz/VizBase.d.ts +160 -0
- package/types/src/charts/viz/VizBaseConfig.d.ts +156 -0
- package/types/src/charts/viz/interactionOpacity.d.ts +23 -0
- package/types/src/charts/viz/ordinalColor.d.ts +14 -0
- package/types/src/charts/viz/trailCatchup.d.ts +14 -0
- package/types/src/charts/viz/vizDefaults.d.ts +8 -0
- package/types/src/charts/viz/vizRender.d.ts +8 -0
- package/types/src/charts/viz/vizTypes.d.ts +250 -0
- package/types/src/charts/vizContext.d.ts +46 -0
- package/types/src/charts/vizDefaults.d.ts +8 -0
- package/types/src/charts/vizDraw.d.ts +25 -0
- package/types/src/charts/vizDrawPure.d.ts +17 -0
- package/types/src/charts/vizPreDraw.d.ts +22 -0
- package/types/src/charts/vizPreDrawPure.d.ts +40 -0
- package/types/src/charts/vizRender.d.ts +8 -0
- package/types/src/charts/vizTypes.d.ts +202 -0
- package/types/src/components/Axis/Axis.d.ts +182 -0
- package/types/src/components/Axis/AxisBottom.d.ts +11 -0
- package/types/src/components/Axis/AxisLeft.d.ts +11 -0
- package/types/src/components/Axis/AxisRight.d.ts +11 -0
- package/types/src/components/Axis/AxisTop.d.ts +11 -0
- package/types/src/components/Axis/axisLayout.d.ts +29 -0
- package/types/src/components/Axis/axisLayoutLabels.d.ts +70 -0
- package/types/src/components/Axis/axisLayoutScale.d.ts +14 -0
- package/types/src/components/Axis/axisRender.d.ts +68 -0
- package/types/src/components/Axis.d.ts +68 -194
- package/types/src/components/ColorScale/ColorScale.d.ts +100 -0
- package/types/src/components/ColorScale/colorScaleRender.d.ts +15 -0
- package/types/src/components/ColorScale/colorScaleScale.d.ts +19 -0
- package/types/src/components/ColorScale.d.ts +1 -129
- package/types/src/components/Legend/Legend.d.ts +95 -0
- package/types/src/components/Legend/legendConfig.d.ts +7 -0
- package/types/src/components/Legend/legendRender.d.ts +16 -0
- package/types/src/components/Legend.d.ts +9 -73
- package/types/src/components/TextBox.d.ts +25 -218
- package/types/src/components/Timeline/Timeline.d.ts +118 -0
- package/types/src/components/Timeline/timelineConfig.d.ts +6 -0
- package/types/src/components/Timeline/timelineRender.d.ts +24 -0
- package/types/src/components/Timeline.d.ts +7 -81
- package/types/src/components/Tooltip.d.ts +20 -200
- package/types/src/components/axisLayout.d.ts +27 -0
- package/types/src/components/axisLayoutLabels.d.ts +42 -0
- package/types/src/components/axisLayoutScale.d.ts +12 -0
- package/types/src/components/axisRender.d.ts +65 -0
- package/types/src/components/colorScaleRender.d.ts +15 -0
- package/types/src/components/colorScaleScale.d.ts +19 -0
- package/types/src/components/index.d.ts +8 -8
- package/types/src/components/legendConfig.d.ts +7 -0
- package/types/src/components/legendRender.d.ts +16 -0
- package/types/src/components/timelineConfig.d.ts +6 -0
- package/types/src/components/timelineRender.d.ts +14 -0
- package/types/src/fluent.d.ts +94 -0
- package/types/src/shapes/Area.d.ts +15 -27
- package/types/src/shapes/Bar.d.ts +13 -33
- package/types/src/shapes/Box.d.ts +17 -56
- package/types/src/shapes/Circle.d.ts +11 -17
- package/types/src/shapes/Image.d.ts +18 -84
- package/types/src/shapes/Line.d.ts +12 -22
- package/types/src/shapes/Path.d.ts +12 -19
- package/types/src/shapes/Rect.d.ts +11 -27
- package/types/src/shapes/Shape.d.ts +46 -257
- package/types/src/shapes/Whisker.d.ts +15 -42
- package/types/src/shapes/buildLabelData.d.ts +50 -0
- package/types/src/shapes/emitLabels.d.ts +16 -0
- package/types/src/shapes/hitAreaNode.d.ts +19 -0
- package/types/src/shapes/sceneSort.d.ts +20 -0
- package/types/src/shapes/shapeConfig.d.ts +226 -0
- package/types/src/utils/BaseClass.d.ts +13 -7
- package/types/src/utils/D3Scale.d.ts +48 -0
- package/types/src/utils/D3plusConfig.d.ts +230 -3
- package/types/src/utils/configPrep.d.ts +7 -4
- package/types/src/utils/getProp.d.ts +3 -1
- package/types/src/utils/index.d.ts +3 -1
- package/types/src/utils/paintComponentScene.d.ts +28 -0
- package/types/umd-entry.d.ts +15 -0
- package/umd/d3plus-core.full.js +31148 -19484
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +5309 -2944
- package/umd/d3plus-core.js +17379 -10578
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +3470 -1876
- package/es/src/charts/AreaPlot.js +0 -85
- package/es/src/charts/AreaPlot.js.map +0 -1
- package/es/src/charts/BarChart.js +0 -92
- package/es/src/charts/BarChart.js.map +0 -1
- package/es/src/charts/BoxWhisker.js +0 -92
- package/es/src/charts/BoxWhisker.js.map +0 -1
- package/es/src/charts/BumpChart.js +0 -147
- package/es/src/charts/BumpChart.js.map +0 -1
- package/es/src/charts/Donut.js +0 -84
- package/es/src/charts/Donut.js.map +0 -1
- package/es/src/charts/Geomap.js +0 -766
- package/es/src/charts/Geomap.js.map +0 -1
- package/es/src/charts/LinePlot.js +0 -83
- package/es/src/charts/LinePlot.js.map +0 -1
- package/es/src/charts/Matrix.js +0 -341
- package/es/src/charts/Matrix.js.map +0 -1
- package/es/src/charts/Network.js +0 -796
- package/es/src/charts/Network.js.map +0 -1
- package/es/src/charts/Pack.js +0 -308
- package/es/src/charts/Pack.js.map +0 -1
- package/es/src/charts/Pie.js +0 -232
- package/es/src/charts/Pie.js.map +0 -1
- package/es/src/charts/Plot.js +0 -2114
- package/es/src/charts/Plot.js.map +0 -1
- package/es/src/charts/Priestley.js +0 -296
- package/es/src/charts/Priestley.js.map +0 -1
- package/es/src/charts/Radar.js +0 -420
- package/es/src/charts/Radar.js.map +0 -1
- package/es/src/charts/RadialMatrix.js +0 -383
- package/es/src/charts/RadialMatrix.js.map +0 -1
- package/es/src/charts/Rings.js +0 -788
- package/es/src/charts/Rings.js.map +0 -1
- package/es/src/charts/Sankey.js +0 -461
- package/es/src/charts/Sankey.js.map +0 -1
- package/es/src/charts/StackedArea.js +0 -80
- package/es/src/charts/StackedArea.js.map +0 -1
- package/es/src/charts/Tree.js +0 -347
- package/es/src/charts/Tree.js.map +0 -1
- package/es/src/charts/Treemap.js +0 -454
- package/es/src/charts/Treemap.js.map +0 -1
- package/es/src/charts/Viz.js +0 -1832
- package/es/src/charts/Viz.js.map +0 -1
- package/es/src/charts/drawSteps/drawAttribution.js +0 -16
- package/es/src/charts/drawSteps/drawAttribution.js.map +0 -1
- package/es/src/charts/drawSteps/drawBack.js +0 -24
- package/es/src/charts/drawSteps/drawBack.js.map +0 -1
- package/es/src/charts/drawSteps/drawColorScale.js +0 -75
- package/es/src/charts/drawSteps/drawColorScale.js.map +0 -1
- package/es/src/charts/drawSteps/drawLegend.js +0 -122
- package/es/src/charts/drawSteps/drawLegend.js.map +0 -1
- package/es/src/charts/drawSteps/drawSubtitle.js +0 -31
- package/es/src/charts/drawSteps/drawSubtitle.js.map +0 -1
- package/es/src/charts/drawSteps/drawTimeline.js +0 -85
- package/es/src/charts/drawSteps/drawTimeline.js.map +0 -1
- package/es/src/charts/drawSteps/drawTitle.js +0 -31
- package/es/src/charts/drawSteps/drawTitle.js.map +0 -1
- package/es/src/charts/drawSteps/drawTotal.js +0 -32
- package/es/src/charts/drawSteps/drawTotal.js.map +0 -1
- package/es/src/components/Axis.js +0 -1457
- package/es/src/components/Axis.js.map +0 -1
- package/es/src/components/AxisBottom.js.map +0 -1
- package/es/src/components/AxisLeft.js.map +0 -1
- package/es/src/components/AxisRight.js.map +0 -1
- package/es/src/components/AxisTop.js.map +0 -1
- package/es/src/components/ColorScale.js +0 -843
- package/es/src/components/ColorScale.js.map +0 -1
- package/es/src/components/Legend.js +0 -622
- package/es/src/components/Legend.js.map +0 -1
- package/es/src/components/Timeline.js +0 -695
- package/es/src/components/Timeline.js.map +0 -1
- /package/es/src/components/{AxisBottom.js → Axis/AxisBottom.js} +0 -0
- /package/es/src/components/{AxisLeft.js → Axis/AxisLeft.js} +0 -0
- /package/es/src/components/{AxisRight.js → Axis/AxisRight.js} +0 -0
- /package/es/src/components/{AxisTop.js → Axis/AxisTop.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type Legend from "./Legend.js";
|
|
2
|
+
/** Wraps + measures the title, setting `_titleHeight` / `_titleWidth`. */
|
|
3
|
+
export declare function measureLegendTitle(legend: Legend): void;
|
|
4
|
+
/** Measures each datum's swatch + wrapped label into the `_lineData` array. */
|
|
5
|
+
export declare function computeLegendLineData(legend: Legend, availableHeight: number): Record<string, unknown>[];
|
|
6
|
+
/**
|
|
7
|
+
Runs the row-wrapping pass: builds rows, retries label-free if it overflows,
|
|
8
|
+
then distributes row `y` offsets. Returns the resolved `spaceNeeded`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function wrapLegendRows(legend: Legend, availableWidth: number, availableHeight: number, spaceNeeded: number): number;
|
|
11
|
+
/** Computes `_outerBounds` (size + aligned x/y offset) from the laid-out rows. */
|
|
12
|
+
export declare function computeLegendBounds(legend: Legend, spaceNeeded: number): void;
|
|
13
|
+
/** Renders the title TextBox into the legend's title group. */
|
|
14
|
+
export declare function renderLegendTitle(legend: Legend): void;
|
|
15
|
+
/** Builds the per-shape data and renders the Circle/Rect swatch groups. */
|
|
16
|
+
export declare function renderLegendShapes(legend: Legend): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type Timeline from "./Timeline.js";
|
|
2
|
+
/** Coerces ticks/data to dates and resolves the tick format. */
|
|
3
|
+
export declare function prepareTicks(tl: Timeline): {
|
|
4
|
+
ticks: unknown[];
|
|
5
|
+
tickFormat: (d: Date) => string;
|
|
6
|
+
};
|
|
7
|
+
/** Measures the widest tick label, driving the auto button/tick decision. */
|
|
8
|
+
export declare function measureTicksWidth(tl: Timeline, ticks: unknown[], tickFormat: (d: Date) => string): void;
|
|
9
|
+
/** Resolves button-vs-tick behavior and sets the scale/domain/range. */
|
|
10
|
+
export declare function configureScale(tl: Timeline, ticks: unknown[], playButtonWidth: number): boolean;
|
|
11
|
+
/** Builds the d3-brush, computes the active selection, and mounts the brush group. */
|
|
12
|
+
export declare function setupBrush(tl: Timeline, hiddenHandles: boolean, height: string, y: string): void;
|
|
13
|
+
/** Renders the play button TextBox into its own group. */
|
|
14
|
+
export declare function renderPlayButton(tl: Timeline, playButtonWidth: number): void;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Generate the fluent chart API from a schema.
|
|
3
|
+
|
|
4
|
+
`installFluent` mixes generated `(value?) => value | this` accessors onto
|
|
5
|
+
a class instance, storing each field as `this.schema.<key>`. Each accessor's
|
|
6
|
+
`arguments.length` overload + coercion lives in this one factory instead
|
|
7
|
+
of being copy-pasted per chart.
|
|
8
|
+
|
|
9
|
+
`createFluent` is the standalone variant — returns a plain object with
|
|
10
|
+
the same accessor surface plus `config()`. Used where a chart shape is
|
|
11
|
+
handed back as a value (not bound to a Viz instance).
|
|
12
|
+
*/
|
|
13
|
+
import type { VizInstance } from "./charts/viz/vizTypes.js";
|
|
14
|
+
/**
|
|
15
|
+
@interface ConfigField
|
|
16
|
+
Declares one config key the fluent factory will generate an accessor for.
|
|
17
|
+
*/
|
|
18
|
+
export interface ConfigField {
|
|
19
|
+
key: string;
|
|
20
|
+
/**
|
|
21
|
+
Setter-argument coercion:
|
|
22
|
+
- `"identity"` (default): store as-is.
|
|
23
|
+
- `"accessor"`: string → `accessor(string)`, non-function → `constant(...)`.
|
|
24
|
+
- `"const"`: non-function → `constant(value)`.
|
|
25
|
+
- function form: full custom coercion (receives the raw value, returns the stored value).
|
|
26
|
+
*/
|
|
27
|
+
coerce?: "identity" | "accessor" | "const" | ((value: unknown) => unknown);
|
|
28
|
+
/** Static default applied to `schema.<key>` when unset. */
|
|
29
|
+
default?: unknown;
|
|
30
|
+
/**
|
|
31
|
+
Viz-bound default. Called with the live `viz` at init so the value
|
|
32
|
+
can close over instance state (e.g. tooltip cells that read live config).
|
|
33
|
+
Mutually exclusive with `default`.
|
|
34
|
+
*/
|
|
35
|
+
factory?: (viz: VizInstance) => unknown;
|
|
36
|
+
/**
|
|
37
|
+
Merge semantics: when set, default/factory output is merged into the
|
|
38
|
+
existing value (shallow assign) instead of replacing it. Use for
|
|
39
|
+
config bags (`shapeConfig`, `tooltipConfig`) that should extend the
|
|
40
|
+
parent's defaults rather than overwrite them.
|
|
41
|
+
*/
|
|
42
|
+
merge?: boolean;
|
|
43
|
+
/** Side-effect run after the value is stored, both at init and on every set. */
|
|
44
|
+
onSet?: (viz: VizInstance, value: unknown) => void;
|
|
45
|
+
/** One-shot wrap of the default value at init time; result is stored. */
|
|
46
|
+
decorate?: (viz: VizInstance, value: unknown) => unknown;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
@interface FluentInstance
|
|
50
|
+
The shape a `createFluent` factory returns. Mirrors `BaseClass.config()`'s
|
|
51
|
+
public contract.
|
|
52
|
+
*/
|
|
53
|
+
export interface FluentInstance<C = Record<string, unknown>> {
|
|
54
|
+
/** Get the current config object (a shallow copy). */
|
|
55
|
+
config(): C;
|
|
56
|
+
/** Apply a partial config and return for chaining. */
|
|
57
|
+
config(_: Partial<C>): this;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
Build a fluent instance from a config schema. Every field in the schema
|
|
61
|
+
becomes a `(value?) => value | this` accessor on the returned object,
|
|
62
|
+
identical in shape to d3plus's hand-written `arguments.length`-overloaded
|
|
63
|
+
methods — but generated.
|
|
64
|
+
|
|
65
|
+
The returned instance also exposes `config()` for getting/setting in one
|
|
66
|
+
shot, matching the `BaseClass.config()` contract.
|
|
67
|
+
|
|
68
|
+
@param schema The config fields the chart supports.
|
|
69
|
+
@param defaults Seed values (applied with the schema's coercions).
|
|
70
|
+
*/
|
|
71
|
+
export declare function createFluent<C extends Record<string, unknown>>(schema: ConfigField[], defaults?: Partial<C>): FluentInstance<C> & Record<string, (value?: unknown) => unknown>;
|
|
72
|
+
/**
|
|
73
|
+
Class-instance variant: mixes generated accessors onto an existing `this`,
|
|
74
|
+
storing each field as `this.schema.<key>`. A chart class inherits its
|
|
75
|
+
accessor surface from a `ChartDefinition`'s schema, and the rest of the
|
|
76
|
+
chart body reads the same values through `this.schema.<key>`.
|
|
77
|
+
|
|
78
|
+
Seeds `this.schema.<key>` from `defaults` (with the same coercion) only if
|
|
79
|
+
the field isn't already set — so an `extends Viz` chain that already wrote
|
|
80
|
+
`this.schema.sum = constant(...)` in `Viz`'s constructor is respected.
|
|
81
|
+
|
|
82
|
+
Methods are installed on the target's **prototype**, once per key (skipped
|
|
83
|
+
if the prototype already owns that method). This is load-bearing for
|
|
84
|
+
`BaseClass.config()` reflection — its `getAllMethods(Object.getPrototypeOf(this))`
|
|
85
|
+
only sees prototype methods, so per-instance methods would be invisible to
|
|
86
|
+
it (causing the React wrapper's hash() to miss user-set values like
|
|
87
|
+
`.padAngle(0.05)`). The methods close over the schema and read/write
|
|
88
|
+
`this.schema.<key>`, so per-instance state is preserved.
|
|
89
|
+
|
|
90
|
+
@param target Object to install methods on (typically a class instance).
|
|
91
|
+
@param schema Same field schema `createFluent` consumes.
|
|
92
|
+
@param defaults Default values (applied to `this.schema.<key>` when unset).
|
|
93
|
+
*/
|
|
94
|
+
export declare function installFluent(target: any, schema: ConfigField[], defaults?: Record<string, unknown>): void;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import type { DataPoint } from "@d3plus/data";
|
|
2
2
|
import type { AccessorFn } from "../utils/index.js";
|
|
3
|
+
import type { AreaConfig } from "./shapeConfig.js";
|
|
3
4
|
import Shape, { type ShapeAes } from "./Shape.js";
|
|
4
5
|
/**
|
|
5
6
|
Creates SVG areas based on an array of data.
|
|
6
7
|
*/
|
|
7
8
|
export default class Area extends Shape {
|
|
8
|
-
_curve: AccessorFn;
|
|
9
|
-
_defined: (d: DataPoint) => boolean;
|
|
10
|
-
_labelBounds: ((d: DataPoint, i: number, aes: ShapeAes) => Record<string, unknown> | null | false) | null;
|
|
11
|
-
_labelConfig: Record<string, unknown>;
|
|
12
|
-
_name: string;
|
|
13
|
-
_x: AccessorFn;
|
|
14
|
-
_x0: AccessorFn;
|
|
15
|
-
_x1: AccessorFn | null;
|
|
16
|
-
_y: AccessorFn;
|
|
17
|
-
_y0: AccessorFn;
|
|
18
|
-
_y1: AccessorFn | null;
|
|
19
|
-
_path: Record<string, unknown>;
|
|
20
9
|
/**
|
|
21
10
|
Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
|
|
22
11
|
@private
|
|
23
12
|
*/
|
|
24
13
|
constructor();
|
|
14
|
+
/**
|
|
15
|
+
Returns the area geometry as a "d" string built by the same area generator
|
|
16
|
+
render() uses, with the center offset baked into the x/x0/x1/y/y0/y1 accessors
|
|
17
|
+
so it pairs with the center-origin transform — identical geometry to the DOM.
|
|
18
|
+
@private
|
|
19
|
+
*/
|
|
20
|
+
_sceneGeometry(d: DataPoint): Record<string, unknown>;
|
|
25
21
|
/**
|
|
26
22
|
Given a specific data point and index, returns the aesthetic properties of the shape.
|
|
27
23
|
@param data point*
|
|
@@ -33,21 +29,6 @@ export default class Area extends Shape {
|
|
|
33
29
|
@param data @private
|
|
34
30
|
*/
|
|
35
31
|
_dataFilter(data: DataPoint[]): DataPoint[];
|
|
36
|
-
/**
|
|
37
|
-
Draws the area polygons.
|
|
38
|
-
@param callback Optional callback invoked after rendering completes.
|
|
39
|
-
*/
|
|
40
|
-
render(callback?: () => void): this;
|
|
41
|
-
/**
|
|
42
|
-
The d3 curve function used to interpolate the area.
|
|
43
|
-
*/
|
|
44
|
-
curve(): AccessorFn;
|
|
45
|
-
curve(_: AccessorFn | string): this;
|
|
46
|
-
/**
|
|
47
|
-
An accessor function that determines whether a data point is defined (not a gap in the area).
|
|
48
|
-
*/
|
|
49
|
-
defined(): (d: DataPoint) => boolean;
|
|
50
|
-
defined(_: (d: DataPoint) => boolean): this;
|
|
51
32
|
/**
|
|
52
33
|
The x position accessor. Also sets x0 to the same value.
|
|
53
34
|
*/
|
|
@@ -78,4 +59,11 @@ export default class Area extends Shape {
|
|
|
78
59
|
*/
|
|
79
60
|
y1(): AccessorFn | null;
|
|
80
61
|
y1(_: AccessorFn | number | null): this;
|
|
62
|
+
/**
|
|
63
|
+
Narrowed `.config()` for Area. Inherited surface from
|
|
64
|
+
`BaseClass.config()`; the override exists only to surface per-shape
|
|
65
|
+
keys (e.g. `width`/`height` for Rect) in autocomplete + type checks.
|
|
66
|
+
*/
|
|
67
|
+
config(): AreaConfig;
|
|
68
|
+
config(_: Partial<AreaConfig>): this;
|
|
81
69
|
}
|
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import type { DataPoint } from "@d3plus/data";
|
|
2
2
|
import type { D3Selection } from "@d3plus/dom";
|
|
3
3
|
import type { AccessorFn } from "../utils/index.js";
|
|
4
|
+
import type { BarConfig } from "./shapeConfig.js";
|
|
4
5
|
import Shape, { type ShapeAes } from "./Shape.js";
|
|
5
6
|
/**
|
|
6
7
|
Creates SVG areas based on an array of data.
|
|
7
8
|
*/
|
|
8
9
|
export default class Bar extends Shape {
|
|
9
|
-
_height: AccessorFn;
|
|
10
|
-
_labelBounds: ((d: DataPoint, i: number, aes: ShapeAes) => Record<string, unknown> | null | false) | null;
|
|
11
|
-
_name: string;
|
|
12
|
-
_width: AccessorFn;
|
|
13
|
-
_x: AccessorFn;
|
|
14
|
-
_x0: AccessorFn;
|
|
15
|
-
_x1: AccessorFn | null;
|
|
16
|
-
_y: AccessorFn;
|
|
17
|
-
_y0: AccessorFn;
|
|
18
|
-
_y1: AccessorFn | null;
|
|
19
10
|
/**
|
|
20
11
|
Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
|
|
21
12
|
@private
|
|
22
13
|
*/
|
|
23
14
|
constructor();
|
|
24
15
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
Returns the bar geometry for a data point, matching _applyPosition: width/height
|
|
17
|
+
from the x/y extents, with the rect centered on the transform origin along the
|
|
18
|
+
non-measure axis.
|
|
19
|
+
@private
|
|
27
20
|
*/
|
|
28
|
-
|
|
21
|
+
_sceneGeometry(d: DataPoint, i: number): Record<string, unknown>;
|
|
29
22
|
/**
|
|
30
23
|
Given a specific data point and index, returns the aesthetic properties of the shape.
|
|
31
24
|
@param data point*
|
|
@@ -61,26 +54,6 @@ export default class Bar extends Shape {
|
|
|
61
54
|
@private
|
|
62
55
|
*/
|
|
63
56
|
_getY(d: DataPoint, i: number): number;
|
|
64
|
-
/**
|
|
65
|
-
The height accessor for each bar.
|
|
66
|
-
|
|
67
|
-
@example
|
|
68
|
-
function(d) {
|
|
69
|
-
return d.height;
|
|
70
|
-
}
|
|
71
|
-
*/
|
|
72
|
-
height(): AccessorFn;
|
|
73
|
-
height(_: AccessorFn | number): this;
|
|
74
|
-
/**
|
|
75
|
-
The width accessor for each bar.
|
|
76
|
-
|
|
77
|
-
@example
|
|
78
|
-
function(d) {
|
|
79
|
-
return d.width;
|
|
80
|
-
}
|
|
81
|
-
*/
|
|
82
|
-
width(): AccessorFn;
|
|
83
|
-
width(_: AccessorFn | number): this;
|
|
84
57
|
/**
|
|
85
58
|
The x0 (left edge) position accessor for each bar.
|
|
86
59
|
*/
|
|
@@ -101,4 +74,11 @@ export default class Bar extends Shape {
|
|
|
101
74
|
*/
|
|
102
75
|
y1(): AccessorFn | null;
|
|
103
76
|
y1(_: AccessorFn | number | null): this;
|
|
77
|
+
/**
|
|
78
|
+
Narrowed `.config()` for Bar. Inherited surface from
|
|
79
|
+
`BaseClass.config()`; the override exists only to surface per-shape
|
|
80
|
+
keys (e.g. `width`/`height` for Rect) in autocomplete + type checks.
|
|
81
|
+
*/
|
|
82
|
+
config(): BarConfig;
|
|
83
|
+
config(_: Partial<BarConfig>): this;
|
|
104
84
|
}
|
|
@@ -1,31 +1,22 @@
|
|
|
1
1
|
import type { DataPoint } from "@d3plus/data";
|
|
2
2
|
import type { D3Selection } from "@d3plus/dom";
|
|
3
|
+
import type { GroupNode } from "@d3plus/render";
|
|
3
4
|
import { BaseClass } from "../utils/index.js";
|
|
4
|
-
import type { AccessorFn } from "../utils/index.js";
|
|
5
5
|
import Circle from "./Circle.js";
|
|
6
6
|
import Rect from "./Rect.js";
|
|
7
|
+
import type { BoxConfig } from "./shapeConfig.js";
|
|
7
8
|
import Whisker from "./Whisker.js";
|
|
8
9
|
/**
|
|
9
10
|
Creates SVG box based on an array of data.
|
|
10
11
|
*/
|
|
11
12
|
export default class Box extends BaseClass {
|
|
12
|
-
|
|
13
|
-
_orient: AccessorFn;
|
|
14
|
-
_outlier: AccessorFn;
|
|
15
|
-
_outlierConfig: Record<string, unknown>;
|
|
16
|
-
_rectConfig: Record<string, unknown>;
|
|
17
|
-
_rectWidth: AccessorFn;
|
|
18
|
-
_whiskerConfig: Record<string, unknown>;
|
|
19
|
-
_whiskerMode: (string | number)[];
|
|
20
|
-
_x: AccessorFn;
|
|
21
|
-
_y: AccessorFn;
|
|
13
|
+
[key: string]: any;
|
|
22
14
|
_data: DataPoint[];
|
|
23
15
|
_select: D3Selection;
|
|
24
16
|
_box: Rect;
|
|
25
17
|
_median: Rect;
|
|
26
18
|
_whisker: Whisker;
|
|
27
19
|
_whiskerEndpoint: (Circle | Rect)[];
|
|
28
|
-
_duration: number;
|
|
29
20
|
/**
|
|
30
21
|
Invoked when creating a new class instance, and overrides any default parameters inherited from BaseClass.
|
|
31
22
|
@private
|
|
@@ -35,6 +26,14 @@ export default class Box extends BaseClass {
|
|
|
35
26
|
Draws the Box.
|
|
36
27
|
*/
|
|
37
28
|
render(): this;
|
|
29
|
+
/**
|
|
30
|
+
Compute-mode scene aggregation. When Box is rendered with
|
|
31
|
+
`renderMode("compute")`, the inner Rect/Whisker/Circle/etc.
|
|
32
|
+
shapes are mounted scene-only (no parent <g>); their `toScene()`
|
|
33
|
+
methods produce GroupNodes that we wrap into a single Box-level
|
|
34
|
+
group so collectComputed(boxInstance) yields the union.
|
|
35
|
+
*/
|
|
36
|
+
toScene(): GroupNode;
|
|
38
37
|
/**
|
|
39
38
|
The active highlight state for all sub-shapes in this Box.
|
|
40
39
|
*/
|
|
@@ -53,16 +52,6 @@ export default class Box extends BaseClass {
|
|
|
53
52
|
*/
|
|
54
53
|
medianConfig(): Record<string, unknown>;
|
|
55
54
|
medianConfig(_: Record<string, unknown>): this;
|
|
56
|
-
/**
|
|
57
|
-
The orientation of the box shape.
|
|
58
|
-
*/
|
|
59
|
-
orient(): AccessorFn;
|
|
60
|
-
orient(_: AccessorFn | string): this;
|
|
61
|
-
/**
|
|
62
|
-
Whether to show outlier points.
|
|
63
|
-
*/
|
|
64
|
-
outlier(): AccessorFn;
|
|
65
|
-
outlier(_: AccessorFn | string): this;
|
|
66
55
|
/**
|
|
67
56
|
Configuration object for each outlier point.
|
|
68
57
|
*/
|
|
@@ -73,16 +62,6 @@ export default class Box extends BaseClass {
|
|
|
73
62
|
*/
|
|
74
63
|
rectConfig(): Record<string, unknown>;
|
|
75
64
|
rectConfig(_: Record<string, unknown>): this;
|
|
76
|
-
/**
|
|
77
|
-
The width accessor for each box.
|
|
78
|
-
|
|
79
|
-
@example
|
|
80
|
-
function(d) {
|
|
81
|
-
return d.width;
|
|
82
|
-
}
|
|
83
|
-
*/
|
|
84
|
-
rectWidth(): AccessorFn;
|
|
85
|
-
rectWidth(_: AccessorFn | number): this;
|
|
86
65
|
/**
|
|
87
66
|
The SVG container element for this visualization. 3 selector or DOM element.
|
|
88
67
|
*/
|
|
@@ -94,28 +73,10 @@ export default class Box extends BaseClass {
|
|
|
94
73
|
whiskerConfig(): Record<string, unknown>;
|
|
95
74
|
whiskerConfig(_: Record<string, unknown>): this;
|
|
96
75
|
/**
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
@example
|
|
105
|
-
function(d) {
|
|
106
|
-
return d.x;
|
|
107
|
-
}
|
|
108
|
-
*/
|
|
109
|
-
x(): AccessorFn;
|
|
110
|
-
x(_: AccessorFn | number): this;
|
|
111
|
-
/**
|
|
112
|
-
The y position accessor for each box.
|
|
113
|
-
|
|
114
|
-
@example
|
|
115
|
-
function(d) {
|
|
116
|
-
return d.y;
|
|
117
|
-
}
|
|
118
|
-
*/
|
|
119
|
-
y(): AccessorFn;
|
|
120
|
-
y(_: AccessorFn | number): this;
|
|
76
|
+
Narrowed `.config()` for Box. Inherited surface from
|
|
77
|
+
`BaseClass.config()`; the override exists only to surface per-shape
|
|
78
|
+
keys (e.g. `width`/`height` for Rect) in autocomplete + type checks.
|
|
79
|
+
*/
|
|
80
|
+
config(): BoxConfig;
|
|
81
|
+
config(_: Partial<BoxConfig>): this;
|
|
121
82
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { DataPoint } from "@d3plus/data";
|
|
2
2
|
import type { D3Selection } from "@d3plus/dom";
|
|
3
|
-
import type {
|
|
3
|
+
import type { CircleConfig } from "./shapeConfig.js";
|
|
4
4
|
import Shape, { type ShapeAes } from "./Shape.js";
|
|
5
5
|
/**
|
|
6
6
|
Creates SVG circles based on an array of data.
|
|
7
7
|
*/
|
|
8
8
|
export default class Circle extends Shape {
|
|
9
|
-
_labelBounds: ((d: DataPoint, i: number, aes: ShapeAes) => Record<string, unknown> | null | false) | null;
|
|
10
|
-
_labelConfig: Record<string, unknown>;
|
|
11
|
-
_name: string;
|
|
12
|
-
_r: AccessorFn;
|
|
13
9
|
/**
|
|
14
10
|
Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
|
|
15
11
|
@private
|
|
@@ -21,10 +17,11 @@ export default class Circle extends Shape {
|
|
|
21
17
|
*/
|
|
22
18
|
_applyPosition(elem: D3Selection): void;
|
|
23
19
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
Returns the circle geometry for a data point. The circle is centered on the
|
|
21
|
+
transform origin (cx/cy = 0); the group transform positions it.
|
|
22
|
+
@private
|
|
26
23
|
*/
|
|
27
|
-
|
|
24
|
+
_sceneGeometry(d: DataPoint, i: number): Record<string, unknown>;
|
|
28
25
|
/**
|
|
29
26
|
Given a specific data point and index, returns the aesthetic properties of the shape.
|
|
30
27
|
@param data point*
|
|
@@ -32,13 +29,10 @@ export default class Circle extends Shape {
|
|
|
32
29
|
*/
|
|
33
30
|
_aes(d: DataPoint, i: number): ShapeAes;
|
|
34
31
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
r(): AccessorFn;
|
|
43
|
-
r(_: AccessorFn | number): this;
|
|
32
|
+
Narrowed `.config()` for Circle. Inherited surface from
|
|
33
|
+
`BaseClass.config()`; the override exists only to surface per-shape
|
|
34
|
+
keys (e.g. `width`/`height` for Rect) in autocomplete + type checks.
|
|
35
|
+
*/
|
|
36
|
+
config(): CircleConfig;
|
|
37
|
+
config(_: Partial<CircleConfig>): this;
|
|
44
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataPoint } from "@d3plus/data";
|
|
2
2
|
import type { D3Selection } from "@d3plus/dom";
|
|
3
|
-
import type {
|
|
3
|
+
import type { GroupNode } from "@d3plus/render";
|
|
4
4
|
/**
|
|
5
5
|
Creates SVG images based on an array of data.
|
|
6
6
|
@example <caption>a sample row of data</caption>
|
|
@@ -15,22 +15,23 @@ image().data([data])();
|
|
|
15
15
|
image().data([data])(function() { alert("draw complete!"); })
|
|
16
16
|
*/
|
|
17
17
|
export default class Image {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_id: AccessorFn;
|
|
21
|
-
_opacity: AccessorFn;
|
|
22
|
-
_pointerEvents: AccessorFn;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
schema: Record<string, any>;
|
|
23
20
|
_select: D3Selection;
|
|
24
|
-
_url: AccessorFn;
|
|
25
|
-
_width: AccessorFn;
|
|
26
|
-
_x: AccessorFn;
|
|
27
|
-
_y: AccessorFn;
|
|
28
21
|
_data: DataPoint[];
|
|
29
22
|
/**
|
|
30
23
|
Invoked when creating a new class instance, and sets any default parameters.
|
|
31
24
|
@private
|
|
32
25
|
*/
|
|
33
26
|
constructor();
|
|
27
|
+
/**
|
|
28
|
+
Get/set multiple config values at once. Mirrors the `BaseClass.config()`
|
|
29
|
+
contract used by the other shapes (and relied on by the React wrapper):
|
|
30
|
+
each patch key is routed through its matching fluent accessor (or
|
|
31
|
+
`data`/`select`), with unknown keys stored on `schema` verbatim.
|
|
32
|
+
*/
|
|
33
|
+
config(): Record<string, unknown>;
|
|
34
|
+
config(_: Record<string, unknown>): this;
|
|
34
35
|
/**
|
|
35
36
|
Renders the current Image to the page. If a *callback* is specified, it will be called once the images are done drawing.
|
|
36
37
|
@param callback Optional callback invoked after rendering completes.
|
|
@@ -42,83 +43,16 @@ export default class Image {
|
|
|
42
43
|
data(): DataPoint[];
|
|
43
44
|
data(_: DataPoint[]): this;
|
|
44
45
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
@example
|
|
53
|
-
function(d) {
|
|
54
|
-
return d.height;
|
|
55
|
-
}
|
|
56
|
-
*/
|
|
57
|
-
height(): AccessorFn;
|
|
58
|
-
height(_: AccessorFn | number): this;
|
|
59
|
-
/**
|
|
60
|
-
The unique id accessor for each image.
|
|
61
|
-
|
|
62
|
-
@example
|
|
63
|
-
function(d) {
|
|
64
|
-
return d.id;
|
|
65
|
-
}
|
|
66
|
-
*/
|
|
67
|
-
id(): AccessorFn;
|
|
68
|
-
id(_: AccessorFn): this;
|
|
69
|
-
/**
|
|
70
|
-
The opacity of each image.
|
|
71
|
-
*/
|
|
72
|
-
opacity(): AccessorFn;
|
|
73
|
-
opacity(_: AccessorFn | number): this;
|
|
74
|
-
/**
|
|
75
|
-
The pointer-events.
|
|
76
|
-
*/
|
|
77
|
-
pointerEvents(): AccessorFn;
|
|
78
|
-
pointerEvents(_: AccessorFn | string): this;
|
|
46
|
+
Compute-mode scene emission. Mirrors Shape.toScene's shape — a
|
|
47
|
+
keyed GroupNode wrapping per-datum ImageNodes. Used by chart
|
|
48
|
+
compositors (Shape._backgroundImageClass, plotPaint) that need
|
|
49
|
+
Image to participate in the scene graph rather than emit
|
|
50
|
+
d3-selection DOM.
|
|
51
|
+
*/
|
|
52
|
+
toScene(): GroupNode;
|
|
79
53
|
/**
|
|
80
54
|
The SVG container element as a d3 selector or DOM element.
|
|
81
55
|
*/
|
|
82
56
|
select(): D3Selection;
|
|
83
57
|
select(_: string | HTMLElement | SVGElement | null): this;
|
|
84
|
-
/**
|
|
85
|
-
Accessor function for the URL of each image.
|
|
86
|
-
|
|
87
|
-
@example
|
|
88
|
-
function(d) {
|
|
89
|
-
return d.url;
|
|
90
|
-
}
|
|
91
|
-
*/
|
|
92
|
-
url(): AccessorFn;
|
|
93
|
-
url(_: AccessorFn): this;
|
|
94
|
-
/**
|
|
95
|
-
The width accessor for each image.
|
|
96
|
-
|
|
97
|
-
@example
|
|
98
|
-
function(d) {
|
|
99
|
-
return d.width;
|
|
100
|
-
}
|
|
101
|
-
*/
|
|
102
|
-
width(): AccessorFn;
|
|
103
|
-
width(_: AccessorFn | number): this;
|
|
104
|
-
/**
|
|
105
|
-
The x position accessor for each image.
|
|
106
|
-
|
|
107
|
-
@example
|
|
108
|
-
function(d) {
|
|
109
|
-
return d.x || 0;
|
|
110
|
-
}
|
|
111
|
-
*/
|
|
112
|
-
x(): AccessorFn;
|
|
113
|
-
x(_: AccessorFn | number): this;
|
|
114
|
-
/**
|
|
115
|
-
The y position accessor for each image.
|
|
116
|
-
|
|
117
|
-
@example
|
|
118
|
-
function(d) {
|
|
119
|
-
return d.y || 0;
|
|
120
|
-
}
|
|
121
|
-
*/
|
|
122
|
-
y(): AccessorFn;
|
|
123
|
-
y(_: AccessorFn | number): this;
|
|
124
58
|
}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import type { DataPoint } from "@d3plus/data";
|
|
2
|
-
import type {
|
|
2
|
+
import type { LineConfig } from "./shapeConfig.js";
|
|
3
3
|
import Shape, { type ShapeAes } from "./Shape.js";
|
|
4
4
|
/**
|
|
5
5
|
Creates SVG lines based on an array of data.
|
|
6
6
|
*/
|
|
7
7
|
export default class Line extends Shape {
|
|
8
|
-
_curve: AccessorFn;
|
|
9
|
-
_defined: AccessorFn;
|
|
10
|
-
_fill: AccessorFn;
|
|
11
|
-
_hitArea: ((d: DataPoint, i: number, aes: ShapeAes) => Record<string, unknown>) | null;
|
|
12
|
-
_name: string;
|
|
13
|
-
_path: Record<string, unknown>;
|
|
14
|
-
_stroke: AccessorFn;
|
|
15
|
-
_strokeWidth: AccessorFn;
|
|
16
|
-
_strokeDasharray: AccessorFn;
|
|
17
8
|
/**
|
|
18
9
|
Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
|
|
19
10
|
@private
|
|
@@ -25,10 +16,12 @@ export default class Line extends Shape {
|
|
|
25
16
|
*/
|
|
26
17
|
_dataFilter(data: DataPoint[]): DataPoint[];
|
|
27
18
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
Returns the line geometry as a "d" string built by the same line generator
|
|
20
|
+
render() uses, with the center offset baked into the accessors so it pairs
|
|
21
|
+
with the center-origin transform — yielding identical geometry to the DOM.
|
|
22
|
+
@private
|
|
30
23
|
*/
|
|
31
|
-
|
|
24
|
+
_sceneGeometry(d: DataPoint): Record<string, unknown>;
|
|
32
25
|
/**
|
|
33
26
|
Given a specific data point and index, returns the aesthetic properties of the shape.
|
|
34
27
|
@param data point*
|
|
@@ -36,13 +29,10 @@ export default class Line extends Shape {
|
|
|
36
29
|
*/
|
|
37
30
|
_aes(d: DataPoint, i: number): ShapeAes;
|
|
38
31
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*/
|
|
46
|
-
defined(): AccessorFn;
|
|
47
|
-
defined(_: AccessorFn): this;
|
|
32
|
+
Narrowed `.config()` for Line. Inherited surface from
|
|
33
|
+
`BaseClass.config()`; the override exists only to surface per-shape
|
|
34
|
+
keys (e.g. `width`/`height` for Rect) in autocomplete + type checks.
|
|
35
|
+
*/
|
|
36
|
+
config(): LineConfig;
|
|
37
|
+
config(_: Partial<LineConfig>): this;
|
|
48
38
|
}
|