@d3plus/core 3.1.6 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9924 -78528
- 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 +655 -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 +84 -35
- 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 +125 -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 +15 -10
- 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 +157 -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 +270 -15
- 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 +30966 -19051
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +5400 -2949
- package/umd/d3plus-core.js +17364 -10534
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +3494 -1877
- 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,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`applyPriestleyLayout` — Priestley's chart-specific layout stage.
|
|
3
|
+
|
|
4
|
+
Coerces start/end values (via `date()` if axis is time-scaled), groups by
|
|
5
|
+
the nested `_groupBy` slice, packs bands onto lanes with a greedy
|
|
6
|
+
first-fit packer, runs the production + measure axes, computes the band
|
|
7
|
+
scale, and stashes `xScale`/`yScale`/`bandWidth` on `viz.ctx`.
|
|
8
|
+
*/
|
|
9
|
+
import type { DataPoint } from "@d3plus/data";
|
|
10
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
11
|
+
interface PriestleyDatum extends Record<string, unknown> {
|
|
12
|
+
__d3plus__: true;
|
|
13
|
+
data: DataPoint;
|
|
14
|
+
end: number | Date;
|
|
15
|
+
i: number;
|
|
16
|
+
id: string | number;
|
|
17
|
+
start: number | Date;
|
|
18
|
+
lane?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const applyPriestleyLayout: TransformStage;
|
|
21
|
+
export type { PriestleyDatum };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Priestley — timeline chart with start/end bands packed onto lanes.
|
|
3
|
+
|
|
4
|
+
Implementation files in this folder:
|
|
5
|
+
- `applyLayout.ts` — chart-specific `TransformStage`.
|
|
6
|
+
- `emit.ts` — Rect + label scene nodes per band.
|
|
7
|
+
*/
|
|
8
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
9
|
+
export declare const priestleyDef: ChartDefinition;
|
|
10
|
+
/**
|
|
11
|
+
Creates a Priestley timeline based on an array of data.
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: new () => any;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`applyRadarLayout` — Radar's chart-specific layout stage. Computes per-
|
|
3
|
+
axis angular positions, per-group polygon vertices, the max value for
|
|
4
|
+
radius normalization, and the per-polygon `pathConfig` (with event-
|
|
5
|
+
handler wrappers that translate cursor → nearest vertex). Emits flat
|
|
6
|
+
SceneNodes for background circles, axis labels, and radial spokes into
|
|
7
|
+
`_chartScene`. Stashes `groupData` + `pathConfig` on `viz.ctx`.
|
|
8
|
+
*/
|
|
9
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
10
|
+
export declare const applyRadarLayout: TransformStage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`radarEmit` — Path SceneNodes for each radar polygon, using
|
|
3
|
+
`groupData` + `pathConfig` stashed on `viz.ctx`. Emits flat
|
|
4
|
+
SceneNodes directly (no transient Shape compute pass).
|
|
5
|
+
*/
|
|
6
|
+
import type { ChartEmit } from "../definition/ChartDefinition.js";
|
|
7
|
+
export declare const radarEmit: ChartEmit;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Radar — polar value polygons over a per-metric radial axis.
|
|
3
|
+
|
|
4
|
+
Implementation files in this folder:
|
|
5
|
+
- `applyLayout.ts` — polar geometry + axis decorations + polygon paths.
|
|
6
|
+
- `emit.ts` — Path scene nodes per polygon.
|
|
7
|
+
*/
|
|
8
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
9
|
+
export declare const radarDef: ChartDefinition;
|
|
10
|
+
/**
|
|
11
|
+
Creates a radar visualization based on an array of data.
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: new () => any;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`applyRadialMatrixLayout` — RadialMatrix's chart-specific layout stage.
|
|
3
|
+
|
|
4
|
+
Runs `matrixData.prepData`, computes polar geometry (label positions,
|
|
5
|
+
arc generator), runs `viz.ctx.columnLabels` (a TextBox) in compute
|
|
6
|
+
mode and absorbs it into `_chartScene`. Stashes `arcData` on
|
|
7
|
+
`viz.ctx`, plus `radialMatrixWidth`/`radialMatrixHeight` so the chart
|
|
8
|
+
transform can center the layout.
|
|
9
|
+
*/
|
|
10
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
11
|
+
export declare const applyRadialMatrixLayout: TransformStage;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
RadialMatrix — radial-arc layout of a row × column matrix.
|
|
3
|
+
|
|
4
|
+
Implementation files in this folder:
|
|
5
|
+
- `applyLayout.ts` — polar geometry + column-label TextBox absorb.
|
|
6
|
+
- `emit.ts` — Path arc cells.
|
|
7
|
+
*/
|
|
8
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
9
|
+
export declare const radialMatrixDef: ChartDefinition;
|
|
10
|
+
/**
|
|
11
|
+
Creates a radial layout of a rows/columns Matrix of any dataset.
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: new () => any;
|
|
14
|
+
export default _default;
|
|
@@ -34,7 +34,6 @@ export default class RadialMatrix extends Viz {
|
|
|
34
34
|
/**
|
|
35
35
|
A manual list of IDs to be used for rows.
|
|
36
36
|
*/
|
|
37
|
-
columnList(_: any): any;
|
|
38
37
|
/**
|
|
39
38
|
A sort comparator function that is run on the unique set of column values.
|
|
40
39
|
|
|
@@ -43,7 +42,6 @@ export default class RadialMatrix extends Viz {
|
|
|
43
42
|
return a.localeCompare(b);
|
|
44
43
|
}
|
|
45
44
|
*/
|
|
46
|
-
columnSort(_: any): any;
|
|
47
45
|
/**
|
|
48
46
|
The radius (in pixels) for the inner donut hole of the diagram. Can either be a static Number, or an accessor function that receives the outer radius as it's only argument.
|
|
49
47
|
|
|
@@ -62,17 +60,4 @@ export default class RadialMatrix extends Viz {
|
|
|
62
60
|
}
|
|
63
61
|
*/
|
|
64
62
|
row(_: any): any;
|
|
65
|
-
/**
|
|
66
|
-
A manual list of IDs to be used for rows.
|
|
67
|
-
*/
|
|
68
|
-
rowList(_: any): any;
|
|
69
|
-
/**
|
|
70
|
-
A sort comparator function that is run on the unique set of row values.
|
|
71
|
-
|
|
72
|
-
@example
|
|
73
|
-
function row(a, b) {
|
|
74
|
-
return a.localeCompare(b);
|
|
75
|
-
}
|
|
76
|
-
*/
|
|
77
|
-
rowSort(_: any): any;
|
|
78
63
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`ringsEmit` — link Paths + per-shape-type node groups using
|
|
3
|
+
`ringsCtx` stashed on `viz.ctx`. Emits flat SceneNodes directly
|
|
4
|
+
(no transient Shape compute pass).
|
|
5
|
+
*/
|
|
6
|
+
import type { ChartEmit } from "../definition/ChartDefinition.js";
|
|
7
|
+
export declare const ringsEmit: ChartEmit;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Rings — node-link diagram laid out around a central focal node in
|
|
3
|
+
two concentric rings.
|
|
4
|
+
|
|
5
|
+
Implementation files in this folder:
|
|
6
|
+
- `applyLayout.ts` — focus + ring placement + link bezier paths.
|
|
7
|
+
- `emit.ts` — link Paths + per-shape-type node groups.
|
|
8
|
+
*/
|
|
9
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
10
|
+
export declare const ringsDef: ChartDefinition;
|
|
11
|
+
/**
|
|
12
|
+
Creates a ring visualization based on a defined set of nodes and edges.
|
|
13
|
+
*/
|
|
14
|
+
declare const _default: new () => any;
|
|
15
|
+
export default _default;
|
|
@@ -17,7 +17,6 @@ export default class Rings extends Viz {
|
|
|
17
17
|
/**
|
|
18
18
|
The center node, specified by id.
|
|
19
19
|
*/
|
|
20
|
-
center(_: any): any;
|
|
21
20
|
/**
|
|
22
21
|
The hover callback function for highlighting shapes on mouseover.
|
|
23
22
|
*/
|
|
@@ -59,16 +58,4 @@ export default class Rings extends Viz {
|
|
|
59
58
|
The size accessor for each node in the rings layout.
|
|
60
59
|
*/
|
|
61
60
|
size(_: any): any;
|
|
62
|
-
/**
|
|
63
|
-
The size scale maximum. By default, the maximum size is determined by half the distance of the two closest nodes.
|
|
64
|
-
*/
|
|
65
|
-
sizeMax(_: any): any;
|
|
66
|
-
/**
|
|
67
|
-
The size scale minimum.
|
|
68
|
-
*/
|
|
69
|
-
sizeMin(_: any): any;
|
|
70
|
-
/**
|
|
71
|
-
The size scale.
|
|
72
|
-
*/
|
|
73
|
-
sizeScale(_: any): any;
|
|
74
61
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`applySankeyLayout` — Sankey's chart-specific layout stage. Resolves
|
|
3
|
+
nodes + links, runs d3-sankey, groups by shape, stashes `sankeyCtx` +
|
|
4
|
+
`nodeLookup` + `linkLookup` on `viz.ctx`.
|
|
5
|
+
*/
|
|
6
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
7
|
+
export declare const applySankeyLayout: TransformStage;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
2
|
+
export declare const sankeyDef: ChartDefinition;
|
|
3
|
+
/**
|
|
4
|
+
Creates a Sankey visualization based on a defined set of nodes and links.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: new () => any;
|
|
7
|
+
export default _default;
|
|
@@ -21,7 +21,6 @@ export default class Sankey extends Viz {
|
|
|
21
21
|
/**
|
|
22
22
|
A pass-through for the d3-sankey [iterations](https://github.com/d3/d3-sankey?tab=readme-ov-file#sankey_iterations) function.
|
|
23
23
|
*/
|
|
24
|
-
iterations(_: any): any;
|
|
25
24
|
/**
|
|
26
25
|
A predefined *Array* of edges that connect each object passed to the [node](#Sankey.node) method. The `source` and `target` keys in each link need to map to the nodes in one of one way:
|
|
27
26
|
1. A *String* value matching the `id` of the node.
|
|
@@ -33,7 +32,6 @@ export default class Sankey extends Viz {
|
|
|
33
32
|
/**
|
|
34
33
|
A pass-through for the d3-sankey [linkSort](https://github.com/d3/d3-sankey?tab=readme-ov-file#sankey_linkSort) function.
|
|
35
34
|
*/
|
|
36
|
-
linkSort(_: any): any;
|
|
37
35
|
/**
|
|
38
36
|
The key inside of each link Object that references the source node.
|
|
39
37
|
*/
|
|
@@ -64,11 +62,9 @@ export default class Sankey extends Viz {
|
|
|
64
62
|
/**
|
|
65
63
|
A pass-through for the d3-sankey [nodeSort](https://github.com/d3/d3-sankey?tab=readme-ov-file#sankey_nodeSort) function.
|
|
66
64
|
*/
|
|
67
|
-
nodeSort(_: any): any;
|
|
68
65
|
/**
|
|
69
66
|
Width of the node. By default, the nodeWidth size is 30.
|
|
70
67
|
*/
|
|
71
|
-
nodeWidth(_: any): any;
|
|
72
68
|
/**
|
|
73
69
|
Width of the links.
|
|
74
70
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
StackedArea — AreaPlot with `stacked: true`.
|
|
3
|
+
*/
|
|
4
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
5
|
+
export declare const stackedAreaDef: ChartDefinition;
|
|
6
|
+
/**
|
|
7
|
+
Creates a stacked area plot based on an array of data.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: new () => any;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`treeEmit` — Path (links) + per-shape-type nodes, stashed by the layout
|
|
3
|
+
stage on `viz.ctx`. Emits flat SceneNodes directly (no transient Shape
|
|
4
|
+
compute pass).
|
|
5
|
+
*/
|
|
6
|
+
import type { ChartEmit } from "../definition/ChartDefinition.js";
|
|
7
|
+
export declare const treeEmit: ChartEmit;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Tree — d3-hierarchy tidy tree.
|
|
3
|
+
|
|
4
|
+
Implementation files in this folder:
|
|
5
|
+
- `applyLayout.ts` — tree layout + label measure + link descriptors.
|
|
6
|
+
- `emit.ts` — Path (links) + per-shape-type scene nodes.
|
|
7
|
+
*/
|
|
8
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
9
|
+
export declare const treeDef: ChartDefinition;
|
|
10
|
+
/**
|
|
11
|
+
Uses d3's tree layout to create a tidy tree chart based on an array of data.
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: new () => any;
|
|
14
|
+
export default _default;
|
|
@@ -14,20 +14,4 @@ export default class Tree extends Viz {
|
|
|
14
14
|
@private
|
|
15
15
|
*/
|
|
16
16
|
_draw(callback?: () => void): this;
|
|
17
|
-
/**
|
|
18
|
-
Changes the orientation of the entire Tree, either "vertical" (top to bottom) or "horizontal" (left to right).
|
|
19
|
-
*/
|
|
20
|
-
orient(_: any): any;
|
|
21
|
-
/**
|
|
22
|
-
The separation function between neighboring nodes.
|
|
23
|
-
|
|
24
|
-
From the [d3-hierarchy documentation](https://github.com/d3/d3-hierarchy#tree_separation):
|
|
25
|
-
> The separation accessor is used to separate neighboring nodes. The separation function is passed two nodes a and b, and must return the desired separation. The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent.
|
|
26
|
-
|
|
27
|
-
@example
|
|
28
|
-
function separation(a, b) {
|
|
29
|
-
return a.parent === b.parent ? 1 : 2;
|
|
30
|
-
}
|
|
31
|
-
*/
|
|
32
|
-
separation(_: any): any;
|
|
33
17
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`applyTreemapLayout` — Treemap's chart-specific layout stage.
|
|
3
|
+
*/
|
|
4
|
+
import type { HierarchyRectangularNode } from "d3-hierarchy";
|
|
5
|
+
import type { DataPoint } from "@d3plus/data";
|
|
6
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
7
|
+
/** A laid-out treemap leaf node (carries `share` + `rank` populated below). */
|
|
8
|
+
export type TreemapShapeNode = Omit<HierarchyRectangularNode<DataPoint>, "id"> & {
|
|
9
|
+
__d3plus__: true;
|
|
10
|
+
id: string | number;
|
|
11
|
+
i: number | undefined;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
share: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const applyTreemapLayout: TransformStage;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Treemap — d3-hierarchy treemap layout, one cell per leaf.
|
|
3
|
+
|
|
4
|
+
Implementation files in this folder:
|
|
5
|
+
- `applyLayout.ts` — chart-specific `TransformStage`.
|
|
6
|
+
- `emit.ts` — rect + label scene nodes from the laid-out data.
|
|
7
|
+
- `thresholdFunction.ts` — pure threshold-merge algorithm.
|
|
8
|
+
|
|
9
|
+
The default export is the chart class via `makeChart(def)`; the named
|
|
10
|
+
export is the def itself.
|
|
11
|
+
*/
|
|
12
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
13
|
+
export declare const treemapDef: ChartDefinition;
|
|
14
|
+
/**
|
|
15
|
+
Uses the d3 treemap layout to create SVG rectangles based on an array of data.
|
|
16
|
+
*/
|
|
17
|
+
declare const _default: new () => any;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Treemap threshold-merge algorithm — pure: takes its inputs explicitly,
|
|
3
|
+
returns a new array. `treemapDef.thresholdFunction` binds the inputs
|
|
4
|
+
from the viz.
|
|
5
|
+
*/
|
|
6
|
+
import type { DataPoint } from "@d3plus/data";
|
|
7
|
+
export interface ThresholdInputs {
|
|
8
|
+
/** Per-key aggregation overrides used by `merge` to bucket removed items. */
|
|
9
|
+
aggs: Record<string, (leaves: DataPoint[]) => unknown>;
|
|
10
|
+
/** The drill-down depth at which the threshold filter applies. */
|
|
11
|
+
drawDepth: number;
|
|
12
|
+
/** GroupBy accessors used to walk down the tree to `drawDepth`. */
|
|
13
|
+
groupBy: ((d: DataPoint) => DataPoint[keyof DataPoint])[];
|
|
14
|
+
/** Threshold accessor — returns a 0..1 percentage given the branch data. */
|
|
15
|
+
threshold: (branchData: DataPoint[]) => number;
|
|
16
|
+
/** Per-datum value accessor compared against `threshold * totalSum`. */
|
|
17
|
+
thresholdKey: (d: DataPoint) => number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
Walks `data` to `drawDepth` and merges entries whose `thresholdKey`
|
|
21
|
+
value falls below `threshold(branchData) * totalSum` into a single
|
|
22
|
+
aggregated row at that depth. Returns the kept set; original `data`
|
|
23
|
+
is not mutated.
|
|
24
|
+
*/
|
|
25
|
+
export declare function thresholdFunction(data: DataPoint[], inputs: ThresholdInputs): DataPoint[];
|
|
@@ -20,21 +20,10 @@ export default class Treemap extends Viz {
|
|
|
20
20
|
* @private
|
|
21
21
|
*/
|
|
22
22
|
_thresholdFunction(data: any): any;
|
|
23
|
-
/**
|
|
24
|
-
The inner and outer padding.
|
|
25
|
-
*/
|
|
26
|
-
layoutPadding(_: any): any;
|
|
27
|
-
/**
|
|
28
|
-
Sort comparator function for the treemap layout. Defaults to descending order by the associated input data's numeric value attribute.
|
|
29
|
-
|
|
30
|
-
@example
|
|
31
|
-
function comparator(a, b) {
|
|
32
|
-
return b.value - a.value;
|
|
33
|
-
}
|
|
34
|
-
*/
|
|
35
|
-
sort(_: any): any;
|
|
36
23
|
/**
|
|
37
24
|
The sum accessor used for sizing each rectangle in the treemap.
|
|
25
|
+
Kept hand-written because the setter must also update `_thresholdKey`
|
|
26
|
+
(the threshold filter reads `_thresholdKey` directly).
|
|
38
27
|
|
|
39
28
|
@example
|
|
40
29
|
function sum(d) {
|
|
@@ -44,6 +33,8 @@ export default class Treemap extends Viz {
|
|
|
44
33
|
sum(_: any): any;
|
|
45
34
|
/**
|
|
46
35
|
The tiling method used when calculating the size and position of the rectangles.
|
|
36
|
+
Kept hand-written because the setter coerces `"dice"` etc. to the
|
|
37
|
+
corresponding d3-hierarchy tile method (`treemapDice`).
|
|
47
38
|
|
|
48
39
|
Can either be a string referring to a d3-hierarchy [tiling method](https://github.com/d3/d3-hierarchy#treemap-tiling), or a custom function in the same format.
|
|
49
40
|
*/
|