@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,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`applyPackLayout` — Pack's chart-specific layout stage. Runs the
|
|
3
|
+
d3-hierarchy pack against the rolled-up nested data; stores the
|
|
4
|
+
diameter + centering offsets on `viz.ctx` so the chart transform can
|
|
5
|
+
center the layout.
|
|
6
|
+
*/
|
|
7
|
+
import type { HierarchyCircularNode } from "d3-hierarchy";
|
|
8
|
+
import type { DataPoint } from "@d3plus/data";
|
|
9
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
10
|
+
type PackLeaf = Omit<HierarchyCircularNode<DataPoint>, "id"> & {
|
|
11
|
+
__d3plus__: true;
|
|
12
|
+
i: number;
|
|
13
|
+
id: string | number;
|
|
14
|
+
};
|
|
15
|
+
export declare const applyPackLayout: TransformStage;
|
|
16
|
+
export type { PackLeaf };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pack — d3-hierarchy circle-packing layout.
|
|
3
|
+
|
|
4
|
+
Implementation files in this folder:
|
|
5
|
+
- `applyLayout.ts` — chart-specific `TransformStage`.
|
|
6
|
+
- `emit.ts` — Circle + label scene nodes from the laid-out data.
|
|
7
|
+
- `recursionCircles.ts` — descendant-walk helper used by hover handlers.
|
|
8
|
+
*/
|
|
9
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
10
|
+
export declare const packDef: ChartDefinition;
|
|
11
|
+
/**
|
|
12
|
+
Uses the d3 pack layout to create a Circle Packing chart based on an array of data.
|
|
13
|
+
*/
|
|
14
|
+
declare const _default: new () => any;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Walk a nested hierarchy, collecting every descendant into a flat array.
|
|
3
|
+
Used by Pack's hover handlers to highlight the subtree under a hovered
|
|
4
|
+
node.
|
|
5
|
+
*/
|
|
6
|
+
import type { DataPoint } from "@d3plus/data";
|
|
7
|
+
export declare function recursionCircles(d: DataPoint, arr?: DataPoint[]): DataPoint[];
|
|
@@ -18,23 +18,10 @@ export default class Pack extends Viz {
|
|
|
18
18
|
The hover callback function for highlighting shapes on mouseover.
|
|
19
19
|
*/
|
|
20
20
|
hover(_: any): this;
|
|
21
|
-
/**
|
|
22
|
-
The inner and outer padding for the pack layout.
|
|
23
|
-
*/
|
|
24
|
-
layoutPadding(_: any): any;
|
|
25
21
|
/**
|
|
26
22
|
The opacity of nested circles within the pack layout.
|
|
27
23
|
*/
|
|
28
24
|
packOpacity(_: any): any;
|
|
29
|
-
/**
|
|
30
|
-
Sort comparator function for the pack layout. Defaults to descending order by the associated input data's numeric value attribute.
|
|
31
|
-
|
|
32
|
-
@example
|
|
33
|
-
function comparator(a, b) {
|
|
34
|
-
return b.value - a.value;
|
|
35
|
-
}
|
|
36
|
-
*/
|
|
37
|
-
sort(_: any): any;
|
|
38
25
|
/**
|
|
39
26
|
The sum accessor used for sizing each circle in the pack layout.
|
|
40
27
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
`applyPieLayout` — Pie's chart-specific layout stage. Runs the d3-shape
|
|
3
|
+
pie layout against `viz._filteredData`, tags each slice with `__d3plus__`
|
|
4
|
+
+ index, builds the arc generator from the current schema values, and
|
|
5
|
+
stores `pieData`/`arcData`/`pieWidth`/`pieHeight` on `viz.ctx`.
|
|
6
|
+
*/
|
|
7
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
8
|
+
export declare const applyPieLayout: TransformStage;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pie — d3-shape pie layout, one path per slice.
|
|
3
|
+
|
|
4
|
+
Implementation files in this folder:
|
|
5
|
+
- `applyLayout.ts` — chart-specific `TransformStage`.
|
|
6
|
+
- `emit.ts` — Path + label scene nodes from the laid-out slices.
|
|
7
|
+
*/
|
|
8
|
+
import type { DataDrivenChartDefinition } from "../definition/ChartDefinition.js";
|
|
9
|
+
export declare const pieDef: DataDrivenChartDefinition;
|
|
10
|
+
/**
|
|
11
|
+
Uses the d3 pie layout to create SVG arcs based on an array of data.
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: new () => any;
|
|
14
|
+
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { DataPoint } from "@d3plus/data";
|
|
2
1
|
import Viz from "./Viz.js";
|
|
3
2
|
/**
|
|
4
3
|
Uses the [d3 pie layout](https://github.com/d3/d3-shape#pies) to creates SVG arcs based on an array of data.
|
|
@@ -15,30 +14,4 @@ export default class Pie extends Viz {
|
|
|
15
14
|
@private
|
|
16
15
|
*/
|
|
17
16
|
_draw(callback?: () => void): this;
|
|
18
|
-
/**
|
|
19
|
-
The pixel value, or function that returns a pixel value, that is used as the inner radius of the Pie (creating a Donut).
|
|
20
|
-
*/
|
|
21
|
-
innerRadius(_?: number | (() => number)): this | number | (() => number);
|
|
22
|
-
/**
|
|
23
|
-
The padding between each arc, set as a radian value between \`0\` and \`1\`.
|
|
24
|
-
|
|
25
|
-
If set, this will override any previously set padPixel value.
|
|
26
|
-
*/
|
|
27
|
-
padAngle(_?: number): this | number;
|
|
28
|
-
/**
|
|
29
|
-
The padding between each arc, set as a pixel number value.
|
|
30
|
-
|
|
31
|
-
By default the value is \`0\`, which shows no padding between each arc.
|
|
32
|
-
|
|
33
|
-
If \`padAngle\` is defined, the \`padPixel\` value will not be considered.
|
|
34
|
-
*/
|
|
35
|
-
padPixel(_?: number): this | number;
|
|
36
|
-
/**
|
|
37
|
-
A comparator function that sorts the Pie slices.
|
|
38
|
-
*/
|
|
39
|
-
sort(_?: (...args: unknown[]) => unknown): this | ((...args: unknown[]) => unknown);
|
|
40
|
-
/**
|
|
41
|
-
The accessor key for each data point used to calculate the size of each Pie section.
|
|
42
|
-
*/
|
|
43
|
-
value(_?: string | ((d: DataPoint, i: number) => number)): this | string | ((d: DataPoint, i: number) => number);
|
|
44
17
|
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { type PlotPaintContext } from "../features/plotPaint.js";
|
|
2
|
+
import Viz from "../viz/Viz.js";
|
|
3
|
+
import type { Scene } from "@d3plus/render";
|
|
4
|
+
import type { DataPoint } from "@d3plus/data";
|
|
5
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
6
|
+
/** Accessor function or string key for a plotted value. */
|
|
7
|
+
type PlotAccessor = (d: DataPoint, i: number) => number | Date | string;
|
|
8
|
+
/** Function-or-string-key value accepted by accessor setters. */
|
|
9
|
+
type PlotAccessorArg = string | PlotAccessor;
|
|
10
|
+
/**
|
|
11
|
+
Creates an x/y plot based on an array of data.
|
|
12
|
+
*/
|
|
13
|
+
export default class Plot extends Viz {
|
|
14
|
+
/**
|
|
15
|
+
Invoked when creating a new class instance, and sets any default parameters.
|
|
16
|
+
@private
|
|
17
|
+
*/
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
Extends the preDraw behavior of the abstract Viz class.
|
|
21
|
+
@private
|
|
22
|
+
*/
|
|
23
|
+
_preDraw(): void;
|
|
24
|
+
/**
|
|
25
|
+
Composes the chart's scene graph: the native shape scenes from Viz.toScene
|
|
26
|
+
(bars/lines/areas + labels) plus snapshots of the rendered axes, so a Plot
|
|
27
|
+
renders fully — geometry and axes — through the @d3plus/render backends.
|
|
28
|
+
*/
|
|
29
|
+
toScene(): Scene;
|
|
30
|
+
/**
|
|
31
|
+
Wires user-registered `on()` event handlers onto a freshly-configured
|
|
32
|
+
shape instance. Splits the registered events into three buckets:
|
|
33
|
+
global (`"click"`), shape-scoped (`"click.shape"`), and
|
|
34
|
+
shape-class-scoped (`"click.Bar"` etc.). All three forward into
|
|
35
|
+
`this.schema.on[event](d.data, d.i, x, event)`. Extracted from
|
|
36
|
+
Plot._paint so the chart-level event wiring is in one place.
|
|
37
|
+
|
|
38
|
+
On the scene path (SvgRenderer/CanvasRenderer) these d3-selection
|
|
39
|
+
bindings don't fire — compute-mode shapes mount no per-shape DOM.
|
|
40
|
+
Pointer events are instead routed by `Viz._drawSceneToTarget`'s
|
|
41
|
+
renderer bridge: it hit-tests via `Renderer.pick`, reads the picked
|
|
42
|
+
node's stamped `shapeType`, and dispatches the matching global,
|
|
43
|
+
`.shape`, and shape-class-scoped (`.Bar`) handlers — the same three
|
|
44
|
+
buckets this method wires, so SVG and Canvas behave identically.
|
|
45
|
+
*/
|
|
46
|
+
_wirePlotShapeEvents(shape: {
|
|
47
|
+
on(event: string, handler: unknown): unknown;
|
|
48
|
+
}, shapeKey: string, events: string[]): void;
|
|
49
|
+
/**
|
|
50
|
+
Extends the draw behavior of the abstract Viz class.
|
|
51
|
+
@private
|
|
52
|
+
*/
|
|
53
|
+
_draw(callback?: () => void): VizInstance;
|
|
54
|
+
/**
|
|
55
|
+
Paint phase: production axis rendering, shape buffer setup, and shape
|
|
56
|
+
emission with event handlers. Receives all cross-phase locals from
|
|
57
|
+
_draw via `pCtx` (so this method has zero coupling to _draw's local
|
|
58
|
+
scope beyond the explicit context).
|
|
59
|
+
*/
|
|
60
|
+
_paint(pCtx: PlotPaintContext): this;
|
|
61
|
+
/**
|
|
62
|
+
Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc).
|
|
63
|
+
|
|
64
|
+
Additionally, each config object can also contain an optional "layer" key, which defines whether the annotations will be displayed in "front" or in "back" of the primary visualization shapes. This value defaults to "back" if not present.
|
|
65
|
+
*/
|
|
66
|
+
annotations(_?: unknown): this | unknown[];
|
|
67
|
+
/**
|
|
68
|
+
Determines whether the x and y axes should have their scales persist while users filter the data, the timeline being the prime example (set this to `true` to make the axes stay consistent when the timeline changes).
|
|
69
|
+
*/
|
|
70
|
+
axisPersist(_?: boolean): this | boolean;
|
|
71
|
+
/**
|
|
72
|
+
A d3plus-shape configuration Object used for styling the background rectangle of the inner x/y plot (behind all of the shapes and gridlines).
|
|
73
|
+
*/
|
|
74
|
+
backgroundConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
75
|
+
/**
|
|
76
|
+
Determines whether or not to add additional padding at the ends of x or y scales. The most commone use for this is in Scatter Plots, so that the shapes do not appear directly on the axis itself. The value provided can either be `true` or `false` to toggle the behavior for all shape types, or a keyed Object for each shape type (ie. `{Bar: false, Circle: true, Line: false}`).
|
|
77
|
+
*/
|
|
78
|
+
buffer(_?: boolean | Record<string, boolean>): this | Record<string, unknown>;
|
|
79
|
+
/**
|
|
80
|
+
The confidence interval as an array of [lower, upper] bounds.
|
|
81
|
+
|
|
82
|
+
@example <caption>Can be called with accessor functions or static keys:</caption>
|
|
83
|
+
var data = {id: "alpha", value: 10, lci: 9, hci: 11};
|
|
84
|
+
...
|
|
85
|
+
// Accessor functions
|
|
86
|
+
.confidence([function(d) { return d.lci }, function(d) { return d.hci }])
|
|
87
|
+
|
|
88
|
+
// Or static keys
|
|
89
|
+
.confidence(["lci", "hci"])
|
|
90
|
+
*/
|
|
91
|
+
confidence(_?: unknown): this | [number, number] | false;
|
|
92
|
+
/**
|
|
93
|
+
Configuration object for shapes rendered as confidence intervals.
|
|
94
|
+
*/
|
|
95
|
+
confidenceConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
96
|
+
/**
|
|
97
|
+
When the width or height of the chart is less than or equal to this pixel value, the discrete axis will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.
|
|
98
|
+
*/
|
|
99
|
+
discreteCutoff(_?: number): this | number;
|
|
100
|
+
/**
|
|
101
|
+
The pixel space between groups of bars.
|
|
102
|
+
*/
|
|
103
|
+
groupPadding(_?: number): this | number;
|
|
104
|
+
/**
|
|
105
|
+
The d3plus-shape config used on the Line shapes created to connect lineLabels to the end of their associated Line path.
|
|
106
|
+
*/
|
|
107
|
+
labelConnectorConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
108
|
+
/**
|
|
109
|
+
The behavior to be used when calculating the position and size of each shape's label(s). The value passed can either be the _String_ name of the behavior to be used for all shapes, or an accessor _Function_ that will be provided each data point and will be expected to return the behavior to be used for that data point. The availability and options for this method depend on the default logic for each Shape. As an example, the values "outside" or "inside" can be set for Bar shapes, whose "auto" default will calculate the best position dynamically based on the available space.
|
|
110
|
+
*/
|
|
111
|
+
labelPosition(_?: string | ((d: DataPoint, i: number) => string)): this | ((d: DataPoint, i: number) => string);
|
|
112
|
+
/**
|
|
113
|
+
Shape config for the Circle shapes drawn by the lineMarkers method.
|
|
114
|
+
*/
|
|
115
|
+
lineMarkerConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
Draws circle markers on each vertex of a Line.
|
|
118
|
+
*/
|
|
119
|
+
lineMarkers(_?: boolean): this | boolean;
|
|
120
|
+
/**
|
|
121
|
+
Sets the size of bubbles to the given Number, data key, or function.
|
|
122
|
+
*/
|
|
123
|
+
size(_?: PlotAccessorArg | false): this | PlotAccessor;
|
|
124
|
+
/**
|
|
125
|
+
Sets the stack offset. If *value* is not specified, returns the current stack offset function.
|
|
126
|
+
*/
|
|
127
|
+
stackOffset(_?: string | ((series: number[][], order: number[]) => void)): this | ((series: number[][], order: number[]) => void);
|
|
128
|
+
/**
|
|
129
|
+
Sets the stack order. If *value* is not specified, returns the current stack order function.
|
|
130
|
+
*/
|
|
131
|
+
stackOrder(_?: string | ((series: number[][]) => number[])): this | ((series: number[][]) => number[]);
|
|
132
|
+
/**
|
|
133
|
+
Accessor function or string key for the x-axis value of each data point.
|
|
134
|
+
*/
|
|
135
|
+
x(_?: PlotAccessorArg): this | PlotAccessor;
|
|
136
|
+
/**
|
|
137
|
+
Accessor function or string key for the secondary x-axis value of each data point.
|
|
138
|
+
*/
|
|
139
|
+
x2(_?: PlotAccessorArg): this | PlotAccessor;
|
|
140
|
+
/**
|
|
141
|
+
A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
|
|
142
|
+
*/
|
|
143
|
+
xConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
144
|
+
/**
|
|
145
|
+
A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
|
|
146
|
+
*/
|
|
147
|
+
x2Config(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
148
|
+
/**
|
|
149
|
+
Accessor function or string key for the y-axis value of each data point.
|
|
150
|
+
*/
|
|
151
|
+
y(_?: PlotAccessorArg): this | PlotAccessor;
|
|
152
|
+
/**
|
|
153
|
+
Accessor function or string key for the secondary y-axis value of each data point.
|
|
154
|
+
*/
|
|
155
|
+
y2(_?: PlotAccessorArg): this | PlotAccessor;
|
|
156
|
+
/**
|
|
157
|
+
A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the y-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
|
|
158
|
+
|
|
159
|
+
*Note:* If a "domain" array is passed to the y-axis config, it will be reversed.
|
|
160
|
+
*/
|
|
161
|
+
yConfig(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
162
|
+
/**
|
|
163
|
+
A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary y-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
|
|
164
|
+
*/
|
|
165
|
+
y2Config(_?: Record<string, unknown>): this | Record<string, unknown>;
|
|
166
|
+
}
|
|
167
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Plot label/size placement helpers. Both are invoked bound to a Plot
|
|
3
|
+
instance (`fn.bind(this)`), so they read the live axis scales +
|
|
4
|
+
accessors off `this`.
|
|
5
|
+
*/
|
|
6
|
+
import type { DataPoint } from "@d3plus/data";
|
|
7
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
8
|
+
/**
|
|
9
|
+
Default shape size, routed through the chart's internal sizeScale.
|
|
10
|
+
*/
|
|
11
|
+
export declare function defaultSize(this: VizInstance, d: DataPoint): number;
|
|
12
|
+
/**
|
|
13
|
+
Determines if a Bar label should be placed outside of the Bar.
|
|
14
|
+
*/
|
|
15
|
+
export declare function outside(this: VizInstance, d: DataPoint, i: number): boolean;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
2
|
+
import type { TransformStage } from "../pipeline/stages.js";
|
|
3
|
+
export { computePlotInitialDomains } from "./pipelineDomains.js";
|
|
4
|
+
export { measurePlotLineLabels } from "./pipelineLineLabels.js";
|
|
5
|
+
/**
|
|
6
|
+
`formatPlotData` — first stage of Plot's chart-specific pipeline. Detects
|
|
7
|
+
time axes (sets viz._xTime / _x2Time / _yTime / _y2Time), maps the
|
|
8
|
+
filtered data through `prepData` to produce the per-row PlotDatum shape
|
|
9
|
+
(x/y/x2/y2 + id + group + shape + lci/hci + discrete), and constructs
|
|
10
|
+
the `_sizeScaleD3` if `_size` is set.
|
|
11
|
+
|
|
12
|
+
Pure compute. Returns `{formattedData, axisData, x2Exists, y2Exists}`
|
|
13
|
+
for downstream stages + the paint phase. Side-effects on viz: stores
|
|
14
|
+
`_formattedData`, `_xTime`/`_x2Time`/`_yTime`/`_y2Time`, `_sizeScaleD3`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatPlotData: TransformStage;
|
|
17
|
+
/**
|
|
18
|
+
`computePlotAxisValues` — second stage of Plot's pipeline. Given the
|
|
19
|
+
`plotFormattedData` + `plotAxisData` from `formatPlotData`, computes
|
|
20
|
+
the per-axis values arrays (`xData`/`x2Data`/`yData`/`y2Data`) used by
|
|
21
|
+
the domain/scale construction downstream.
|
|
22
|
+
|
|
23
|
+
Takes the axis name + the two data sources + the viz state and returns
|
|
24
|
+
the sorted/unique values for that axis.
|
|
25
|
+
*/
|
|
26
|
+
export declare const computePlotAxisValues: TransformStage;
|
|
27
|
+
/**
|
|
28
|
+
`extendPlotOppScales` — sixth stage. After `computePlotScales` returns the
|
|
29
|
+
initial x/y/x2/y2 scales, the opposite-axis (non-discrete) scales need to
|
|
30
|
+
be extended by each shape type's buffer function (Bar/Box/Circle/Line/
|
|
31
|
+
etc. — `viz._buffer[key]`) to allocate room for the shapes' widths.
|
|
32
|
+
|
|
33
|
+
Reads `viz._buffer[shapeKey]({data, x, y, yScale, xScale, config, x2?,
|
|
34
|
+
y2?})` and chains the returned `[x, y]` (or `[x2, y2]`) back into the
|
|
35
|
+
scales. Also calls `discreteBuffer` for Bar/Box to round the discrete
|
|
36
|
+
scale to integer pixels.
|
|
37
|
+
|
|
38
|
+
Returns the extended scales. Side-effect-free on viz (only on the scale
|
|
39
|
+
instances, which are passed through the context).
|
|
40
|
+
*/
|
|
41
|
+
export declare const extendPlotOppScales: TransformStage;
|
|
42
|
+
/**
|
|
43
|
+
`preparePlotAxisLayout` — final pre-paint stage. Reads the constructed
|
|
44
|
+
scales and computes the per-axis display config the four axis
|
|
45
|
+
`.measure()` + `.render()` calls in Plot._draw need:
|
|
46
|
+
- `defaultConfig`/`defaultX2Config`/`defaultY2Config`
|
|
47
|
+
- `showX`/`showY` (cutoff predicates)
|
|
48
|
+
- `yC` (base y-axis config, including no-x-axis layout adjustments)
|
|
49
|
+
- `barLabels` (used to suppress redundant ticks)
|
|
50
|
+
- `xTicks`/`yTicks`/`x2Ticks`/`y2Ticks` (null when ticks should display,
|
|
51
|
+
empty array when ticks are redundant with bar labels)
|
|
52
|
+
|
|
53
|
+
Pure compute. No DOM, no side effects on viz.
|
|
54
|
+
*/
|
|
55
|
+
export declare const preparePlotAxisLayout: TransformStage;
|
|
56
|
+
/**
|
|
57
|
+
`computePlotScales` — fourth stage of Plot's pipeline. Takes the per-axis
|
|
58
|
+
values + the chart's raw `domains` object (computed by the inline
|
|
59
|
+
stacking/non-stacking branch) and produces the four configured d3 scale
|
|
60
|
+
instances (`x`/`x2`/`y`/`y2`), the resolved scale-type strings
|
|
61
|
+
(`xConfigScale` etc., returned in `plotConfigScales`), and the final
|
|
62
|
+
`domains` after log/baseline adjustments.
|
|
63
|
+
|
|
64
|
+
The "initial domains" computation (stacked vs non-stacked branch that
|
|
65
|
+
fills `domains.x`, `domains.y`, etc. from data) is inline in
|
|
66
|
+
`Plot._draw` — extracting that requires untangling array sorts that
|
|
67
|
+
mutate `axisData` in place, which is the natural next step.
|
|
68
|
+
*/
|
|
69
|
+
export declare const computePlotScales: TransformStage;
|
|
70
|
+
export declare const plotDef: ChartDefinition;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { DataPoint } from "@d3plus/data";
|
|
2
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
3
|
+
export declare function plotShapeDefaults(this: VizInstance): {
|
|
4
|
+
Area: {
|
|
5
|
+
label: (d: DataPoint, i: number) => string | false;
|
|
6
|
+
labelBounds: (d: DataPoint, i: number, aes: {
|
|
7
|
+
points: [number, number][];
|
|
8
|
+
}) => {
|
|
9
|
+
angle: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
} | null;
|
|
15
|
+
labelConfig: {
|
|
16
|
+
fontMin: number;
|
|
17
|
+
fontResize: boolean;
|
|
18
|
+
padding: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
ariaLabel: (d: DataPoint, i: number) => string;
|
|
22
|
+
Bar: {
|
|
23
|
+
labelBounds(this: VizInstance, d: DataPoint, i: number, s: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
}): {
|
|
27
|
+
[x: string]: number;
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
labelConfig: {
|
|
32
|
+
fontMax: number;
|
|
33
|
+
fontMin: number;
|
|
34
|
+
fontResize: boolean;
|
|
35
|
+
fontColor(this: VizInstance, d: DataPoint, i: number): string;
|
|
36
|
+
fontStroke(this: VizInstance, d: DataPoint, i: number): string;
|
|
37
|
+
fontStrokeWidth(this: VizInstance, d: DataPoint, i: number): 0 | 0.1;
|
|
38
|
+
padding: number;
|
|
39
|
+
textAnchor(this: VizInstance, d: DataPoint, i: number): string;
|
|
40
|
+
verticalAlign(this: VizInstance, d: DataPoint, i: number): string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
Circle: {
|
|
44
|
+
r: (d: DataPoint) => number;
|
|
45
|
+
trail: boolean;
|
|
46
|
+
};
|
|
47
|
+
Line: {
|
|
48
|
+
curve: () => string;
|
|
49
|
+
fill: () => string;
|
|
50
|
+
labelConfig: {
|
|
51
|
+
fontColor: (d: DataPoint, i: number) => string;
|
|
52
|
+
fontResize: boolean;
|
|
53
|
+
padding: number;
|
|
54
|
+
textAnchor: string;
|
|
55
|
+
verticalAlign: string;
|
|
56
|
+
};
|
|
57
|
+
strokeWidth: () => number;
|
|
58
|
+
};
|
|
59
|
+
Rect: {
|
|
60
|
+
height: (d: DataPoint) => number;
|
|
61
|
+
width: (d: DataPoint) => number;
|
|
62
|
+
trail: boolean;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
d3-stack ordering + offset helpers used by Plot's `stackOrder` /
|
|
3
|
+
`stackOffset` accessors and their constructor defaults.
|
|
4
|
+
*/
|
|
5
|
+
import * as d3Shape from "d3-shape";
|
|
6
|
+
type Series = d3Shape.Series<Record<string, unknown>, string>;
|
|
7
|
+
/**
|
|
8
|
+
Sums a single stack series, ignoring non-numeric segments.
|
|
9
|
+
*/
|
|
10
|
+
export declare function stackSum(series: Series): number;
|
|
11
|
+
/**
|
|
12
|
+
Stack order: ascending by series key, tie-broken by summed value.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stackOrderAscending(series: Series[]): number[];
|
|
15
|
+
/**
|
|
16
|
+
Stack order: the reverse of {@link stackOrderAscending}.
|
|
17
|
+
*/
|
|
18
|
+
export declare function stackOrderDescending(series: Series[]): number[];
|
|
19
|
+
/**
|
|
20
|
+
Diverging stack offset: positive segments stack upward from zero,
|
|
21
|
+
negative segments stack downward.
|
|
22
|
+
*/
|
|
23
|
+
export declare function stackOffsetDiverging(series: Series[], order: number[]): void;
|
|
24
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Viz from "./Viz.js";
|
|
2
|
+
import type { Scene } from "@d3plus/render";
|
|
2
3
|
/**
|
|
3
4
|
Creates an x/y plot based on an array of data.
|
|
4
5
|
*/
|
|
@@ -14,11 +15,33 @@ export default class Plot extends Viz {
|
|
|
14
15
|
@private
|
|
15
16
|
*/
|
|
16
17
|
_preDraw(): void;
|
|
18
|
+
/**
|
|
19
|
+
Composes the chart's scene graph: the native shape scenes from Viz.toScene
|
|
20
|
+
(bars/lines/areas + labels) plus snapshots of the rendered axes, so a Plot
|
|
21
|
+
renders fully — geometry and axes — through the @d3plus/render backends.
|
|
22
|
+
*/
|
|
23
|
+
toScene(): Scene;
|
|
24
|
+
/**
|
|
25
|
+
Wires user-registered `on()` event handlers onto a freshly-configured
|
|
26
|
+
shape instance. Splits the registered events into three buckets the
|
|
27
|
+
legacy code maintained: global (`"click"`), shape-scoped
|
|
28
|
+
(`"click.shape"`), and shape-class-scoped (`"click.Bar"` etc.). All
|
|
29
|
+
three forward into `this._on[event](d.data, d.i, x, event)`. Extracted
|
|
30
|
+
from Plot._paint so the chart-level event wiring is in one place.
|
|
31
|
+
*/
|
|
32
|
+
_wirePlotShapeEvents(shape: any, shapeKey: string, events: string[]): void;
|
|
17
33
|
/**
|
|
18
34
|
Extends the draw behavior of the abstract Viz class.
|
|
19
35
|
@private
|
|
20
36
|
*/
|
|
21
37
|
_draw(callback?: () => void): this;
|
|
38
|
+
/**
|
|
39
|
+
Paint phase: production axis rendering, shape buffer setup, and shape
|
|
40
|
+
emission with event handlers. Receives all cross-phase locals from
|
|
41
|
+
_draw via `pCtx` (so this method has zero coupling to _draw's local
|
|
42
|
+
scope beyond the explicit context).
|
|
43
|
+
*/
|
|
44
|
+
_paint(pCtx: any): this;
|
|
22
45
|
/**
|
|
23
46
|
Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc).
|
|
24
47
|
|
|
@@ -33,14 +56,6 @@ export default class Plot extends Viz {
|
|
|
33
56
|
A d3plus-shape configuration Object used for styling the background rectangle of the inner x/y plot (behind all of the shapes and gridlines).
|
|
34
57
|
*/
|
|
35
58
|
backgroundConfig(_: any): any;
|
|
36
|
-
/**
|
|
37
|
-
The pixel space between each bar in a group of bars.
|
|
38
|
-
*/
|
|
39
|
-
barPadding(_: any): any;
|
|
40
|
-
/**
|
|
41
|
-
The baseline for the x/y plot.
|
|
42
|
-
*/
|
|
43
|
-
baseline(_: any): any;
|
|
44
59
|
/**
|
|
45
60
|
Determines whether or not to add additional padding at the ends of x or y scales. The most commone use for this is in Scatter Plots, so that the shapes do not appear directly on the axis itself. The value provided can either be `true` or `false` to toggle the behavior for all shape types, or a keyed Object for each shape type (ie. `{Bar: false, Circle: true, Line: false}`).
|
|
46
61
|
*/
|
|
@@ -78,10 +93,6 @@ export default class Plot extends Viz {
|
|
|
78
93
|
The behavior to be used when calculating the position and size of each shape's label(s). The value passed can either be the _String_ name of the behavior to be used for all shapes, or an accessor _Function_ that will be provided each data point and will be expected to return the behavior to be used for that data point. The availability and options for this method depend on the default logic for each Shape. As an example, the values "outside" or "inside" can be set for Bar shapes, whose "auto" default will calculate the best position dynamically based on the available space.
|
|
79
94
|
*/
|
|
80
95
|
labelPosition(_: any): any;
|
|
81
|
-
/**
|
|
82
|
-
Draws labels on the right side of any Line shapes that are drawn on the plot.
|
|
83
|
-
*/
|
|
84
|
-
lineLabels(_: any): any;
|
|
85
96
|
/**
|
|
86
97
|
Shape config for the Circle shapes drawn by the lineMarkers method.
|
|
87
98
|
*/
|
|
@@ -90,30 +101,10 @@ export default class Plot extends Viz {
|
|
|
90
101
|
Draws circle markers on each vertex of a Line.
|
|
91
102
|
*/
|
|
92
103
|
lineMarkers(_: any): any;
|
|
93
|
-
/**
|
|
94
|
-
A JavaScript [sort comparator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) that receives each shape Class (ie. "Circle", "Line", etc) as it's comparator arguments. Shapes are drawn in groups based on their type, so you are defining the layering order for all shapes of said type.
|
|
95
|
-
*/
|
|
96
|
-
shapeSort(_: any): any;
|
|
97
104
|
/**
|
|
98
105
|
Sets the size of bubbles to the given Number, data key, or function.
|
|
99
106
|
*/
|
|
100
107
|
size(_: any): any;
|
|
101
|
-
/**
|
|
102
|
-
Sets the size scale maximum to the specified number.
|
|
103
|
-
*/
|
|
104
|
-
sizeMax(_: any): any;
|
|
105
|
-
/**
|
|
106
|
-
Sets the size scale minimum to the specified number.
|
|
107
|
-
*/
|
|
108
|
-
sizeMin(_: any): any;
|
|
109
|
-
/**
|
|
110
|
-
Sets the size scale to the specified string.
|
|
111
|
-
*/
|
|
112
|
-
sizeScale(_: any): any;
|
|
113
|
-
/**
|
|
114
|
-
If *value* is specified, toggles shape stacking. If *value* is not specified, returns the current stack value.
|
|
115
|
-
*/
|
|
116
|
-
stacked(_: any): any;
|
|
117
108
|
/**
|
|
118
109
|
Sets the stack offset. If *value* is not specified, returns the current stack offset function.
|
|
119
110
|
*/
|
|
@@ -134,30 +125,10 @@ export default class Plot extends Viz {
|
|
|
134
125
|
A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
|
|
135
126
|
*/
|
|
136
127
|
xConfig(_: any): any;
|
|
137
|
-
/**
|
|
138
|
-
When the width of the chart is less than or equal to this pixel value, and the x-axis is not the discrete axis, it will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.
|
|
139
|
-
*/
|
|
140
|
-
xCutoff(_: any): any;
|
|
141
128
|
/**
|
|
142
129
|
A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
|
|
143
130
|
*/
|
|
144
131
|
x2Config(_: any): any;
|
|
145
|
-
/**
|
|
146
|
-
The x domain as an array. If either value is undefined, it will be calculated from the data.
|
|
147
|
-
*/
|
|
148
|
-
xDomain(_: any): any;
|
|
149
|
-
/**
|
|
150
|
-
The x2 domain as an array. If either value is undefined, it will be calculated from the data.
|
|
151
|
-
*/
|
|
152
|
-
x2Domain(_: any): any;
|
|
153
|
-
/**
|
|
154
|
-
Defines a custom sorting comparitor function to be used for discrete x axes.
|
|
155
|
-
*/
|
|
156
|
-
xSort(_: any): any;
|
|
157
|
-
/**
|
|
158
|
-
Defines a custom sorting comparitor function to be used for discrete x2 axes.
|
|
159
|
-
*/
|
|
160
|
-
x2Sort(_: any): any;
|
|
161
132
|
/**
|
|
162
133
|
Accessor function or string key for the y-axis value of each data point.
|
|
163
134
|
*/
|
|
@@ -172,28 +143,8 @@ export default class Plot extends Viz {
|
|
|
172
143
|
*Note:* If a "domain" array is passed to the y-axis config, it will be reversed.
|
|
173
144
|
*/
|
|
174
145
|
yConfig(_: any): any;
|
|
175
|
-
/**
|
|
176
|
-
When the height of the chart is less than or equal to this pixel value, and the y-axis is not the discrete axis, it will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.
|
|
177
|
-
*/
|
|
178
|
-
yCutoff(_: any): any;
|
|
179
146
|
/**
|
|
180
147
|
A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary y-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
|
|
181
148
|
*/
|
|
182
149
|
y2Config(_: any): any;
|
|
183
|
-
/**
|
|
184
|
-
The y domain as an array. If either value is undefined, it will be calculated from the data.
|
|
185
|
-
*/
|
|
186
|
-
yDomain(_: any): any;
|
|
187
|
-
/**
|
|
188
|
-
The y2 domain as an array. If either value is undefined, it will be calculated from the data.
|
|
189
|
-
*/
|
|
190
|
-
y2Domain(_: any): any;
|
|
191
|
-
/**
|
|
192
|
-
Defines a custom sorting comparitor function to be used for discrete y axes.
|
|
193
|
-
*/
|
|
194
|
-
ySort(_: any): any;
|
|
195
|
-
/**
|
|
196
|
-
Defines a custom sorting comparitor function to be used for discrete y2 axes.
|
|
197
|
-
*/
|
|
198
|
-
y2Sort(_: any): any;
|
|
199
150
|
}
|