@d3plus/core 3.1.5 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9922 -78537
- package/es/index.js +8 -0
- package/es/index.js.map +1 -1
- package/es/internal.js +54 -0
- package/es/internal.js.map +1 -0
- package/es/src/charts/AreaPlot/index.js +36 -0
- package/es/src/charts/AreaPlot/index.js.map +1 -0
- package/es/src/charts/BarChart/index.js +48 -0
- package/es/src/charts/BarChart/index.js.map +1 -0
- package/es/src/charts/BoxWhisker/index.js +52 -0
- package/es/src/charts/BoxWhisker/index.js.map +1 -0
- package/es/src/charts/BumpChart/index.js +81 -0
- package/es/src/charts/BumpChart/index.js.map +1 -0
- package/es/src/charts/Donut/index.js +42 -0
- package/es/src/charts/Donut/index.js.map +1 -0
- package/es/src/charts/Geomap/applyLayout.js +208 -0
- package/es/src/charts/Geomap/applyLayout.js.map +1 -0
- package/es/src/charts/Geomap/emit.js +169 -0
- package/es/src/charts/Geomap/emit.js.map +1 -0
- package/es/src/charts/Geomap/index.js +521 -0
- package/es/src/charts/Geomap/index.js.map +1 -0
- package/es/src/charts/LinePlot/index.js +32 -0
- package/es/src/charts/LinePlot/index.js.map +1 -0
- package/es/src/charts/Matrix/applyLayout.js +92 -0
- package/es/src/charts/Matrix/applyLayout.js.map +1 -0
- package/es/src/charts/Matrix/emit.js +44 -0
- package/es/src/charts/Matrix/emit.js.map +1 -0
- package/es/src/charts/Matrix/index.js +154 -0
- package/es/src/charts/Matrix/index.js.map +1 -0
- package/es/src/charts/Network/applyLayout.js +322 -0
- package/es/src/charts/Network/applyLayout.js.map +1 -0
- package/es/src/charts/Network/emit.js +273 -0
- package/es/src/charts/Network/emit.js.map +1 -0
- package/es/src/charts/Network/index.js +422 -0
- package/es/src/charts/Network/index.js.map +1 -0
- package/es/src/charts/Pack/applyLayout.js +46 -0
- package/es/src/charts/Pack/applyLayout.js.map +1 -0
- package/es/src/charts/Pack/emit.js +116 -0
- package/es/src/charts/Pack/emit.js.map +1 -0
- package/es/src/charts/Pack/index.js +194 -0
- package/es/src/charts/Pack/index.js.map +1 -0
- package/es/src/charts/Pack/recursionCircles.js +18 -0
- package/es/src/charts/Pack/recursionCircles.js.map +1 -0
- package/es/src/charts/Pie/applyLayout.js +44 -0
- package/es/src/charts/Pie/applyLayout.js.map +1 -0
- package/es/src/charts/Pie/emit.js +111 -0
- package/es/src/charts/Pie/emit.js.map +1 -0
- package/es/src/charts/Pie/index.js +134 -0
- package/es/src/charts/Pie/index.js.map +1 -0
- package/es/src/charts/Plot/draw.js +424 -0
- package/es/src/charts/Plot/draw.js.map +1 -0
- package/es/src/charts/Plot/index.js +827 -0
- package/es/src/charts/Plot/index.js.map +1 -0
- package/es/src/charts/Plot/labelPlacement.js +36 -0
- package/es/src/charts/Plot/labelPlacement.js.map +1 -0
- package/es/src/charts/Plot/pipeline.js +594 -0
- package/es/src/charts/Plot/pipeline.js.map +1 -0
- package/es/src/charts/Plot/pipelineDomains.js +254 -0
- package/es/src/charts/Plot/pipelineDomains.js.map +1 -0
- package/es/src/charts/Plot/pipelineLineLabels.js +210 -0
- package/es/src/charts/Plot/pipelineLineLabels.js.map +1 -0
- package/es/src/charts/Plot/shapeDefaults.js +189 -0
- package/es/src/charts/Plot/shapeDefaults.js.map +1 -0
- package/es/src/charts/Plot/stackHelpers.js +52 -0
- package/es/src/charts/Plot/stackHelpers.js.map +1 -0
- package/es/src/charts/Priestley/applyLayout.js +121 -0
- package/es/src/charts/Priestley/applyLayout.js.map +1 -0
- package/es/src/charts/Priestley/emit.js +129 -0
- package/es/src/charts/Priestley/emit.js.map +1 -0
- package/es/src/charts/Priestley/index.js +97 -0
- package/es/src/charts/Priestley/index.js.map +1 -0
- package/es/src/charts/Radar/applyLayout.js +326 -0
- package/es/src/charts/Radar/applyLayout.js.map +1 -0
- package/es/src/charts/Radar/emit.js +28 -0
- package/es/src/charts/Radar/emit.js.map +1 -0
- package/es/src/charts/Radar/index.js +98 -0
- package/es/src/charts/Radar/index.js.map +1 -0
- package/es/src/charts/RadialMatrix/applyLayout.js +132 -0
- package/es/src/charts/RadialMatrix/applyLayout.js.map +1 -0
- package/es/src/charts/RadialMatrix/emit.js +33 -0
- package/es/src/charts/RadialMatrix/emit.js.map +1 -0
- package/es/src/charts/RadialMatrix/index.js +144 -0
- package/es/src/charts/RadialMatrix/index.js.map +1 -0
- package/es/src/charts/Rings/applyLayout.js +508 -0
- package/es/src/charts/Rings/applyLayout.js.map +1 -0
- package/es/src/charts/Rings/emit.js +222 -0
- package/es/src/charts/Rings/emit.js.map +1 -0
- package/es/src/charts/Rings/index.js +245 -0
- package/es/src/charts/Rings/index.js.map +1 -0
- package/es/src/charts/Sankey/applyLayout.js +107 -0
- package/es/src/charts/Sankey/applyLayout.js.map +1 -0
- package/es/src/charts/Sankey/emit.js +134 -0
- package/es/src/charts/Sankey/emit.js.map +1 -0
- package/es/src/charts/Sankey/index.js +219 -0
- package/es/src/charts/Sankey/index.js.map +1 -0
- package/es/src/charts/StackedArea/index.js +27 -0
- package/es/src/charts/StackedArea/index.js.map +1 -0
- package/es/src/charts/Tree/applyLayout.js +233 -0
- package/es/src/charts/Tree/applyLayout.js.map +1 -0
- package/es/src/charts/Tree/emit.js +257 -0
- package/es/src/charts/Tree/emit.js.map +1 -0
- package/es/src/charts/Tree/index.js +105 -0
- package/es/src/charts/Tree/index.js.map +1 -0
- package/es/src/charts/Treemap/applyLayout.js +85 -0
- package/es/src/charts/Treemap/applyLayout.js.map +1 -0
- package/es/src/charts/Treemap/emit.js +141 -0
- package/es/src/charts/Treemap/emit.js.map +1 -0
- package/es/src/charts/Treemap/index.js +177 -0
- package/es/src/charts/Treemap/index.js.map +1 -0
- package/es/src/charts/Treemap/thresholdFunction.js +112 -0
- package/es/src/charts/Treemap/thresholdFunction.js.map +1 -0
- package/es/src/charts/definition/ChartDefinition.js +12 -0
- package/es/src/charts/definition/ChartDefinition.js.map +1 -0
- package/es/src/charts/definition/applyDefinition.js +107 -0
- package/es/src/charts/definition/applyDefinition.js.map +1 -0
- package/es/src/charts/definition/makeChart.js +153 -0
- package/es/src/charts/definition/makeChart.js.map +1 -0
- package/es/src/charts/drawSteps/zoomControls.js +231 -96
- package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
- package/es/src/charts/events/click.legend.js +2 -2
- package/es/src/charts/events/click.legend.js.map +1 -1
- package/es/src/charts/events/click.shape.js +5 -5
- package/es/src/charts/events/click.shape.js.map +1 -1
- package/es/src/charts/events/mouseenter.js +20 -1
- package/es/src/charts/events/mouseenter.js.map +1 -1
- package/es/src/charts/events/mouseleave.js +19 -4
- package/es/src/charts/events/mouseleave.js.map +1 -1
- package/es/src/charts/events/mousemove.legend.js +10 -10
- package/es/src/charts/events/mousemove.legend.js.map +1 -1
- package/es/src/charts/events/mousemove.shape.js +14 -8
- package/es/src/charts/events/mousemove.shape.js.map +1 -1
- package/es/src/charts/events/touchstart.body.js.map +1 -1
- package/es/src/charts/features/axes.js +432 -0
- package/es/src/charts/features/axes.js.map +1 -0
- package/es/src/charts/features/chartGeometry.js +66 -0
- package/es/src/charts/features/chartGeometry.js.map +1 -0
- package/es/src/charts/features/colorScaleBucket.js +92 -0
- package/es/src/charts/features/colorScaleBucket.js.map +1 -0
- package/es/src/charts/features/emitHelpers.js +217 -0
- package/es/src/charts/features/emitHelpers.js.map +1 -0
- package/es/src/charts/features/ensureZoomDom.js +71 -0
- package/es/src/charts/features/ensureZoomDom.js.map +1 -0
- package/es/src/charts/features/features.js +650 -0
- package/es/src/charts/features/features.js.map +1 -0
- package/es/src/charts/features/featuresLegend.js +180 -0
- package/es/src/charts/features/featuresLegend.js.map +1 -0
- package/es/src/charts/features/legendLabel.js +12 -0
- package/es/src/charts/features/legendLabel.js.map +1 -0
- package/es/src/charts/features/lineLabels.js +154 -0
- package/es/src/charts/features/lineLabels.js.map +1 -0
- package/es/src/charts/features/plotPaint.js +512 -0
- package/es/src/charts/features/plotPaint.js.map +1 -0
- package/es/src/charts/features/shapeEmit.js +273 -0
- package/es/src/charts/features/shapeEmit.js.map +1 -0
- package/es/src/charts/helpers/matrixData.js +3 -3
- package/es/src/charts/helpers/matrixData.js.map +1 -1
- package/es/src/charts/index.js +21 -21
- package/es/src/charts/index.js.map +1 -1
- package/es/src/charts/pipeline/resolveSpec.js +44 -0
- package/es/src/charts/pipeline/resolveSpec.js.map +1 -0
- package/es/src/charts/pipeline/runChartDraw.js +109 -0
- package/es/src/charts/pipeline/runChartDraw.js.map +1 -0
- package/es/src/charts/pipeline/runVizPipeline.js +84 -0
- package/es/src/charts/pipeline/runVizPipeline.js.map +1 -0
- package/es/src/charts/pipeline/stages.js +103 -0
- package/es/src/charts/pipeline/stages.js.map +1 -0
- package/es/src/charts/pipeline/vizContext.js +29 -0
- package/es/src/charts/pipeline/vizContext.js.map +1 -0
- package/es/src/charts/pipeline/vizDraw.js +37 -0
- package/es/src/charts/pipeline/vizDraw.js.map +1 -0
- package/es/src/charts/pipeline/vizDrawPure.js +174 -0
- package/es/src/charts/pipeline/vizDrawPure.js.map +1 -0
- package/es/src/charts/pipeline/vizPreDraw.js +145 -0
- package/es/src/charts/pipeline/vizPreDraw.js.map +1 -0
- package/es/src/charts/pipeline/vizPreDrawPure.js +279 -0
- package/es/src/charts/pipeline/vizPreDrawPure.js.map +1 -0
- package/es/src/charts/plotBuffers/Bar.js +4 -4
- package/es/src/charts/plotBuffers/Bar.js.map +1 -1
- package/es/src/charts/plotBuffers/Box.js +4 -4
- package/es/src/charts/plotBuffers/Box.js.map +1 -1
- package/es/src/charts/plotBuffers/Circle.js +2 -2
- package/es/src/charts/plotBuffers/Circle.js.map +1 -1
- package/es/src/charts/plotBuffers/Line.js +5 -5
- package/es/src/charts/plotBuffers/Line.js.map +1 -1
- package/es/src/charts/plotBuffers/Rect.js +2 -2
- package/es/src/charts/plotBuffers/Rect.js.map +1 -1
- package/es/src/charts/plotBuffers/discreteBuffer.js +1 -2
- package/es/src/charts/plotBuffers/discreteBuffer.js.map +1 -1
- package/es/src/charts/plotBuffers/numericBuffer.js +1 -2
- package/es/src/charts/plotBuffers/numericBuffer.js.map +1 -1
- package/es/src/charts/viz/Viz.js +985 -0
- package/es/src/charts/viz/Viz.js.map +1 -0
- package/es/src/charts/viz/VizBase.js +447 -0
- package/es/src/charts/viz/VizBase.js.map +1 -0
- package/es/src/charts/viz/VizBaseConfig.js +504 -0
- package/es/src/charts/viz/VizBaseConfig.js.map +1 -0
- package/es/src/charts/viz/interactionOpacity.js +247 -0
- package/es/src/charts/viz/interactionOpacity.js.map +1 -0
- package/es/src/charts/viz/ordinalColor.js +71 -0
- package/es/src/charts/viz/ordinalColor.js.map +1 -0
- package/es/src/charts/viz/trailCatchup.js +127 -0
- package/es/src/charts/viz/trailCatchup.js.map +1 -0
- package/es/src/charts/viz/vizDefaults.js +602 -0
- package/es/src/charts/viz/vizDefaults.js.map +1 -0
- package/es/src/charts/viz/vizRender.js +251 -0
- package/es/src/charts/viz/vizRender.js.map +1 -0
- package/es/src/charts/viz/vizTypes.js +28 -0
- package/es/src/charts/viz/vizTypes.js.map +1 -0
- package/es/src/components/Axis/Axis.js +691 -0
- package/es/src/components/Axis/Axis.js.map +1 -0
- package/es/src/components/Axis/AxisBottom.js.map +1 -0
- package/es/src/components/Axis/AxisLeft.js.map +1 -0
- package/es/src/components/Axis/AxisRight.js.map +1 -0
- package/es/src/components/Axis/AxisTop.js.map +1 -0
- package/es/src/components/Axis/axisLayout.js +208 -0
- package/es/src/components/Axis/axisLayout.js.map +1 -0
- package/es/src/components/Axis/axisLayoutLabels.js +177 -0
- package/es/src/components/Axis/axisLayoutLabels.js.map +1 -0
- package/es/src/components/Axis/axisLayoutScale.js +374 -0
- package/es/src/components/Axis/axisLayoutScale.js.map +1 -0
- package/es/src/components/Axis/axisRender.js +535 -0
- package/es/src/components/Axis/axisRender.js.map +1 -0
- package/es/src/components/ColorScale/ColorScale.js +506 -0
- package/es/src/components/ColorScale/ColorScale.js.map +1 -0
- package/es/src/components/ColorScale/colorScaleRender.js +277 -0
- package/es/src/components/ColorScale/colorScaleRender.js.map +1 -0
- package/es/src/components/ColorScale/colorScaleScale.js +274 -0
- package/es/src/components/ColorScale/colorScaleScale.js.map +1 -0
- package/es/src/components/Legend/Legend.js +445 -0
- package/es/src/components/Legend/Legend.js.map +1 -0
- package/es/src/components/Legend/legendConfig.js +87 -0
- package/es/src/components/Legend/legendConfig.js.map +1 -0
- package/es/src/components/Legend/legendRender.js +245 -0
- package/es/src/components/Legend/legendRender.js.map +1 -0
- package/es/src/components/Message.js.map +1 -1
- package/es/src/components/TextBox.js +639 -453
- package/es/src/components/TextBox.js.map +1 -1
- package/es/src/components/Timeline/Timeline.js +674 -0
- package/es/src/components/Timeline/Timeline.js.map +1 -0
- package/es/src/components/Timeline/timelineConfig.js +115 -0
- package/es/src/components/Timeline/timelineConfig.js.map +1 -0
- package/es/src/components/Timeline/timelineRender.js +267 -0
- package/es/src/components/Timeline/timelineRender.js.map +1 -0
- package/es/src/components/Tooltip.js +288 -249
- package/es/src/components/Tooltip.js.map +1 -1
- package/es/src/components/index.js +8 -8
- package/es/src/components/index.js.map +1 -1
- package/es/src/fluent.js +265 -0
- package/es/src/fluent.js.map +1 -0
- package/es/src/shapes/Area.js +96 -114
- package/es/src/shapes/Area.js.map +1 -1
- package/es/src/shapes/Bar.js +71 -86
- package/es/src/shapes/Bar.js.map +1 -1
- package/es/src/shapes/Box.js +295 -190
- package/es/src/shapes/Box.js.map +1 -1
- package/es/src/shapes/Circle.js +72 -31
- package/es/src/shapes/Circle.js.map +1 -1
- package/es/src/shapes/Image.js +164 -85
- package/es/src/shapes/Image.js.map +1 -1
- package/es/src/shapes/Line.js +51 -94
- package/es/src/shapes/Line.js.map +1 -1
- package/es/src/shapes/Path.js +33 -41
- package/es/src/shapes/Path.js.map +1 -1
- package/es/src/shapes/Rect.js +86 -37
- package/es/src/shapes/Rect.js.map +1 -1
- package/es/src/shapes/Shape.js +655 -678
- package/es/src/shapes/Shape.js.map +1 -1
- package/es/src/shapes/Whisker.js +156 -61
- package/es/src/shapes/Whisker.js.map +1 -1
- package/es/src/shapes/buildLabelData.js +70 -0
- package/es/src/shapes/buildLabelData.js.map +1 -0
- package/es/src/shapes/emitLabels.js +84 -0
- package/es/src/shapes/emitLabels.js.map +1 -0
- package/es/src/shapes/hitAreaNode.js +37 -0
- package/es/src/shapes/hitAreaNode.js.map +1 -0
- package/es/src/shapes/sceneSort.js +57 -0
- package/es/src/shapes/sceneSort.js.map +1 -0
- package/es/src/shapes/shapeConfig.js +31 -0
- package/es/src/shapes/shapeConfig.js.map +1 -0
- package/es/src/utils/BaseClass.js +35 -19
- package/es/src/utils/BaseClass.js.map +1 -1
- package/es/src/utils/D3Scale.js +16 -0
- package/es/src/utils/D3Scale.js.map +1 -0
- package/es/src/utils/D3plusConfig.js.map +1 -1
- package/es/src/utils/configPrep.js +8 -3
- package/es/src/utils/configPrep.js.map +1 -1
- package/es/src/utils/getProp.js +1 -1
- package/es/src/utils/getProp.js.map +1 -1
- package/es/src/utils/index.js +1 -0
- package/es/src/utils/index.js.map +1 -1
- package/es/src/utils/paintComponentScene.js +59 -0
- package/es/src/utils/paintComponentScene.js.map +1 -0
- package/es/umd-entry.js +16 -0
- package/es/umd-entry.js.map +1 -0
- package/package.json +17 -9
- package/types/index.d.ts +3 -1
- package/types/internal.d.ts +54 -0
- package/types/src/charts/AreaPlot/index.d.ts +10 -0
- package/types/src/charts/BarChart/index.d.ts +10 -0
- package/types/src/charts/BoxWhisker/index.d.ts +11 -0
- package/types/src/charts/BumpChart/index.d.ts +11 -0
- package/types/src/charts/ChartDefinition.d.ts +75 -0
- package/types/src/charts/Donut/index.d.ts +13 -0
- package/types/src/charts/Geomap/applyLayout.d.ts +7 -0
- package/types/src/charts/Geomap/emit.d.ts +7 -0
- package/types/src/charts/Geomap/index.d.ts +14 -0
- package/types/src/charts/Geomap.d.ts +6 -0
- package/types/src/charts/LinePlot/index.d.ts +10 -0
- package/types/src/charts/Matrix/applyLayout.d.ts +9 -0
- package/types/src/charts/Matrix/emit.d.ts +6 -0
- package/types/src/charts/Matrix/index.d.ts +14 -0
- package/types/src/charts/Matrix.d.ts +0 -26
- package/types/src/charts/Network/applyLayout.d.ts +10 -0
- package/types/src/charts/Network/emit.d.ts +6 -0
- package/types/src/charts/Network/index.d.ts +7 -0
- package/types/src/charts/Network.d.ts +0 -24
- package/types/src/charts/Pack/applyLayout.d.ts +16 -0
- package/types/src/charts/Pack/emit.d.ts +6 -0
- package/types/src/charts/Pack/index.d.ts +15 -0
- package/types/src/charts/Pack/recursionCircles.d.ts +7 -0
- package/types/src/charts/Pack.d.ts +0 -13
- package/types/src/charts/Pie/applyLayout.d.ts +8 -0
- package/types/src/charts/Pie/emit.d.ts +5 -0
- package/types/src/charts/Pie/index.d.ts +14 -0
- package/types/src/charts/Pie.d.ts +0 -27
- package/types/src/charts/Plot/draw.d.ts +2 -0
- package/types/src/charts/Plot/index.d.ts +167 -0
- package/types/src/charts/Plot/labelPlacement.d.ts +15 -0
- package/types/src/charts/Plot/pipeline.d.ts +70 -0
- package/types/src/charts/Plot/pipelineDomains.d.ts +2 -0
- package/types/src/charts/Plot/pipelineLineLabels.d.ts +2 -0
- package/types/src/charts/Plot/shapeDefaults.d.ts +64 -0
- package/types/src/charts/Plot/stackHelpers.d.ts +24 -0
- package/types/src/charts/Plot.d.ts +23 -72
- package/types/src/charts/Priestley/applyLayout.d.ts +21 -0
- package/types/src/charts/Priestley/emit.d.ts +6 -0
- package/types/src/charts/Priestley/index.d.ts +14 -0
- package/types/src/charts/Radar/applyLayout.d.ts +10 -0
- package/types/src/charts/Radar/emit.d.ts +7 -0
- package/types/src/charts/Radar/index.d.ts +14 -0
- package/types/src/charts/RadialMatrix/applyLayout.d.ts +11 -0
- package/types/src/charts/RadialMatrix/emit.d.ts +6 -0
- package/types/src/charts/RadialMatrix/index.d.ts +14 -0
- package/types/src/charts/RadialMatrix.d.ts +0 -15
- package/types/src/charts/Rings/applyLayout.d.ts +2 -0
- package/types/src/charts/Rings/emit.d.ts +7 -0
- package/types/src/charts/Rings/index.d.ts +15 -0
- package/types/src/charts/Rings.d.ts +0 -13
- package/types/src/charts/Sankey/applyLayout.d.ts +7 -0
- package/types/src/charts/Sankey/emit.d.ts +6 -0
- package/types/src/charts/Sankey/index.d.ts +7 -0
- package/types/src/charts/Sankey.d.ts +0 -4
- package/types/src/charts/StackedArea/index.d.ts +10 -0
- package/types/src/charts/Tree/applyLayout.d.ts +2 -0
- package/types/src/charts/Tree/emit.d.ts +7 -0
- package/types/src/charts/Tree/index.d.ts +14 -0
- package/types/src/charts/Tree.d.ts +0 -16
- package/types/src/charts/Treemap/applyLayout.d.ts +16 -0
- package/types/src/charts/Treemap/emit.d.ts +6 -0
- package/types/src/charts/Treemap/index.d.ts +18 -0
- package/types/src/charts/Treemap/thresholdFunction.d.ts +25 -0
- package/types/src/charts/Treemap.d.ts +4 -13
- package/types/src/charts/Viz.d.ts +49 -361
- package/types/src/charts/VizBase.d.ts +158 -0
- package/types/src/charts/VizBaseConfig.d.ts +148 -0
- package/types/src/charts/applyDefinition.d.ts +13 -0
- package/types/src/charts/axes.d.ts +134 -0
- package/types/src/charts/chartGeometry.d.ts +58 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +84 -0
- package/types/src/charts/definition/applyDefinition.d.ts +13 -0
- package/types/src/charts/definition/makeChart.d.ts +22 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +25 -5
- package/types/src/charts/emitHelpers.d.ts +122 -0
- package/types/src/charts/ensureZoomDom.d.ts +39 -0
- package/types/src/charts/events/click.legend.d.ts +1 -1
- package/types/src/charts/events/click.shape.d.ts +1 -1
- package/types/src/charts/events/mouseenter.d.ts +1 -1
- package/types/src/charts/events/mouseleave.d.ts +1 -1
- package/types/src/charts/events/mousemove.legend.d.ts +1 -1
- package/types/src/charts/events/mousemove.shape.d.ts +1 -1
- package/types/src/charts/events/touchstart.body.d.ts +1 -1
- package/types/src/charts/factories.d.ts +73 -0
- package/types/src/charts/features/axes.d.ts +134 -0
- package/types/src/charts/features/chartGeometry.d.ts +58 -0
- package/types/src/charts/features/colorScaleBucket.d.ts +43 -0
- package/types/src/charts/features/colorScaleBucketShare.d.ts +16 -0
- package/types/src/charts/features/emitHelpers.d.ts +123 -0
- package/types/src/charts/features/ensureZoomDom.d.ts +39 -0
- package/types/src/charts/features/features.d.ts +152 -0
- package/types/src/charts/features/featuresLegend.d.ts +12 -0
- package/types/src/charts/features/legendLabel.d.ts +11 -0
- package/types/src/charts/features/lineLabels.d.ts +40 -0
- package/types/src/charts/features/plotPaint.d.ts +233 -0
- package/types/src/charts/features/shapeEmit.d.ts +61 -0
- package/types/src/charts/features.d.ts +152 -0
- package/types/src/charts/featuresLegend.d.ts +12 -0
- package/types/src/charts/helpers/matrixData.d.ts +1 -1
- package/types/src/charts/index.d.ts +21 -21
- package/types/src/charts/legendLabel.d.ts +11 -0
- package/types/src/charts/lineLabels.d.ts +40 -0
- package/types/src/charts/makeChart.d.ts +22 -0
- package/types/src/charts/pipeline/resolveSpec.d.ts +51 -0
- package/types/src/charts/pipeline/runChartDraw.d.ts +38 -0
- package/types/src/charts/pipeline/runVizPipeline.d.ts +31 -0
- package/types/src/charts/pipeline/stages.d.ts +160 -0
- package/types/src/charts/pipeline/vizContext.d.ts +45 -0
- package/types/src/charts/pipeline/vizDraw.d.ts +25 -0
- package/types/src/charts/pipeline/vizDrawPure.d.ts +46 -0
- package/types/src/charts/pipeline/vizPreDraw.d.ts +22 -0
- package/types/src/charts/pipeline/vizPreDrawPure.d.ts +68 -0
- package/types/src/charts/plotBuffers/Bar.d.ts +6 -5
- package/types/src/charts/plotBuffers/Box.d.ts +6 -5
- package/types/src/charts/plotBuffers/Circle.d.ts +6 -5
- package/types/src/charts/plotBuffers/Line.d.ts +6 -5
- package/types/src/charts/plotBuffers/Rect.d.ts +6 -5
- package/types/src/charts/plotBuffers/discreteBuffer.d.ts +2 -1
- package/types/src/charts/plotBuffers/numericBuffer.d.ts +2 -1
- package/types/src/charts/plotPaint.d.ts +233 -0
- package/types/src/charts/resolveSpec.d.ts +50 -0
- package/types/src/charts/runChartDraw.d.ts +38 -0
- package/types/src/charts/runVizPipeline.d.ts +31 -0
- package/types/src/charts/shapeEmit.d.ts +61 -0
- package/types/src/charts/stages.d.ts +117 -0
- package/types/src/charts/viz/Viz.d.ts +111 -0
- package/types/src/charts/viz/VizBase.d.ts +160 -0
- package/types/src/charts/viz/VizBaseConfig.d.ts +156 -0
- package/types/src/charts/viz/interactionOpacity.d.ts +23 -0
- package/types/src/charts/viz/ordinalColor.d.ts +14 -0
- package/types/src/charts/viz/trailCatchup.d.ts +14 -0
- package/types/src/charts/viz/vizDefaults.d.ts +8 -0
- package/types/src/charts/viz/vizRender.d.ts +8 -0
- package/types/src/charts/viz/vizTypes.d.ts +250 -0
- package/types/src/charts/vizContext.d.ts +46 -0
- package/types/src/charts/vizDefaults.d.ts +8 -0
- package/types/src/charts/vizDraw.d.ts +25 -0
- package/types/src/charts/vizDrawPure.d.ts +17 -0
- package/types/src/charts/vizPreDraw.d.ts +22 -0
- package/types/src/charts/vizPreDrawPure.d.ts +40 -0
- package/types/src/charts/vizRender.d.ts +8 -0
- package/types/src/charts/vizTypes.d.ts +202 -0
- package/types/src/components/Axis/Axis.d.ts +182 -0
- package/types/src/components/Axis/AxisBottom.d.ts +11 -0
- package/types/src/components/Axis/AxisLeft.d.ts +11 -0
- package/types/src/components/Axis/AxisRight.d.ts +11 -0
- package/types/src/components/Axis/AxisTop.d.ts +11 -0
- package/types/src/components/Axis/axisLayout.d.ts +29 -0
- package/types/src/components/Axis/axisLayoutLabels.d.ts +70 -0
- package/types/src/components/Axis/axisLayoutScale.d.ts +14 -0
- package/types/src/components/Axis/axisRender.d.ts +68 -0
- package/types/src/components/Axis.d.ts +68 -194
- package/types/src/components/ColorScale/ColorScale.d.ts +100 -0
- package/types/src/components/ColorScale/colorScaleRender.d.ts +15 -0
- package/types/src/components/ColorScale/colorScaleScale.d.ts +19 -0
- package/types/src/components/ColorScale.d.ts +1 -129
- package/types/src/components/Legend/Legend.d.ts +95 -0
- package/types/src/components/Legend/legendConfig.d.ts +7 -0
- package/types/src/components/Legend/legendRender.d.ts +16 -0
- package/types/src/components/Legend.d.ts +9 -73
- package/types/src/components/TextBox.d.ts +25 -218
- package/types/src/components/Timeline/Timeline.d.ts +118 -0
- package/types/src/components/Timeline/timelineConfig.d.ts +6 -0
- package/types/src/components/Timeline/timelineRender.d.ts +24 -0
- package/types/src/components/Timeline.d.ts +7 -81
- package/types/src/components/Tooltip.d.ts +20 -200
- package/types/src/components/axisLayout.d.ts +27 -0
- package/types/src/components/axisLayoutLabels.d.ts +42 -0
- package/types/src/components/axisLayoutScale.d.ts +12 -0
- package/types/src/components/axisRender.d.ts +65 -0
- package/types/src/components/colorScaleRender.d.ts +15 -0
- package/types/src/components/colorScaleScale.d.ts +19 -0
- package/types/src/components/index.d.ts +8 -8
- package/types/src/components/legendConfig.d.ts +7 -0
- package/types/src/components/legendRender.d.ts +16 -0
- package/types/src/components/timelineConfig.d.ts +6 -0
- package/types/src/components/timelineRender.d.ts +14 -0
- package/types/src/fluent.d.ts +94 -0
- package/types/src/shapes/Area.d.ts +15 -27
- package/types/src/shapes/Bar.d.ts +13 -33
- package/types/src/shapes/Box.d.ts +17 -56
- package/types/src/shapes/Circle.d.ts +11 -17
- package/types/src/shapes/Image.d.ts +18 -84
- package/types/src/shapes/Line.d.ts +12 -22
- package/types/src/shapes/Path.d.ts +12 -19
- package/types/src/shapes/Rect.d.ts +11 -27
- package/types/src/shapes/Shape.d.ts +46 -257
- package/types/src/shapes/Whisker.d.ts +15 -42
- package/types/src/shapes/buildLabelData.d.ts +50 -0
- package/types/src/shapes/emitLabels.d.ts +16 -0
- package/types/src/shapes/hitAreaNode.d.ts +19 -0
- package/types/src/shapes/sceneSort.d.ts +20 -0
- package/types/src/shapes/shapeConfig.d.ts +226 -0
- package/types/src/utils/BaseClass.d.ts +13 -7
- package/types/src/utils/D3Scale.d.ts +48 -0
- package/types/src/utils/D3plusConfig.d.ts +230 -3
- package/types/src/utils/configPrep.d.ts +7 -4
- package/types/src/utils/getProp.d.ts +3 -1
- package/types/src/utils/index.d.ts +3 -1
- package/types/src/utils/paintComponentScene.d.ts +28 -0
- package/types/umd-entry.d.ts +15 -0
- package/umd/d3plus-core.full.js +31148 -19470
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +5315 -2939
- package/umd/d3plus-core.js +17379 -10575
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +3470 -1873
- 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 -1454
- 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,95 @@
|
|
|
1
|
+
import type { DataPoint } from "@d3plus/data";
|
|
2
|
+
import type { D3Selection } from "@d3plus/dom";
|
|
3
|
+
import type { GroupNode } from "@d3plus/render";
|
|
4
|
+
import type { SvgRenderer } from "@d3plus/render";
|
|
5
|
+
import { TextBox } from "../index.js";
|
|
6
|
+
import { BaseClass } from "../../utils/index.js";
|
|
7
|
+
/**
|
|
8
|
+
Creates an SVG legend based on an array of data.
|
|
9
|
+
*/
|
|
10
|
+
export default class Legend extends BaseClass {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
_titleClass: TextBox;
|
|
13
|
+
_data: DataPoint[];
|
|
14
|
+
_lineData: Record<string, unknown>[];
|
|
15
|
+
_outerBounds: Record<string, number>;
|
|
16
|
+
_select: D3Selection;
|
|
17
|
+
_shapes: unknown[];
|
|
18
|
+
_rtl: boolean;
|
|
19
|
+
_group: D3Selection;
|
|
20
|
+
_titleGroup: D3Selection;
|
|
21
|
+
_shapeGroup: D3Selection;
|
|
22
|
+
_titleHeight: number;
|
|
23
|
+
_titleWidth: number;
|
|
24
|
+
_wrapLines: (() => void) | undefined;
|
|
25
|
+
_wrapRows: (() => void) | undefined;
|
|
26
|
+
_sceneRenderer?: SvgRenderer;
|
|
27
|
+
/**
|
|
28
|
+
Invoked when creating a new class instance, and sets any default parameters.
|
|
29
|
+
@private
|
|
30
|
+
*/
|
|
31
|
+
constructor();
|
|
32
|
+
/**
|
|
33
|
+
@param key The configuration key.
|
|
34
|
+
@param d The data point.
|
|
35
|
+
@param i The data index.
|
|
36
|
+
@private
|
|
37
|
+
*/
|
|
38
|
+
_fetchConfig(key: string, d: DataPoint, i: number): unknown;
|
|
39
|
+
/**
|
|
40
|
+
@param row The legend row data.
|
|
41
|
+
@private
|
|
42
|
+
*/
|
|
43
|
+
_rowHeight(row: Record<string, unknown>[]): number;
|
|
44
|
+
/**
|
|
45
|
+
@param row The legend row data.
|
|
46
|
+
@private
|
|
47
|
+
*/
|
|
48
|
+
_rowWidth(row: Record<string, unknown>[]): number;
|
|
49
|
+
/**
|
|
50
|
+
Produces a backend-agnostic scene graph for this legend with no DOM dependency:
|
|
51
|
+
the title is composed from its TextBox.toScene(), and each swatch group is
|
|
52
|
+
composed from the stored Shape instances' toScene() (positions resolve through
|
|
53
|
+
the x/y accessors against this._lineData / this._outerBounds).
|
|
54
|
+
*/
|
|
55
|
+
toScene(): GroupNode;
|
|
56
|
+
/**
|
|
57
|
+
Renders the current Legend to the page.
|
|
58
|
+
@param callback Optional callback invoked after rendering completes.
|
|
59
|
+
*/
|
|
60
|
+
render(callback?: (...args: unknown[]) => unknown): this;
|
|
61
|
+
/**
|
|
62
|
+
The active method for all shapes.
|
|
63
|
+
*/
|
|
64
|
+
active(_: unknown): this;
|
|
65
|
+
/**
|
|
66
|
+
The data array used to create shapes. A shape key will be drawn for each object in the array.
|
|
67
|
+
*/
|
|
68
|
+
data(): DataPoint[];
|
|
69
|
+
data(_: DataPoint[]): this;
|
|
70
|
+
/**
|
|
71
|
+
The hover method for all shapes.
|
|
72
|
+
*/
|
|
73
|
+
hover(_: unknown): this;
|
|
74
|
+
/**
|
|
75
|
+
Returns the outer bounds of the legend content. Must be called after rendering.
|
|
76
|
+
@example
|
|
77
|
+
{"width": 180, "height": 24, "x": 10, "y": 20}
|
|
78
|
+
*/
|
|
79
|
+
outerBounds(): Record<string, number>;
|
|
80
|
+
/**
|
|
81
|
+
The SVG container element as a d3 selector or DOM element.
|
|
82
|
+
*/
|
|
83
|
+
select(): D3Selection;
|
|
84
|
+
select(_: string | HTMLElement | SVGElement | null): this;
|
|
85
|
+
/**
|
|
86
|
+
Methods that correspond to the key/value pairs for each shape.
|
|
87
|
+
*/
|
|
88
|
+
shapeConfig(): Record<string, unknown>;
|
|
89
|
+
shapeConfig(_: Record<string, unknown>): this;
|
|
90
|
+
/**
|
|
91
|
+
Title configuration of the legend.
|
|
92
|
+
*/
|
|
93
|
+
titleConfig(): Record<string, unknown>;
|
|
94
|
+
titleConfig(_: Record<string, unknown>): this;
|
|
95
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type Legend from "./Legend.js";
|
|
2
|
+
/**
|
|
3
|
+
Builds the Legend's default `shapeConfig` object. The accessors close over
|
|
4
|
+
the `legend` instance so they read live `_lineData` / `_outerBounds` /
|
|
5
|
+
`_rtl` / `_titleHeight` state during render.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildLegendShapeConfig(legend: Legend): Record<string, unknown>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type Legend from "./Legend.js";
|
|
2
|
+
/** Wraps + measures the title, setting `_titleHeight` / `_titleWidth`. */
|
|
3
|
+
export declare function measureLegendTitle(legend: Legend): void;
|
|
4
|
+
/** Measures each datum's swatch + wrapped label into the `_lineData` array. */
|
|
5
|
+
export declare function computeLegendLineData(legend: Legend, availableHeight: number): Record<string, unknown>[];
|
|
6
|
+
/**
|
|
7
|
+
Runs the row-wrapping pass: builds rows, retries label-free if it overflows,
|
|
8
|
+
then distributes row `y` offsets. Returns the resolved `spaceNeeded`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function wrapLegendRows(legend: Legend, availableWidth: number, availableHeight: number, spaceNeeded: number): number;
|
|
11
|
+
/** Computes `_outerBounds` (size + aligned x/y offset) from the laid-out rows. */
|
|
12
|
+
export declare function computeLegendBounds(legend: Legend, spaceNeeded: number): void;
|
|
13
|
+
/** Renders the title TextBox into the legend's title group. */
|
|
14
|
+
export declare function renderLegendTitle(legend: Legend): void;
|
|
15
|
+
/** Builds the per-shape data and renders the Circle/Rect swatch groups. */
|
|
16
|
+
export declare function renderLegendShapes(legend: Legend): void;
|
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
import type { DataPoint } from "@d3plus/data";
|
|
2
2
|
import type { D3Selection } from "@d3plus/dom";
|
|
3
|
+
import type { GroupNode } from "@d3plus/render";
|
|
3
4
|
import { TextBox } from "../components/index.js";
|
|
4
5
|
import { BaseClass } from "../utils/index.js";
|
|
5
6
|
/**
|
|
6
7
|
Creates an SVG legend based on an array of data.
|
|
7
8
|
*/
|
|
8
9
|
export default class Legend extends BaseClass {
|
|
10
|
+
[key: string]: any;
|
|
9
11
|
_titleClass: TextBox;
|
|
10
|
-
_align: string;
|
|
11
12
|
_data: DataPoint[];
|
|
12
|
-
_direction: string;
|
|
13
|
-
_duration: number;
|
|
14
|
-
_height: number;
|
|
15
|
-
_id: (d: DataPoint, i?: number) => unknown;
|
|
16
|
-
_label: (d: DataPoint, i?: number) => unknown;
|
|
17
13
|
_lineData: Record<string, unknown>[];
|
|
18
14
|
_outerBounds: Record<string, number>;
|
|
19
|
-
_padding: number;
|
|
20
|
-
_shape: (d: DataPoint, i?: number) => unknown;
|
|
21
15
|
_select: D3Selection;
|
|
22
16
|
_shapes: unknown[];
|
|
23
|
-
_shapeConfig: Record<string, unknown>;
|
|
24
|
-
_titleConfig: Record<string, unknown>;
|
|
25
|
-
_verticalAlign: string;
|
|
26
|
-
_width: number;
|
|
27
17
|
_rtl: boolean;
|
|
28
18
|
_group: D3Selection;
|
|
29
19
|
_titleGroup: D3Selection;
|
|
30
20
|
_shapeGroup: D3Selection;
|
|
31
21
|
_titleHeight: number;
|
|
32
22
|
_titleWidth: number;
|
|
33
|
-
_title: string | undefined;
|
|
34
23
|
_wrapLines: (() => void) | undefined;
|
|
35
24
|
_wrapRows: (() => void) | undefined;
|
|
36
25
|
/**
|
|
@@ -55,6 +44,13 @@ export default class Legend extends BaseClass {
|
|
|
55
44
|
@private
|
|
56
45
|
*/
|
|
57
46
|
_rowWidth(row: Record<string, unknown>[]): number;
|
|
47
|
+
/**
|
|
48
|
+
Produces a backend-agnostic scene graph for this legend with no DOM dependency:
|
|
49
|
+
the title is composed from its TextBox.toScene(), and each swatch group is
|
|
50
|
+
composed from the stored Shape instances' toScene() (positions resolve through
|
|
51
|
+
the x/y accessors against this._lineData / this._outerBounds).
|
|
52
|
+
*/
|
|
53
|
+
toScene(): GroupNode;
|
|
58
54
|
/**
|
|
59
55
|
Renders the current Legend to the page.
|
|
60
56
|
@param callback Optional callback invoked after rendering completes.
|
|
@@ -64,94 +60,34 @@ export default class Legend extends BaseClass {
|
|
|
64
60
|
The active method for all shapes.
|
|
65
61
|
*/
|
|
66
62
|
active(_: unknown): this;
|
|
67
|
-
/**
|
|
68
|
-
The horizontal alignment.
|
|
69
|
-
*/
|
|
70
|
-
align(): string;
|
|
71
|
-
align(_: string): this;
|
|
72
63
|
/**
|
|
73
64
|
The data array used to create shapes. A shape key will be drawn for each object in the array.
|
|
74
65
|
*/
|
|
75
66
|
data(): DataPoint[];
|
|
76
67
|
data(_: DataPoint[]): this;
|
|
77
|
-
/**
|
|
78
|
-
The flow direction of the legend items.
|
|
79
|
-
*/
|
|
80
|
-
direction(): string;
|
|
81
|
-
direction(_: string): this;
|
|
82
|
-
/**
|
|
83
|
-
Transition duration of the legend.
|
|
84
|
-
*/
|
|
85
|
-
duration(): number;
|
|
86
|
-
duration(_: number): this;
|
|
87
|
-
/**
|
|
88
|
-
Overall height of the legend.
|
|
89
|
-
*/
|
|
90
|
-
height(): number;
|
|
91
|
-
height(_: number): this;
|
|
92
68
|
/**
|
|
93
69
|
The hover method for all shapes.
|
|
94
70
|
*/
|
|
95
71
|
hover(_: unknown): this;
|
|
96
|
-
/**
|
|
97
|
-
The unique id accessor for each legend entry.
|
|
98
|
-
|
|
99
|
-
@example
|
|
100
|
-
function value(d) {
|
|
101
|
-
return d.id;
|
|
102
|
-
}
|
|
103
|
-
*/
|
|
104
|
-
id(): (d: DataPoint, i?: number) => unknown;
|
|
105
|
-
id(_: (d: DataPoint, i?: number) => unknown): this;
|
|
106
|
-
/**
|
|
107
|
-
The label accessor for each legend entry. Uses the id accessor by default.
|
|
108
|
-
*/
|
|
109
|
-
label(): (d: DataPoint, i?: number) => unknown;
|
|
110
|
-
label(_: ((d: DataPoint, i?: number) => unknown) | unknown): this;
|
|
111
72
|
/**
|
|
112
73
|
Returns the outer bounds of the legend content. Must be called after rendering.
|
|
113
74
|
@example
|
|
114
75
|
{"width": 180, "height": 24, "x": 10, "y": 20}
|
|
115
76
|
*/
|
|
116
77
|
outerBounds(): Record<string, number>;
|
|
117
|
-
/**
|
|
118
|
-
The padding between each key.
|
|
119
|
-
*/
|
|
120
|
-
padding(): number;
|
|
121
|
-
padding(_: number): this;
|
|
122
78
|
/**
|
|
123
79
|
The SVG container element as a d3 selector or DOM element.
|
|
124
80
|
*/
|
|
125
81
|
select(): D3Selection;
|
|
126
82
|
select(_: any): this;
|
|
127
|
-
/**
|
|
128
|
-
The shape type used for each legend entry.
|
|
129
|
-
*/
|
|
130
|
-
shape(): (d: DataPoint, i?: number) => unknown;
|
|
131
|
-
shape(_: ((d: DataPoint, i?: number) => unknown) | unknown): this;
|
|
132
83
|
/**
|
|
133
84
|
Methods that correspond to the key/value pairs for each shape.
|
|
134
85
|
*/
|
|
135
86
|
shapeConfig(): Record<string, unknown>;
|
|
136
87
|
shapeConfig(_: Record<string, unknown>): this;
|
|
137
|
-
/**
|
|
138
|
-
Title of the legend.
|
|
139
|
-
*/
|
|
140
|
-
title(): string | undefined;
|
|
141
|
-
title(_: string): this;
|
|
142
88
|
/**
|
|
143
89
|
Title configuration of the legend.
|
|
144
90
|
*/
|
|
145
91
|
titleConfig(): Record<string, unknown>;
|
|
146
92
|
titleConfig(_: Record<string, unknown>): this;
|
|
147
|
-
/**
|
|
148
|
-
The vertical alignment.
|
|
149
|
-
*/
|
|
150
|
-
verticalAlign(): string;
|
|
151
|
-
verticalAlign(_: string): this;
|
|
152
|
-
/**
|
|
153
|
-
Overall width of the legend.
|
|
154
|
-
*/
|
|
155
|
-
width(): number;
|
|
156
|
-
width(_: number): this;
|
|
157
93
|
}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import "d3-transition";
|
|
2
1
|
import type { DataPoint } from "@d3plus/data";
|
|
3
2
|
import type { D3Selection } from "@d3plus/dom";
|
|
3
|
+
import type { GroupNode } from "@d3plus/render";
|
|
4
4
|
import { BaseClass } from "../utils/index.js";
|
|
5
|
+
/** A parsed inline run (segment of a wrapped line with optional bold/italic). */
|
|
6
|
+
interface LineRun {
|
|
7
|
+
text: string;
|
|
8
|
+
style?: {
|
|
9
|
+
weight?: number | string;
|
|
10
|
+
style?: "normal" | "italic";
|
|
11
|
+
};
|
|
12
|
+
}
|
|
5
13
|
/** Internal shape produced by the data reduce in render(). */
|
|
6
14
|
interface TextBoxDatum {
|
|
7
15
|
aH: string;
|
|
8
16
|
data: DataPoint;
|
|
9
17
|
i: number;
|
|
10
18
|
lines: string[];
|
|
19
|
+
/** Per-line parsed runs when `_html` is configured; null when plain text. */
|
|
20
|
+
lineRuns: LineRun[][] | null;
|
|
11
21
|
fC: string;
|
|
12
22
|
fStroke: string;
|
|
13
23
|
fSW: number;
|
|
@@ -15,6 +25,7 @@ interface TextBoxDatum {
|
|
|
15
25
|
fO: number;
|
|
16
26
|
fW: number | string;
|
|
17
27
|
id: string;
|
|
28
|
+
pE: string;
|
|
18
29
|
tA: string;
|
|
19
30
|
vA: string;
|
|
20
31
|
widths: number[];
|
|
@@ -30,249 +41,45 @@ interface TextBoxDatum {
|
|
|
30
41
|
Creates a wrapped text box for each point in an array of data. See [this example](https://d3plus.org/examples/d3plus-text/getting-started/) for help getting started using the TextBox class.
|
|
31
42
|
*/
|
|
32
43
|
export default class TextBox extends BaseClass {
|
|
44
|
+
[key: string]: any;
|
|
33
45
|
_select: D3Selection;
|
|
34
46
|
_data: DataPoint[];
|
|
35
|
-
_ariaHidden: (d: DataPoint, i?: number) => string;
|
|
36
|
-
_delay: number;
|
|
37
|
-
_duration: number;
|
|
38
|
-
_ellipsis: (text: string, line: number) => string;
|
|
39
|
-
_fontColor: (d: DataPoint, i?: number) => string;
|
|
40
|
-
_fontFamily: (d: DataPoint, i?: number) => string;
|
|
41
|
-
_fontMax: (d: DataPoint, i?: number) => number;
|
|
42
|
-
_fontMin: (d: DataPoint, i?: number) => number;
|
|
43
|
-
_fontOpacity: (d: DataPoint, i?: number) => number;
|
|
44
|
-
_fontResize: (d: DataPoint, i?: number) => boolean;
|
|
45
|
-
_fontSize: (d: DataPoint, i?: number) => number;
|
|
46
|
-
_fontStroke: (d: DataPoint, i?: number) => string;
|
|
47
|
-
_fontStrokeWidth: (d: DataPoint, i?: number) => number;
|
|
48
|
-
_fontWeight: (d: DataPoint, i?: number) => number | string;
|
|
49
|
-
_height: (d: DataPoint, i?: number) => number;
|
|
50
|
-
_html: Record<string, string> | false;
|
|
51
|
-
_id: (d: DataPoint, i: number) => string;
|
|
52
|
-
_lineHeight: (d: DataPoint, i?: number) => number;
|
|
53
|
-
_maxLines: (d: DataPoint, i?: number) => number | null;
|
|
54
|
-
_on: Record<string, (...args: unknown[]) => unknown>;
|
|
55
|
-
_overflow: (d: DataPoint, i?: number) => boolean;
|
|
56
|
-
_padding: (d: DataPoint, i?: number) => number | string;
|
|
57
|
-
_pointerEvents: (d: DataPoint, i?: number) => string;
|
|
58
|
-
_rotate: (d: DataPoint, i?: number) => number;
|
|
59
|
-
_rotateAnchor: (d: TextBoxDatum, i?: number) => [number, number];
|
|
60
|
-
_split: (text: string, i?: number) => string[];
|
|
61
|
-
_text: (d: DataPoint, i?: number) => string | undefined;
|
|
62
|
-
_textAnchor: (d: DataPoint, i?: number) => string;
|
|
63
|
-
_verticalAlign: (d: DataPoint, i?: number) => string;
|
|
64
|
-
_width: (d: DataPoint, i?: number) => number;
|
|
65
|
-
_x: (d: DataPoint, i?: number) => number;
|
|
66
|
-
_y: (d: DataPoint, i?: number) => number;
|
|
67
47
|
/**
|
|
68
48
|
Invoked when creating a new class instance, and sets any default parameters.
|
|
69
49
|
@private
|
|
70
50
|
*/
|
|
71
51
|
constructor();
|
|
52
|
+
/**
|
|
53
|
+
Computes the laid-out text boxes (wrapping, font sizing, per-box position)
|
|
54
|
+
for the current data. Shared by render() and toScene() so both produce
|
|
55
|
+
identical layout.
|
|
56
|
+
@private
|
|
57
|
+
*/
|
|
58
|
+
_textData(): TextBoxDatum[];
|
|
59
|
+
/**
|
|
60
|
+
Produces a backend-agnostic scene graph for the text boxes, reusing the same
|
|
61
|
+
layout (_textData) and per-line positioning render() applies to the DOM.
|
|
62
|
+
*/
|
|
63
|
+
toScene(): GroupNode;
|
|
72
64
|
/**
|
|
73
65
|
Renders the text boxes. If a *callback* is specified, it will be called once the shapes are done drawing.
|
|
74
66
|
@param callback Optional callback invoked after rendering completes.
|
|
75
67
|
*/
|
|
76
68
|
render(callback?: (...args: unknown[]) => unknown): this;
|
|
77
|
-
/**
|
|
78
|
-
The aria-hidden attribute.
|
|
79
|
-
*/
|
|
80
|
-
ariaHidden(): (d: DataPoint, i?: number) => string;
|
|
81
|
-
ariaHidden(_: string | ((d: DataPoint, i?: number) => string)): this;
|
|
82
69
|
/**
|
|
83
70
|
The data array used to draw text boxes. A text box will be drawn for each object in the array.
|
|
84
71
|
*/
|
|
85
72
|
data(): DataPoint[];
|
|
86
73
|
data(_: DataPoint[]): this;
|
|
87
|
-
/**
|
|
88
|
-
The animation delay in milliseconds.
|
|
89
|
-
*/
|
|
90
|
-
delay(): number;
|
|
91
|
-
delay(_: number): this;
|
|
92
|
-
/**
|
|
93
|
-
The animation duration in milliseconds.
|
|
94
|
-
*/
|
|
95
|
-
duration(): number;
|
|
96
|
-
duration(_: number): this;
|
|
97
|
-
/**
|
|
98
|
-
The function that handles truncated lines. It should return the new value for the line, and is passed 2 arguments: the String of text for the line in question, and the number of the line. By default, an ellipsis is added to the end of any line except if it is the first word that cannot fit (in that case, an empty string is returned).
|
|
99
|
-
|
|
100
|
-
@example <caption>default accessor</caption>
|
|
101
|
-
function(text, line) {
|
|
102
|
-
return line ? text.replace(/\.|,$/g, "") + "..." : "";
|
|
103
|
-
}
|
|
104
|
-
*/
|
|
105
|
-
ellipsis(): (text: string, line: number) => string;
|
|
106
|
-
ellipsis(_: ((text: string, line: number) => string) | string): this;
|
|
107
|
-
/**
|
|
108
|
-
The font color as an accessor function or static string. Inferred from the [DOM selection](#textBox.select) by default.
|
|
109
|
-
*/
|
|
110
|
-
fontColor(): (d: DataPoint, i?: number) => string;
|
|
111
|
-
fontColor(_: string | ((d: DataPoint, i?: number) => string)): this;
|
|
112
|
-
/**
|
|
113
|
-
Defines the font-family to be used. The value passed can be either a *String* name of a font, a comma-separated list of font-family fallbacks, an *Array* of fallbacks, or a *Function* that returns either a *String* or an *Array*. If supplying multiple fallback fonts, the [fontExists](#fontExists) function will be used to determine the first available font on the client's machine.
|
|
114
|
-
*/
|
|
115
|
-
fontFamily(): (d: DataPoint, i?: number) => string;
|
|
116
|
-
fontFamily(_: string | ((d: DataPoint, i?: number) => string)): this;
|
|
117
|
-
/**
|
|
118
|
-
The maximum font size in pixels, used when [dynamically resizing fonts](#textBox.fontResize).
|
|
119
|
-
*/
|
|
120
|
-
fontMax(): (d: DataPoint, i?: number) => number;
|
|
121
|
-
fontMax(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
122
|
-
/**
|
|
123
|
-
The minimum font size in pixels, used when [dynamically resizing fonts](#textBox.fontResize).
|
|
124
|
-
*/
|
|
125
|
-
fontMin(): (d: DataPoint, i?: number) => number;
|
|
126
|
-
fontMin(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
127
|
-
/**
|
|
128
|
-
The font opacity as an accessor function or static number between 0 and 1.
|
|
129
|
-
*/
|
|
130
|
-
fontOpacity(): (d: DataPoint, i?: number) => number;
|
|
131
|
-
fontOpacity(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
132
|
-
/**
|
|
133
|
-
Toggles font resizing, which can either be defined as a static boolean for all data points, or an accessor function that returns a boolean. See [this example](http://d3plus.org/examples/d3plus-text/resizing-text/) for a side-by-side comparison.
|
|
134
|
-
*/
|
|
135
|
-
fontResize(): (d: DataPoint, i?: number) => boolean;
|
|
136
|
-
fontResize(_: boolean | ((d: DataPoint, i?: number) => boolean)): this;
|
|
137
|
-
/**
|
|
138
|
-
The font size in pixels. Inferred from the [DOM selection](#textBox.select) by default.
|
|
139
|
-
*/
|
|
140
|
-
fontSize(): (d: DataPoint, i?: number) => number;
|
|
141
|
-
fontSize(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
142
|
-
/**
|
|
143
|
-
The font stroke color for the rendered text.
|
|
144
|
-
*/
|
|
145
|
-
fontStroke(): (d: DataPoint, i?: number) => string;
|
|
146
|
-
fontStroke(_: string | ((d: DataPoint, i?: number) => string)): this;
|
|
147
|
-
/**
|
|
148
|
-
The font stroke width for the rendered text.
|
|
149
|
-
*/
|
|
150
|
-
fontStrokeWidth(): (d: DataPoint, i?: number) => number;
|
|
151
|
-
fontStrokeWidth(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
152
|
-
/**
|
|
153
|
-
The font weight. Inferred from the [DOM selection](#textBox.select) by default.
|
|
154
|
-
*/
|
|
155
|
-
fontWeight(): (d: DataPoint, i?: number) => number | string;
|
|
156
|
-
fontWeight(_: number | string | ((d: DataPoint, i?: number) => number | string)): this;
|
|
157
|
-
/**
|
|
158
|
-
The height for each text box.
|
|
159
|
-
|
|
160
|
-
@example <caption>default accessor</caption>
|
|
161
|
-
function(d) {
|
|
162
|
-
return d.height || 200;
|
|
163
|
-
}
|
|
164
|
-
*/
|
|
165
|
-
height(): (d: DataPoint, i?: number) => number;
|
|
166
|
-
height(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
167
74
|
/**
|
|
168
75
|
Configures the ability to render simple HTML tags. Defaults to supporting `<b>`, `<strong>`, `<i>`, and `<em>`, set to false to disable or provide a mapping of tags to svg styles
|
|
169
76
|
*/
|
|
170
77
|
html(): Record<string, string> | false;
|
|
171
78
|
html(_: Record<string, string> | boolean): this;
|
|
172
|
-
/**
|
|
173
|
-
The unique id for each text box.
|
|
174
|
-
|
|
175
|
-
@example <caption>default accessor</caption>
|
|
176
|
-
function(d, i) {
|
|
177
|
-
return d.id || i + "";
|
|
178
|
-
}
|
|
179
|
-
*/
|
|
180
|
-
id(): (d: DataPoint, i: number) => string;
|
|
181
|
-
id(_: string | ((d: DataPoint, i: number) => string)): this;
|
|
182
|
-
/**
|
|
183
|
-
The line height, which is 1.2 times the [font size](#textBox.fontSize) by default.
|
|
184
|
-
*/
|
|
185
|
-
lineHeight(): (d: DataPoint, i?: number) => number;
|
|
186
|
-
lineHeight(_: ((d: DataPoint, i?: number) => number) | number): this;
|
|
187
|
-
/**
|
|
188
|
-
Restricts the maximum number of lines to wrap onto, which is null (unlimited) by default.
|
|
189
|
-
*/
|
|
190
|
-
maxLines(): (d: DataPoint, i?: number) => number | null;
|
|
191
|
-
maxLines(_: number | null | ((d: DataPoint, i?: number) => number | null)): this;
|
|
192
|
-
/**
|
|
193
|
-
Whether text is allowed to overflow its bounding box.
|
|
194
|
-
*/
|
|
195
|
-
overflow(): (d: DataPoint, i?: number) => boolean;
|
|
196
|
-
overflow(_: boolean | ((d: DataPoint, i?: number) => boolean)): this;
|
|
197
|
-
/**
|
|
198
|
-
The padding as a CSS shorthand string or number. Defaults to 0.
|
|
199
|
-
*/
|
|
200
|
-
padding(): (d: DataPoint, i?: number) => number | string;
|
|
201
|
-
padding(_: number | string | ((d: DataPoint, i?: number) => number | string)): this;
|
|
202
|
-
/**
|
|
203
|
-
The pointer-events CSS property for each text box.
|
|
204
|
-
*/
|
|
205
|
-
pointerEvents(): (d: DataPoint, i?: number) => string;
|
|
206
|
-
pointerEvents(_: string | ((d: DataPoint, i?: number) => string)): this;
|
|
207
|
-
/**
|
|
208
|
-
The rotation angle in degrees for each text box.
|
|
209
|
-
*/
|
|
210
|
-
rotate(): (d: DataPoint, i?: number) => number;
|
|
211
|
-
rotate(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
212
|
-
/**
|
|
213
|
-
The anchor point around which to rotate the text box.
|
|
214
|
-
*/
|
|
215
|
-
rotateAnchor(): (d: DataPoint, i?: number) => [number, number];
|
|
216
|
-
rotateAnchor(_: ((d: DataPoint, i?: number) => [number, number]) | [number, number]): this;
|
|
217
79
|
/**
|
|
218
80
|
The SVG container element as a d3 selector or DOM element. If not specified, an SVG element will be added to the page.
|
|
219
81
|
*/
|
|
220
82
|
select(): D3Selection;
|
|
221
83
|
select(_: string | HTMLElement): this;
|
|
222
|
-
/**
|
|
223
|
-
The word split function, which when passed a string is expected to return that string split into an array of words.
|
|
224
|
-
*/
|
|
225
|
-
split(): (text: string, i?: number) => string[];
|
|
226
|
-
split(_: (text: string, i?: number) => string[]): this;
|
|
227
|
-
/**
|
|
228
|
-
The text content for each box.
|
|
229
|
-
|
|
230
|
-
@example <caption>default accessor</caption>
|
|
231
|
-
function(d) {
|
|
232
|
-
return d.text;
|
|
233
|
-
}
|
|
234
|
-
*/
|
|
235
|
-
text(): (d: DataPoint, i?: number) => string | undefined;
|
|
236
|
-
text(_: string | ((d: DataPoint, i?: number) => string | undefined)): this;
|
|
237
|
-
/**
|
|
238
|
-
The horizontal text anchor, analagous to the SVG [text-anchor](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor) property.
|
|
239
|
-
*/
|
|
240
|
-
textAnchor(): (d: DataPoint, i?: number) => string;
|
|
241
|
-
textAnchor(_: string | ((d: DataPoint, i?: number) => string)): this;
|
|
242
|
-
/**
|
|
243
|
-
The vertical alignment. Accepts `"top"`, `"middle"`, and `"bottom"`.
|
|
244
|
-
*/
|
|
245
|
-
verticalAlign(): (d: DataPoint, i?: number) => string;
|
|
246
|
-
verticalAlign(_: string | ((d: DataPoint, i?: number) => string)): this;
|
|
247
|
-
/**
|
|
248
|
-
The width for each text box.
|
|
249
|
-
|
|
250
|
-
@example <caption>default accessor</caption>
|
|
251
|
-
function(d) {
|
|
252
|
-
return d.width || 200;
|
|
253
|
-
}
|
|
254
|
-
*/
|
|
255
|
-
width(): (d: DataPoint, i?: number) => number;
|
|
256
|
-
width(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
257
|
-
/**
|
|
258
|
-
The x position for each text box. The number given should correspond to the left side of the textBox.
|
|
259
|
-
|
|
260
|
-
@example <caption>default accessor</caption>
|
|
261
|
-
function(d) {
|
|
262
|
-
return d.x || 0;
|
|
263
|
-
}
|
|
264
|
-
*/
|
|
265
|
-
x(): (d: DataPoint, i?: number) => number;
|
|
266
|
-
x(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
267
|
-
/**
|
|
268
|
-
The y position for each text box. The number given should correspond to the top side of the textBox.
|
|
269
|
-
|
|
270
|
-
@example <caption>default accessor</caption>
|
|
271
|
-
function(d) {
|
|
272
|
-
return d.y || 0;
|
|
273
|
-
}
|
|
274
|
-
*/
|
|
275
|
-
y(): (d: DataPoint, i?: number) => number;
|
|
276
|
-
y(_: number | ((d: DataPoint, i?: number) => number)): this;
|
|
277
84
|
}
|
|
278
85
|
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { BrushBehavior } from "d3-brush";
|
|
2
|
+
import type { D3Selection } from "@d3plus/dom";
|
|
3
|
+
import type { GroupNode } from "@d3plus/render";
|
|
4
|
+
import { Axis, TextBox } from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
Creates an interactive timeline brush component for selecting time periods within a visualization.
|
|
7
|
+
*/
|
|
8
|
+
export default class Timeline extends Axis {
|
|
9
|
+
_buttonBehaviorCurrent: string;
|
|
10
|
+
_hiddenHandles: boolean;
|
|
11
|
+
_playButtonClass: TextBox;
|
|
12
|
+
_playTimer: ReturnType<typeof setInterval> | false;
|
|
13
|
+
_onPlayToggle?: () => void;
|
|
14
|
+
_brush: BrushBehavior<unknown>;
|
|
15
|
+
_brushGroup: D3Selection;
|
|
16
|
+
_paddingLeft: number;
|
|
17
|
+
_ticksWidth: number;
|
|
18
|
+
/**
|
|
19
|
+
Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.
|
|
20
|
+
@private
|
|
21
|
+
*/
|
|
22
|
+
constructor();
|
|
23
|
+
/**
|
|
24
|
+
Triggered on brush "brush".
|
|
25
|
+
@private
|
|
26
|
+
*/
|
|
27
|
+
_brushBrush(event: Record<string, unknown>): void;
|
|
28
|
+
/**
|
|
29
|
+
Repaints the brush selection/handle rects at the given pixel limits,
|
|
30
|
+
matching d3-brush's own `redraw` geometry. Used for the one-shot snap on
|
|
31
|
+
click/press (`_brushStart`) so the target button is shown immediately.
|
|
32
|
+
Not used per-frame during a drag: repainting over d3-brush every brush
|
|
33
|
+
event races its own redraw and destabilizes the gesture — drags snap on
|
|
34
|
+
release (`_brushEnd`) instead.
|
|
35
|
+
@private
|
|
36
|
+
*/
|
|
37
|
+
_snapBrushVisual(limit: number[]): void;
|
|
38
|
+
/**
|
|
39
|
+
Triggered on brush "end".
|
|
40
|
+
@private
|
|
41
|
+
*/
|
|
42
|
+
_brushEnd(event: Record<string, unknown>): void;
|
|
43
|
+
/**
|
|
44
|
+
Triggered on brush "start".
|
|
45
|
+
@private
|
|
46
|
+
*/
|
|
47
|
+
_brushStart(event: Record<string, unknown>): void;
|
|
48
|
+
/**
|
|
49
|
+
Overrides the default brush styles.
|
|
50
|
+
@private
|
|
51
|
+
*/
|
|
52
|
+
_brushStyle(): void;
|
|
53
|
+
/**
|
|
54
|
+
Updates domain of the timeline used in brush functions.
|
|
55
|
+
@private
|
|
56
|
+
*/
|
|
57
|
+
_updateDomain(event: Record<string, unknown>): unknown[];
|
|
58
|
+
/**
|
|
59
|
+
Updates limits of the brush.
|
|
60
|
+
@private
|
|
61
|
+
*/
|
|
62
|
+
_updateBrushLimit(domain: unknown[]): unknown[];
|
|
63
|
+
/**
|
|
64
|
+
Toggles timeline playback. When stopped, advances the selection one tick
|
|
65
|
+
every `playButtonInterval` ms until it reaches the final tick; when
|
|
66
|
+
playing, stops. Invoked by the play button's DOM hit target (the scene
|
|
67
|
+
path wires no listeners, so the click can't reach the TextBox itself).
|
|
68
|
+
@private
|
|
69
|
+
*/
|
|
70
|
+
_togglePlay(): void;
|
|
71
|
+
/**
|
|
72
|
+
Whether the current selection already spans every period. Playback has
|
|
73
|
+
nowhere to advance in that case, so the play button is disabled (greyed
|
|
74
|
+
out + non-interactive) — see `renderPlayButton`.
|
|
75
|
+
@private
|
|
76
|
+
*/
|
|
77
|
+
_isFullRangeSelected(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
Extends the native Axis scene with the Timeline-specific play-button
|
|
80
|
+
TextBox.
|
|
81
|
+
|
|
82
|
+
The brush selection + handles are NOT composed here: d3-brush owns its
|
|
83
|
+
own DOM (mounted in `g.brushGroup` and styled by `_brushStyle`), which the
|
|
84
|
+
Viz lifts above the scene so it paints on top of the timeline ticks. That
|
|
85
|
+
DOM brush is the sole brush visual and interaction layer — drawing a
|
|
86
|
+
second copy from the scene only duplicated it at the wrong height (the
|
|
87
|
+
full outer bounds rather than the tick band), so the overlay no longer
|
|
88
|
+
lined up with the timeline.
|
|
89
|
+
*/
|
|
90
|
+
toScene(): GroupNode;
|
|
91
|
+
/**
|
|
92
|
+
Draws the timeline.
|
|
93
|
+
@param callback Optional callback invoked after rendering completes.
|
|
94
|
+
*/
|
|
95
|
+
render(callback?: (...args: unknown[]) => unknown): this;
|
|
96
|
+
/**
|
|
97
|
+
Handle style.
|
|
98
|
+
*/
|
|
99
|
+
handleConfig(): Record<string, unknown>;
|
|
100
|
+
handleConfig(_: Record<string, unknown>): this;
|
|
101
|
+
/**
|
|
102
|
+
Event listener for the specified brush event *typename*. Mirrors the core [d3-brush](https://github.com/d3/d3-brush#brush_on) behavior.
|
|
103
|
+
*/
|
|
104
|
+
on(): Record<string, (...args: unknown[]) => unknown>;
|
|
105
|
+
on(_: string): ((...args: unknown[]) => unknown) | undefined;
|
|
106
|
+
on(_: string, f: (...args: unknown[]) => unknown): this;
|
|
107
|
+
on(_: Record<string, (...args: unknown[]) => unknown>): this;
|
|
108
|
+
/**
|
|
109
|
+
The config Object for the Rect class used to create the playButton.
|
|
110
|
+
*/
|
|
111
|
+
playButtonConfig(): Record<string, unknown>;
|
|
112
|
+
playButtonConfig(_: Record<string, unknown>): this;
|
|
113
|
+
/**
|
|
114
|
+
Selection style.
|
|
115
|
+
*/
|
|
116
|
+
selectionConfig(): Record<string, unknown>;
|
|
117
|
+
selectionConfig(_: Record<string, unknown>): this;
|
|
118
|
+
}
|