@d3plus/core 4.11.0 → 4.13.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/es/index.js +2 -2
- package/es/internal.js +167 -23
- package/es/src/charts/Alluvial/emit.js +5 -4
- package/es/src/charts/Alluvial/index.js +7 -1
- package/es/src/charts/Alluvial/titles.js +24 -4
- package/es/src/charts/ArcDiagram/applyLayout.js +17 -10
- package/es/src/charts/ArcDiagram/arcGeometry.js +21 -8
- package/es/src/charts/ArcDiagram/arcLoops.js +5 -2
- package/es/src/charts/ArcDiagram/arcNodeBox.js +89 -0
- package/es/src/charts/ArcDiagram/emit.js +81 -38
- package/es/src/charts/ArcDiagram/events.js +16 -8
- package/es/src/charts/ArcDiagram/index.js +3 -1
- package/es/src/charts/BarChart/index.js +14 -10
- package/es/src/charts/BoxWhisker/extras.js +95 -0
- package/es/src/charts/BoxWhisker/index.js +77 -6
- package/es/src/charts/BoxWhisker/outliers.js +3 -2
- package/es/src/charts/BoxWhisker/summary.js +14 -3
- package/es/src/charts/BoxWhisker/tooltip.js +114 -29
- package/es/src/charts/BubbleChart/emit.js +9 -5
- package/es/src/charts/BubbleMatrix/colorDefaults.js +58 -0
- package/es/src/charts/BubbleMatrix/index.js +52 -0
- package/es/src/charts/Bullet/emit.js +3 -2
- package/es/src/charts/BumpChart/areaBump.js +175 -0
- package/es/src/charts/BumpChart/index.js +84 -18
- package/es/src/charts/Calendar/applyLayout.js +1 -1
- package/es/src/charts/Calendar/calendarDates.js +21 -7
- package/es/src/charts/Calendar/emit.js +3 -2
- package/es/src/charts/Calendar/index.js +16 -1
- package/es/src/charts/Candlestick/index.js +6 -11
- package/es/src/charts/Candlestick/periods.js +52 -29
- package/es/src/charts/Candlestick/tooltip.js +5 -7
- package/es/src/charts/Chord/emit.js +3 -2
- package/es/src/charts/ConnectedScatter/index.js +39 -0
- package/es/src/charts/CyclePlot/cycleFacet.js +162 -0
- package/es/src/charts/CyclePlot/cycleMeans.js +54 -0
- package/es/src/charts/CyclePlot/cyclePeriods.js +99 -0
- package/es/src/charts/CyclePlot/cycleTooltip.js +67 -0
- package/es/src/charts/CyclePlot/index.js +197 -0
- package/es/src/charts/DensityPlot/densityCurves.js +139 -0
- package/es/src/charts/DensityPlot/densityPoint.js +10 -0
- package/es/src/charts/DensityPlot/index.js +235 -0
- package/es/src/charts/DensityPlot/rug.js +144 -0
- package/es/src/charts/DotPlot/dotLayout.js +165 -0
- package/es/src/charts/DotPlot/facetSize.js +40 -0
- package/es/src/charts/DotPlot/index.js +173 -0
- package/es/src/charts/DotPlot/placements.js +121 -0
- package/es/src/charts/DotPlot/tooltip.js +68 -0
- package/es/src/charts/Dumbbell/arrowGrays.js +46 -0
- package/es/src/charts/Dumbbell/categoryChange.js +124 -0
- package/es/src/charts/Dumbbell/changeEmit.js +291 -0
- package/es/src/charts/Dumbbell/changes.js +87 -0
- package/es/src/charts/Dumbbell/connectors.js +46 -0
- package/es/src/charts/Dumbbell/emit.js +51 -50
- package/es/src/charts/Dumbbell/gapSort.js +2 -1
- package/es/src/charts/Dumbbell/index.js +121 -5
- package/es/src/charts/Funnel/emit.js +3 -2
- package/es/src/charts/Gantt/applyLayout.js +33 -13
- package/es/src/charts/Gantt/criticalPath.js +202 -0
- package/es/src/charts/Gantt/emit.js +49 -15
- package/es/src/charts/Gantt/ganttCalendar.js +54 -0
- package/es/src/charts/Gantt/ganttCritical.js +106 -0
- package/es/src/charts/Gantt/ganttDecor.js +183 -60
- package/es/src/charts/Gantt/ganttSlack.js +14 -0
- package/es/src/charts/Gantt/ganttTooltip.js +91 -36
- package/es/src/charts/Gantt/index.js +59 -10
- package/es/src/charts/Gauge/emit.js +3 -2
- package/es/src/charts/Geomap/applyLayout.js +177 -19
- package/es/src/charts/Geomap/cartogram.js +50 -0
- package/es/src/charts/Geomap/cartogramContiguous.js +196 -0
- package/es/src/charts/Geomap/cartogramFields.js +63 -0
- package/es/src/charts/Geomap/cartogramLabels.js +109 -0
- package/es/src/charts/Geomap/cartogramLayout.js +186 -0
- package/es/src/charts/Geomap/cartogramLegend.js +73 -0
- package/es/src/charts/Geomap/cartogramRelax.js +251 -0
- package/es/src/charts/Geomap/densityEmit.js +93 -0
- package/es/src/charts/Geomap/densityFields.js +69 -0
- package/es/src/charts/Geomap/densityLayout.js +90 -0
- package/es/src/charts/Geomap/densityTooltip.js +98 -0
- package/es/src/charts/Geomap/dotDensity.js +157 -0
- package/es/src/charts/Geomap/dotDensityLayout.js +116 -0
- package/es/src/charts/Geomap/dotRenderer.js +49 -0
- package/es/src/charts/Geomap/drillDown.js +216 -0
- package/es/src/charts/Geomap/drillEmit.js +64 -0
- package/es/src/charts/Geomap/drillEvents.js +108 -0
- package/es/src/charts/Geomap/emit.js +64 -42
- package/es/src/charts/Geomap/flowEmit.js +36 -15
- package/es/src/charts/Geomap/flowEvents.js +3 -1
- package/es/src/charts/Geomap/flowFields.js +2 -2
- package/es/src/charts/Geomap/flowLinks.js +18 -10
- package/es/src/charts/Geomap/geoHexbin.js +144 -0
- package/es/src/charts/Geomap/geoHexbinZoom.js +110 -0
- package/es/src/charts/Geomap/index.js +71 -116
- package/es/src/charts/Geomap/pointCluster.js +246 -0
- package/es/src/charts/Geomap/pointClusterEmit.js +385 -0
- package/es/src/charts/Geomap/pointClusterLayout.js +170 -0
- package/es/src/charts/Geomap/pointClusterLinks.js +95 -0
- package/es/src/charts/Geomap/pointClusterZoom.js +253 -0
- package/es/src/charts/Geomap/pointLabels.js +12 -4
- package/es/src/charts/Geomap/pointRows.js +25 -0
- package/es/src/charts/Geomap/tileGrid.js +468 -0
- package/es/src/charts/Geomap/tileState.js +41 -0
- package/es/src/charts/Geomap/topojsonFluent.js +96 -0
- package/es/src/charts/Geomap/topojsonLevels.js +16 -0
- package/es/src/charts/Hexbin/contourLabels.js +25 -17
- package/es/src/charts/Hexbin/index.js +4 -1
- package/es/src/charts/Histogram/binData.js +5 -1
- package/es/src/charts/Histogram/index.js +4 -26
- package/es/src/charts/HorizonChart/emit.js +147 -0
- package/es/src/charts/HorizonChart/horizonBands.js +117 -0
- package/es/src/charts/HorizonChart/horizonColors.js +30 -0
- package/es/src/charts/HorizonChart/hover.js +147 -0
- package/es/src/charts/HorizonChart/index.js +220 -0
- package/es/src/charts/HorizonChart/measure.js +91 -0
- package/es/src/charts/HorizonChart/rowFilter.js +250 -0
- package/es/src/charts/HorizonChart/state.js +64 -0
- package/es/src/charts/Icicle/emit.js +3 -2
- package/es/src/charts/Icicle/index.js +3 -1
- package/es/src/charts/KPI/applyLayout.js +119 -0
- package/es/src/charts/KPI/delta.js +74 -0
- package/es/src/charts/KPI/emit.js +303 -0
- package/es/src/charts/KPI/index.js +192 -0
- package/es/src/charts/KPI/series.js +67 -0
- package/es/src/charts/KPI/tileLayout.js +134 -0
- package/es/src/charts/Lollipop/emit.js +2 -1
- package/es/src/charts/Marimekko/index.js +2 -1
- package/es/src/charts/Matrix/applyLayout.js +29 -12
- package/es/src/charts/Matrix/bubbles.js +133 -0
- package/es/src/charts/Matrix/emit.js +68 -25
- package/es/src/charts/Matrix/index.js +64 -5
- package/es/src/charts/Network/applyLayout.js +206 -84
- package/es/src/charts/Network/bundle.js +29 -8
- package/es/src/charts/Network/circleLayout.js +281 -0
- package/es/src/charts/Network/containNodes.js +72 -0
- package/es/src/charts/Network/emit.js +109 -50
- package/es/src/charts/Network/forceLayout.js +111 -0
- package/es/src/charts/Network/graph.js +76 -8
- package/es/src/charts/Network/graphFluent.js +5 -3
- package/es/src/charts/Network/index.js +117 -3
- package/es/src/charts/Network/liveForce.js +312 -0
- package/es/src/charts/Network/livePositions.js +180 -0
- package/es/src/charts/Network/networkDrag.js +156 -0
- package/es/src/charts/Pack/applyLayout.js +16 -5
- package/es/src/charts/Pack/emit.js +18 -10
- package/es/src/charts/Pack/groupRows.js +61 -0
- package/es/src/charts/Pack/index.js +3 -14
- package/es/src/charts/Pack/neutralPaint.js +20 -0
- package/es/src/charts/Pack/nodeNames.js +35 -0
- package/es/src/charts/ParallelCoordinates/axes.js +22 -22
- package/es/src/charts/ParallelCoordinates/chrome.js +18 -0
- package/es/src/charts/ParallelCoordinates/emit.js +3 -2
- package/es/src/charts/ParallelCoordinates/index.js +3 -1
- package/es/src/charts/ParallelCoordinates/titles.js +17 -9
- package/es/src/charts/Pareto/color.js +46 -0
- package/es/src/charts/Pareto/hover.js +54 -0
- package/es/src/charts/Pareto/index.js +170 -0
- package/es/src/charts/Pareto/labels.js +91 -0
- package/es/src/charts/Pareto/order.js +61 -0
- package/es/src/charts/Pareto/paretoSteps.js +84 -0
- package/es/src/charts/Pareto/state.js +158 -0
- package/es/src/charts/Parliament/index.js +68 -0
- package/es/src/charts/Pie/emit.js +12 -3
- package/es/src/charts/Pie/index.js +10 -0
- package/es/src/charts/Plot/areaEnter.js +70 -0
- package/es/src/charts/Plot/areaLabelsAlong.js +10 -2
- package/es/src/charts/Plot/aspectRatio.js +92 -0
- package/es/src/charts/Plot/axisHover.js +4 -2
- package/es/src/charts/Plot/axisHoverAnchors.js +2 -1
- package/es/src/charts/Plot/axisHoverScene.js +138 -5
- package/es/src/charts/Plot/barConfidence.js +7 -6
- package/es/src/charts/Plot/barHitArea.js +121 -7
- package/es/src/charts/Plot/barLabelConfidence.js +50 -0
- package/es/src/charts/Plot/barLabelFit.js +2 -1
- package/es/src/charts/Plot/barWidth.js +10 -5
- package/es/src/charts/Plot/baselineBreak.js +15 -6
- package/es/src/charts/Plot/baselineDomain.js +13 -4
- package/es/src/charts/Plot/circleLabels.js +26 -16
- package/es/src/charts/Plot/confidenceAxes.js +100 -0
- package/es/src/charts/Plot/confidenceConfig.js +7 -2
- package/es/src/charts/Plot/confidenceTooltip.js +47 -4
- package/es/src/charts/Plot/connectGapsScene.js +2 -1
- package/es/src/charts/Plot/discreteDomain.js +27 -5
- package/es/src/charts/Plot/discreteSpan.js +10 -1
- package/es/src/charts/Plot/domainClip.js +74 -44
- package/es/src/charts/Plot/downsample.js +26 -0
- package/es/src/charts/Plot/draw.js +41 -14
- package/es/src/charts/Plot/fillBetween.js +2 -1
- package/es/src/charts/Plot/forecast.js +8 -4
- package/es/src/charts/Plot/forecastScene.js +6 -5
- package/es/src/charts/Plot/index.js +52 -27
- package/es/src/charts/Plot/inferDiscrete.js +72 -0
- package/es/src/charts/Plot/jitter.js +50 -0
- package/es/src/charts/Plot/labelPlacement.js +4 -3
- package/es/src/charts/Plot/lineBands.js +6 -1
- package/es/src/charts/Plot/lineLabelEmit.js +4 -3
- package/es/src/charts/Plot/lineLabelSides.js +8 -0
- package/es/src/charts/Plot/lineLabelsAlong.js +45 -31
- package/es/src/charts/Plot/lineMarkerKeys.js +19 -0
- package/es/src/charts/Plot/marginalHover.js +141 -0
- package/es/src/charts/Plot/marginalLayout.js +102 -0
- package/es/src/charts/Plot/marginalPaint.js +105 -0
- package/es/src/charts/Plot/marginalScene.js +272 -0
- package/es/src/charts/Plot/marginalSeries.js +73 -0
- package/es/src/charts/Plot/marginalStats.js +219 -0
- package/es/src/charts/Plot/openDomainEnds.js +60 -0
- package/es/src/charts/Plot/orderPath.js +137 -0
- package/es/src/charts/Plot/orderPathScene.js +253 -0
- package/es/src/charts/Plot/outlierDetect.js +179 -0
- package/es/src/charts/Plot/outlierLabels.js +327 -0
- package/es/src/charts/Plot/outlierLines.js +93 -0
- package/es/src/charts/Plot/outlierScene.js +308 -0
- package/es/src/charts/Plot/outlierTooltip.js +69 -0
- package/es/src/charts/Plot/periodLabels.js +27 -0
- package/es/src/charts/Plot/pipeline.js +62 -24
- package/es/src/charts/Plot/pipelineAxisLayout.js +9 -7
- package/es/src/charts/Plot/pipelineDomains.js +64 -27
- package/es/src/charts/Plot/pipelineScales.js +37 -28
- package/es/src/charts/Plot/plotBreaks.js +38 -18
- package/es/src/charts/Plot/plotFacet.js +3 -1
- package/es/src/charts/Plot/plotInit.js +65 -3
- package/es/src/charts/Plot/plotLevels.js +183 -0
- package/es/src/charts/Plot/plotRangeBreaks.js +46 -9
- package/es/src/charts/Plot/plotShapes.js +60 -0
- package/es/src/charts/Plot/pointConfidence.js +186 -0
- package/es/src/charts/Plot/pointKey.js +10 -0
- package/es/src/charts/Plot/referenceDomains.js +11 -6
- package/es/src/charts/Plot/shapeAccessors.js +52 -0
- package/es/src/charts/Plot/shapeDefaults.js +32 -17
- package/es/src/charts/Plot/shapeLabelLegend.js +67 -0
- package/es/src/charts/Plot/sharedHover.js +42 -13
- package/es/src/charts/Plot/sharedHoverScene.js +49 -13
- package/es/src/charts/Plot/sharedTooltip.js +68 -25
- package/es/src/charts/Plot/stackEnter.js +7 -3
- package/es/src/charts/Plot/stackLegendOrder.js +5 -2
- package/es/src/charts/Plot/stackNeutral.js +154 -0
- package/es/src/charts/Plot/stackShareTooltip.js +2 -1
- package/es/src/charts/Plot/stackThreshold.js +2 -1
- package/es/src/charts/Plot/swarm.js +8 -5
- package/es/src/charts/Plot/timeNestKeys.js +37 -0
- package/es/src/charts/Plot/trendLabels.js +45 -18
- package/es/src/charts/Plot/trendLines.js +78 -34
- package/es/src/charts/Plot/trendMovingAverage.js +135 -0
- package/es/src/charts/Plot/trendProjection.js +18 -6
- package/es/src/charts/Plot/trendScene.js +4 -1
- package/es/src/charts/Plot/trendTooltip.js +75 -20
- package/es/src/charts/PolarArea/emit.js +3 -2
- package/es/src/charts/PolarArea/index.js +2 -1
- package/es/src/charts/Priestley/applyLayout.js +20 -12
- package/es/src/charts/Priestley/emit.js +3 -2
- package/es/src/charts/Priestley/index.js +0 -2
- package/es/src/charts/Priestley/timeAxis.js +24 -13
- package/es/src/charts/Pyramid/gutter.js +52 -16
- package/es/src/charts/Pyramid/index.js +55 -7
- package/es/src/charts/Pyramid/scene.js +4 -4
- package/es/src/charts/Radar/applyLayout.js +31 -33
- package/es/src/charts/Radar/axisDecorations.js +29 -17
- package/es/src/charts/Radar/curvedLabels.js +43 -2
- package/es/src/charts/Radar/emit.js +33 -17
- package/es/src/charts/Radar/index.js +41 -2
- package/es/src/charts/Radar/points.js +85 -0
- package/es/src/charts/RadialArea/index.js +51 -0
- package/es/src/charts/RadialBar/emit.js +9 -3
- package/es/src/charts/RadialBar/index.js +10 -0
- package/es/src/charts/RadialLine/angles.js +117 -0
- package/es/src/charts/RadialLine/applyLayout.js +204 -0
- package/es/src/charts/RadialLine/emit.js +66 -0
- package/es/src/charts/RadialLine/index.js +228 -0
- package/es/src/charts/RadialLine/paths.js +55 -0
- package/es/src/charts/RadialLine/points.js +80 -0
- package/es/src/charts/RadialLine/series.js +84 -0
- package/es/src/charts/RadialLine/seriesLabelNodes.js +116 -0
- package/es/src/charts/RadialLine/seriesLabels.js +91 -0
- package/es/src/charts/RadialLine/spokes.js +32 -0
- package/es/src/charts/RadialMatrix/applyLayout.js +115 -31
- package/es/src/charts/RadialMatrix/emit.js +3 -2
- package/es/src/charts/RadialMatrix/index.js +15 -2
- package/es/src/charts/RadialTree/index.js +33 -0
- package/es/src/charts/Rings/applyLayout.js +28 -151
- package/es/src/charts/Rings/emit.js +120 -60
- package/es/src/charts/Rings/index.js +28 -5
- package/es/src/charts/Rings/ringsCurves.js +158 -0
- package/es/src/charts/Rings/ringsLoops.js +4 -2
- package/es/src/charts/Rings/ringsParallel.js +20 -3
- package/es/src/charts/Rings/ringsPlacement.js +152 -0
- package/es/src/charts/Rings/ringsSizing.js +82 -51
- package/es/src/charts/Sankey/applyLayout.js +22 -4
- package/es/src/charts/Sankey/circularLayout.js +14 -6
- package/es/src/charts/Sankey/emit.js +3 -2
- package/es/src/charts/Sankey/index.js +50 -1
- package/es/src/charts/Sankey/sankeyDrag.js +225 -0
- package/es/src/charts/Sankey/sankeyLayout.js +12 -0
- package/es/src/charts/Scatter/index.js +3 -2
- package/es/src/charts/ScatterMatrix/binEmit.js +59 -0
- package/es/src/charts/ScatterMatrix/index.js +253 -0
- package/es/src/charts/ScatterMatrix/matrixData.js +161 -0
- package/es/src/charts/ScatterMatrix/matrixFacet.js +76 -0
- package/es/src/charts/ScatterMatrix/matrixHover.js +36 -0
- package/es/src/charts/ScatterMatrix/matrixTooltip.js +45 -0
- package/es/src/charts/StripPlot/index.js +53 -0
- package/es/src/charts/Sunburst/emit.js +12 -3
- package/es/src/charts/Sunburst/index.js +13 -1
- package/es/src/charts/TileGridMap/index.js +29 -0
- package/es/src/charts/Tree/applyLayout.js +135 -32
- package/es/src/charts/Tree/emit.js +61 -8
- package/es/src/charts/Tree/index.js +34 -15
- package/es/src/charts/Tree/keys.js +33 -0
- package/es/src/charts/Tree/nodeHeight.js +58 -0
- package/es/src/charts/Tree/nodeLabel.js +15 -0
- package/es/src/charts/Tree/radialLabels.js +61 -0
- package/es/src/charts/Tree/radialLayout.js +210 -0
- package/es/src/charts/Treemap/emit.js +3 -2
- package/es/src/charts/Treemap/emitGroupHeaders.js +3 -5
- package/es/src/charts/Venn/applyLayout.js +176 -0
- package/es/src/charts/Venn/circles.js +192 -0
- package/es/src/charts/Venn/ellipseFrame.js +57 -0
- package/es/src/charts/Venn/emit.js +142 -0
- package/es/src/charts/Venn/index.js +178 -0
- package/es/src/charts/Venn/nelderMead.js +59 -0
- package/es/src/charts/Venn/tooltip.js +22 -0
- package/es/src/charts/Venn/vennData.js +99 -0
- package/es/src/charts/Venn/vennEllipses.js +291 -0
- package/es/src/charts/Venn/vennFit.js +169 -0
- package/es/src/charts/Venn/vennLayout.js +252 -0
- package/es/src/charts/Venn/vennRegions.js +133 -0
- package/es/src/charts/Violin/emit.js +2 -1
- package/es/src/charts/Violin/index.js +2 -1
- package/es/src/charts/Waffle/applyLayout.js +45 -22
- package/es/src/charts/Waffle/arcEmit.js +153 -0
- package/es/src/charts/Waffle/arcLayout.js +122 -0
- package/es/src/charts/Waffle/arcStage.js +79 -0
- package/es/src/charts/Waffle/emit.js +9 -4
- package/es/src/charts/Waffle/index.js +88 -4
- package/es/src/charts/Waffle/tooltip.js +7 -2
- package/es/src/charts/Waterfall/connectors.js +5 -3
- package/es/src/charts/Waterfall/state.js +2 -1
- package/es/src/charts/WordCloud/applyLayout.js +157 -0
- package/es/src/charts/WordCloud/cloudLayout.js +128 -0
- package/es/src/charts/WordCloud/emit.js +96 -0
- package/es/src/charts/WordCloud/fontScale.js +34 -0
- package/es/src/charts/WordCloud/glyphMask.js +298 -0
- package/es/src/charts/WordCloud/index.js +174 -0
- package/es/src/charts/WordCloud/occupancy.js +99 -0
- package/es/src/charts/WordCloud/rotation.js +44 -0
- package/es/src/charts/WordCloud/size.js +15 -0
- package/es/src/charts/WordCloud/spiral.js +72 -0
- package/es/src/charts/definition/applyDefinition.js +6 -1
- package/es/src/charts/definition/declaresField.js +14 -0
- package/es/src/charts/definition/makeChart.js +15 -3
- package/es/src/charts/drawSteps/bottomRightControls.js +1 -1
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js +1 -1
- package/es/src/charts/drawSteps/gestureHover.js +10 -6
- package/es/src/charts/drawSteps/leavesSurface.js +12 -0
- package/es/src/charts/drawSteps/minimap.js +5 -21
- package/es/src/charts/drawSteps/selectActions.js +105 -0
- package/es/src/charts/drawSteps/selectGesture.js +318 -0
- package/es/src/charts/drawSteps/selectRegion.js +222 -0
- package/es/src/charts/drawSteps/selectState.js +118 -0
- package/es/src/charts/drawSteps/topLeftControls.js +4 -1
- package/es/src/charts/drawSteps/zoomActions.js +36 -0
- package/es/src/charts/drawSteps/zoomControls.js +90 -37
- package/es/src/charts/drawSteps/zoomControlsMarkup.js +228 -36
- package/es/src/charts/drawSteps/zoomControlsMenu.js +140 -0
- package/es/src/charts/drawSteps/zoomDrag.js +190 -0
- package/es/src/charts/drawSteps/zoomFit.js +69 -0
- package/es/src/charts/events/click.legend.js +4 -2
- package/es/src/charts/events/click.shape.js +5 -3
- package/es/src/charts/events/mouseenter.js +6 -16
- package/es/src/charts/events/mouseleave.js +15 -5
- package/es/src/charts/events/mousemove.legend.js +35 -34
- package/es/src/charts/events/mousemove.shape.js +53 -44
- package/es/src/charts/facet/drawFacets.js +61 -22
- package/es/src/charts/facet/facetConfig.js +3 -1
- package/es/src/charts/facet/facetData.js +10 -2
- package/es/src/charts/facet/facetGrid.js +5 -1
- package/es/src/charts/facet/facetGutter.js +36 -7
- package/es/src/charts/facet/facetLayout.js +136 -0
- package/es/src/charts/facet/facetLayouts.js +574 -0
- package/es/src/charts/facet/facetScene.js +10 -3
- package/es/src/charts/features/annotationFrame.js +8 -3
- package/es/src/charts/features/axes.js +19 -6
- package/es/src/charts/features/axesFinal.js +99 -10
- package/es/src/charts/features/axesMeasure.js +31 -10
- package/es/src/charts/features/axisTooltip.js +138 -0
- package/es/src/charts/features/bareRegion.js +24 -0
- package/es/src/charts/features/boxGrid.js +39 -0
- package/es/src/charts/features/centerLabel.js +196 -0
- package/es/src/charts/features/circleLabelPlacement.js +288 -83
- package/es/src/charts/features/circleLabels.js +66 -14
- package/es/src/charts/features/colorScaleBivariate.js +83 -0
- package/es/src/charts/features/colorScaleBucket.js +18 -0
- package/es/src/charts/features/colorScaleHover.js +35 -5
- package/es/src/charts/features/colorScaleLimit.js +73 -0
- package/es/src/charts/features/colorScaleTooltip.js +62 -0
- package/es/src/charts/features/colorScaleTop.js +71 -0
- package/es/src/charts/features/colorScaleValue.js +10 -1
- package/es/src/charts/features/curvedArrows.js +74 -23
- package/es/src/charts/features/depthKey.js +26 -0
- package/es/src/charts/features/edgeArrows.js +107 -18
- package/es/src/charts/features/emitHelpers.js +7 -2
- package/es/src/charts/features/features.js +25 -5
- package/es/src/charts/features/featuresColorScale.js +64 -20
- package/es/src/charts/features/featuresLegend.js +20 -0
- package/es/src/charts/features/hoverTicks.js +46 -0
- package/es/src/charts/features/idleQueue.js +72 -0
- package/es/src/charts/features/keyHold.js +115 -0
- package/es/src/charts/features/keyTooltip.js +91 -0
- package/es/src/charts/features/labelLayering.js +149 -0
- package/es/src/charts/features/labelSlots.js +112 -0
- package/es/src/charts/features/linkInteraction.js +62 -7
- package/es/src/charts/features/linkLabelPath.js +2 -39
- package/es/src/charts/features/networkMeasures.js +241 -0
- package/es/src/charts/features/nodeDrag.js +175 -0
- package/es/src/charts/features/nodeKeys.js +117 -0
- package/es/src/charts/features/nodeOutline.js +41 -0
- package/es/src/charts/features/nodeStats.js +309 -0
- package/es/src/charts/features/pathLabelBends.js +191 -0
- package/es/src/charts/features/plotAnnotations.js +8 -5
- package/es/src/charts/features/plotEndLabels.js +28 -7
- package/es/src/charts/features/plotPaint.js +52 -13
- package/es/src/charts/features/rectNodeSize.js +41 -0
- package/es/src/charts/features/ringLabels.js +3 -1
- package/es/src/charts/features/selfLoops.js +33 -23
- package/es/src/charts/features/shapeEmit.js +110 -32
- package/es/src/charts/features/sharedFields.js +10 -5
- package/es/src/charts/features/spokeLabels.js +178 -0
- package/es/src/charts/features/swatchPaint.js +68 -0
- package/es/src/charts/features/textHalo.js +3 -2
- package/es/src/charts/features/thresholdMembers.js +8 -12
- package/es/src/charts/features/tooltipRows.js +76 -0
- package/es/src/charts/features/tooltipSwatch.js +81 -24
- package/es/src/charts/features/xAxisConfig.js +2 -1
- package/es/src/charts/helpers/densityChart.js +2 -7
- package/es/src/charts/helpers/valueTitle.js +13 -1
- package/es/src/charts/index.js +17 -0
- package/es/src/charts/partition/chartFields.js +12 -3
- package/es/src/charts/partition/interaction.js +10 -5
- package/es/src/charts/pipeline/insetPlacement.js +19 -7
- package/es/src/charts/pipeline/preDrawData.js +80 -11
- package/es/src/charts/pipeline/runVizPipeline.js +5 -0
- package/es/src/charts/pipeline/stages.js +3 -2
- package/es/src/charts/pipeline/vizPreDraw.js +4 -0
- package/es/src/charts/plotBuffers/Circle.js +3 -2
- package/es/src/charts/plotBuffers/Line.js +6 -5
- package/es/src/charts/plotBuffers/Rect.js +3 -2
- package/es/src/charts/plotBuffers/Tick.js +12 -0
- package/es/src/charts/plotBuffers/defaultBuffers.js +3 -1
- package/es/src/charts/plotBuffers/rectLikeBuffer.js +4 -3
- package/es/src/charts/polar/chrome.js +81 -9
- package/es/src/charts/polar/config.js +4 -0
- package/es/src/charts/polar/wedgeLayout.js +2 -1
- package/es/src/charts/viz/Viz.js +56 -33
- package/es/src/charts/viz/VizBase.js +78 -42
- package/es/src/charts/viz/appendRows.js +90 -0
- package/es/src/charts/viz/backgroundInk.js +10 -0
- package/es/src/charts/viz/dataChanged.js +19 -0
- package/es/src/charts/viz/discrete.js +9 -0
- package/es/src/charts/viz/emphasis.js +14 -0
- package/es/src/charts/viz/fillStroke.js +10 -0
- package/es/src/charts/viz/focusTargets.js +25 -5
- package/es/src/charts/viz/groupByLevels.js +48 -0
- package/es/src/charts/viz/groupRow.js +27 -0
- package/es/src/charts/viz/hoverBand.js +40 -0
- package/es/src/charts/viz/interactionOpacity.js +240 -52
- package/es/src/charts/viz/keyboardNav.js +39 -9
- package/es/src/charts/viz/liftRaised.js +84 -0
- package/es/src/charts/viz/nearestHover.js +9 -2
- package/es/src/charts/viz/reportDrawError.js +15 -0
- package/es/src/charts/viz/setCursor.js +41 -0
- package/es/src/charts/viz/simpleHover.js +3 -4
- package/es/src/charts/viz/tooltipEnabled.js +38 -0
- package/es/src/charts/viz/userClick.js +45 -0
- package/es/src/charts/viz/vizDataPolling.js +0 -1
- package/es/src/charts/viz/vizDefaults.js +23 -34
- package/es/src/charts/viz/vizFields.js +13 -1
- package/es/src/charts/viz/vizRender.js +35 -5
- package/es/src/charts/viz/vizTypes.js +1 -1
- package/es/src/charts/viz/vizVisibility.js +12 -2
- package/es/src/components/Axis/Axis.js +114 -14
- package/es/src/components/Axis/AxisBottom.js +1 -0
- package/es/src/components/Axis/AxisLeft.js +1 -0
- package/es/src/components/Axis/AxisRight.js +1 -0
- package/es/src/components/Axis/AxisTop.js +1 -0
- package/es/src/components/Axis/axisBreak.js +29 -7
- package/es/src/components/Axis/axisDefaults.js +18 -0
- package/es/src/components/Axis/axisEndLabels.js +4 -1
- package/es/src/components/Axis/axisLabelKinds.js +36 -0
- package/es/src/components/Axis/axisLabelLineHeight.js +19 -0
- package/es/src/components/Axis/axisLabelRoom.js +37 -0
- package/es/src/components/Axis/axisLabelSize.js +195 -0
- package/es/src/components/Axis/axisLabelThinning.js +167 -10
- package/es/src/components/Axis/axisLayout.js +76 -46
- package/es/src/components/Axis/axisLayoutLabels.js +93 -145
- package/es/src/components/Axis/axisLayoutScale.js +79 -34
- package/es/src/components/Axis/axisLevels.js +271 -0
- package/es/src/components/Axis/axisLimit.js +33 -0
- package/es/src/components/Axis/axisMaxSize.js +39 -0
- package/es/src/components/Axis/axisMinorTicks.js +280 -0
- package/es/src/components/Axis/axisPeriods.js +144 -0
- package/es/src/components/Axis/axisRangeBreaks.js +19 -10
- package/es/src/components/Axis/axisRender.js +90 -36
- package/es/src/components/Axis/axisRounding.js +38 -1
- package/es/src/components/Axis/axisScaleType.js +55 -0
- package/es/src/components/Axis/axisScene.js +100 -6
- package/es/src/components/Axis/axisTickLookups.js +30 -0
- package/es/src/components/Axis/axisTitle.js +53 -0
- package/es/src/components/Axis/axisTooltipTargets.js +151 -0
- package/es/src/components/Axis/labelSizeSession.js +23 -0
- package/es/src/components/Axis/rangeBreaks.js +10 -4
- package/es/src/components/Axis/timeValues.js +116 -19
- package/es/src/components/ColorScale/ColorScale.js +63 -18
- package/es/src/components/ColorScale/bivariateRender.js +353 -0
- package/es/src/components/ColorScale/bivariateScale.js +150 -0
- package/es/src/components/ColorScale/colorScaleRender.js +32 -2
- package/es/src/components/ColorScale/colorScaleScale.js +139 -41
- package/es/src/components/ColorScale/colorScaleSwatchTooltips.js +77 -0
- package/es/src/components/Legend/Legend.js +11 -2
- package/es/src/components/Legend/legendCut.js +108 -0
- package/es/src/components/Legend/legendRender.js +38 -13
- package/es/src/components/SizeLegend/SizeLegend.js +20 -1
- package/es/src/components/TextBox.js +6 -2
- package/es/src/components/Timeline/Timeline.js +11 -3
- package/es/src/components/Timeline/timelineRender.js +25 -14
- package/es/src/components/Tooltip.js +8 -1
- package/es/src/components/textBoxScene.js +3 -0
- package/es/src/components/textEllipsis.js +7 -0
- package/es/src/components/tooltipDom.js +80 -18
- package/es/src/fluent.js +124 -9
- package/es/src/shapes/Area.js +32 -1
- package/es/src/shapes/Bar.js +22 -1
- package/es/src/shapes/Box.js +72 -13
- package/es/src/shapes/Circle.js +1 -0
- package/es/src/shapes/Image.js +8 -1
- package/es/src/shapes/Line.js +45 -1
- package/es/src/shapes/Path.js +1 -0
- package/es/src/shapes/Rect.js +1 -0
- package/es/src/shapes/Shape.js +29 -8
- package/es/src/shapes/Tick.js +54 -0
- package/es/src/shapes/Whisker.js +1 -0
- package/es/src/shapes/boxExtraShapes.js +72 -0
- package/es/src/shapes/boxExtras.js +212 -0
- package/es/src/shapes/boxStyle.js +38 -5
- package/es/src/shapes/buildLabelData.js +2 -0
- package/es/src/shapes/downsample.js +150 -0
- package/es/src/shapes/hitAreaNode.js +6 -2
- package/es/src/shapes/index.js +1 -0
- package/es/src/shapes/pathSeries.js +51 -0
- package/es/src/utils/BaseClass.js +59 -52
- package/es/src/utils/configValue.js +9 -0
- package/es/src/utils/jitter.js +33 -0
- package/es/src/utils/resetSetters.js +66 -0
- package/package.json +10 -10
- package/types/index.d.ts +5 -4
- package/types/internal.d.ts +272 -29
- package/types/src/charts/Alluvial/titles.d.ts +16 -3
- package/types/src/charts/ArcDiagram/arcGeometry.d.ts +7 -3
- package/types/src/charts/ArcDiagram/arcLoops.d.ts +3 -1
- package/types/src/charts/ArcDiagram/arcNodeBox.d.ts +60 -0
- package/types/src/charts/ArcDiagram/emit.d.ts +6 -4
- package/types/src/charts/ArcDiagram/events.d.ts +2 -1
- package/types/src/charts/BoxWhisker/extras.d.ts +41 -0
- package/types/src/charts/BoxWhisker/summary.d.ts +1 -1
- package/types/src/charts/BoxWhisker/tooltip.d.ts +33 -4
- package/types/src/charts/BubbleChart/emit.d.ts +3 -3
- package/types/src/charts/BubbleMatrix/colorDefaults.d.ts +19 -0
- package/types/src/charts/BubbleMatrix/index.d.ts +18 -0
- package/types/src/charts/BumpChart/areaBump.d.ts +86 -0
- package/types/src/charts/BumpChart/index.d.ts +19 -1
- package/types/src/charts/Calendar/calendarDates.d.ts +8 -1
- package/types/src/charts/Candlestick/periods.d.ts +19 -8
- package/types/src/charts/ConnectedScatter/index.d.ts +17 -0
- package/types/src/charts/CyclePlot/cycleFacet.d.ts +61 -0
- package/types/src/charts/CyclePlot/cycleMeans.d.ts +32 -0
- package/types/src/charts/CyclePlot/cyclePeriods.d.ts +37 -0
- package/types/src/charts/CyclePlot/cycleTooltip.d.ts +47 -0
- package/types/src/charts/CyclePlot/index.d.ts +75 -0
- package/types/src/charts/DensityPlot/densityCurves.d.ts +84 -0
- package/types/src/charts/DensityPlot/densityPoint.d.ts +16 -0
- package/types/src/charts/DensityPlot/index.d.ts +33 -0
- package/types/src/charts/DensityPlot/rug.d.ts +57 -0
- package/types/src/charts/DotPlot/dotLayout.d.ts +95 -0
- package/types/src/charts/DotPlot/facetSize.d.ts +33 -0
- package/types/src/charts/DotPlot/index.d.ts +22 -0
- package/types/src/charts/DotPlot/placements.d.ts +28 -0
- package/types/src/charts/DotPlot/tooltip.d.ts +27 -0
- package/types/src/charts/Dumbbell/arrowGrays.d.ts +33 -0
- package/types/src/charts/Dumbbell/categoryChange.d.ts +66 -0
- package/types/src/charts/Dumbbell/changeEmit.d.ts +71 -0
- package/types/src/charts/Dumbbell/changes.d.ts +64 -0
- package/types/src/charts/Dumbbell/connectors.d.ts +43 -0
- package/types/src/charts/Dumbbell/emit.d.ts +17 -19
- package/types/src/charts/Dumbbell/index.d.ts +6 -2
- package/types/src/charts/Gantt/applyLayout.d.ts +14 -1
- package/types/src/charts/Gantt/criticalPath.d.ts +100 -0
- package/types/src/charts/Gantt/emit.d.ts +17 -1
- package/types/src/charts/Gantt/ganttCalendar.d.ts +37 -0
- package/types/src/charts/Gantt/ganttCritical.d.ts +53 -0
- package/types/src/charts/Gantt/ganttDecor.d.ts +32 -2
- package/types/src/charts/Gantt/ganttRows.d.ts +2 -0
- package/types/src/charts/Gantt/ganttSlack.d.ts +21 -0
- package/types/src/charts/Gantt/ganttTooltip.d.ts +35 -15
- package/types/src/charts/Gantt/index.d.ts +12 -6
- package/types/src/charts/Geomap/applyLayout.d.ts +19 -0
- package/types/src/charts/Geomap/cartogram.d.ts +58 -0
- package/types/src/charts/Geomap/cartogramContiguous.d.ts +59 -0
- package/types/src/charts/Geomap/cartogramFields.d.ts +16 -0
- package/types/src/charts/Geomap/cartogramLabels.d.ts +48 -0
- package/types/src/charts/Geomap/cartogramLayout.d.ts +71 -0
- package/types/src/charts/Geomap/cartogramLegend.d.ts +36 -0
- package/types/src/charts/Geomap/cartogramRelax.d.ts +29 -0
- package/types/src/charts/Geomap/densityEmit.d.ts +29 -0
- package/types/src/charts/Geomap/densityFields.d.ts +27 -0
- package/types/src/charts/Geomap/densityLayout.d.ts +49 -0
- package/types/src/charts/Geomap/densityTooltip.d.ts +48 -0
- package/types/src/charts/Geomap/dotDensity.d.ts +80 -0
- package/types/src/charts/Geomap/dotDensityLayout.d.ts +97 -0
- package/types/src/charts/Geomap/dotRenderer.d.ts +27 -0
- package/types/src/charts/Geomap/drillDown.d.ts +128 -0
- package/types/src/charts/Geomap/drillEmit.d.ts +37 -0
- package/types/src/charts/Geomap/drillEvents.d.ts +33 -0
- package/types/src/charts/Geomap/emit.d.ts +7 -0
- package/types/src/charts/Geomap/flowEmit.d.ts +6 -4
- package/types/src/charts/Geomap/flowLinks.d.ts +12 -1
- package/types/src/charts/Geomap/geoHexbin.d.ts +91 -0
- package/types/src/charts/Geomap/geoHexbinZoom.d.ts +76 -0
- package/types/src/charts/Geomap/index.d.ts +7 -0
- package/types/src/charts/Geomap/pointCluster.d.ts +108 -0
- package/types/src/charts/Geomap/pointClusterEmit.d.ts +106 -0
- package/types/src/charts/Geomap/pointClusterLayout.d.ts +123 -0
- package/types/src/charts/Geomap/pointClusterLinks.d.ts +21 -0
- package/types/src/charts/Geomap/pointClusterZoom.d.ts +89 -0
- package/types/src/charts/Geomap/pointLabels.d.ts +21 -3
- package/types/src/charts/Geomap/pointRows.d.ts +24 -0
- package/types/src/charts/Geomap/tileGrid.d.ts +98 -0
- package/types/src/charts/Geomap/tileState.d.ts +18 -0
- package/types/src/charts/Geomap/topojsonFluent.d.ts +9 -0
- package/types/src/charts/Geomap/topojsonLevels.d.ts +14 -0
- package/types/src/charts/Hexbin/contourLabels.d.ts +6 -5
- package/types/src/charts/Hexbin/settings.d.ts +7 -1
- package/types/src/charts/Histogram/binData.d.ts +6 -0
- package/types/src/charts/HorizonChart/emit.d.ts +20 -0
- package/types/src/charts/HorizonChart/horizonBands.d.ts +42 -0
- package/types/src/charts/HorizonChart/horizonColors.d.ts +25 -0
- package/types/src/charts/HorizonChart/hover.d.ts +52 -0
- package/types/src/charts/HorizonChart/index.d.ts +32 -0
- package/types/src/charts/HorizonChart/measure.d.ts +24 -0
- package/types/src/charts/HorizonChart/rowFilter.d.ts +88 -0
- package/types/src/charts/HorizonChart/state.d.ts +71 -0
- package/types/src/charts/KPI/applyLayout.d.ts +64 -0
- package/types/src/charts/KPI/delta.d.ts +62 -0
- package/types/src/charts/KPI/emit.d.ts +55 -0
- package/types/src/charts/KPI/index.d.ts +34 -0
- package/types/src/charts/KPI/series.d.ts +45 -0
- package/types/src/charts/KPI/tileLayout.d.ts +90 -0
- package/types/src/charts/Matrix/applyLayout.d.ts +5 -2
- package/types/src/charts/Matrix/bubbles.d.ts +87 -0
- package/types/src/charts/Matrix/emit.d.ts +3 -2
- package/types/src/charts/Matrix/index.d.ts +2 -1
- package/types/src/charts/Network/applyLayout.d.ts +35 -0
- package/types/src/charts/Network/bundle.d.ts +24 -15
- package/types/src/charts/Network/circleLayout.d.ts +149 -0
- package/types/src/charts/Network/containNodes.d.ts +35 -0
- package/types/src/charts/Network/emit.d.ts +20 -0
- package/types/src/charts/Network/forceLayout.d.ts +49 -0
- package/types/src/charts/Network/graph.d.ts +29 -5
- package/types/src/charts/Network/liveForce.d.ts +133 -0
- package/types/src/charts/Network/livePositions.d.ts +90 -0
- package/types/src/charts/Network/networkDrag.d.ts +55 -0
- package/types/src/charts/Pack/applyLayout.d.ts +2 -0
- package/types/src/charts/Pack/groupRows.d.ts +46 -0
- package/types/src/charts/Pack/index.d.ts +3 -0
- package/types/src/charts/Pack/neutralPaint.d.ts +14 -0
- package/types/src/charts/Pack/nodeNames.d.ts +23 -0
- package/types/src/charts/ParallelCoordinates/chrome.d.ts +12 -0
- package/types/src/charts/ParallelCoordinates/index.d.ts +1 -0
- package/types/src/charts/ParallelCoordinates/titles.d.ts +7 -2
- package/types/src/charts/Pareto/color.d.ts +21 -0
- package/types/src/charts/Pareto/hover.d.ts +38 -0
- package/types/src/charts/Pareto/index.d.ts +22 -0
- package/types/src/charts/Pareto/labels.d.ts +40 -0
- package/types/src/charts/Pareto/order.d.ts +30 -0
- package/types/src/charts/Pareto/paretoSteps.d.ts +65 -0
- package/types/src/charts/Pareto/state.d.ts +93 -0
- package/types/src/charts/Parliament/index.d.ts +18 -0
- package/types/src/charts/Plot/areaEnter.d.ts +34 -0
- package/types/src/charts/Plot/areaLabelsAlong.d.ts +7 -0
- package/types/src/charts/Plot/aspectRatio.d.ts +68 -0
- package/types/src/charts/Plot/axisHover.d.ts +2 -0
- package/types/src/charts/Plot/axisHoverScene.d.ts +44 -1
- package/types/src/charts/Plot/barConfidence.d.ts +14 -1
- package/types/src/charts/Plot/barHitArea.d.ts +34 -7
- package/types/src/charts/Plot/barLabelConfidence.d.ts +25 -0
- package/types/src/charts/Plot/baselineBreak.d.ts +2 -1
- package/types/src/charts/Plot/baselineDomain.d.ts +5 -0
- package/types/src/charts/Plot/circleLabels.d.ts +8 -7
- package/types/src/charts/Plot/confidenceAxes.d.ts +63 -0
- package/types/src/charts/Plot/confidenceTooltip.d.ts +22 -0
- package/types/src/charts/Plot/discreteDomain.d.ts +13 -2
- package/types/src/charts/Plot/discreteSpan.d.ts +5 -0
- package/types/src/charts/Plot/domainClip.d.ts +15 -5
- package/types/src/charts/Plot/downsample.d.ts +16 -0
- package/types/src/charts/Plot/index.d.ts +20 -17
- package/types/src/charts/Plot/inferDiscrete.d.ts +31 -0
- package/types/src/charts/Plot/jitter.d.ts +45 -0
- package/types/src/charts/Plot/lineLabelSides.d.ts +19 -0
- package/types/src/charts/Plot/lineLabelsAlong.d.ts +19 -6
- package/types/src/charts/Plot/lineMarkerKeys.d.ts +11 -0
- package/types/src/charts/Plot/marginalHover.d.ts +26 -0
- package/types/src/charts/Plot/marginalLayout.d.ts +95 -0
- package/types/src/charts/Plot/marginalPaint.d.ts +54 -0
- package/types/src/charts/Plot/marginalScene.d.ts +67 -0
- package/types/src/charts/Plot/marginalSeries.d.ts +38 -0
- package/types/src/charts/Plot/marginalStats.d.ts +115 -0
- package/types/src/charts/Plot/openDomainEnds.d.ts +25 -0
- package/types/src/charts/Plot/orderPath.d.ts +100 -0
- package/types/src/charts/Plot/orderPathScene.d.ts +49 -0
- package/types/src/charts/Plot/outlierDetect.d.ts +87 -0
- package/types/src/charts/Plot/outlierLabels.d.ts +103 -0
- package/types/src/charts/Plot/outlierLines.d.ts +30 -0
- package/types/src/charts/Plot/outlierScene.d.ts +103 -0
- package/types/src/charts/Plot/outlierTooltip.d.ts +44 -0
- package/types/src/charts/Plot/periodLabels.d.ts +14 -0
- package/types/src/charts/Plot/pipeline.d.ts +2 -1
- package/types/src/charts/Plot/plotBreaks.d.ts +21 -6
- package/types/src/charts/Plot/plotInit.d.ts +7 -25
- package/types/src/charts/Plot/plotLevels.d.ts +120 -0
- package/types/src/charts/Plot/plotRangeBreaks.d.ts +28 -2
- package/types/src/charts/Plot/plotShapes.d.ts +42 -0
- package/types/src/charts/Plot/pointConfidence.d.ts +73 -0
- package/types/src/charts/Plot/pointKey.d.ts +9 -0
- package/types/src/charts/Plot/referenceDomains.d.ts +2 -1
- package/types/src/charts/Plot/shapeAccessors.d.ts +24 -0
- package/types/src/charts/Plot/shapeLabelLegend.d.ts +19 -0
- package/types/src/charts/Plot/sharedHover.d.ts +5 -0
- package/types/src/charts/Plot/sharedTooltip.d.ts +31 -7
- package/types/src/charts/Plot/stackEnter.d.ts +1 -1
- package/types/src/charts/Plot/stackLegendOrder.d.ts +4 -1
- package/types/src/charts/Plot/stackNeutral.d.ts +85 -0
- package/types/src/charts/Plot/swarm.d.ts +8 -4
- package/types/src/charts/Plot/timeNestKeys.d.ts +20 -0
- package/types/src/charts/Plot/trendLabels.d.ts +15 -6
- package/types/src/charts/Plot/trendLines.d.ts +40 -8
- package/types/src/charts/Plot/trendMovingAverage.d.ts +78 -0
- package/types/src/charts/Plot/trendProjection.d.ts +4 -2
- package/types/src/charts/Plot/trendTooltip.d.ts +24 -2
- package/types/src/charts/Priestley/timeAxis.d.ts +13 -7
- package/types/src/charts/Pyramid/gutter.d.ts +28 -6
- package/types/src/charts/Pyramid/scene.d.ts +1 -1
- package/types/src/charts/Radar/applyLayout.d.ts +2 -3
- package/types/src/charts/Radar/axisDecorations.d.ts +5 -2
- package/types/src/charts/Radar/curvedLabels.d.ts +35 -0
- package/types/src/charts/Radar/emit.d.ts +5 -2
- package/types/src/charts/Radar/index.d.ts +7 -2
- package/types/src/charts/Radar/points.d.ts +50 -0
- package/types/src/charts/RadialArea/index.d.ts +17 -0
- package/types/src/charts/RadialLine/angles.d.ts +67 -0
- package/types/src/charts/RadialLine/applyLayout.d.ts +70 -0
- package/types/src/charts/RadialLine/emit.d.ts +13 -0
- package/types/src/charts/RadialLine/index.d.ts +28 -0
- package/types/src/charts/RadialLine/paths.d.ts +37 -0
- package/types/src/charts/RadialLine/points.d.ts +43 -0
- package/types/src/charts/RadialLine/series.d.ts +63 -0
- package/types/src/charts/RadialLine/seriesLabelNodes.d.ts +26 -0
- package/types/src/charts/RadialLine/seriesLabels.d.ts +80 -0
- package/types/src/charts/RadialLine/spokes.d.ts +15 -0
- package/types/src/charts/RadialMatrix/applyLayout.d.ts +6 -4
- package/types/src/charts/RadialTree/index.d.ts +16 -0
- package/types/src/charts/Rings/emit.d.ts +28 -5
- package/types/src/charts/Rings/index.d.ts +4 -2
- package/types/src/charts/Rings/ringsCurves.d.ts +46 -0
- package/types/src/charts/Rings/ringsGraph.d.ts +32 -5
- package/types/src/charts/Rings/ringsParallel.d.ts +4 -2
- package/types/src/charts/Rings/ringsPlacement.d.ts +47 -0
- package/types/src/charts/Rings/ringsSizing.d.ts +41 -11
- package/types/src/charts/Sankey/circularLayout.d.ts +3 -0
- package/types/src/charts/Sankey/sankeyDrag.d.ts +112 -0
- package/types/src/charts/Sankey/sankeyLayout.d.ts +8 -0
- package/types/src/charts/Scatter/index.d.ts +3 -2
- package/types/src/charts/ScatterMatrix/binEmit.d.ts +22 -0
- package/types/src/charts/ScatterMatrix/index.d.ts +80 -0
- package/types/src/charts/ScatterMatrix/matrixData.d.ts +93 -0
- package/types/src/charts/ScatterMatrix/matrixFacet.d.ts +32 -0
- package/types/src/charts/ScatterMatrix/matrixHover.d.ts +21 -0
- package/types/src/charts/ScatterMatrix/matrixTooltip.d.ts +32 -0
- package/types/src/charts/StripPlot/index.d.ts +16 -0
- package/types/src/charts/TileGridMap/index.d.ts +14 -0
- package/types/src/charts/Tree/applyLayout.d.ts +20 -0
- package/types/src/charts/Tree/index.d.ts +2 -2
- package/types/src/charts/Tree/keys.d.ts +25 -0
- package/types/src/charts/Tree/nodeHeight.d.ts +41 -0
- package/types/src/charts/Tree/nodeLabel.d.ts +11 -0
- package/types/src/charts/Tree/radialLabels.d.ts +24 -0
- package/types/src/charts/Tree/radialLayout.d.ts +129 -0
- package/types/src/charts/Venn/applyLayout.d.ts +91 -0
- package/types/src/charts/Venn/circles.d.ts +87 -0
- package/types/src/charts/Venn/ellipseFrame.d.ts +37 -0
- package/types/src/charts/Venn/emit.d.ts +36 -0
- package/types/src/charts/Venn/index.d.ts +30 -0
- package/types/src/charts/Venn/nelderMead.d.ts +28 -0
- package/types/src/charts/Venn/tooltip.d.ts +8 -0
- package/types/src/charts/Venn/vennData.d.ts +56 -0
- package/types/src/charts/Venn/vennEllipses.d.ts +93 -0
- package/types/src/charts/Venn/vennFit.d.ts +39 -0
- package/types/src/charts/Venn/vennLayout.d.ts +52 -0
- package/types/src/charts/Venn/vennRegions.d.ts +58 -0
- package/types/src/charts/Waffle/applyLayout.d.ts +4 -1
- package/types/src/charts/Waffle/arcEmit.d.ts +45 -0
- package/types/src/charts/Waffle/arcLayout.d.ts +82 -0
- package/types/src/charts/Waffle/arcStage.d.ts +60 -0
- package/types/src/charts/Waffle/emit.d.ts +2 -1
- package/types/src/charts/Waffle/index.d.ts +8 -2
- package/types/src/charts/Waffle/tooltip.d.ts +7 -2
- package/types/src/charts/Waterfall/connectors.d.ts +3 -2
- package/types/src/charts/WordCloud/applyLayout.d.ts +51 -0
- package/types/src/charts/WordCloud/cloudLayout.d.ts +95 -0
- package/types/src/charts/WordCloud/emit.d.ts +27 -0
- package/types/src/charts/WordCloud/fontScale.d.ts +20 -0
- package/types/src/charts/WordCloud/glyphMask.d.ts +95 -0
- package/types/src/charts/WordCloud/index.d.ts +31 -0
- package/types/src/charts/WordCloud/occupancy.d.ts +59 -0
- package/types/src/charts/WordCloud/rotation.d.ts +31 -0
- package/types/src/charts/WordCloud/size.d.ts +16 -0
- package/types/src/charts/WordCloud/spiral.d.ts +47 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +26 -0
- package/types/src/charts/definition/declaresField.d.ts +9 -0
- package/types/src/charts/definition/makeChart.d.ts +3 -3
- package/types/src/charts/drawSteps/gestureHover.d.ts +2 -2
- package/types/src/charts/drawSteps/leavesSurface.d.ts +11 -0
- package/types/src/charts/drawSteps/selectActions.d.ts +58 -0
- package/types/src/charts/drawSteps/selectGesture.d.ts +60 -0
- package/types/src/charts/drawSteps/selectRegion.d.ts +86 -0
- package/types/src/charts/drawSteps/selectState.d.ts +51 -0
- package/types/src/charts/drawSteps/zoomActions.d.ts +30 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +32 -7
- package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +104 -16
- package/types/src/charts/drawSteps/zoomControlsMenu.d.ts +30 -0
- package/types/src/charts/drawSteps/zoomDrag.d.ts +73 -0
- package/types/src/charts/drawSteps/zoomFit.d.ts +30 -0
- package/types/src/charts/facet/drawFacets.d.ts +6 -3
- package/types/src/charts/facet/facetConfig.d.ts +35 -1
- package/types/src/charts/facet/facetData.d.ts +8 -2
- package/types/src/charts/facet/facetGrid.d.ts +12 -0
- package/types/src/charts/facet/facetGutter.d.ts +19 -5
- package/types/src/charts/facet/facetLayout.d.ts +79 -0
- package/types/src/charts/facet/facetLayouts.d.ts +21 -0
- package/types/src/charts/facet/facetScene.d.ts +4 -1
- package/types/src/charts/features/annotationFrame.d.ts +2 -0
- package/types/src/charts/features/axesFinal.d.ts +5 -2
- package/types/src/charts/features/axisTooltip.d.ts +49 -0
- package/types/src/charts/features/bareRegion.d.ts +18 -0
- package/types/src/charts/features/boxGrid.d.ts +28 -0
- package/types/src/charts/features/centerLabel.d.ts +89 -0
- package/types/src/charts/features/circleLabelPlacement.d.ts +81 -11
- package/types/src/charts/features/circleLabels.d.ts +33 -3
- package/types/src/charts/features/colorScaleBivariate.d.ts +50 -0
- package/types/src/charts/features/colorScaleBucket.d.ts +10 -0
- package/types/src/charts/features/colorScaleHover.d.ts +14 -3
- package/types/src/charts/features/colorScaleLimit.d.ts +60 -0
- package/types/src/charts/features/colorScaleTooltip.d.ts +38 -0
- package/types/src/charts/features/colorScaleTop.d.ts +30 -0
- package/types/src/charts/features/colorScaleValue.d.ts +6 -0
- package/types/src/charts/features/curvedArrows.d.ts +42 -12
- package/types/src/charts/features/depthKey.d.ts +19 -0
- package/types/src/charts/features/edgeArrows.d.ts +68 -31
- package/types/src/charts/features/emitHelpers.d.ts +6 -1
- package/types/src/charts/features/featuresColorScale.d.ts +6 -0
- package/types/src/charts/features/hoverTicks.d.ts +33 -0
- package/types/src/charts/features/idleQueue.d.ts +46 -0
- package/types/src/charts/features/keyHold.d.ts +41 -0
- package/types/src/charts/features/keyTooltip.d.ts +44 -0
- package/types/src/charts/features/labelLayering.d.ts +38 -0
- package/types/src/charts/features/labelSlots.d.ts +53 -0
- package/types/src/charts/features/linkInteraction.d.ts +13 -4
- package/types/src/charts/features/linkLabelPath.d.ts +0 -7
- package/types/src/charts/features/networkMeasures.d.ts +53 -0
- package/types/src/charts/features/nodeDrag.d.ts +51 -0
- package/types/src/charts/features/nodeKeys.d.ts +53 -0
- package/types/src/charts/features/nodeOutline.d.ts +34 -0
- package/types/src/charts/features/nodeStats.d.ts +93 -0
- package/types/src/charts/features/pathLabelBends.d.ts +78 -0
- package/types/src/charts/features/plotAnnotations.d.ts +2 -1
- package/types/src/charts/features/plotEndLabels.d.ts +14 -1
- package/types/src/charts/features/plotPaint.d.ts +5 -0
- package/types/src/charts/features/rectNodeSize.d.ts +42 -0
- package/types/src/charts/features/ringLabels.d.ts +3 -1
- package/types/src/charts/features/selfLoops.d.ts +10 -9
- package/types/src/charts/features/shapeEmit.d.ts +2 -0
- package/types/src/charts/features/sharedFields.d.ts +8 -4
- package/types/src/charts/features/spokeLabels.d.ts +123 -0
- package/types/src/charts/features/swatchPaint.d.ts +58 -0
- package/types/src/charts/features/textHalo.d.ts +4 -3
- package/types/src/charts/features/thresholdMembers.d.ts +6 -6
- package/types/src/charts/features/tooltipRows.d.ts +50 -0
- package/types/src/charts/features/tooltipSwatch.d.ts +25 -11
- package/types/src/charts/helpers/valueTitle.d.ts +7 -0
- package/types/src/charts/index.d.ts +17 -0
- package/types/src/charts/partition/chartFields.d.ts +6 -1
- package/types/src/charts/pipeline/insetPlacement.d.ts +6 -0
- package/types/src/charts/pipeline/preDrawData.d.ts +26 -0
- package/types/src/charts/plotBuffers/Circle.d.ts +2 -1
- package/types/src/charts/plotBuffers/Rect.d.ts +2 -1
- package/types/src/charts/plotBuffers/Tick.d.ts +9 -0
- package/types/src/charts/plotBuffers/defaultBuffers.d.ts +2 -0
- package/types/src/charts/polar/chrome.d.ts +19 -6
- package/types/src/charts/viz/Viz.d.ts +10 -3
- package/types/src/charts/viz/VizBase.d.ts +63 -3
- package/types/src/charts/viz/appendRows.d.ts +49 -0
- package/types/src/charts/viz/backgroundInk.d.ts +8 -0
- package/types/src/charts/viz/dataChanged.d.ts +11 -0
- package/types/src/charts/viz/discrete.d.ts +19 -0
- package/types/src/charts/viz/emphasis.d.ts +17 -0
- package/types/src/charts/viz/fillStroke.d.ts +7 -0
- package/types/src/charts/viz/focusTargets.d.ts +15 -1
- package/types/src/charts/viz/groupByLevels.d.ts +36 -0
- package/types/src/charts/viz/groupRow.d.ts +6 -0
- package/types/src/charts/viz/hoverBand.d.ts +28 -0
- package/types/src/charts/viz/interactionOpacity.d.ts +23 -2
- package/types/src/charts/viz/keyboardNav.d.ts +13 -0
- package/types/src/charts/viz/liftRaised.d.ts +23 -0
- package/types/src/charts/viz/reportDrawError.d.ts +12 -0
- package/types/src/charts/viz/setCursor.d.ts +38 -0
- package/types/src/charts/viz/simpleHover.d.ts +3 -3
- package/types/src/charts/viz/tooltipEnabled.d.ts +31 -0
- package/types/src/charts/viz/userClick.d.ts +43 -0
- package/types/src/charts/viz/vizFields.d.ts +12 -0
- package/types/src/charts/viz/vizTypes.d.ts +132 -2
- package/types/src/charts/viz/vizVisibility.d.ts +7 -0
- package/types/src/components/Axis/Axis.d.ts +68 -3
- package/types/src/components/Axis/axisBreak.d.ts +19 -3
- package/types/src/components/Axis/axisDefaults.d.ts +14 -0
- package/types/src/components/Axis/axisLabelKinds.d.ts +22 -0
- package/types/src/components/Axis/axisLabelLineHeight.d.ts +27 -0
- package/types/src/components/Axis/axisLabelRoom.d.ts +17 -0
- package/types/src/components/Axis/axisLabelSize.d.ts +82 -0
- package/types/src/components/Axis/axisLabelThinning.d.ts +57 -3
- package/types/src/components/Axis/axisLayout.d.ts +9 -2
- package/types/src/components/Axis/axisLayoutLabels.d.ts +28 -33
- package/types/src/components/Axis/axisLayoutScale.d.ts +16 -2
- package/types/src/components/Axis/axisLevels.d.ts +137 -0
- package/types/src/components/Axis/axisLimit.d.ts +18 -0
- package/types/src/components/Axis/axisMaxSize.d.ts +48 -0
- package/types/src/components/Axis/axisMinorTicks.d.ts +83 -0
- package/types/src/components/Axis/axisPeriods.d.ts +45 -0
- package/types/src/components/Axis/axisRangeBreaks.d.ts +6 -2
- package/types/src/components/Axis/axisRounding.d.ts +22 -0
- package/types/src/components/Axis/axisScaleType.d.ts +32 -0
- package/types/src/components/Axis/axisScene.d.ts +15 -7
- package/types/src/components/Axis/axisTickLookups.d.ts +26 -0
- package/types/src/components/Axis/axisTitle.d.ts +30 -0
- package/types/src/components/Axis/axisTooltipTargets.d.ts +94 -0
- package/types/src/components/Axis/labelSizeSession.d.ts +16 -0
- package/types/src/components/Axis/rangeBreaks.d.ts +6 -2
- package/types/src/components/Axis/timeValues.d.ts +48 -2
- package/types/src/components/ColorScale/ColorScale.d.ts +21 -11
- package/types/src/components/ColorScale/bivariateRender.d.ts +53 -0
- package/types/src/components/ColorScale/bivariateScale.d.ts +92 -0
- package/types/src/components/ColorScale/colorScaleScale.d.ts +45 -0
- package/types/src/components/ColorScale/colorScaleSwatchTooltips.d.ts +48 -0
- package/types/src/components/Legend/Legend.d.ts +5 -0
- package/types/src/components/Legend/legendCut.d.ts +31 -0
- package/types/src/components/Legend/legendRender.d.ts +6 -1
- package/types/src/components/TextBox.d.ts +4 -0
- package/types/src/components/Tooltip.d.ts +11 -2
- package/types/src/components/textEllipsis.d.ts +6 -0
- package/types/src/components/tooltipDom.d.ts +24 -0
- package/types/src/fluent.d.ts +48 -1
- package/types/src/shapes/Bar.d.ts +7 -0
- package/types/src/shapes/Box.d.ts +15 -0
- package/types/src/shapes/Shape.d.ts +11 -0
- package/types/src/shapes/Tick.d.ts +20 -0
- package/types/src/shapes/boxExtraShapes.d.ts +40 -0
- package/types/src/shapes/boxExtras.d.ts +85 -0
- package/types/src/shapes/boxStyle.d.ts +25 -4
- package/types/src/shapes/downsample.d.ts +68 -0
- package/types/src/shapes/emitLabels.d.ts +1 -1
- package/types/src/shapes/hitAreaNode.d.ts +2 -1
- package/types/src/shapes/index.d.ts +1 -0
- package/types/src/shapes/pathSeries.d.ts +35 -0
- package/types/src/shapes/shapeConfig.d.ts +70 -2
- package/types/src/utils/BaseClass.d.ts +18 -4
- package/types/src/utils/D3plusConfig.d.ts +1458 -676
- package/types/src/utils/configValue.d.ts +8 -0
- package/types/src/utils/index.d.ts +1 -1
- package/types/src/utils/jitter.d.ts +23 -0
- package/types/src/utils/resetSetters.d.ts +23 -0
- package/types/umd-entry.d.ts +4 -0
- package/umd/d3plus-core.full.js +109828 -74615
- package/umd/d3plus-core.full.min.js +2 -2
- package/umd/d3plus-core.js +90460 -56685
- package/umd/d3plus-core.min.js +2 -2
|
@@ -21,107 +21,88 @@ import type { ReferenceBandConfig, ReferenceLineConfig } from "../charts/feature
|
|
|
21
21
|
import type { RangeBreakRule } from "../components/Axis/rangeBreaks.js";
|
|
22
22
|
import type { BinValueOption, ContourConfig, ContoursOption, PointConfig } from "../charts/Hexbin/settings.js";
|
|
23
23
|
type Position = "top" | "right" | "bottom" | "left";
|
|
24
|
+
/** One variable of a bivariate `colorScale`: a data key, or an accessor returning a number. */
|
|
25
|
+
export type ColorScaleField = string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]);
|
|
24
26
|
/** A legend or colorScale side, or `"auto"` to let the chart choose (inside the chart when it fits, else right on wide charts and bottom otherwise). */
|
|
25
27
|
type PanelPosition = Position | "auto";
|
|
26
28
|
type DataPointAccessor<T> = string | ((d: DataPoint) => T);
|
|
27
29
|
/** A config value that is either a constant or a `(datum, index)` accessor. */
|
|
28
30
|
type Accessor<T> = T | ((d: DataPoint, i?: number) => T);
|
|
29
|
-
|
|
31
|
+
/** A scale an axis draws (see `axisScales`), or `"auto"` (see `AxisConfig.scale`). */
|
|
32
|
+
type AxisScale = "auto" | "band" | "linear" | "log" | "ordinal" | "point" | "pow" | "sqrt" | "time" | "utc";
|
|
30
33
|
export interface AxisConfig {
|
|
31
34
|
barConfig?: Record<string, string | number>;
|
|
32
35
|
/**
|
|
33
|
-
The axis's domain: `[min, max]` on a continuous axis, or the
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
default. In `xConfig`/`yConfig`, one with a single end set (`[min]`
|
|
40
|
-
or `[undefined, max]`) on a continuous axis works exactly like
|
|
41
|
-
`yDomain([min])` instead: it pins that end, and the data fills the
|
|
42
|
-
other, rounded as `rounding` says.
|
|
36
|
+
The axis's domain: `[min, max]` on a continuous axis, or the categories
|
|
37
|
+
to show on a discrete one. In a Plot it overrides `xDomain`/`yDomain`
|
|
38
|
+
and isn't rounded unless `rounding` says so; a single end (`[min]` or
|
|
39
|
+
`[undefined, max]`) pins that end like `yDomain([min])`. On a Plot's
|
|
40
|
+
multi-level axis (an Array `x` or `y`), each category can be the list
|
|
41
|
+
of its level values, outermost first: `[[2023, "Q1"], [2023, "Q2"]]`.
|
|
43
42
|
*/
|
|
44
|
-
domain?: (number | string | Date | undefined)[];
|
|
43
|
+
domain?: (number | string | Date | undefined | (number | string | Date)[])[];
|
|
45
44
|
/**
|
|
46
|
-
The
|
|
47
|
-
|
|
48
|
-
a value, set the chart's `baseline` instead, which sets the axis's
|
|
49
|
-
minimum exactly like `yDomain([n])`, break back to this tick included.
|
|
45
|
+
The tick the axis's `baselineBreak` returns to. Defaults to `0`. To start
|
|
46
|
+
a Plot's value axis at a value, set the chart's `baseline` instead.
|
|
50
47
|
*/
|
|
51
48
|
baseline?: number;
|
|
52
49
|
/**
|
|
53
|
-
When
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
value domain (`yDomain`/`yConfig.domain`, or the x versions for
|
|
60
|
-
horizontal charts), and bars and areas start at the baseline tick,
|
|
61
|
-
with the break's gap cut across them (`baselineBreakConfig`'s
|
|
62
|
-
`mask`); turned off, a `yDomain` stretches to reach the baseline while a
|
|
63
|
-
`yConfig.domain` is kept and cuts its bars off at the axis. Defaults
|
|
64
|
-
to `true` for the Plots whose marks grow from `0`, such as BarChart,
|
|
65
|
-
AreaPlot, Histogram, and Lollipop (each chart lists its own default),
|
|
66
|
-
and `false` for other Plots and a standalone Axis.
|
|
50
|
+
When a linear value axis's domain stops short of the `baseline` (e.g.
|
|
51
|
+
`[1100, 2100]` with a baseline of `0`), keeps the baseline tick and
|
|
52
|
+
breaks the axis between it and the domain, styled by
|
|
53
|
+
`baselineBreakConfig`. Turned off, a Plot's `yDomain` stretches to the
|
|
54
|
+
baseline instead. Defaults to `true` for Plots whose marks grow from `0`
|
|
55
|
+
(BarChart, AreaPlot, Histogram, Lollipop), else `false`.
|
|
67
56
|
*/
|
|
68
57
|
baselineBreak?: boolean;
|
|
69
58
|
/**
|
|
70
|
-
Style of the baseline break: `space` (pixels
|
|
71
|
-
tick and the
|
|
72
|
-
|
|
73
|
-
`
|
|
74
|
-
|
|
75
|
-
(
|
|
76
|
-
`
|
|
77
|
-
foot of each mark, perpendicular to the axis, default `true`; they take
|
|
78
|
-
the axis line's `barConfig` style), `lineConfig` (those lines'
|
|
79
|
-
`stroke`, `stroke-width`, and other line styles, layered over the axis
|
|
80
|
-
line style), `mask` (whether a Plot cuts the gap between the two
|
|
81
|
-
lines straight across the shapes, default `true`), plus `stroke`,
|
|
82
|
-
`stroke-width`, and the other line styles `barConfig` takes, for the
|
|
83
|
-
marks.
|
|
59
|
+
Style of the baseline break: `space` (axis pixels between the baseline
|
|
60
|
+
tick and the domain, default `36`), `gap` (pixels between the two marks,
|
|
61
|
+
default `5`), `size` (mark length, default `10`), `angle` (mark tilt in
|
|
62
|
+
degrees, default `30`), `lines` (whether a Plot draws lines across the
|
|
63
|
+
plot at the break, default `true`), `lineConfig` (their style), `mask`
|
|
64
|
+
(whether a Plot cuts the gap across its shapes, default `true`), and
|
|
65
|
+
`stroke`, `stroke-width`, and other line styles for the marks.
|
|
84
66
|
*/
|
|
85
67
|
baselineBreakConfig?: Record<string, string | number | boolean | Record<string, string | number>>;
|
|
86
68
|
/**
|
|
87
|
-
Value ranges to remove from a linear axis: one `[start, end]` pair
|
|
88
|
-
list of them
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
on either side keep one shared scale. Reversed pairs are flipped,
|
|
92
|
-
overlapping ones merged, and ranges that don't lie strictly inside the
|
|
93
|
-
domain (or that don't leave room for the data) are ignored. Only
|
|
94
|
-
positions change — tooltips and labels still show the real values.
|
|
69
|
+
Value ranges to remove from a linear axis: one `[start, end]` pair or a
|
|
70
|
+
list of them. Each collapses to a short marked gap (styled by
|
|
71
|
+
`breakConfig`); values either side share one scale, and tooltips still
|
|
72
|
+
show real values. Ranges outside the domain are ignored.
|
|
95
73
|
*/
|
|
96
74
|
break?: false | [number, number] | [number, number][];
|
|
97
75
|
/**
|
|
98
76
|
Style of the ranges set with `break`: the same `space`, `gap`, `size`,
|
|
99
77
|
`angle`, `lines`, `lineConfig`, `mask`, and mark line styles, with the
|
|
100
|
-
same defaults, as `baselineBreakConfig
|
|
78
|
+
same defaults, as `baselineBreakConfig`, plus `spaceMin`: the least
|
|
79
|
+
`space` a break shrinks to on an axis too short for it (by default it
|
|
80
|
+
is dropped instead).
|
|
101
81
|
*/
|
|
102
82
|
breakConfig?: Record<string, string | number | boolean | Record<string, string | number>>;
|
|
103
83
|
/**
|
|
104
|
-
Stretches of time to hide from a time axis,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`{
|
|
108
|
-
`{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
as holidays; and `{bounds: [start, end]}` hides one range, from `start`
|
|
112
|
-
up to `end`. Rules read the calendar in local time, as the axis's date
|
|
113
|
-
labels do. In a Plot, rules on an axis whose values are dates make it
|
|
114
|
-
a time axis even without `time`, and a chart's timeline takes the
|
|
115
|
-
rules of the axis that plots its `time` (see `timelineConfig`). Shown time keeps one shared scale, ticks and labels never
|
|
116
|
-
land in hidden time, lines and areas connect across it, and rows whose
|
|
117
|
-
time is hidden are not drawn. A rule's `marker` draws the `break`
|
|
118
|
-
marker where its time was removed, in a gap of `breakConfig.space`
|
|
119
|
-
pixels: on by default for `bounds`, off for the others, which recur
|
|
120
|
-
too often to mark.
|
|
84
|
+
Stretches of time to hide from a time axis (weekends, nights, holidays),
|
|
85
|
+
so the data closes up around them: one rule or a list of them.
|
|
86
|
+
`"weekends"`; `{days: [5, 6]}` (0 is Sunday); `{hours: [17, 9]}`, daily,
|
|
87
|
+
wrapping past midnight (`9.5` is 9:30); `{values: [date, …]}`, whole
|
|
88
|
+
days; or `{bounds: [start, end]}`, one range. Rules use local time
|
|
89
|
+
(UTC with `utc`). A rule's `marker` draws the `break` marker at the gap
|
|
90
|
+
(on by default for `bounds` only).
|
|
121
91
|
@example
|
|
122
|
-
|
|
92
|
+
{rangeBreaks: ["weekends", {hours: [16, 9.5]}, {values: ["2024-07-04"]}]}
|
|
123
93
|
*/
|
|
124
94
|
rangeBreaks?: false | RangeBreakRule | RangeBreakRule[];
|
|
95
|
+
/**
|
|
96
|
+
Whether a time axis reads its calendar in UTC instead of the viewer's
|
|
97
|
+
time zone: its ticks fall on UTC days, months, and years, its labels,
|
|
98
|
+
tooltips, and hover badges write UTC dates, its `rangeBreaks` use UTC,
|
|
99
|
+
and values that name no time zone (years, `"2024-03-01"`) parse as UTC.
|
|
100
|
+
Defaults to `false` (local time). Use it for dates stored at UTC
|
|
101
|
+
midnight, which a viewer west of UTC otherwise sees on the previous day.
|
|
102
|
+
@example
|
|
103
|
+
{xConfig: {utc: true}}
|
|
104
|
+
*/
|
|
105
|
+
utc?: boolean;
|
|
125
106
|
/** Grid values of the axis. */
|
|
126
107
|
grid?: unknown[];
|
|
127
108
|
gridConfig?: Record<string, string | number>;
|
|
@@ -137,15 +118,51 @@ export interface AxisConfig {
|
|
|
137
118
|
labels?: unknown[];
|
|
138
119
|
labelOffset?: false | number;
|
|
139
120
|
/**
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
121
|
+
Nests a category axis's categories in outer groups: given a category,
|
|
122
|
+
returns its labels, outermost first (`d => d.split("|")` for
|
|
123
|
+
`"2020|Q1"`). Each tick is labeled with its innermost label (which a
|
|
124
|
+
`tickFormat` receives in place of the category), and each run of
|
|
125
|
+
neighboring categories sharing an outer label is labeled once,
|
|
126
|
+
centered across the run, in a row of its own past the tick labels
|
|
127
|
+
(a column, on a vertical axis), with a divider between neighboring
|
|
128
|
+
runs. An outer label drawn cut short shows its whole text on hover
|
|
129
|
+
(unless `tickTooltip` is `false`), and `levelFormat` writes them. A
|
|
130
|
+
horizontal axis's outer labels wrap to two lines at most, and
|
|
131
|
+
a vertical axis's columns are as wide as their labels, up to a fifth
|
|
132
|
+
of the axis's width. A Plot sets this for an Array `x` or `y`. Only a
|
|
133
|
+
`"band"`, `"point"`, or `"ordinal"` axis reads it.
|
|
134
|
+
@example
|
|
135
|
+
{scale: "point", domain: ["2020|Q1", "2020|Q2", "2021|Q1"], levels: d => d.split("|")}
|
|
136
|
+
*/
|
|
137
|
+
levels?: ((d: unknown) => unknown[]) | false;
|
|
138
|
+
/**
|
|
139
|
+
TextBox config for the outer level labels (see `levels`): `fontSize`,
|
|
140
|
+
`fontWeight`, `fontColor`, and the like. They start from the tick
|
|
141
|
+
labels' font.
|
|
142
|
+
*/
|
|
143
|
+
levelConfig?: TextBoxConfig;
|
|
144
|
+
/**
|
|
145
|
+
Style of the dividers between outer level groups (see `levels`):
|
|
146
|
+
`stroke`, `stroke-width`, and other line styles, over the axis line's
|
|
147
|
+
`barConfig` style. `{stroke: "transparent"}` hides them.
|
|
148
|
+
*/
|
|
149
|
+
levelDividerConfig?: Record<string, string | number>;
|
|
150
|
+
/**
|
|
151
|
+
Writes the outer level labels (see `levels`): called with each label's
|
|
152
|
+
value and its level, counted from the outermost (0), and the axis as
|
|
153
|
+
`this`. By default a Date is written as the axis's tick labels write
|
|
154
|
+
dates (a year as "2023", a month as "Mar"), against the other Dates at
|
|
155
|
+
its level, and any other value as text. The innermost level is the tick
|
|
156
|
+
label, which `tickFormat` writes.
|
|
157
|
+
@example
|
|
158
|
+
{levelFormat: (value, level) => (level === 0 ? `FY${value}` : `${value}`)}
|
|
159
|
+
*/
|
|
160
|
+
levelFormat?: (value: unknown, level: number) => string;
|
|
161
|
+
/**
|
|
162
|
+
Whether to rotate the axis labels: `true` rotates them -90 degrees,
|
|
163
|
+
`false` keeps them flat, and a number rotates them that many degrees
|
|
164
|
+
clockwise (`-45` rises to the right). Unset (the default), a horizontal
|
|
165
|
+
axis of categories slants its labels when they don't fit flat.
|
|
149
166
|
*/
|
|
150
167
|
labelRotation?: boolean | number;
|
|
151
168
|
/**
|
|
@@ -154,8 +171,46 @@ export interface AxisConfig {
|
|
|
154
171
|
line; zooming pins a rescaled axis this way so it doesn't shift.
|
|
155
172
|
*/
|
|
156
173
|
fixedSize?: number;
|
|
157
|
-
/**
|
|
158
|
-
|
|
174
|
+
/**
|
|
175
|
+
Maximum size allowed for the space that contains the axis tick labels
|
|
176
|
+
and title: a number of pixels, or a function that is given the room the
|
|
177
|
+
axis has across its labels and returns that maximum. The room is a
|
|
178
|
+
horizontal axis's `height` or a vertical axis's `width`; in a chart, it
|
|
179
|
+
is the chart's height (for a horizontal axis) or width (for a vertical
|
|
180
|
+
one) inside its margins. A chart can call the function more than once
|
|
181
|
+
in a draw, so it should depend only on its argument.
|
|
182
|
+
@example
|
|
183
|
+
{maxSize: size => size / 3}
|
|
184
|
+
*/
|
|
185
|
+
maxSize?: number | ((size: number) => number);
|
|
186
|
+
/**
|
|
187
|
+
Whether to draw fainter grid lines at the minor ticks (see
|
|
188
|
+
`minorTicks`), styled by `minorGridConfig`. Defaults to `false`.
|
|
189
|
+
@example
|
|
190
|
+
{yConfig: {minorTicks: true, minorGrid: true}}
|
|
191
|
+
*/
|
|
192
|
+
minorGrid?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
Style of the `minorGrid` lines: `stroke`, `stroke-width`,
|
|
195
|
+
`stroke-opacity`, `stroke-dasharray`, and other line styles. Defaults
|
|
196
|
+
to the grid lines' color at half opacity.
|
|
197
|
+
*/
|
|
198
|
+
minorGridConfig?: Record<string, string | number>;
|
|
199
|
+
/**
|
|
200
|
+
Short, unlabeled tick marks between the axis's ticks, half as long as
|
|
201
|
+
a labeled tick. A log axis draws them by default, at 2 through 9 times
|
|
202
|
+
each power of ten; `false` turns them off. On a linear, pow, or time
|
|
203
|
+
axis, `true` draws them (4 evenly between each pair of ticks, or on a
|
|
204
|
+
time axis the calendar's months, days, hours, … between them) and a
|
|
205
|
+
number draws that many evenly between each pair. Minor ticks that
|
|
206
|
+
would sit closer than 4 pixels apart thin out a level at a time (to
|
|
207
|
+
2 and 5 times each power of ten on a log axis, or fewer per step), or
|
|
208
|
+
leave off entirely. Category axes draw none. Style them through
|
|
209
|
+
`shapeConfig`, where each tick's datum has `minor: true`.
|
|
210
|
+
@example
|
|
211
|
+
{xConfig: {minorTicks: 9}}
|
|
212
|
+
*/
|
|
213
|
+
minorTicks?: boolean | number;
|
|
159
214
|
/** Minimum size alloted for the space that contains the axis tick labels and title. */
|
|
160
215
|
minSize?: number;
|
|
161
216
|
/**
|
|
@@ -170,21 +225,23 @@ export interface AxisConfig {
|
|
|
170
225
|
*/
|
|
171
226
|
rotatedTickFormat?: (d: number | string) => string | number;
|
|
172
227
|
/**
|
|
173
|
-
How a linear or log axis rounds its domain to "nice" values:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
full `domain`, which is rounded only when asked for here. With a
|
|
179
|
-
user domain on a Plot (`xDomain`/`yDomain`, `baseline`, or a
|
|
180
|
-
one-sided `domain` here) only an end left open is rounded:
|
|
181
|
-
`yDomain([n])` keeps `n` exactly and rounds the far end where the
|
|
182
|
-
axis would with no domain set, and "none" leaves that end at the
|
|
183
|
-
data. A `yDomain` with both ends set isn't rounded unless `rounding`
|
|
184
|
-
is set here.
|
|
228
|
+
How a linear or log axis rounds its domain to "nice" values: "outside"
|
|
229
|
+
widens each end past the data, "inside" pulls each end in, and "none"
|
|
230
|
+
keeps it as given. Defaults to "none" on an Axis and "outside" in a
|
|
231
|
+
Plot. A Plot only rounds the ends a user domain leaves open, unless
|
|
232
|
+
`rounding` is set here.
|
|
185
233
|
*/
|
|
186
234
|
rounding?: "none" | "outside" | "inside";
|
|
187
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
The axis's scale: `"linear"`, `"log"` (which splits around 0 to draw
|
|
237
|
+
negative and positive values), `"pow"` (see `exponent`), `"sqrt"`,
|
|
238
|
+
`"time"`, `"utc"` (a time scale read in UTC, as `utc: true` does), or
|
|
239
|
+
the category scales `"band"`, `"point"`, and `"ordinal"`. `"auto"`
|
|
240
|
+
picks one for the axis's values (a standalone Axis's data, else its
|
|
241
|
+
domain): `"time"` for Dates, `"band"` for strings, and for numbers
|
|
242
|
+
`"log"` when their spread is over three times their mean, else
|
|
243
|
+
`"linear"`. Any other name logs a warning and draws linear.
|
|
244
|
+
*/
|
|
188
245
|
scale?: AxisScale;
|
|
189
246
|
/**
|
|
190
247
|
The exponent of a `"pow"` axis (`scale: "pow"`): below 1 it spreads the
|
|
@@ -211,6 +268,21 @@ export interface AxisConfig {
|
|
|
211
268
|
shapeConfig?: Record<string, unknown>;
|
|
212
269
|
/** Tick formatter, called with the axis as `this`. Defaults to the locale's abbreviated number format ("1.5k"), with years printed in full ("1990") when the axis's values are all whole numbers from 1000 through 2999. */
|
|
213
270
|
tickFormat?: (d: number | string) => string | number;
|
|
271
|
+
/**
|
|
272
|
+
Where each tick label is drawn: `"tick"` (the default) centers it on
|
|
273
|
+
its tick, and `"period"` centers a date label in the period it names
|
|
274
|
+
("Mar" between the ticks for March 1 and April 1), while the ticks and
|
|
275
|
+
grid lines stay on the boundaries. The period is the calendar unit
|
|
276
|
+
the axis's dates step by (a year, quarter, month, day, hour, minute,
|
|
277
|
+
or second, read in UTC with `utc`); on a linear axis of whole-number
|
|
278
|
+
years, it is the year. A period the axis shows only part of centers
|
|
279
|
+
in that part, and the last one, which starts where the axis ends,
|
|
280
|
+
centers where its whole period would be, past the end. Other axes
|
|
281
|
+
draw their labels at their ticks.
|
|
282
|
+
@example
|
|
283
|
+
{xConfig: {tickLabelPosition: "period"}}
|
|
284
|
+
*/
|
|
285
|
+
tickLabelPosition?: "tick" | "period";
|
|
214
286
|
/** Tick values of the axis. */
|
|
215
287
|
ticks?: unknown[];
|
|
216
288
|
/**
|
|
@@ -228,11 +300,62 @@ export interface AxisConfig {
|
|
|
228
300
|
[d3-time-format](https://github.com/d3/d3-time-format/blob/master/README.md#timeFormatLocale)).
|
|
229
301
|
*/
|
|
230
302
|
timeLocale?: Record<string, unknown>;
|
|
303
|
+
/**
|
|
304
|
+
The tooltip shown when a tick label is hovered, in a chart: its text
|
|
305
|
+
(the same on every tick), a function that receives the tick's value (as
|
|
306
|
+
`tickFormat` does) and its index and returns the text, or a tooltip
|
|
307
|
+
config (as `tooltipConfig`) whose accessors receive the same. The index
|
|
308
|
+
counts the axis's labels from the start of its domain (0 is the bottom
|
|
309
|
+
label of a y axis, the left one of an x axis). Unset (the default) or
|
|
310
|
+
when the function returns nothing, a label cut short with an ellipsis
|
|
311
|
+
shows its whole text; `false`, set or returned, shows no tooltip.
|
|
312
|
+
@example
|
|
313
|
+
{tickTooltip: value => notes[value]}
|
|
314
|
+
*/
|
|
315
|
+
tickTooltip?: string | ((value: number | string, index: number) => string | false | void) | AxisTooltipConfig<[value: number | string, index: number]> | false;
|
|
231
316
|
/** Title of the axis. */
|
|
232
317
|
title?: string;
|
|
233
318
|
/** Title configuration of the axis. */
|
|
234
319
|
titleConfig?: Record<string, unknown>;
|
|
320
|
+
/**
|
|
321
|
+
The tooltip shown when the axis title is hovered, in a chart: the
|
|
322
|
+
tooltip's text, a function that receives the title and returns it, or a
|
|
323
|
+
tooltip config (as `tooltipConfig`) whose accessors receive the title.
|
|
324
|
+
Unset (the default) or when the function returns nothing, a title cut
|
|
325
|
+
short with an ellipsis shows its whole text; `false`, set or returned,
|
|
326
|
+
shows no tooltip.
|
|
327
|
+
@example
|
|
328
|
+
{title: "GDP per capita", titleTooltip: "Constant 2015 US$"}
|
|
329
|
+
*/
|
|
330
|
+
titleTooltip?: string | ((title: string) => string | false | void) | AxisTooltipConfig<[title: string]> | false;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
The `groupBy` levels a `tooltip` accessor receives as its third argument,
|
|
334
|
+
and whether it is asked about a legend entry.
|
|
335
|
+
*/
|
|
336
|
+
export interface TooltipLevels {
|
|
337
|
+
/**
|
|
338
|
+
The `groupBy` level, from 0, the hovered item stands for: the level the
|
|
339
|
+
chart draws, or the item's own level where a chart draws several at
|
|
340
|
+
once (a Sunburst or Icicle node, a Tree node, a Treemap group header).
|
|
341
|
+
A legend entry stands for the level its label is read from.
|
|
342
|
+
*/
|
|
343
|
+
depth: number;
|
|
344
|
+
/** The deepest `groupBy` level: `groupBy.length - 1`. */
|
|
345
|
+
maxDepth: number;
|
|
346
|
+
/** Whether the hovered item is a legend entry, not a mark. */
|
|
347
|
+
legend: boolean;
|
|
235
348
|
}
|
|
349
|
+
/** `T` with every accessor in it called with `Args`. */
|
|
350
|
+
type WithAccessorArgs<T, Args extends unknown[]> = T extends (...args: never[]) => infer R ? (...args: Args) => R : T extends Array<infer U> ? Array<WithAccessorArgs<U, Args>> : T;
|
|
351
|
+
/**
|
|
352
|
+
A tooltip config for an axis label (see `titleTooltip` and
|
|
353
|
+
`tickTooltip`): a `TooltipConfig` whose accessors are called with `Args`
|
|
354
|
+
in place of a data point.
|
|
355
|
+
*/
|
|
356
|
+
export type AxisTooltipConfig<Args extends unknown[]> = {
|
|
357
|
+
[K in keyof TooltipConfig]: WithAccessorArgs<TooltipConfig[K], Args>;
|
|
358
|
+
};
|
|
236
359
|
export interface TooltipConfig {
|
|
237
360
|
/** The inner HTML content of the arrow element, empty by default. */
|
|
238
361
|
arrow?: ((d: DataPoint) => string) | string;
|
|
@@ -265,7 +388,12 @@ export interface TooltipConfig {
|
|
|
265
388
|
to drop the swatch from legend tooltips only.
|
|
266
389
|
*/
|
|
267
390
|
titleSwatch?: boolean;
|
|
268
|
-
/**
|
|
391
|
+
/**
|
|
392
|
+
Overall CSS styles applied to the tooltip container. A `z-index` here
|
|
393
|
+
also goes on the tooltip's portal, the fixed layer on `<body>` that
|
|
394
|
+
holds a chart's tooltips, so a high value (`{"z-index": 100}`) keeps
|
|
395
|
+
them above a page's sticky header or sidebar.
|
|
396
|
+
*/
|
|
269
397
|
tooltipStyle?: Record<string, string>;
|
|
270
398
|
body?: ((d: DataPoint) => string) | string;
|
|
271
399
|
/**
|
|
@@ -320,9 +448,10 @@ export interface TextBoxConfig {
|
|
|
320
448
|
overflow?: Accessor<boolean>;
|
|
321
449
|
/**
|
|
322
450
|
Handles truncated lines, returning the new line value. Passed the line's
|
|
323
|
-
text and number; by default
|
|
324
|
-
|
|
325
|
-
measured, and words come off its
|
|
451
|
+
text and number; by default drops the line's trailing periods, commas,
|
|
452
|
+
and spaces and appends "...", except for a first word that cannot fit
|
|
453
|
+
(which returns ""). The ended line is measured, and words come off its
|
|
454
|
+
end until it fits the box.
|
|
326
455
|
*/
|
|
327
456
|
ellipsis?: (text: string, line: number) => string;
|
|
328
457
|
/**
|
|
@@ -426,6 +555,14 @@ export interface TimelineConfig {
|
|
|
426
555
|
`xConfig.rangeBreaks`); set this to use others, or `false` for none.
|
|
427
556
|
*/
|
|
428
557
|
rangeBreaks?: false | RangeBreakRule | RangeBreakRule[];
|
|
558
|
+
/**
|
|
559
|
+
Whether the timeline reads its periods in UTC instead of the viewer's
|
|
560
|
+
time zone (see the axis config's `utc`), which also parses the chart's
|
|
561
|
+
`time` values. By default the timeline follows the axis that plots the
|
|
562
|
+
chart's `time` values (such as `xConfig.utc`), else the chart's own
|
|
563
|
+
`utc` (a Calendar's), else local time.
|
|
564
|
+
*/
|
|
565
|
+
utc?: boolean;
|
|
429
566
|
/**
|
|
430
567
|
The maximum number of ticks (or buttons) a selection can span; unlimited
|
|
431
568
|
by default. A wider brush is pulled in to it on release, keeping the end
|
|
@@ -523,8 +660,10 @@ export interface SizeLegendConfig {
|
|
|
523
660
|
values?: number[] | number | ((domain: [number, number]) => number[]);
|
|
524
661
|
/** Formats each value's label. Defaults to the locale's abbreviated number format. */
|
|
525
662
|
tickFormat?: (value: number) => string;
|
|
526
|
-
/** Title above the circles. Defaults to the `size` key when `size` is set to a string. */
|
|
663
|
+
/** Title above the circles. Defaults to the `size` key when `size` is set to a string (on a Geomap `cartogram`, the `cartogramSize` key, else the `colorScale` key). */
|
|
527
664
|
title?: string;
|
|
665
|
+
/** The marks drawn for each value: nested `"circle"`s, or `"square"`s (each as wide as its circle; a Demers `cartogram` draws them). */
|
|
666
|
+
shape?: "circle" | "square";
|
|
528
667
|
/** Circle paint: `fill`, `fillOpacity`, `stroke`, `strokeWidth`, `strokeOpacity`. */
|
|
529
668
|
shapeConfig?: SizeLegendShapeConfig;
|
|
530
669
|
/** Leader-line paint: `stroke`, `strokeWidth`, `strokeOpacity`, `strokeDasharray`. */
|
|
@@ -540,8 +679,33 @@ export interface SizeLegendConfig {
|
|
|
540
679
|
labelPadding?: number;
|
|
541
680
|
}
|
|
542
681
|
export interface TrendLineConfig {
|
|
543
|
-
/** `"series"` (default) fits one line per series, colored to match it; `"all"` fits one line to every point. Stacked charts always fit the stack totals. */
|
|
682
|
+
/** `"series"` (default) fits one line per series, colored to match it; `"all"` fits one line to every point (a moving average averages the points sharing a position). Stacked charts always fit the stack totals. */
|
|
544
683
|
group?: "series" | "all";
|
|
684
|
+
/**
|
|
685
|
+
A moving average's window: how many points each average spans,
|
|
686
|
+
counting each distinct position along the axis once, or on a time axis
|
|
687
|
+
a span of time, such as `{days: 30}` (`seconds`, `minutes`, `hours`,
|
|
688
|
+
`days`, `weeks`, `months`, `years`), which averages the points in the
|
|
689
|
+
span ending at each point (centered on it, with `center`), so gaps and
|
|
690
|
+
uneven spacing average over the same length of time. A span starts at
|
|
691
|
+
the first point, averaging the points it holds so far; on any other
|
|
692
|
+
axis it falls back to 7 points, with a console warning. With a number
|
|
693
|
+
of points, the first `window − 1` (with `center`, the ends) have no
|
|
694
|
+
average. Defaults to 7.
|
|
695
|
+
*/
|
|
696
|
+
window?: number | {
|
|
697
|
+
seconds?: number;
|
|
698
|
+
minutes?: number;
|
|
699
|
+
hours?: number;
|
|
700
|
+
days?: number;
|
|
701
|
+
weeks?: number;
|
|
702
|
+
months?: number;
|
|
703
|
+
years?: number;
|
|
704
|
+
};
|
|
705
|
+
/** Centers a moving average's window on each point instead of ending it there. Defaults to `false` (a trailing window). */
|
|
706
|
+
center?: boolean;
|
|
707
|
+
/** Draws bands either side of a moving average (Bollinger bands), this many standard deviations of each window from it, styled by `confidenceConfig`. Defaults to 2; `false` drops them. */
|
|
708
|
+
bands?: boolean | number;
|
|
545
709
|
/** The polynomial degree when `trendLine` is `"polynomial"`. Defaults to 2. */
|
|
546
710
|
order?: number;
|
|
547
711
|
/** Draws a confidence band around a linear fit. Defaults to `false`. */
|
|
@@ -551,7 +715,7 @@ export interface TrendLineConfig {
|
|
|
551
715
|
/** Area shape config for the confidence band. Its fill defaults to the line color. */
|
|
552
716
|
confidenceConfig?: Record<string, unknown>;
|
|
553
717
|
/**
|
|
554
|
-
Extends each trend line past the end of its data: a number of steps (at the data's own spacing — the median gap between values, or the calendar interval of dates), or `{to}` an end value to step up to (a number, or on a time axis a Date or a parseable date such as a year). Widens the axis to fit. Ignored on a category axis. Defaults to `0` (off).
|
|
718
|
+
Extends each regression trend line (not a moving average) past the end of its data: a number of steps (at the data's own spacing — the median gap between values, or the calendar interval of dates), or `{to}` an end value to step up to (a number, or on a time axis a Date or a parseable date such as a year). Widens the axis to fit. Ignored on a category axis. Defaults to `0` (off).
|
|
555
719
|
*/
|
|
556
720
|
projection?: number | {
|
|
557
721
|
to: number | string | Date;
|
|
@@ -567,30 +731,34 @@ export interface TrendLineConfig {
|
|
|
567
731
|
/** Line dash pattern. Defaults to `"6 4"`. */
|
|
568
732
|
strokeDasharray?: string;
|
|
569
733
|
/**
|
|
570
|
-
Labels each trend line along its
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
(
|
|
574
|
-
|
|
575
|
-
`
|
|
576
|
-
|
|
577
|
-
an ellipsis when the line is too short for it; a line too short for a
|
|
578
|
-
few letters gets no label. It labels the fitted stretch, not a
|
|
579
|
-
projection. Labels never overlap one another or the line labels: one
|
|
580
|
-
whose spot near its line's end is taken slides back along the line, or
|
|
581
|
-
moves below it, and is skipped only when no clear spot exists.
|
|
582
|
-
Defaults to `"equation"`; `false` turns labels off.
|
|
734
|
+
Labels each trend line along its path, near its end, in the line's
|
|
735
|
+
color: `true` names the series, `"equation"` shows its fitted equation
|
|
736
|
+
and R² (a moving average's name and window, such as "Moving Average
|
|
737
|
+
(7)" or "Moving Average (30 days)"), and a function of the fit (`label`, `color`, and `fit` with the
|
|
738
|
+
regression's `coefficients` and `r2`, or the moving average's `window`,
|
|
739
|
+
`center`, and `deviations`) returns any text. Defaults to `"equation"`;
|
|
740
|
+
`false` turns labels off.
|
|
583
741
|
*/
|
|
584
742
|
label?: boolean | "equation" | ((fit: {
|
|
585
743
|
label: string;
|
|
586
744
|
color: string;
|
|
587
745
|
fit: {
|
|
588
|
-
coefficients: number[];
|
|
589
|
-
r2: number;
|
|
590
746
|
type: string;
|
|
747
|
+
coefficients?: number[];
|
|
748
|
+
r2?: number;
|
|
749
|
+
window?: number;
|
|
750
|
+
center?: boolean;
|
|
751
|
+
deviations?: number;
|
|
591
752
|
};
|
|
592
753
|
}) => string | false | null | undefined);
|
|
593
|
-
/**
|
|
754
|
+
/**
|
|
755
|
+
TextBox config for the trend line labels, such as `fontSize` (default
|
|
756
|
+
11) or `fontColor`, and `minRadius`: the tightest a label may bend
|
|
757
|
+
toward its text (where its letters' tops crowd together), as a radius
|
|
758
|
+
in ems, and away from it twice as tightly. A label slides back from a
|
|
759
|
+
tighter bend to a gentler stretch, or takes the gentlest one there is.
|
|
760
|
+
`0` sets no limit. Defaults to `4`.
|
|
761
|
+
*/
|
|
594
762
|
labelConfig?: Record<string, unknown>;
|
|
595
763
|
/** Other Line shape config. */
|
|
596
764
|
[key: string]: unknown;
|
|
@@ -678,6 +846,12 @@ export interface ColorScaleConfig {
|
|
|
678
846
|
outside this range map to the nearest color.
|
|
679
847
|
*/
|
|
680
848
|
domain?: number[];
|
|
849
|
+
/**
|
|
850
|
+
Draws a bucket-type scale ("jenks", "quantile", …) as one bar with an
|
|
851
|
+
axis along it, labeled where the buckets start, instead of a labeled
|
|
852
|
+
swatch for each bucket. Defaults to `false`.
|
|
853
|
+
*/
|
|
854
|
+
bucketAxis?: boolean;
|
|
681
855
|
/**
|
|
682
856
|
Formats the label for each bucket in a bucket-type scale ("jenks",
|
|
683
857
|
"quantile", …). Passed the bucket's start value, its index, the full
|
|
@@ -698,16 +872,10 @@ export interface ColorScaleConfig {
|
|
|
698
872
|
*/
|
|
699
873
|
scale?: ColorScaleTypeSetting;
|
|
700
874
|
/**
|
|
701
|
-
Whether hovering a
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
end). A bucketed bar (`bucketAxis`) also outlines the value's bucket.
|
|
706
|
-
A scale drawn as discrete swatches gets no mark; the value's swatch
|
|
707
|
-
stays lit and the others dim instead. On charts whose shape hover is
|
|
708
|
-
off (`hoverOpacity: 1`, as on Geomap and Calendar or past
|
|
709
|
-
`dataCutoff`), that swatch highlight comes from this option too, so
|
|
710
|
-
`false` turns it off there. Defaults to `true`.
|
|
875
|
+
Whether hovering a shape marks its value on the color scale: a tick and
|
|
876
|
+
a badge with the value (and, on a `bucketAxis`, an outline around its
|
|
877
|
+
bucket). A swatch scale lights the value's swatch instead. Defaults to
|
|
878
|
+
`true`.
|
|
711
879
|
*/
|
|
712
880
|
hoverMark?: boolean;
|
|
713
881
|
/**
|
|
@@ -718,21 +886,30 @@ export interface ColorScaleConfig {
|
|
|
718
886
|
*/
|
|
719
887
|
ordinalRamp?: boolean;
|
|
720
888
|
/**
|
|
721
|
-
Styles the `hoverMark
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
contrasting the fill by default), `fontFamily`, `fontSize` (default
|
|
727
|
-
`11`), `fontWeight` (default `400`), `padding` around the text (default
|
|
728
|
-
`3`; across the bar it is padded to sit as far out as the tick
|
|
729
|
-
labels), and `rx` corner radius (default `2`). `outlineConfig`, the
|
|
730
|
-
bucket outline on a `bucketAxis` bar, takes `stroke` (the
|
|
731
|
-
background-legible text color by default) and `strokeWidth` (default
|
|
732
|
-
`2`). Each is a value or a function of the
|
|
733
|
-
hovered value.
|
|
889
|
+
Styles the `hoverMark`: `tickConfig` (`stroke`, `strokeWidth`, `length`),
|
|
890
|
+
`badgeConfig` (`fill`, `stroke`, `strokeWidth`, `fontColor`,
|
|
891
|
+
`fontFamily`, `fontSize`, `fontWeight`, `padding`, `rx`), and
|
|
892
|
+
`outlineConfig`, the bucket outline on a `bucketAxis` bar (`stroke`,
|
|
893
|
+
`strokeWidth`). Each is a value or a function of the hovered value.
|
|
734
894
|
*/
|
|
735
895
|
hoverMarkConfig?: ColorScaleHoverMarkConfig;
|
|
896
|
+
/**
|
|
897
|
+
Draws the scale as a bivariate key: each row's `value` is a pair of
|
|
898
|
+
numbers, and a chart sets this when its `colorScale` names two fields.
|
|
899
|
+
Defaults to `false`.
|
|
900
|
+
*/
|
|
901
|
+
bivariate?: boolean;
|
|
902
|
+
/** How many quantile bins a bivariate scale splits each variable into, from `2` to `4`. Defaults to `3`. */
|
|
903
|
+
bivariateBuckets?: number;
|
|
904
|
+
/**
|
|
905
|
+
A bivariate scale's colors: a square grid, row-major from the low/low
|
|
906
|
+
corner, each row one bin of the second variable and each column one bin
|
|
907
|
+
of the first. A grid of another size than `bivariateBuckets` is blended
|
|
908
|
+
to fit. Defaults to Joshua Stevens' blue–red 3×3 scheme.
|
|
909
|
+
*/
|
|
910
|
+
bivariateColors?: string[];
|
|
911
|
+
/** A bivariate key's names for its two variables, in `colorScale` order. Defaults to the two field names. */
|
|
912
|
+
bivariateLabels?: [string, string];
|
|
736
913
|
}
|
|
737
914
|
/** `colorDefaults` input: any subset of the color defaults, with `scale` also accepting an array of colors. */
|
|
738
915
|
export type ColorDefaultsConfig = Partial<Omit<ColorDefaults, "scale">> & {
|
|
@@ -778,6 +955,114 @@ export interface PointLabelConfig extends Omit<TextBoxConfig, "fontMin" | "fontS
|
|
|
778
955
|
/** The space, in pixels, between a circle's edge and a label beside it (default `3`). */
|
|
779
956
|
padding?: number;
|
|
780
957
|
}
|
|
958
|
+
/**
|
|
959
|
+
What a `marginalConfig` paint accessor receives: the marginal mark being
|
|
960
|
+
drawn (a histogram bin, a box or one of its parts, or a density curve).
|
|
961
|
+
*/
|
|
962
|
+
export interface MarginalMarkDatum {
|
|
963
|
+
/** The axis its strip summarizes: `"x"` (the top strip) or `"y"` (the right). */
|
|
964
|
+
axis: "x" | "y";
|
|
965
|
+
kind: "histogram" | "box" | "density";
|
|
966
|
+
/** Its series: the legend entry's key, name and color (empty for the single series of every point). */
|
|
967
|
+
series: {
|
|
968
|
+
key: string;
|
|
969
|
+
label: string;
|
|
970
|
+
color: string;
|
|
971
|
+
};
|
|
972
|
+
/** The source rows of the points it summarizes. */
|
|
973
|
+
rows: DataPoint[];
|
|
974
|
+
/** A histogram bin's range, count, and the count stacked below it. */
|
|
975
|
+
bin?: {
|
|
976
|
+
x0: number;
|
|
977
|
+
x1: number;
|
|
978
|
+
count: number;
|
|
979
|
+
y0: number;
|
|
980
|
+
};
|
|
981
|
+
/** A box's statistics. */
|
|
982
|
+
box?: {
|
|
983
|
+
min: number;
|
|
984
|
+
first: number;
|
|
985
|
+
median: number;
|
|
986
|
+
third: number;
|
|
987
|
+
max: number;
|
|
988
|
+
lowerLimit: number;
|
|
989
|
+
upperLimit: number;
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
/** A paint value for marginal marks: a constant, or an accessor of the mark and its series' index. */
|
|
993
|
+
export type MarginalPaintValue<T> = T | ((d: MarginalMarkDatum, i: number) => T);
|
|
994
|
+
/** The paint keys marginal marks take, as `shapeConfig` names them. */
|
|
995
|
+
export interface MarginalPaintConfig {
|
|
996
|
+
fill?: MarginalPaintValue<string>;
|
|
997
|
+
fillOpacity?: MarginalPaintValue<number>;
|
|
998
|
+
stroke?: MarginalPaintValue<string>;
|
|
999
|
+
strokeWidth?: MarginalPaintValue<number>;
|
|
1000
|
+
strokeOpacity?: MarginalPaintValue<number>;
|
|
1001
|
+
/** Dash and gap lengths, as an array or a space-separated string. */
|
|
1002
|
+
strokeDasharray?: MarginalPaintValue<number[] | string>;
|
|
1003
|
+
opacity?: MarginalPaintValue<number>;
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
`marginalConfig`: each strip's size and spacing, a histogram strip's
|
|
1007
|
+
bins, and how the marks paint. Paint keys at the top level style every
|
|
1008
|
+
mark; `histogram`, `box`, and `density` style one kind, and a box's
|
|
1009
|
+
`median`, `whisker` (its whiskers and caps) and `outlier` keys style one
|
|
1010
|
+
of its parts. Lines take only stroke keys, and a density curve's fill
|
|
1011
|
+
only its fill keys (its outline takes the stroke keys).
|
|
1012
|
+
*/
|
|
1013
|
+
export interface MarginalConfig extends MarginalPaintConfig {
|
|
1014
|
+
/** Each strip's thickness: pixels, or a share (up to `1`) of the chart area's shorter side (default `0.15`, kept between 16 and 120 pixels). */
|
|
1015
|
+
size?: number;
|
|
1016
|
+
/** The gap between a strip and the plot, in pixels (default `8`). */
|
|
1017
|
+
padding?: number;
|
|
1018
|
+
/** A histogram strip's bins: a count, interior edges, or a d3-array threshold generator (default Sturges' rule). */
|
|
1019
|
+
binThresholds?: number | number[] | ((values: ArrayLike<number>, min: number, max: number) => number | number[]);
|
|
1020
|
+
/** Histogram bars (default: the series' color). */
|
|
1021
|
+
histogram?: MarginalPaintConfig;
|
|
1022
|
+
/** Boxes (default: the series' color at `fillOpacity` 0.35, with a 1px stroke in it). */
|
|
1023
|
+
box?: MarginalPaintConfig & {
|
|
1024
|
+
median?: MarginalPaintConfig;
|
|
1025
|
+
whisker?: MarginalPaintConfig;
|
|
1026
|
+
/** Outlier dots (default: solid, unstroked, `r` 2, kept over the box's own keys). */
|
|
1027
|
+
outlier?: MarginalPaintConfig & {
|
|
1028
|
+
r?: MarginalPaintValue<number>;
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
/** Density curves (default: filled at `fillOpacity` 0.3, outlined 1.5px in the series' color). */
|
|
1032
|
+
density?: MarginalPaintConfig;
|
|
1033
|
+
}
|
|
1034
|
+
/** An `outlier` setting: on, the rule that finds outliers, or a predicate that flags rows. */
|
|
1035
|
+
export type OutlierSetting = boolean | {
|
|
1036
|
+
/** `"iqr"` (default), `"zscore"`, or `"mad"`. */
|
|
1037
|
+
method?: "iqr" | "zscore" | "mad";
|
|
1038
|
+
/** How far past the quartiles, mean, or median the fences sit (defaults `1.5`, `3`, `3.5`). */
|
|
1039
|
+
k?: number;
|
|
1040
|
+
/** What each mark is compared with: `"auto"` (default), `"series"`, `"discrete"`, or `"all"`. */
|
|
1041
|
+
group?: "auto" | "series" | "discrete" | "all";
|
|
1042
|
+
} | ((d: DataPoint, i: number) => boolean);
|
|
1043
|
+
/** A ring style key: a value, or an accessor of the outlier's row. */
|
|
1044
|
+
type OutlierStyle<T> = T | ((d: DataPoint, i: number) => T);
|
|
1045
|
+
/** `outlierConfig`: how outliers are ringed and labeled. */
|
|
1046
|
+
export interface OutlierConfig {
|
|
1047
|
+
/** The ring's color (default the chart's text color, which contrasts with its background). */
|
|
1048
|
+
stroke?: OutlierStyle<string>;
|
|
1049
|
+
/** The ring's width in pixels (default `2`). */
|
|
1050
|
+
strokeWidth?: OutlierStyle<number>;
|
|
1051
|
+
/** The ring's opacity. */
|
|
1052
|
+
strokeOpacity?: OutlierStyle<number>;
|
|
1053
|
+
/** The ring's dash pattern, as `"4 2"` or `[4, 2]`. */
|
|
1054
|
+
strokeDasharray?: OutlierStyle<string | number[]>;
|
|
1055
|
+
/** The space between a mark's edge and its ring, in pixels (default `2`). */
|
|
1056
|
+
gap?: number;
|
|
1057
|
+
/** The ring's radius around a line or area's point, which has no mark of its own (default `6`). */
|
|
1058
|
+
r?: number;
|
|
1059
|
+
/** The label: `true` (default) names the row and its value, a function returns the text (or `false` for none), and `false` draws none. */
|
|
1060
|
+
label?: boolean | ((d: DataPoint, i: number) => string | false);
|
|
1061
|
+
/** TextBox config for the label (`fontSize` defaults to `pointLabelConfig`'s). */
|
|
1062
|
+
labelConfig?: Record<string, unknown>;
|
|
1063
|
+
/** Notes "Outlier" in the tooltip and the mark's aria label (default `true`). */
|
|
1064
|
+
tooltip?: boolean;
|
|
1065
|
+
}
|
|
781
1066
|
export interface D3plusConfig {
|
|
782
1067
|
/** Data array or URL string to load data from. */
|
|
783
1068
|
data?: DataPoint[] | string;
|
|
@@ -808,6 +1093,20 @@ export interface D3plusConfig {
|
|
|
808
1093
|
arcSide?: "above" | "below" | "both";
|
|
809
1094
|
/** Hides the SVG from assistive technology when true (`aria-hidden`). */
|
|
810
1095
|
ariaHidden?: boolean;
|
|
1096
|
+
/**
|
|
1097
|
+
Plot: draws one unit of y `aspectRatio` times as long as one unit of
|
|
1098
|
+
x, so `1` makes a unit square square (a 45 degree line rises at 45
|
|
1099
|
+
degrees). The plot area shrinks along one side, centered, to hold it;
|
|
1100
|
+
the axes keep their domains. A log axis measures in powers of ten (one
|
|
1101
|
+
decade is one unit), and a time axis in milliseconds. Each small
|
|
1102
|
+
multiple holds it in its own panel, and a zoom keeps it (both axes
|
|
1103
|
+
zoom together). Ignored, with a warning, when either axis is a
|
|
1104
|
+
category, pow, or sqrt axis, or a log axis spanning zero. Unset (the
|
|
1105
|
+
default), the plot fills its area.
|
|
1106
|
+
@example
|
|
1107
|
+
{aspectRatio: 1}
|
|
1108
|
+
*/
|
|
1109
|
+
aspectRatio?: number;
|
|
811
1110
|
/**
|
|
812
1111
|
The Radar's axis styles, named after the parts of a Plot axis: the
|
|
813
1112
|
inner level rings are its gridlines (`gridConfig`, a faint stroke like
|
|
@@ -824,16 +1123,9 @@ export interface D3plusConfig {
|
|
|
824
1123
|
shapeConfig?: Record<string, unknown>;
|
|
825
1124
|
};
|
|
826
1125
|
/**
|
|
827
|
-
Whether hovering a Plot's mark draws a dashed guide
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
`tickFormat` when set). `"x"` or `"y"` draws them for that direction
|
|
831
|
-
only (each including its secondary axis). A bar is badged on its value
|
|
832
|
-
axis only. With a discrete axis, the shared tooltip's crosshair is that
|
|
833
|
-
axis's guide, and the value axis follows the hovered series' point (or
|
|
834
|
-
the one nearest the pointer). Defaults to `true` (`"x"` on BumpChart,
|
|
835
|
-
whose y axes label series rather than values, and on Streamgraph, whose
|
|
836
|
-
y positions name no values).
|
|
1126
|
+
Whether hovering a Plot's mark draws a dashed guide to each axis with a
|
|
1127
|
+
badge showing its value there. `"x"` or `"y"` limits it to that
|
|
1128
|
+
direction. Defaults to `true` (`"x"` on BumpChart and Streamgraph).
|
|
837
1129
|
*/
|
|
838
1130
|
axisHover?: boolean | "x" | "y";
|
|
839
1131
|
/**
|
|
@@ -881,20 +1173,10 @@ export interface D3plusConfig {
|
|
|
881
1173
|
barWidth?: string | false | ((d: DataPoint, i?: number) => number);
|
|
882
1174
|
/**
|
|
883
1175
|
BarChart/Marimekko with `barWidth`: whether each category's axis label
|
|
884
|
-
also shows its bar's share of the total width
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
still can't fit is left out, and the labels rotate, showing the name
|
|
889
|
-
alone, only when half or more can't fit. The tooltip always shows the
|
|
890
|
-
share. `"opposite"` moves the shares to the axis across the bars from
|
|
891
|
-
the names, above them along a horizontal axis and to their right along
|
|
892
|
-
a vertical one, leaving the names alone on their own axis; style it
|
|
893
|
-
with `x2Config` (or `y2Config`). In small
|
|
894
|
-
multiples (`facet`), each panel's shares are of that panel's own total
|
|
895
|
-
width and add to 100%, even when shared scales draw a smaller panel
|
|
896
|
-
narrower. `barWidthShareFormat` changes what the label says.
|
|
897
|
-
`"opposite"` for Marimekko, off for BarChart.
|
|
1176
|
+
also shows its bar's share of the total width ("Retail" over "50%").
|
|
1177
|
+
`"opposite"` puts the shares on the axis across from the names (styled
|
|
1178
|
+
with `x2Config`/`y2Config`). `barWidthShareFormat` changes the text.
|
|
1179
|
+
Defaults to `"opposite"` for Marimekko, `false` for BarChart.
|
|
898
1180
|
*/
|
|
899
1181
|
barWidthShare?: boolean | "opposite";
|
|
900
1182
|
/**
|
|
@@ -907,43 +1189,32 @@ export interface D3plusConfig {
|
|
|
907
1189
|
*/
|
|
908
1190
|
barWidthShareFormat?: (d: DataPoint, info: BarShareInfo) => unknown;
|
|
909
1191
|
/**
|
|
910
|
-
Starts a Plot's value axis
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
the axis
|
|
916
|
-
|
|
917
|
-
and with it off the axis
|
|
918
|
-
stretches down to `0`. As with `yDomain([n])`, only `n` is
|
|
919
|
-
pinned: the far end comes from the data and is rounded where the
|
|
920
|
-
axis would round it with no domain set (left at the data when the
|
|
921
|
-
axis config's `rounding` is "none"), and marks for values past `n`
|
|
922
|
-
stop at the axis's edge.
|
|
923
|
-
When every value sits at or below `n`, it ends the axis instead,
|
|
924
|
-
like `yDomain([undefined, n])`. A bound given in
|
|
925
|
-
`yDomain`/`xDomain` wins.
|
|
1192
|
+
Starts a Plot's value axis at a value, like `yDomain([n])` (or
|
|
1193
|
+
`xDomain([n])` for horizontal charts); the far end comes from the data.
|
|
1194
|
+
Bars, areas, and stems still grow from `0`, so with `baselineBreak` on
|
|
1195
|
+
the axis breaks back to a `0` tick. A bound in `yDomain`/`xDomain` wins.
|
|
1196
|
+
Left unset on a Plot that draws bars or areas, they grow from `0` and
|
|
1197
|
+
the value axis reaches it, as on a BarChart or AreaPlot, unless the
|
|
1198
|
+
chart sets its own `discrete` axis (a BumpChart, Ridgeline, or Violin).
|
|
926
1199
|
*/
|
|
927
1200
|
baseline?: number;
|
|
928
1201
|
/**
|
|
929
|
-
When
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
value domain (`yDomain`/`yConfig.domain`, or the x versions for
|
|
936
|
-
horizontal charts), and bars and areas start at the baseline tick,
|
|
937
|
-
with the break's gap cut across them (`baselineBreakConfig`'s
|
|
938
|
-
`mask`); turned off, a `yDomain` stretches to reach the baseline while a
|
|
939
|
-
`yConfig.domain` is kept and cuts its bars off at the axis. Defaults
|
|
940
|
-
to `true` for the Plots whose marks grow from `0`, such as BarChart,
|
|
941
|
-
AreaPlot, Histogram, and Lollipop (each chart lists its own default),
|
|
942
|
-
and `false` for other Plots and a standalone Axis.
|
|
1202
|
+
When a linear value axis's domain stops short of the `baseline` (e.g.
|
|
1203
|
+
`[1100, 2100]` with a baseline of `0`), keeps the baseline tick and
|
|
1204
|
+
breaks the axis between it and the domain, styled by
|
|
1205
|
+
`baselineBreakConfig`. Turned off, a Plot's `yDomain` stretches to the
|
|
1206
|
+
baseline instead. Defaults to `true` for Plots whose marks grow from `0`
|
|
1207
|
+
(BarChart, AreaPlot, Histogram, Lollipop), else `false`.
|
|
943
1208
|
*/
|
|
944
1209
|
baselineBreak?: boolean;
|
|
945
|
-
/**
|
|
946
|
-
|
|
1210
|
+
/**
|
|
1211
|
+
Bullet: the qualitative ranges behind each measure, as threshold values
|
|
1212
|
+
(`[60, 85]`) or band objects (`{min, max, color}`), or a `(d, i) =>
|
|
1213
|
+
bands` accessor for per-row bands. HorizonChart: how many bands each
|
|
1214
|
+
sign of a series is cut into (default 3), each a darker shade folded
|
|
1215
|
+
over the one below.
|
|
1216
|
+
*/
|
|
1217
|
+
bands?: number | (number | {
|
|
947
1218
|
min?: number;
|
|
948
1219
|
max?: number;
|
|
949
1220
|
color?: string;
|
|
@@ -952,6 +1223,26 @@ export interface D3plusConfig {
|
|
|
952
1223
|
max?: number;
|
|
953
1224
|
color?: string;
|
|
954
1225
|
})[]);
|
|
1226
|
+
/**
|
|
1227
|
+
HorizonChart: the range of values each band spans. Defaults to the
|
|
1228
|
+
largest absolute value in all of the data (before the timeline,
|
|
1229
|
+
`filter`, and hidden rows cut it) divided by `bands`, rounded up to 1,
|
|
1230
|
+
2, 2.5, or 5 times a power of ten. Every row shares it; values past
|
|
1231
|
+
the top band fill it.
|
|
1232
|
+
*/
|
|
1233
|
+
bandSize?: number;
|
|
1234
|
+
/**
|
|
1235
|
+
HorizonChart: the band colors. `positive` and `negative` each take a
|
|
1236
|
+
base color to ramp from pale (the band nearest zero) to the base, or a
|
|
1237
|
+
list of colors from the band nearest zero up. Defaults to ramps toward
|
|
1238
|
+
the theme's colorScale `max` (positive) and `min` (negative) colors.
|
|
1239
|
+
*/
|
|
1240
|
+
colors?: {
|
|
1241
|
+
positive?: string | string[];
|
|
1242
|
+
negative?: string | string[];
|
|
1243
|
+
};
|
|
1244
|
+
/** HorizonChart: the space between rows, in pixels. Defaults to `1`. */
|
|
1245
|
+
rowGap?: number;
|
|
955
1246
|
/**
|
|
956
1247
|
Hexbin: the bin shape, `"hex"` (default) for hexagons or `"square"`
|
|
957
1248
|
for squares, or `false` to draw no bins (for contours alone).
|
|
@@ -964,6 +1255,13 @@ export interface D3plusConfig {
|
|
|
964
1255
|
`12`.
|
|
965
1256
|
*/
|
|
966
1257
|
binSize?: number;
|
|
1258
|
+
/**
|
|
1259
|
+
Histogram and DotPlot: a uniform bin width, in data units. Histogram
|
|
1260
|
+
places its edges at multiples of it (taking precedence over
|
|
1261
|
+
`binThresholds`); DotPlot sweeps its stacks this wide, shrinking the
|
|
1262
|
+
dots to fit (defaults to one dot's diameter).
|
|
1263
|
+
*/
|
|
1264
|
+
binWidth?: number;
|
|
967
1265
|
/**
|
|
968
1266
|
Hexbin: what each bin measures, which its color shows. `"count"`
|
|
969
1267
|
(default) is the number of observations in the bin; `{value, agg,
|
|
@@ -973,8 +1271,18 @@ export interface D3plusConfig {
|
|
|
973
1271
|
binValue?: BinValueOption;
|
|
974
1272
|
/** Candlestick: the share of each period's room its candle body (or OHLC ticks) spans, from 0 to 1. Defaults to `0.7`. */
|
|
975
1273
|
bodyWidth?: number;
|
|
1274
|
+
/** BoxWhisker: accessor or data key for each summary row's observation count, which `boxNotch` and `boxWidthByCount` need for precomputed boxes. */
|
|
1275
|
+
boxCount?: string | ((d: DataPoint, i: number) => number);
|
|
976
1276
|
/** BoxWhisker: accessor or data key for each summary row's upper whisker end. See `boxMedian`. */
|
|
977
1277
|
boxMax?: string | ((d: DataPoint, i: number) => number);
|
|
1278
|
+
/**
|
|
1279
|
+
BoxWhisker: marks each box's mean with a diamond (default `true`),
|
|
1280
|
+
listed as "Mean" in its tooltip; `false` turns it off. A computed box
|
|
1281
|
+
takes the mean of its observations; a precomputed box needs a data key
|
|
1282
|
+
or accessor giving each row's mean. Style it with
|
|
1283
|
+
`shapeConfig.Box.meanConfig`.
|
|
1284
|
+
*/
|
|
1285
|
+
boxMean?: boolean | string | ((d: DataPoint, i: number) => number);
|
|
978
1286
|
/**
|
|
979
1287
|
BoxWhisker: accessor or data key for each summary row's median. Setting
|
|
980
1288
|
it, `boxMin`, `boxQ1`, `boxQ3`, or `boxMax` draws boxes from statistics
|
|
@@ -988,14 +1296,35 @@ export interface D3plusConfig {
|
|
|
988
1296
|
boxMedian?: string | ((d: DataPoint, i: number) => number);
|
|
989
1297
|
/** BoxWhisker: accessor or data key for each summary row's lower whisker end. See `boxMedian`. */
|
|
990
1298
|
boxMin?: string | ((d: DataPoint, i: number) => number);
|
|
1299
|
+
/**
|
|
1300
|
+
BoxWhisker: notches each box around its median (default `false`),
|
|
1301
|
+
spanning `median ± 1.58·IQR/√n`, roughly a 95% interval for the median:
|
|
1302
|
+
boxes whose notches don't overlap likely differ. Listed as "Notch" in
|
|
1303
|
+
the tooltip. A precomputed box needs `boxCount`, or an accessor
|
|
1304
|
+
returning each row's `[lower, upper]`.
|
|
1305
|
+
*/
|
|
1306
|
+
boxNotch?: boolean | ((d: DataPoint, i: number) => [number, number]);
|
|
991
1307
|
/** BoxWhisker: accessor or data key for each summary row's outliers, an array of values drawn as points past the whiskers. Used only with the other box statistics; see `boxMedian`. */
|
|
992
1308
|
boxOutliers?: string | ((d: DataPoint, i: number) => number[]);
|
|
993
1309
|
/** Alluvial: the fill opacity of the bands between columns (default `0.5`). */
|
|
994
1310
|
bandOpacity?: number;
|
|
995
1311
|
/** BoxWhisker: accessor or data key for each summary row's lower quartile, where its box starts. See `boxMedian`. */
|
|
996
1312
|
boxQ1?: string | ((d: DataPoint, i: number) => number);
|
|
1313
|
+
/**
|
|
1314
|
+
BoxWhisker: draws every observation of a computed box as a small point
|
|
1315
|
+
over it (default `true`), spread across the box's width by `jitter`;
|
|
1316
|
+
outliers keep their own marks. Style them with
|
|
1317
|
+
`shapeConfig.Box.pointConfig`.
|
|
1318
|
+
*/
|
|
1319
|
+
boxPoints?: boolean;
|
|
997
1320
|
/** BoxWhisker: accessor or data key for each summary row's upper quartile, where its box ends. See `boxMedian`. */
|
|
998
1321
|
boxQ3?: string | ((d: DataPoint, i: number) => number);
|
|
1322
|
+
/**
|
|
1323
|
+
BoxWhisker: scales each box's width by the square root of its
|
|
1324
|
+
observation count relative to the largest box's (default `false`), so
|
|
1325
|
+
a box's area tracks its sample size. A precomputed box needs `boxCount`.
|
|
1326
|
+
*/
|
|
1327
|
+
boxWidthByCount?: boolean;
|
|
999
1328
|
/**
|
|
1000
1329
|
ParallelCoordinates: the brush strips over each axis — `width` (px), the
|
|
1001
1330
|
selection's `fill`, `fillOpacity`, `stroke`, and `strokeWidth`, and
|
|
@@ -1019,15 +1348,13 @@ export interface D3plusConfig {
|
|
|
1019
1348
|
/** Bullet: the most each bullet's band can be thick, in pixels (default 40); raise it to let rows fill a tall chart. */
|
|
1020
1349
|
bulletSize?: number;
|
|
1021
1350
|
/**
|
|
1022
|
-
Whether the chart
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
from the cache
|
|
1029
|
-
fetch on every load, or use `dataPollingInterval` to re-fetch `data` on
|
|
1030
|
-
a schedule (polls always fetch).
|
|
1351
|
+
Whether the chart uses the data cache that every chart on the page
|
|
1352
|
+
shares for the files fetched by `data`, `links`, `nodes`, `topojson`,
|
|
1353
|
+
and `fitObject`, so charts loading the same URL share one request and
|
|
1354
|
+
loading it again, or changing a formatter, needs none. The cache uses
|
|
1355
|
+
up to about 50 MB of memory, dropping the least recently used files
|
|
1356
|
+
first. Defaults to `true`; `false` fetches on every load.
|
|
1357
|
+
`clearDataCache()` from `@d3plus/data` empties the cache.
|
|
1031
1358
|
*/
|
|
1032
1359
|
cache?: boolean;
|
|
1033
1360
|
/** Calendar: styles the weekday, month, and year labels (`fontColor`, `fontFamily`, `fontSize`, default `11`, and `fontWeight`). */
|
|
@@ -1037,36 +1364,68 @@ export interface D3plusConfig {
|
|
|
1037
1364
|
fontSize?: number;
|
|
1038
1365
|
fontWeight?: number | string;
|
|
1039
1366
|
};
|
|
1367
|
+
/**
|
|
1368
|
+
Geomap: redraws the map as a cartogram, its regions sized by
|
|
1369
|
+
`cartogramSize`. `"dorling"` draws each region as a circle and
|
|
1370
|
+
`"demers"` as a square, its area in proportion to the region's value,
|
|
1371
|
+
set at the center of the region's largest part and nudged apart until
|
|
1372
|
+
none overlap, with a pull back toward home; the shapes shrink together
|
|
1373
|
+
when they would spill out of the map. Regions without data or a
|
|
1374
|
+
positive value are left out, each region's label sits inside its
|
|
1375
|
+
shape when it fits, and a size legend of nested circles or squares
|
|
1376
|
+
shows a few values of `cartogramSize` (see `sizeLegend`).
|
|
1377
|
+
`"contiguous"` stretches the regions themselves until each one's area
|
|
1378
|
+
stands for its value, keeping the borders they share (Dougenik,
|
|
1379
|
+
Chrisman and Niemeyer's method: up to 12 passes, stopping early once
|
|
1380
|
+
every region is within 1% of its area); a region without data or a
|
|
1381
|
+
positive value keeps the map's mean density. Every kind leaves out
|
|
1382
|
+
coordinate points and the tiles, runs `links` between the shapes'
|
|
1383
|
+
centers (a contiguous region's at the center of its largest part),
|
|
1384
|
+
leaving out a link with an end that isn't a drawn region, and morphs
|
|
1385
|
+
each outline to and from its shape when the cartogram is toggled or a
|
|
1386
|
+
value changes. Defaults to `false`, which draws the map.
|
|
1387
|
+
*/
|
|
1388
|
+
cartogram?: "dorling" | "demers" | "contiguous" | false;
|
|
1389
|
+
/** Geomap: the gap left between neighboring `cartogram` shapes, in pixels. Defaults to `1`. */
|
|
1390
|
+
cartogramPadding?: number;
|
|
1391
|
+
/** Geomap: the value that sizes each region in a `cartogram`, as a data key or an accessor function. Defaults to the `colorScale` value, or the same size for every region with data when there is none. */
|
|
1392
|
+
cartogramSize?: string | ((d: DataPoint, i: number) => number);
|
|
1040
1393
|
/** Matrix and Calendar: the gap between neighboring cells, in pixels. */
|
|
1041
1394
|
cellPadding?: number;
|
|
1042
1395
|
/** Calendar: each cell's corner radius, in pixels (kept below a third of the cell). Defaults to `2`. */
|
|
1043
1396
|
cellRadius?: number;
|
|
1044
1397
|
/**
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1398
|
+
Pie (when `innerRadius` leaves a hole, as in a Donut), Sunburst and
|
|
1399
|
+
RadialBar: text drawn in the chart's empty middle. `true` draws the sum
|
|
1400
|
+
of every drawn row's value (Sunburst's `sum`), formatted the way the
|
|
1401
|
+
tooltips format values; a string draws that string; a function
|
|
1402
|
+
receives the drawn rows (after filters and hidden legend entries) and
|
|
1403
|
+
their total and returns the text. The text wraps and shrinks to fit
|
|
1404
|
+
the hole (see `centerLabelConfig`) and is left out when it can't fit
|
|
1405
|
+
whole, or, on a Sunburst, once a click zooms into a node. Defaults to
|
|
1406
|
+
`false`.
|
|
1407
|
+
*/
|
|
1408
|
+
centerLabel?: boolean | string | ((data: DataPoint[], total: number) => string | false);
|
|
1409
|
+
/**
|
|
1410
|
+
Pie, Sunburst and RadialBar: styles the `centerLabel` with TextBox keys
|
|
1411
|
+
(`fontColor`, `fontFamily`, `fontWeight`, `lineHeight`, `padding`, …).
|
|
1412
|
+
The text shrinks from `fontMax` (default `40`) to fit the hole, down to
|
|
1413
|
+
`fontMin` (default `10`); a `fontSize` fixes its size instead. Defaults
|
|
1414
|
+
to the chart's text color and `padding: 5`. Merged into the current
|
|
1415
|
+
config.
|
|
1416
|
+
*/
|
|
1417
|
+
centerLabelConfig?: TextBoxConfig;
|
|
1418
|
+
/**
|
|
1419
|
+
Sankey: draws links that loop back to a node they left (A → B → A, or a
|
|
1420
|
+
node to itself) as bands that run in a lane above or below the nodes.
|
|
1421
|
+
`false` leaves them out, with a warning. Defaults to `true`.
|
|
1055
1422
|
*/
|
|
1056
1423
|
circularLinks?: boolean;
|
|
1057
1424
|
/**
|
|
1058
|
-
Network and ArcDiagram: colors each node by
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
from `nodes` alone; clicking a cluster zooms to it. A Network also writes each name
|
|
1063
|
-
inside its cluster, where it fits clear of the nodes and their labels.
|
|
1064
|
-
Applies only while the chart's color is its default: setting `color`,
|
|
1065
|
-
`colorScale`, `colorOrdinal`, or a `shapeConfig` fill, or more than one
|
|
1066
|
-
`groupBy` level, colors nodes as configured instead. A network with
|
|
1067
|
-
fewer than two clusters of two or more nodes keeps one color per node.
|
|
1068
|
-
A node with no links keeps its own color and label. `false` turns
|
|
1069
|
-
clustering off. Defaults to `true`.
|
|
1425
|
+
Network and ArcDiagram: colors each node by its cluster (found with the
|
|
1426
|
+
Louvain method, weighted by `linkSize`), named after its most-connected
|
|
1427
|
+
node and listed in the legend; clicking a cluster zooms to it. Applies
|
|
1428
|
+
only while the chart's color is its default. Defaults to `true`.
|
|
1070
1429
|
*/
|
|
1071
1430
|
cluster?: boolean;
|
|
1072
1431
|
/**
|
|
@@ -1102,14 +1461,39 @@ export interface D3plusConfig {
|
|
|
1102
1461
|
/** Treat a discrete color field as ordered: color it with a single-hue light→dark ramp instead of nominal categorical hues. */
|
|
1103
1462
|
colorOrdinal?: boolean;
|
|
1104
1463
|
/**
|
|
1105
|
-
Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point.
|
|
1464
|
+
Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point. Two of them (`["a", "b"]`) make a bivariate scale: each variable is split into quantile bins, the pair of bins picks a color from a grid, and the key is that grid turned into a diamond (see `colorScaleConfig.bivariateBuckets`, `bivariateColors`, and `bivariateLabels`). A row missing either value gets no colorScale color.
|
|
1106
1465
|
*/
|
|
1107
|
-
colorScale?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
|
|
1466
|
+
colorScale?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | [ColorScaleField, ColorScaleField] | false;
|
|
1108
1467
|
/** A pass-through to the config method of ColorScale. */
|
|
1109
1468
|
colorScaleConfig?: {
|
|
1469
|
+
/** Configures the axis that labels a gradient or `bucketAxis` scale: `labels` lists the values it labels, `ticks` the values it marks, and `tickFormat` writes their text. Along a side of the chart, the whole scale (its bar, ticks, labels and title) takes at most a third of the chart's width (a scale at the left or right) or height (top or bottom), leaving out its title, and then its labels, when they don't fit; `maxSize` sets the room for the axis's labels and title instead. On a scale drawn as swatches, `title` and `titleTooltip` apply to the swatches' title, and `tickTooltip` to each swatch's label, given the value and index of the label at that bucket's start on a `bucketAxis` bar. */
|
|
1110
1470
|
axisConfig?: AxisConfig;
|
|
1471
|
+
/** Draws a bucket-type scale as one bar with an axis along it instead of a labeled swatch for each bucket (see `ColorScaleConfig.bucketAxis`). Defaults to `false`. */
|
|
1472
|
+
bucketAxis?: boolean;
|
|
1473
|
+
/** Formats the label for each bucket in a bucket-type scale (see `ColorScaleConfig.bucketFormat`). */
|
|
1474
|
+
bucketFormat?: ColorScaleConfig["bucketFormat"];
|
|
1475
|
+
/** Given a bucket's minimum and maximum labels, returns the full label (see `ColorScaleConfig.bucketJoiner`). */
|
|
1476
|
+
bucketJoiner?: ColorScaleConfig["bucketJoiner"];
|
|
1477
|
+
/** How many buckets a bucket-type scale splits its values into, or the value each bucket starts at. Defaults to `5`. */
|
|
1478
|
+
buckets?: number | number[];
|
|
1479
|
+
/** Splits a diverging scale evenly on either side of its `midpoint`. Defaults to `true`. */
|
|
1111
1480
|
centered?: boolean;
|
|
1112
|
-
colors
|
|
1481
|
+
/** The scale's colors (see `ColorScaleConfig.color`). */
|
|
1482
|
+
color?: ColorScaleConfig["color"];
|
|
1483
|
+
/** The `[min, max]` values a linear scale spans (see `ColorScaleConfig.domain`). */
|
|
1484
|
+
domain?: number[];
|
|
1485
|
+
/** The value a diverging scale turns at. Defaults to `0`. */
|
|
1486
|
+
midpoint?: number;
|
|
1487
|
+
/** The thickness of a gradient's or a `bucketAxis` scale's bar, in pixels. Defaults to `10`. */
|
|
1488
|
+
size?: number;
|
|
1489
|
+
/** The space around the scale, in pixels. Defaults to `5`. */
|
|
1490
|
+
padding?: number;
|
|
1491
|
+
/** Styles the bar of a gradient or a `bucketAxis` scale, as a Rect config (`stroke`, `strokeWidth`, …). */
|
|
1492
|
+
rectConfig?: Record<string, unknown>;
|
|
1493
|
+
/** A scale at the left or right takes at most this many pixels of the chart's width, in place of a third of it. At the top or bottom, it is the scale's length, in place of `colorScaleMaxSize`. */
|
|
1494
|
+
width?: number;
|
|
1495
|
+
/** A scale at the top or bottom takes at most this many pixels of the chart's height, in place of a third of it. At the left or right, it is the scale's length, in place of `colorScaleMaxSize`. */
|
|
1496
|
+
height?: number;
|
|
1113
1497
|
/** The negative pole of a diverging scale, and the hue of an all-negative ramp. Defaults to `colorDefaults.off`, or the theme's `colorScale.min` on a dark or custom theme. */
|
|
1114
1498
|
colorMin?: CssColor;
|
|
1115
1499
|
/** The midpoint of a diverging scale. Defaults to `colorDefaults.light`, or the theme's `colorScale.mid` on a dark or custom theme. */
|
|
@@ -1122,6 +1506,14 @@ export interface D3plusConfig {
|
|
|
1122
1506
|
hoverMark?: boolean;
|
|
1123
1507
|
/** Styles the hover mark (see `ColorScaleConfig.hoverMarkConfig`). */
|
|
1124
1508
|
hoverMarkConfig?: ColorScaleHoverMarkConfig;
|
|
1509
|
+
/** Configures the Legend that draws a bucket-type scale as a swatch for each bucket. Along a side of the chart, the swatches, their labels and title take at most a third of the chart's width (a scale at the left or right) or height (top or bottom): the title and labels wrap onto more lines, and when they still don't fit, the title is left out and then the labels are cut short. Its `width` (left or right) or `height` (top or bottom) sets another limit. */
|
|
1510
|
+
legendConfig?: Record<string, unknown>;
|
|
1511
|
+
/** How many quantile bins a bivariate `colorScale` splits each variable into, from `2` to `4`. Defaults to `3`. */
|
|
1512
|
+
bivariateBuckets?: number;
|
|
1513
|
+
/** A bivariate `colorScale`'s colors (see `ColorScaleConfig.bivariateColors`). Defaults to Joshua Stevens' blue–red 3×3 scheme. */
|
|
1514
|
+
bivariateColors?: string[];
|
|
1515
|
+
/** A bivariate key's names for its two variables. Defaults to the two field names. */
|
|
1516
|
+
bivariateLabels?: [string, string];
|
|
1125
1517
|
/** Holds the palest step of a light theme's single-hue ramp darker (see `ColorScaleConfig.ordinalRamp`). Defaults to `true` when links are colored by number (`linkColor`), so the lowest-valued links still read as lines, and `false` otherwise. */
|
|
1126
1518
|
ordinalRamp?: boolean;
|
|
1127
1519
|
};
|
|
@@ -1143,6 +1535,8 @@ export interface D3plusConfig {
|
|
|
1143
1535
|
categoryPosition?: "center" | "left";
|
|
1144
1536
|
/** Pyramid: a comparison value per row (data key or accessor), drawn as an outline around each side's bars. */
|
|
1145
1537
|
comparison?: string | ((d: DataPoint, i: number) => number) | false;
|
|
1538
|
+
/** KPI: the words after each tile's delta (a string, a `(d, i)` accessor, or `false` for none). Defaults to "vs. previous", translated. */
|
|
1539
|
+
comparisonLabel?: string | ((d: DataPoint, i: number) => string) | false;
|
|
1146
1540
|
/** Pyramid: line styles for the comparison outline (`stroke`, `strokeWidth`, `strokeOpacity`, `strokeDasharray`), each optionally a function of the side value and its index. */
|
|
1147
1541
|
comparisonConfig?: Record<string, unknown>;
|
|
1148
1542
|
/** Waterfall: draws a thin line from the end of each bar to the start of the next. */
|
|
@@ -1156,44 +1550,56 @@ export interface D3plusConfig {
|
|
|
1156
1550
|
nested bands around each line (a fan) — each a `[lower, upper]` pair,
|
|
1157
1551
|
`[lower, upper, label]`, or `{lower, upper, label}` — shaded by
|
|
1158
1552
|
`confidenceConfig.bandOpacity`, with each band's range listed in
|
|
1159
|
-
tooltips under its label (bars draw the first band).
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1553
|
+
tooltips under its label (bars draw the first band). Points (Scatter,
|
|
1554
|
+
Beeswarm) draw error bars. `{x: [lower, upper], y: [lower, upper]}`
|
|
1555
|
+
bounds each axis: the value axis's bounds (y, or x when `discrete` is
|
|
1556
|
+
`"y"`) draw as above, the other axis's draw on points as horizontal (or
|
|
1557
|
+
vertical) error bars, a cross where a point has both, and widen that
|
|
1558
|
+
axis; tooltips list each axis's bounds under its name. A label beside a
|
|
1559
|
+
point keeps clear of every error bar (hiding when no side is clear),
|
|
1560
|
+
and a bar with an error bar anchors its label at its base, or, outside
|
|
1561
|
+
the bar, past the whisker's far end.
|
|
1562
|
+
*/
|
|
1563
|
+
confidence?: ConfidenceBandSetting | ConfidenceBandSetting[] | {
|
|
1564
|
+
x?: ConfidenceBandSetting | false;
|
|
1565
|
+
y?: ConfidenceBandSetting | false;
|
|
1566
|
+
} | false;
|
|
1567
|
+
/**
|
|
1568
|
+
Styles the `confidence` interval: a line's band (Area keys) or a bar's
|
|
1569
|
+
or point's error bar (Path keys, plus `capWidth`, in pixels or a
|
|
1570
|
+
percentage of the bar or point; a point's caps default to its width).
|
|
1571
|
+
Keys under `Area`, `Bar`, or `Circle` apply to that shape only.
|
|
1572
|
+
`bandOpacity` ramps nested bands' opacity (default `[0.15, 0.6]`), and
|
|
1573
|
+
`tooltip: false` leaves the bounds out of tooltips.
|
|
1174
1574
|
*/
|
|
1175
1575
|
confidenceConfig?: Record<string, unknown>;
|
|
1176
1576
|
/**
|
|
1177
|
-
How a line crosses a missing value
|
|
1178
|
-
|
|
1179
|
-
`
|
|
1180
|
-
|
|
1181
|
-
`"
|
|
1182
|
-
(`"2 4"`) in the line's color, distinct from a forecast's longer dash.
|
|
1183
|
-
An object styles the bridge: `stroke` (default the line's color),
|
|
1184
|
-
`strokeDasharray` (default `"2 4"`; `false` for a solid bridge),
|
|
1185
|
-
`strokeWidth` (default the line's width), and `opacity` (default `1`).
|
|
1186
|
-
A bridge follows the line's curve, since it is drawn along the same
|
|
1187
|
-
path, and is decoration only: it has no tooltip, takes no keyboard
|
|
1188
|
-
focus, and a shared tooltip at a missing step lists no value for that
|
|
1189
|
-
line. Confidence bands are clipped to the stretches between gaps. A
|
|
1190
|
-
point with a gap on both sides draws no line of its own, so turn on
|
|
1191
|
-
`lineMarkers` to show it. Areas, including stacked ones, are drawn as
|
|
1192
|
-
before.
|
|
1577
|
+
How a line crosses a missing value (a skipped step, or a `null`/`NaN`
|
|
1578
|
+
value): `true` (the default) or `"solid"` draws straight through,
|
|
1579
|
+
`false` breaks the line, and `"dashed"` breaks it and bridges the gap
|
|
1580
|
+
with a short dash. An object styles the bridge: `stroke`,
|
|
1581
|
+
`strokeDasharray` (default `"2 4"`), `strokeWidth`, and `opacity`.
|
|
1193
1582
|
*/
|
|
1194
1583
|
connectGaps?: ConnectGaps;
|
|
1195
|
-
/**
|
|
1196
|
-
|
|
1584
|
+
/**
|
|
1585
|
+
Thins dense lines and areas to draw: when a series has more than
|
|
1586
|
+
about 2 points per pixel of plot along its axis, it draws a subset
|
|
1587
|
+
chosen by Largest-Triangle-Three-Buckets, which keeps its peaks and
|
|
1588
|
+
dips. A number sets how many points each series draws instead, and
|
|
1589
|
+
`false` draws every point. Only the drawn path is thinned: hover,
|
|
1590
|
+
tooltips, and the nearest-point lookup still read every row. A zoomed
|
|
1591
|
+
plot thins the part it shows, so zooming in brings back detail.
|
|
1592
|
+
Stacked areas, and a line's confidence bands, keep the same points
|
|
1593
|
+
along the axis so their edges still meet.
|
|
1594
|
+
*/
|
|
1595
|
+
downsample?: boolean | number;
|
|
1596
|
+
/**
|
|
1597
|
+
Funnel: fills the gap between consecutive stages with a neck joining
|
|
1598
|
+
their widths. Dumbbell: how each category's values are joined,
|
|
1599
|
+
`"line"` (a connector behind the dots, the default) or `"bar"` (a
|
|
1600
|
+
floating bar in place of the dots).
|
|
1601
|
+
*/
|
|
1602
|
+
connector?: boolean | "line" | "bar";
|
|
1197
1603
|
/**
|
|
1198
1604
|
Funnel: paint for the necks between stages (`fill`, `opacity`,
|
|
1199
1605
|
`stroke`, `strokeWidth`), each optionally a function of the stage the
|
|
@@ -1203,24 +1609,14 @@ export interface D3plusConfig {
|
|
|
1203
1609
|
*/
|
|
1204
1610
|
connectorConfig?: Record<string, unknown>;
|
|
1205
1611
|
/**
|
|
1206
|
-
Hexbin
|
|
1207
|
-
|
|
1208
|
-
levels
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
beneath it, reading upright, and clear of the other contours and
|
|
1215
|
-
labels. A long contour takes more than one label, at least
|
|
1216
|
-
`labelSpacing` pixels apart (default `"auto"`: 20 ems or half the
|
|
1217
|
-
plot's mean side, whichever is longer); `labelStep` labels every n-th
|
|
1218
|
-
level (`1` all of them, `2` every other one, keeping the multiples of
|
|
1219
|
-
twice the levels' spacing; default `"auto"`: all of up to five levels,
|
|
1220
|
-
else every other one); and a level with no clear, gently curving
|
|
1221
|
-
stretch goes unlabelled. `labelConfig` is TextBox config for the
|
|
1222
|
-
labels (`fontSize` defaults to `10`), and `levelFormat` formats their
|
|
1223
|
-
values. Merged into the current config.
|
|
1612
|
+
Hexbin contour options: `bandwidth` (density kernel standard deviation,
|
|
1613
|
+
px, default `20`), `thresholds` (a level count, default `8`, or the
|
|
1614
|
+
levels themselves), `strokeWidth` (`"lines"` outline width, default
|
|
1615
|
+
`1.5`), `fillOpacity` (top `"filled"` level, default `0.8`), `labels`
|
|
1616
|
+
(write each level's value along its lines, default `true`),
|
|
1617
|
+
`labelSpacing` (px between labels on a line, default `"auto"`),
|
|
1618
|
+
`labelStep` (label every n-th level, default `"auto"`), `labelConfig`
|
|
1619
|
+
(TextBox config), and `levelFormat`.
|
|
1224
1620
|
*/
|
|
1225
1621
|
contourConfig?: ContourConfig;
|
|
1226
1622
|
/**
|
|
@@ -1249,22 +1645,18 @@ export interface D3plusConfig {
|
|
|
1249
1645
|
/** Maximum number of data points to render before downsampling. */
|
|
1250
1646
|
dataCutoff?: number;
|
|
1251
1647
|
/**
|
|
1252
|
-
Transforms `data` before it is drawn
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
`data` key, and the rest of that object is applied to the chart, so a
|
|
1257
|
-
response can set options such as `title` from what it contains.
|
|
1258
|
-
|
|
1259
|
-
It runs when the chart renders, whichever order `data` and `dataFormat`
|
|
1260
|
-
are set in, and setting it again re-runs it on the next render, over the
|
|
1261
|
-
cached response (see `cache`). Every `dataPollingInterval` poll runs it too. Passing a
|
|
1262
|
-
formatter as the second argument of `data(url, format)` sets it, and
|
|
1263
|
-
setting `data` alone keeps it.
|
|
1648
|
+
Transforms `data` before it is drawn: receives the loaded file (or the
|
|
1649
|
+
Array passed as `data`) and returns the rows to draw, or a config object
|
|
1650
|
+
holding them as `data` (its other keys are applied to the chart). Also
|
|
1651
|
+
set by `data(url, format)`.
|
|
1264
1652
|
*/
|
|
1265
1653
|
dataFormat?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>;
|
|
1266
1654
|
/**
|
|
1267
|
-
When `data`
|
|
1655
|
+
When `data` comes from a URL, re-fetches it every this many milliseconds
|
|
1656
|
+
and redraws when it changes, keeping hover, zoom, and legend state.
|
|
1657
|
+
Polling pauses while the tab (or, with `detectVisible`, the chart) is
|
|
1658
|
+
hidden, and a failed request keeps the last data. Only `data` is polled.
|
|
1659
|
+
Defaults to `false` (load once).
|
|
1268
1660
|
*/
|
|
1269
1661
|
dataPollingInterval?: number | false;
|
|
1270
1662
|
/**
|
|
@@ -1274,15 +1666,27 @@ export interface D3plusConfig {
|
|
|
1274
1666
|
else its `time`.
|
|
1275
1667
|
*/
|
|
1276
1668
|
date?: string | ((d: DataPoint, i: number) => Date | number | string);
|
|
1277
|
-
/** Waterfall: fill for bars that lower the running total. Defaults to `colorDefaults.off`. */
|
|
1278
|
-
decreaseColor?: string;
|
|
1279
1669
|
/**
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1670
|
+
Waterfall: fill for bars that lower the running total. Dumbbell with
|
|
1671
|
+
`arrows`: color for a category whose value falls. Defaults to
|
|
1672
|
+
`colorDefaults.off`.
|
|
1673
|
+
*/
|
|
1674
|
+
decreaseColor?: string;
|
|
1675
|
+
/** KPI: what each tile's delta shows — the `"percent"` change (default), the `"absolute"` change, `"both"`, or `false` for none. */
|
|
1676
|
+
delta?: "percent" | "absolute" | "both" | false;
|
|
1677
|
+
/** KPI: which way is good news — `"up"` (default) or `"down"` (for costs or churn), or a `(d, i)` accessor per tile. */
|
|
1678
|
+
deltaDirection?: "up" | "down" | ((d: DataPoint, i: number) => "up" | "down");
|
|
1679
|
+
/**
|
|
1680
|
+
Kernel density options for Violin, Ridgeline, and DensityPlot curves:
|
|
1681
|
+
`kernel` (`"gaussian"` or `"epanechnikov"`), `bandwidth` (in data units,
|
|
1682
|
+
or a function of the observations returning one; by default Silverman's
|
|
1683
|
+
rule of thumb, on each group's own values for Violin and Ridgeline and
|
|
1684
|
+
on every group's values together for DensityPlot, so its curves are
|
|
1685
|
+
smoothed alike), `points` (how many values each curve is evaluated at:
|
|
1686
|
+
80, or about 100 for DensityPlot, which evaluates every curve in the
|
|
1687
|
+
same round steps), and `cut` (how far each curve runs past the
|
|
1688
|
+
smallest and largest value, in bandwidths: 2 for Violin, 3 for Ridgeline
|
|
1689
|
+
and DensityPlot).
|
|
1286
1690
|
*/
|
|
1287
1691
|
densityConfig?: {
|
|
1288
1692
|
kernel?: "gaussian" | "epanechnikov" | ((u: number) => number);
|
|
@@ -1291,10 +1695,13 @@ export interface D3plusConfig {
|
|
|
1291
1695
|
cut?: number;
|
|
1292
1696
|
};
|
|
1293
1697
|
/**
|
|
1294
|
-
How Violin and
|
|
1295
|
-
|
|
1698
|
+
How Violin, Ridgeline, and DensityPlot curves are sized against each
|
|
1699
|
+
other: `"area"` gives every shape the same area, `"count"` makes areas
|
|
1296
1700
|
proportional to each group's observations, and `"width"` scales every
|
|
1297
|
-
shape to the full width (Violin)
|
|
1701
|
+
shape to the full width (Violin), height (Ridgeline), or a peak of 1
|
|
1702
|
+
(DensityPlot). Defaults to `"area"`, except on a stacked DensityPlot,
|
|
1703
|
+
where `"count"` makes the stack's top edge the density of every
|
|
1704
|
+
observation.
|
|
1298
1705
|
*/
|
|
1299
1706
|
densityScale?: "area" | "count" | "width";
|
|
1300
1707
|
/**
|
|
@@ -1330,17 +1737,33 @@ export interface D3plusConfig {
|
|
|
1330
1737
|
*/
|
|
1331
1738
|
detectVisibleInterval?: number;
|
|
1332
1739
|
/**
|
|
1333
|
-
|
|
1740
|
+
With `detectVisible` on, releases the chart's DOM and scene while it is
|
|
1741
|
+
scrolled out of view and redraws it when it returns, keeping pages with
|
|
1742
|
+
many charts light. Data and config are kept; zoom and selection are not,
|
|
1743
|
+
so set `false` to keep them. Defaults to `true`.
|
|
1334
1744
|
*/
|
|
1335
1745
|
detectVisibleUnload?: boolean;
|
|
1336
1746
|
/**
|
|
1337
1747
|
ParallelCoordinates: per-dimension options, keyed by dimension — `domain`
|
|
1338
1748
|
(either end of a numeric domain may be `undefined`), `reverse`, `title`,
|
|
1339
|
-
and any Axis config (`tickFormat`, `ticks`, `scale`,
|
|
1749
|
+
and any Axis config (`tickFormat`, `ticks`, `scale`, `tickTooltip`,
|
|
1750
|
+
`titleTooltip`, …).
|
|
1340
1751
|
*/
|
|
1341
1752
|
dimensionConfig?: Record<string, DimensionOptions>;
|
|
1342
|
-
/**
|
|
1343
|
-
|
|
1753
|
+
/**
|
|
1754
|
+
Alluvial: styles the column titles drawn above each column (any TextBox
|
|
1755
|
+
config), and takes a `titleTooltip`: the tooltip shown when a title is
|
|
1756
|
+
hovered, as its text, a function that receives the title and returns it,
|
|
1757
|
+
or a tooltip config (as `tooltipConfig`) whose accessors receive the
|
|
1758
|
+
title. Unset (the default) or when the
|
|
1759
|
+
function returns nothing, a title cut short with an ellipsis shows its
|
|
1760
|
+
whole text; `false`, set or returned, shows no tooltip.
|
|
1761
|
+
@example
|
|
1762
|
+
{maxLines: 1, titleTooltip: title => notes[title]}
|
|
1763
|
+
*/
|
|
1764
|
+
dimensionTitleConfig?: Record<string, unknown> & {
|
|
1765
|
+
titleTooltip?: string | ((title: string) => string | false | void) | AxisTooltipConfig<[title: string]> | false;
|
|
1766
|
+
};
|
|
1344
1767
|
/**
|
|
1345
1768
|
ParallelCoordinates: the data keys to draw an axis for, in order.
|
|
1346
1769
|
Defaults to every numeric key except the `groupBy` keys and `id`; a key
|
|
@@ -1351,10 +1774,54 @@ export interface D3plusConfig {
|
|
|
1351
1774
|
objects. A key is its column's title; a bare accessor has none. Rows
|
|
1352
1775
|
missing a category on any dimension (`undefined`, `null`, or `""`) are
|
|
1353
1776
|
left out.
|
|
1777
|
+
|
|
1778
|
+
ScatterMatrix: the numeric dimensions to compare, in order — data keys,
|
|
1779
|
+
accessor functions, or `{value, title}` objects. Defaults to every
|
|
1780
|
+
numeric key except the `groupBy` keys and `id`.
|
|
1354
1781
|
*/
|
|
1355
1782
|
dimensions?: AlluvialDimensionInput[];
|
|
1356
|
-
/**
|
|
1783
|
+
/**
|
|
1784
|
+
Sets orientation of main category axis. Left unset on a Plot (Scatter,
|
|
1785
|
+
BubbleChart, …), the axis whose values include text is the category
|
|
1786
|
+
axis (when both do, the one with fewer distinct values, `x` on a
|
|
1787
|
+
tie); numbers stored as text stay continuous. With no text on either
|
|
1788
|
+
axis, a Plot drawing a Bar, Area, or Box stands it on `x`.
|
|
1789
|
+
*/
|
|
1357
1790
|
discrete?: "x" | "y" | "radius" | "angle";
|
|
1791
|
+
/**
|
|
1792
|
+
Geomap: draws one dot for every `per` units of each row's `value`
|
|
1793
|
+
(`1000` by default), scattered inside the row's region. Each region
|
|
1794
|
+
(and each category in it) draws its dots from a random stream seeded
|
|
1795
|
+
by its id, so a redraw, a resize, or a new value never moves the dots
|
|
1796
|
+
already there; a dot never falls outside its region or inside one of
|
|
1797
|
+
its holes. With more than one `groupBy` level, the outer levels split
|
|
1798
|
+
each region into categories (e.g. `groupBy: ["race", "state"]`),
|
|
1799
|
+
whose dots take the chart's colors for them, mix together, and show in
|
|
1800
|
+
the legend; with one level, every dot takes `fill`, or the first color
|
|
1801
|
+
of the chart's palette (lightened over a dark basemap). `r` sets the
|
|
1802
|
+
dot radius in pixels (`1.5`) and `fillOpacity` their opacity (`0.8`).
|
|
1803
|
+
Each dot stands for exactly `per` units: past 20,000 dots, a chart
|
|
1804
|
+
whose `renderer` isn't set draws on Canvas instead of SVG (noting it
|
|
1805
|
+
once in the console), and back on SVG once the dots fit. Only past
|
|
1806
|
+
`max` dots in all (`100000`) does each dot stand for the next round
|
|
1807
|
+
number of units at which the dots fit. The region outlines stay
|
|
1808
|
+
drawn; hovering a region shows its totals, and hovering its dots shows
|
|
1809
|
+
their value and count. A `cartogram` turns the dots off. Defaults to
|
|
1810
|
+
`false`.
|
|
1811
|
+
*/
|
|
1812
|
+
dotDensity?: false | {
|
|
1813
|
+
value: string | ((d: DataPoint, i: number) => unknown);
|
|
1814
|
+
per?: number;
|
|
1815
|
+
r?: number;
|
|
1816
|
+
fill?: CssColor | ((d: DataPoint, i: number) => CssColor);
|
|
1817
|
+
fillOpacity?: number;
|
|
1818
|
+
max?: number;
|
|
1819
|
+
};
|
|
1820
|
+
/**
|
|
1821
|
+
DotPlot: a fixed dot radius, in pixels. Defaults to the largest dot (up
|
|
1822
|
+
to 10 pixels) at which the tallest stack fits its row (or the chart).
|
|
1823
|
+
*/
|
|
1824
|
+
dotRadius?: number;
|
|
1358
1825
|
/** Candlestick: the color of periods that closed below their open, or an accessor of the row. Defaults to red. */
|
|
1359
1826
|
downColor?: string | ((d: DataPoint, i: number) => string);
|
|
1360
1827
|
/** Default duration of transitions, in milliseconds. */
|
|
@@ -1368,7 +1835,7 @@ export interface D3plusConfig {
|
|
|
1368
1835
|
emptyFill?: string;
|
|
1369
1836
|
/** Splits the chart into small multiples: one equally sized panel per distinct value of this data key or accessor, sharing one legend, color scale, title, and timeline. `false` draws a single chart. */
|
|
1370
1837
|
facet?: string | ((d: DataPoint, i: number) => unknown) | false;
|
|
1371
|
-
/** Layout and scale sharing for small multiples (see `facet`): `columns`, `rows`, `padding`, `sort`, `scales` (`"shared"` or `"independent"`), `axes` (`"outer"` or `"all"`, for both axes or per axis as `{x, y}`), `title`, and `
|
|
1838
|
+
/** Layout and scale sharing for small multiples (see `facet`): `columns`, `rows`, `padding`, `sort`, `scales` (`"shared"` or `"independent"`), `axes` (`"outer"` or `"all"`, for both axes or per axis as `{x, y}`), `title`, `titleConfig`, and `layout` (a map-shaped grid: `"us-states"`, `"eu-countries"`, `"world-regions"`, or `{[value]: [row, column]}`). */
|
|
1372
1839
|
facetConfig?: FacetConfig;
|
|
1373
1840
|
/**
|
|
1374
1841
|
Fills the area between two series' lines, in the color of whichever
|
|
@@ -1396,48 +1863,46 @@ export interface D3plusConfig {
|
|
|
1396
1863
|
/** Allows removing specific geographies from topojson file to improve zoom. */
|
|
1397
1864
|
fitFilter?: number | string | ((d: Record<string, unknown>) => boolean);
|
|
1398
1865
|
/**
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1866
|
+
WordCloud: the largest font size, in pixels, given to the word with
|
|
1867
|
+
the largest value (default `60`). When the words don't all fit, every
|
|
1868
|
+
size shrinks together until they do.
|
|
1869
|
+
*/
|
|
1870
|
+
fontMax?: number;
|
|
1871
|
+
/** WordCloud: the smallest font size, in pixels, given to the word with the smallest value (default `10`). */
|
|
1872
|
+
fontMin?: number;
|
|
1873
|
+
/**
|
|
1874
|
+
WordCloud: how values map onto font sizes between `fontMin` and
|
|
1875
|
+
`fontMax`: `"sqrt"` (default) so each word's ink area grows about in
|
|
1876
|
+
step with its value, `"linear"` for its height, or `"log"` for values
|
|
1877
|
+
spanning orders of magnitude.
|
|
1878
|
+
*/
|
|
1879
|
+
fontScale?: "sqrt" | "linear" | "log";
|
|
1880
|
+
/** WordCloud: the words' font weight (default `600`), or an accessor `(d, i) => weight` per word. */
|
|
1881
|
+
fontWeight?: number | string | ((d: DataPoint, i: number) => number | string);
|
|
1882
|
+
/**
|
|
1883
|
+
Marks a forecast: a shaded backdrop, a rule, and a "Forecast" label over
|
|
1884
|
+
the forecast stretch, with lines dashed there (see `forecastConfig`).
|
|
1885
|
+
A function flags the forecast rows; `"auto"` (or `true`) flags rows whose
|
|
1886
|
+
`confidence` bounds spread from their line; a discrete-axis value starts
|
|
1887
|
+
the forecast there; `false` marks nothing. Unset (the default), only a
|
|
1888
|
+
trend line projection is marked. Defaults to `"auto"` on a FanChart.
|
|
1413
1889
|
|
|
1414
|
-
Bullet: each row's forecast (or other comparative measure), drawn as
|
|
1415
|
-
|
|
1416
|
-
|
|
1890
|
+
Bullet: each row's forecast (or other comparative measure), drawn as a
|
|
1891
|
+
paler bar behind the measure: a data key, an accessor, a number, or
|
|
1892
|
+
`false`.
|
|
1417
1893
|
*/
|
|
1418
1894
|
forecast?: boolean | "auto" | number | string | Date | ((d: DataPoint, i: number) => boolean | number);
|
|
1419
1895
|
/**
|
|
1420
|
-
Styles
|
|
1421
|
-
|
|
1422
|
-
`
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
`
|
|
1427
|
-
line's forecast stretch (default `"6 4"`; `false` keeps lines solid).
|
|
1428
|
-
Colors default to the chart's text color for its background. The
|
|
1429
|
-
backdrop is chart chrome with no data row, so `shapeConfig.texture`
|
|
1430
|
-
and `shapeConfig.backgroundImage` leave it plain; give it its own
|
|
1431
|
-
`texture` (a textures.js name or config, drawn in the backdrop's color
|
|
1432
|
-
over its shade at `textureOpacity`, default `0.3`, with
|
|
1433
|
-
`textureDefault`) or `backgroundImage` (a URL,
|
|
1434
|
-
fit by `backgroundImageFit`, `"cover"` or `"contain"`). Both are off
|
|
1435
|
-
by default.
|
|
1896
|
+
Styles the `forecast` marker: the backdrop's `fill` and `fillOpacity`
|
|
1897
|
+
(default `0.05`), the rule's `stroke`, `strokeWidth`, `strokeOpacity`,
|
|
1898
|
+
and `strokeDasharray`, the `label` text (default "Forecast"; `false`
|
|
1899
|
+
hides it) and its font keys, `lineDasharray` for each line's forecast
|
|
1900
|
+
stretch (default `"6 4"`; `false` keeps lines solid), and an optional
|
|
1901
|
+
`texture` or `backgroundImage` for the backdrop. `fill: false` or
|
|
1902
|
+
`stroke: false` hides the backdrop or rule.
|
|
1436
1903
|
|
|
1437
|
-
Bullet: the forecast bar's `size` (a
|
|
1438
|
-
|
|
1439
|
-
`backgroundImage`/`backgroundImageFit`, each a value or a `(d, i)`
|
|
1440
|
-
accessor.
|
|
1904
|
+
Bullet: the forecast bar's `size` (a share of the band), `opacity`,
|
|
1905
|
+
`fill`, `texture`, and `backgroundImage`/`backgroundImageFit`.
|
|
1441
1906
|
*/
|
|
1442
1907
|
forecastConfig?: Record<string, unknown>;
|
|
1443
1908
|
/**
|
|
@@ -1495,6 +1960,25 @@ export interface D3plusConfig {
|
|
|
1495
1960
|
groupPadding?: number;
|
|
1496
1961
|
/** Overall height of the visualization in pixels. */
|
|
1497
1962
|
height?: number;
|
|
1963
|
+
/**
|
|
1964
|
+
Geomap: bins the coordinate points into hexagons on the projected map,
|
|
1965
|
+
each colored on the colorScale by how many points it holds, in place of
|
|
1966
|
+
the points themselves. `true` bins at a `12`-pixel radius; an object
|
|
1967
|
+
sets the `radius`, and with a `value` (a data key or accessor), colors
|
|
1968
|
+
each bin by the `"sum"` (default) or `"mean"` (`agg`) of it over the
|
|
1969
|
+
bin's points, named `label` in the bin's tooltip. As the map zooms, the
|
|
1970
|
+
points are binned again so each hexagon keeps its pixel radius and
|
|
1971
|
+
zooming in shows finer detail, and the colorScale refits to the bins
|
|
1972
|
+
in view. Bins aren't clipped to land. The regions keep the no-data fill, and
|
|
1973
|
+
the legend and point size legend are hidden. A `cartogram` turns the
|
|
1974
|
+
bins off. Defaults to `false`.
|
|
1975
|
+
*/
|
|
1976
|
+
hexbin?: boolean | {
|
|
1977
|
+
radius?: number;
|
|
1978
|
+
value?: string | ((d: DataPoint, i: number) => unknown);
|
|
1979
|
+
agg?: "sum" | "mean";
|
|
1980
|
+
label?: string;
|
|
1981
|
+
};
|
|
1498
1982
|
/**
|
|
1499
1983
|
Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).
|
|
1500
1984
|
*/
|
|
@@ -1506,19 +1990,9 @@ export interface D3plusConfig {
|
|
|
1506
1990
|
/** The hover callback function for highlighting shapes on mouseover. */
|
|
1507
1991
|
hover?: ((d: DataPoint, i: number) => boolean) | false | null;
|
|
1508
1992
|
/**
|
|
1509
|
-
How close
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
whose edge lies within this distance: its tooltip, hover highlight, and
|
|
1513
|
-
axis guides show, and a click there clicks it. A point's tooltip points
|
|
1514
|
-
at the top of the point (on it or near it) and holds still until
|
|
1515
|
-
another point takes over. Applies to the point
|
|
1516
|
-
marks of scatter and bubble plots (Circle and Rect shapes, Beeswarm
|
|
1517
|
-
included), Network nodes, and Geomap points; bars, areas, lines, and
|
|
1518
|
-
other area-filling marks keep exact hit-testing.
|
|
1519
|
-
Plots with a discrete axis and `tooltipShared` on snap to the nearest
|
|
1520
|
-
column instead. Defaults to `20`; `0` turns it off, along with the
|
|
1521
|
-
anchored tooltip.
|
|
1993
|
+
How close (px) the pointer must come to a point mark (scatter and
|
|
1994
|
+
bubble points, Network nodes, Geomap points, Radar dots) to hover it, so small
|
|
1995
|
+
points are easy to reach. Defaults to `20`; `0` turns it off.
|
|
1522
1996
|
*/
|
|
1523
1997
|
hoverDistance?: number;
|
|
1524
1998
|
/** Candlestick: accessor or data key for each period's highest value (default `"high"`). */
|
|
@@ -1531,7 +2005,11 @@ export interface D3plusConfig {
|
|
|
1531
2005
|
`false` fills both.
|
|
1532
2006
|
*/
|
|
1533
2007
|
hollow?: boolean;
|
|
1534
|
-
/**
|
|
2008
|
+
/**
|
|
2009
|
+
Waterfall: fill for bars that raise the running total. Dumbbell with
|
|
2010
|
+
`arrows`: color for a category whose value rises. Defaults to
|
|
2011
|
+
`colorDefaults.on`.
|
|
2012
|
+
*/
|
|
1535
2013
|
increaseColor?: string;
|
|
1536
2014
|
/**
|
|
1537
2015
|
What Violin draws inside each violin: `"box"` (default; a narrow box
|
|
@@ -1547,17 +2025,22 @@ export interface D3plusConfig {
|
|
|
1547
2025
|
points?: Record<string, unknown>;
|
|
1548
2026
|
};
|
|
1549
2027
|
/**
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
2028
|
+
Spreads a Plot's point marks (Circle and Rect) across their category's
|
|
2029
|
+
band, so points sharing a category don't hide each other: `true` spreads
|
|
2030
|
+
them over 0.6 of the band, a number over that share of it (0–1), and
|
|
2031
|
+
`false` (the default; `true` for StripPlot) keeps each on its
|
|
2032
|
+
category's center. The band runs across the `discrete` axis; without
|
|
2033
|
+
one, nothing moves. Each point's offset is seeded from its id, so a
|
|
2034
|
+
redraw, resize, or filter never moves it. A `swarm` takes precedence.
|
|
2035
|
+
In BoxWhisker, it spreads the `boxPoints` across each box's width
|
|
2036
|
+
instead (default `true`).
|
|
2037
|
+
*/
|
|
2038
|
+
jitter?: boolean | number;
|
|
2039
|
+
/**
|
|
2040
|
+
Lets keyboard users move between the chart's marks: the chart is one Tab
|
|
2041
|
+
stop, the arrow keys move to the nearest mark in that direction, Home and
|
|
2042
|
+
End jump to the ends, Enter or Space click the focused mark, and Escape
|
|
2043
|
+
clears it. Defaults to `true`; `false` removes the Tab stop.
|
|
1561
2044
|
*/
|
|
1562
2045
|
keyboardNav?: boolean;
|
|
1563
2046
|
/** Styles the focus ring around the mark keyboard navigation has focused (see `KeyboardNavConfig`). */
|
|
@@ -1568,6 +2051,13 @@ export interface D3plusConfig {
|
|
|
1568
2051
|
per-datum object key — pass a function for that).
|
|
1569
2052
|
*/
|
|
1570
2053
|
label?: string | string[] | false | AccessorFn;
|
|
2054
|
+
/**
|
|
2055
|
+
Venn: what each region label's count means. `"exclusive"` (default)
|
|
2056
|
+
counts the items in that region and none of the smaller regions drawn
|
|
2057
|
+
inside it, so the counts add up to the whole; `"inclusive"` shows each
|
|
2058
|
+
row's own size, every item in all of its sets. Tooltips show both.
|
|
2059
|
+
*/
|
|
2060
|
+
labelCounts?: "exclusive" | "inclusive";
|
|
1571
2061
|
/**
|
|
1572
2062
|
Gantt: the most the task label column may take: a share of the chart's
|
|
1573
2063
|
width when 1 or below (default `0.3`), else pixels. The column fits the
|
|
@@ -1575,96 +2065,45 @@ export interface D3plusConfig {
|
|
|
1575
2065
|
*/
|
|
1576
2066
|
labelWidth?: number;
|
|
1577
2067
|
/**
|
|
1578
|
-
Where each shape's label goes
|
|
1579
|
-
`(d, i) => string` accessor
|
|
2068
|
+
Where each shape's label goes: `"auto"`, `"along"`, `"inside"`, or
|
|
2069
|
+
`"outside"`, or a `(d, i) => string` accessor. `"auto"` picks
|
|
2070
|
+
whichever fits best per shape, and a label with no room is left out.
|
|
1580
2071
|
|
|
1581
|
-
-
|
|
1582
|
-
|
|
1583
|
-
`"
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
`"auto"` is labelled outside the ring instead, and `"outside"`
|
|
1594
|
-
labels every slice there: its name and share, horizontal, in the
|
|
1595
|
-
Path `labelConfig`'s font at its `fontSize` (12px by default), in
|
|
1596
|
-
the theme's text color unless `labelConfig.fontColor` sets one,
|
|
1597
|
-
joined to the slice by a thin leader line. These labels stack in a
|
|
1598
|
-
column on the side of the ring their slice faces, wrapping onto a
|
|
1599
|
-
second line between words when their column is narrow; the ring
|
|
1600
|
-
shrinks (its hole with it) to leave room for them, never below 60%
|
|
1601
|
-
of its full radius, and when they don't all fit, the smallest
|
|
1602
|
-
slices' labels are left out (those slices keep their label inside,
|
|
1603
|
-
if any). `"inside"` keeps a Pie or Donut's labels straight inside
|
|
1604
|
-
their slices, and on the other ring segments both `"inside"` and
|
|
1605
|
-
`"outside"` keep the straight labels. A Donut's curves
|
|
1606
|
-
follow the middle of its ring (the rim, when its hole is small),
|
|
1607
|
-
with the slice's share on a smaller second line when there is room.
|
|
1608
|
-
A Sunburst also weighs a label turned along its radius, which suits
|
|
1609
|
-
the narrow arcs of the outer rings. Curved Donut and Sunburst names
|
|
1610
|
-
keep 5px from the ring's edges and at least 0.3em from the
|
|
1611
|
-
segment's ends, at the largest size from the Path `labelConfig`'s
|
|
1612
|
-
`fontSize` (else `fontMax`, 24px by default) down to its `fontMin`
|
|
1613
|
-
(8px). A Chord curves its group names just outside the ring when
|
|
1614
|
-
every name fits along its arc, which leaves the ring more room;
|
|
1615
|
-
otherwise it curves those that fit and turns the rest along their
|
|
1616
|
-
spokes, all at the Path `labelConfig`'s `fontSize` (11px by
|
|
1617
|
-
default). A Radar does the same with its metric names, just outside
|
|
1618
|
-
the web, each between its neighbors' spokes, wrapping a long name
|
|
1619
|
-
onto a second curved line. A RadialBar curves each track's name along the track, inside
|
|
1620
|
-
its bar (or past its end when the bar is too short), when the sweep
|
|
1621
|
-
leaves no room before the start for the straight labels, and at any
|
|
1622
|
-
sweep for `"along"`; when every track is named this way, the default
|
|
1623
|
-
legend hides. Curved text takes the color that contrasts with what
|
|
1624
|
-
lies under it (the theme's ink outside the ring) and dims with its
|
|
1625
|
-
segment on hover. A label with no room is left out.
|
|
1626
|
-
- Bars: `"inside"` or `"outside"` the bar, or `"auto"`, which goes
|
|
1627
|
-
outside when the bar is shorter than half the room along its axis.
|
|
1628
|
-
Stacked bars always label inside.
|
|
1629
|
-
- Circles (scatter and bubble points, Beeswarm points given a `label`,
|
|
1630
|
-
Network nodes, and Geomap coordinate points): `"auto"` keeps a label
|
|
1631
|
-
inside its circle when it fits there at `pointLabelConfig.fontMin` or
|
|
1632
|
-
larger, else moves it beside the circle, else hides it. A Network or
|
|
1633
|
-
Geomap's labels beside their circles stay in the chart area, a
|
|
1634
|
-
Plot's in its plot area. `"inside"` keeps every label
|
|
1635
|
-
inside, shrinking it to fit (a label that can't fit is dropped).
|
|
1636
|
-
`"outside"` always puts it beside the circle. A label goes beside its
|
|
1637
|
-
circle on the side with the most open room: the side facing its
|
|
1638
|
-
Voronoi cell's centroid first, then right, left, top, bottom, and the
|
|
1639
|
-
diagonals. A side is taken only where the label lies mostly in the
|
|
1640
|
-
circle's Voronoi cell, stays in that area, and overlaps no circle and
|
|
1641
|
-
no label placed before it. Larger circles are
|
|
1642
|
-
placed first. A label with no room is hidden; the circle's tooltip and
|
|
1643
|
-
aria-label still name it. Geomap points are labeled by
|
|
1644
|
-
`shapeConfig.Circle.label` when it is set (`false` turns their labels
|
|
1645
|
-
off), else by `label`. Labels are placed when the chart draws: a
|
|
1646
|
-
zoomed Plot places them again for its new scales, while a zoomed
|
|
1647
|
-
Network or Geomap scales them with the picture.
|
|
1648
|
-
- Stacked areas (StackedArea, Streamgraph, and a stacked AreaPlot):
|
|
1649
|
-
`"auto"` or `"along"` runs each series' name along its band's
|
|
1650
|
-
centerline, following its curve, on the stretch where the band is at
|
|
1651
|
-
least the font size plus 4px thick under the whole label and flattest.
|
|
1652
|
-
The text reads upright, in the color that contrasts with the band's
|
|
1653
|
-
fill (or the Area `labelConfig`'s `fontColor`, when you set one), and
|
|
1654
|
-
dims with its band on hover. It starts at the Area `labelConfig`'s
|
|
1655
|
-
`fontSize` (or `fontMax`, else 16px) and shrinks a pixel at a time
|
|
1656
|
-
down to its `fontMin`, but no lower than 8px, before giving up; a
|
|
1657
|
-
band too thin for its name everywhere goes unlabeled. When every band
|
|
1658
|
-
gets a name, the default legend hides (a `legend` of your own always
|
|
1659
|
-
wins, and the legend stays while a series is hidden from it).
|
|
1660
|
-
`"inside"` (or `"outside"`) puts the label in the band's largest box
|
|
1661
|
-
instead. `shapeConfig.Area.label` sets the text, or `false` for none.
|
|
2072
|
+
- Rings (Pie, Donut, Sunburst, Chord, RadialBar) and polar charts
|
|
2073
|
+
(Radar, PolarArea, RadialMatrix): `"along"` curves the name along its
|
|
2074
|
+
arc. `"inside"` keeps it straight; on a Pie or Donut, `"outside"`
|
|
2075
|
+
moves it beside the ring with a leader line.
|
|
2076
|
+
- Bars: inside or outside the bar. `"auto"` goes outside when the bar
|
|
2077
|
+
is short. Stacked bars always label inside.
|
|
2078
|
+
- Circles (Plot points, Network nodes, Geomap points): inside the
|
|
2079
|
+
circle, or beside it when it doesn't fit (`"outside"` always beside).
|
|
2080
|
+
`"auto"` also moves it beside when a circle drawn over its own
|
|
2081
|
+
covers it, and keeps it inside when no side has room.
|
|
2082
|
+
- Stacked areas: `"auto"` and `"along"` run each name along its band;
|
|
2083
|
+
`"inside"` puts it in the band's largest box.
|
|
1662
2084
|
|
|
1663
|
-
|
|
2085
|
+
When every stacked area or RadialBar track is named along its shape,
|
|
2086
|
+
the default legend hides. Defaults to `"auto"`.
|
|
1664
2087
|
*/
|
|
1665
2088
|
labelPosition?: "auto" | "along" | "inside" | "outside" | ((d: DataPoint, i: number) => "auto" | "along" | "inside" | "outside");
|
|
1666
2089
|
/**
|
|
1667
|
-
|
|
2090
|
+
Circles (Plot points, Network nodes, Geomap points): whether a label
|
|
2091
|
+
that fits neither inside its circle nor centered on a side of it slides
|
|
2092
|
+
along a side before it hides, clear of the other circles and labels
|
|
2093
|
+
(and, on a Network, crossing as few links as it can). It may also move
|
|
2094
|
+
a neighbor's label aside to make room. `false` keeps each label
|
|
2095
|
+
centered on a side, or hides it. Defaults to `true`.
|
|
2096
|
+
*/
|
|
2097
|
+
labelSlide?: boolean;
|
|
2098
|
+
/**
|
|
2099
|
+
Whether to display the legend. By default it shows when it has more than
|
|
2100
|
+
one entry and each entry stands for a single group, or when entries are
|
|
2101
|
+
colored by a category that isn't a `groupBy` level. It hides when the
|
|
2102
|
+
chart's own labels already name every entry (see `labelPosition`), or
|
|
2103
|
+
when every Circle, Rect, and Bar of a Plot shows its whole label as its
|
|
2104
|
+
legend entry would, and stays while a series is hidden or soloed.
|
|
2105
|
+
`false` hides it, `true` always shows it, and a `(config, data) =>
|
|
2106
|
+
boolean` function decides.
|
|
1668
2107
|
*/
|
|
1669
2108
|
legend?: boolean | ((config: D3plusConfig, arr: DataPoint[]) => boolean);
|
|
1670
2109
|
/** Configuration object passed to the legend's config method. */
|
|
@@ -1684,11 +2123,17 @@ export interface D3plusConfig {
|
|
|
1684
2123
|
*/
|
|
1685
2124
|
legendFilterInvert?: boolean | ((viz: VizBase) => boolean);
|
|
1686
2125
|
/**
|
|
1687
|
-
Whether legend clicks go on the chart's Back history
|
|
2126
|
+
Whether legend clicks go on the chart's Back history, so Back undoes
|
|
2127
|
+
them along with drill-downs, in order. Defaults to `true`; `false` leaves
|
|
2128
|
+
them off, so Back only steps out of drill-downs.
|
|
1688
2129
|
*/
|
|
1689
2130
|
legendHistory?: boolean;
|
|
1690
2131
|
/**
|
|
1691
|
-
Whether the chart may draw
|
|
2132
|
+
Whether the chart may draw a legend, size legend, or colorScale inside
|
|
2133
|
+
empty space around its marks (over a translucent box, see
|
|
2134
|
+
`legendInsetConfig`) instead of in a margin. Only a legend whose position
|
|
2135
|
+
is `"auto"` can move inside. Defaults to `true`; also accepts a function
|
|
2136
|
+
of the resolved config.
|
|
1692
2137
|
*/
|
|
1693
2138
|
legendInset?: boolean | ((config: D3plusConfig) => boolean);
|
|
1694
2139
|
/**
|
|
@@ -1722,10 +2167,10 @@ export interface D3plusConfig {
|
|
|
1722
2167
|
/** Configuration object for the legend tooltip. */
|
|
1723
2168
|
legendTooltip?: TooltipConfig;
|
|
1724
2169
|
/**
|
|
1725
|
-
Formats the Radar's level value labels, or the
|
|
1726
|
-
labels and tooltips. Receives the
|
|
1727
|
-
Defaults to the abbreviated number format the axes
|
|
1728
|
-
…).
|
|
2170
|
+
Formats the Radar's level value labels and dot tooltip values, or the
|
|
2171
|
+
Hexbin's contour level labels and tooltips. Receives the value and
|
|
2172
|
+
returns its label. Defaults to the abbreviated number format the axes
|
|
2173
|
+
use (`1.5k`, `2M`, …).
|
|
1729
2174
|
*/
|
|
1730
2175
|
levelFormat?: (d: number) => string | number;
|
|
1731
2176
|
/**
|
|
@@ -1762,28 +2207,15 @@ export interface D3plusConfig {
|
|
|
1762
2207
|
/** ParallelCoordinates: the lines' stroke opacity, or `"auto"` (default) to fade them as their number grows. */
|
|
1763
2208
|
lineOpacity?: number | "auto";
|
|
1764
2209
|
/**
|
|
1765
|
-
Labels each line
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
the plot is too short for them all, the last that fits reads "+N more".
|
|
1775
|
-
`lineLabelConfig` adds each end's value to its label.
|
|
1776
|
-
|
|
1777
|
-
`"along"` writes each series name along its own line instead, following
|
|
1778
|
-
its curve: on the stretch that bends and slopes least and stays clear
|
|
1779
|
-
of the other lines and labels, reading upright whichever way the line
|
|
1780
|
-
runs. A line with no clear stretch for its name goes unlabeled, a chart
|
|
1781
|
-
(or small-multiples panel) with a single line names none, and the plot
|
|
1782
|
-
leaves no room past the lines for these labels. The Line shape's
|
|
1783
|
-
`labelConfig` sets their `fontSize`, `fontFamily`, and `fontWeight`.
|
|
1784
|
-
When every line gets a name, the default legend hides (a `legend` of
|
|
1785
|
-
your own always wins). LinePlot defaults to `"along"`; other charts
|
|
1786
|
-
default to no labels.
|
|
2210
|
+
Labels each line with its series name: `true` or `"end"` past its right
|
|
2211
|
+
end, `"start"` past its left end, `"both"` at both ends, or `"along"`
|
|
2212
|
+
written along the line itself, following its curve on a stretch no
|
|
2213
|
+
steeper than 45° (see `lineLabelConfig.maxSlope`; a line with none goes
|
|
2214
|
+
unlabeled). A function of each
|
|
2215
|
+
row picks per series (or `false`). End labels that would overlap are
|
|
2216
|
+
moved apart, and `lineLabelConfig` can add each end's value. When every
|
|
2217
|
+
line is named along it, the default legend hides. Defaults to `"along"`
|
|
2218
|
+
on LinePlot, no labels elsewhere.
|
|
1787
2219
|
*/
|
|
1788
2220
|
lineLabels?: LineLabelsSetting;
|
|
1789
2221
|
/**
|
|
@@ -1791,7 +2223,11 @@ export interface D3plusConfig {
|
|
|
1791
2223
|
labeled end after the series name (e.g. "Brazil 37%"), formatted as the
|
|
1792
2224
|
y axis formats its ticks (its `tickFormat` when set). `valueFormat`
|
|
1793
2225
|
formats it instead, as a function of the value, the row it belongs to,
|
|
1794
|
-
and the row's index.
|
|
2226
|
+
and the row's index. For along labels, `minRadius` sets how tightly a
|
|
2227
|
+
label may bend toward its text, in ems (default `4`), and `maxSlope`
|
|
2228
|
+
how steeply its stretch may climb or fall, in degrees (default `45`;
|
|
2229
|
+
`90` for no limit); see `LineLabelConfig`.
|
|
2230
|
+
Defaults to `{value: false}`.
|
|
1795
2231
|
*/
|
|
1796
2232
|
lineLabelConfig?: LineLabelConfig;
|
|
1797
2233
|
/**
|
|
@@ -1799,30 +2235,37 @@ export interface D3plusConfig {
|
|
|
1799
2235
|
tracks and 360 for the circular bar chart.
|
|
1800
2236
|
*/
|
|
1801
2237
|
maxAngle?: number;
|
|
2238
|
+
/**
|
|
2239
|
+
Network: how the nodes are placed. `"force"` (the default) places them
|
|
2240
|
+
at their `x` and `y`, or by a force simulation when any node has
|
|
2241
|
+
none. `"circle"` spaces them evenly around a circle, ordered by
|
|
2242
|
+
cluster and then most connected first (see `nodeSort`), with links
|
|
2243
|
+
bowing in toward the center and each label turned outward along its
|
|
2244
|
+
node's spoke past the circle.
|
|
2245
|
+
*/
|
|
2246
|
+
layout?: "force" | "circle";
|
|
2247
|
+
/**
|
|
2248
|
+
Network's circle layout (`layout: "circle"`): how far links bow in
|
|
2249
|
+
toward the center, from `0` (straight lines) to `1` (each link curves
|
|
2250
|
+
through the center's pull, as a chord diagram's do). It sets the share
|
|
2251
|
+
of the way from the middle of a link's chord to the center that its
|
|
2252
|
+
curve's control point sits. Defaults to `0.5`, which keeps links
|
|
2253
|
+
between neighbors near the rim and lets long ones cross the middle.
|
|
2254
|
+
Bundled links ignore it.
|
|
2255
|
+
*/
|
|
2256
|
+
linkBow?: number;
|
|
1802
2257
|
/**
|
|
1803
2258
|
Geomap: how far each link bows into an arc, as a share of the distance
|
|
1804
|
-
between its ends
|
|
1805
|
-
`0.2`
|
|
1806
|
-
|
|
1807
|
-
running both ways between two places stay apart. On a flat map, a
|
|
1808
|
-
link whose great circle the projection cuts (across the antimeridian,
|
|
1809
|
-
or between `"geoAlbersUsa"`'s insets) is drawn on the screen between
|
|
1810
|
-
its ends, bowed the same way, so it crosses the map instead of leaving
|
|
1811
|
-
by one edge. On a projection that clips to a circle (a globe such as
|
|
1812
|
-
`"geoOrthographic"`), links follow the great circle without the lift.
|
|
2259
|
+
between its ends: `0` draws the plain great-circle path, and the default
|
|
2260
|
+
`0.2` bows it to the left of its direction (negative bows right), so
|
|
2261
|
+
links running both ways stay apart. Globes ignore it.
|
|
1813
2262
|
*/
|
|
1814
2263
|
linkCurve?: number;
|
|
1815
2264
|
/**
|
|
1816
|
-
Network and Geomap: bundles the
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
Arrowheads, labels, hover, and click focus follow each bundled curve.
|
|
1821
|
-
A Network's links from a node to itself, and a Geomap's links on a
|
|
1822
|
-
globe or cut by its projection, are drawn as usual; a bundled Geomap
|
|
1823
|
-
link ignores `linkCurve`. The bundling is worked out once per layout
|
|
1824
|
-
(under a second for 2,500 links) and reused while the chart zooms,
|
|
1825
|
-
pans, or is hovered. Defaults to `false`.
|
|
2265
|
+
Network and Geomap: bundles links that run the same way into shared
|
|
2266
|
+
curves (force-directed edge bundling), so the main flows read through
|
|
2267
|
+
the clutter of a dense chart. A bundled Geomap link ignores
|
|
2268
|
+
`linkCurve`. Defaults to `false`.
|
|
1826
2269
|
*/
|
|
1827
2270
|
linkBundle?: boolean;
|
|
1828
2271
|
/**
|
|
@@ -1846,18 +2289,11 @@ export interface D3plusConfig {
|
|
|
1846
2289
|
*/
|
|
1847
2290
|
linkSizeMin?: number;
|
|
1848
2291
|
/**
|
|
1849
|
-
Colors each link of a Network, Rings, Sankey, ArcDiagram, or Geomap
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
colorScale, which then shows the links' values beside the nodes' color
|
|
1855
|
-
legend (when the chart also has a `colorScale` for its nodes, nodes and
|
|
1856
|
-
links share it, on one domain); a string is a color when it parses as
|
|
1857
|
-
one, or else a category in the chart's palette, as `color` colors
|
|
1858
|
-
nodes. `false` (the default) draws every link in the theme's `link`
|
|
1859
|
-
gray (on a Geomap, a gray halfway between the chart's background and
|
|
1860
|
-
text colors, which reads over land and water alike).
|
|
2292
|
+
Colors each link of a Network, Rings, Sankey, ArcDiagram, or Geomap (and
|
|
2293
|
+
its arrowheads): `"source"` or `"target"` takes that node's color, and a
|
|
2294
|
+
key or accessor reads a value from each link: a number is colored on the
|
|
2295
|
+
colorScale, and a string is a color or a palette category. `false` (the
|
|
2296
|
+
default) draws every link in the theme's link gray.
|
|
1861
2297
|
*/
|
|
1862
2298
|
linkColor?: false | "source" | "target" | string | ((d: DataPoint, i: number) => unknown);
|
|
1863
2299
|
/**
|
|
@@ -1873,35 +2309,21 @@ export interface D3plusConfig {
|
|
|
1873
2309
|
*/
|
|
1874
2310
|
linkLabel?: string | ((d: DataPoint, i: number) => unknown);
|
|
1875
2311
|
/**
|
|
1876
|
-
Styles the link labels (see `linkLabel`): `rotate
|
|
1877
|
-
default
|
|
1878
|
-
`fontSize` (10)
|
|
1879
|
-
`backgroundOpacity
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
(defaults to the chart's text color), `fontFamily`, or `fontWeight`.
|
|
1883
|
-
Along a curved link (a Rings spline or fanned parallel link, an
|
|
1884
|
-
ArcDiagram arc, a self-loop, a bundled Network edge, a Geomap flow
|
|
1885
|
-
arc, or a Sankey band or return lane), an `"along"` label follows the
|
|
1886
|
-
curve, centered where a straight label would sit, over a pad that
|
|
1887
|
-
curves with it, and is cut short with an ellipsis when the curve has
|
|
1888
|
-
too little room (or left out when fewer than three letters fit). A
|
|
1889
|
-
loop bending tighter than `minRadius` keeps a straight label.
|
|
2312
|
+
Styles the link labels (see `linkLabel`): `rotate` (`"along"`, the
|
|
2313
|
+
default, runs text along its link, curves included; `"horizontal"`
|
|
2314
|
+
keeps it flat), `fontSize` (default `10`), `padding` (default `2`),
|
|
2315
|
+
`backgroundOpacity` of the pad behind the text (default `0.85`),
|
|
2316
|
+
`minRadius`, the tightest bend a label follows in ems (default `2`), and
|
|
2317
|
+
any other TextBox setting, such as `fontColor`.
|
|
1890
2318
|
*/
|
|
1891
2319
|
linkLabelConfig?: LinkLabelConfig;
|
|
1892
2320
|
/** Links this chart to every other chart with the same group name, so hovering, `active`, `highlight` (including search), and legend hide/solo clicks in one are mirrored in the rest, and a value gets the same categorical color in every chart. Rows match across charts by the value of `by` (a data key or accessor), which defaults to the chart's own id. A string is shorthand for `{group}`; set `hover`, `active`, `highlight`, `legend`, or `color` to `false` to stop sharing that behavior. */
|
|
1893
2321
|
link?: LinkOption;
|
|
1894
2322
|
/**
|
|
1895
|
-
Network, Rings, ArcDiagram, and Geomap:
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
smallest node's radius on the first two, and 10 pixels on a Geomap),
|
|
1900
|
-
or up to the smallest node's radius on an ArcDiagram. The
|
|
1901
|
-
function receives each link with its own fields, with `source` and
|
|
1902
|
-
`target` set to the data of the nodes at its ends (not their ids or
|
|
1903
|
-
indices), and its index in `links`. Link `shapeConfig` functions, arrow
|
|
1904
|
-
accessors, and tooltip accessors receive the same object.
|
|
2323
|
+
Network, Rings, ArcDiagram, and Geomap: each link's thickness, as a
|
|
2324
|
+
pixel number, or an accessor whose values are scaled (see
|
|
2325
|
+
`linkSizeScale`) between `linkSizeMin` and `linkSizeMax`. The accessor
|
|
2326
|
+
receives each link with `source` and `target` set to its nodes' data.
|
|
1905
2327
|
*/
|
|
1906
2328
|
linkSize?: number | ((d: DataPoint & {
|
|
1907
2329
|
source: DataPoint;
|
|
@@ -1928,6 +2350,47 @@ export interface D3plusConfig {
|
|
|
1928
2350
|
loadingHTML?: string | ((viz: VizBase) => string);
|
|
1929
2351
|
/** Candlestick: accessor or data key for each period's lowest value (default `"low"`). */
|
|
1930
2352
|
low?: string | ((d: DataPoint, i: number) => number);
|
|
2353
|
+
/**
|
|
2354
|
+
Draws the distribution of a Plot's points along its axes: the x values
|
|
2355
|
+
in a strip above the plot and the y values in a strip to its right,
|
|
2356
|
+
each lined up with its axis. `"histogram"` stacks the points in bins,
|
|
2357
|
+
`"box"` draws a box plot, and `"density"` a kernel density curve; `true`
|
|
2358
|
+
means `"histogram"`. `{x, y}` picks each strip (`false` or leaving one
|
|
2359
|
+
out draws none). Only for a Plot with two continuous axes and no
|
|
2360
|
+
`discrete` axis (Scatter, BubbleChart, ConnectedScatter); on a log or
|
|
2361
|
+
time axis the strip bins and smooths along the axis as drawn. The strips split
|
|
2362
|
+
the points by legend entry in their colors, and draw only the points
|
|
2363
|
+
the chart shows. Hovering a point lights the bins and boxes holding it,
|
|
2364
|
+
and hovering a strip's mark lights its points. Off by default.
|
|
2365
|
+
*/
|
|
2366
|
+
marginals?: boolean | "histogram" | "box" | "density" | {
|
|
2367
|
+
x?: false | "histogram" | "box" | "density";
|
|
2368
|
+
y?: false | "histogram" | "box" | "density";
|
|
2369
|
+
};
|
|
2370
|
+
/**
|
|
2371
|
+
Options for `marginals`: `size`, each strip's thickness in pixels, or
|
|
2372
|
+
as a share (up to `1`) of the chart area's shorter side (default
|
|
2373
|
+
`0.15`, kept between 16 and 120 pixels); `padding`, the gap between a
|
|
2374
|
+
strip and the plot (default `8`); `binThresholds`, a histogram strip's
|
|
2375
|
+
bins, as a count, interior edges, or a d3-array threshold generator
|
|
2376
|
+
(default Sturges' rule); and how the marks paint: `shapeConfig`-style
|
|
2377
|
+
keys (`fill`, `fillOpacity`, `stroke`, `strokeWidth`, `strokeOpacity`,
|
|
2378
|
+
`strokeDasharray`, `opacity`) at the top level style every mark, and
|
|
2379
|
+
under `histogram`, `box` (with its `median`, `whisker` and `outlier`
|
|
2380
|
+
parts) or `density`, one kind. Each takes a value or an accessor
|
|
2381
|
+
`(d, i)` of the mark (its `series`, `rows`, and `bin` or `box`) and
|
|
2382
|
+
its series' index.
|
|
2383
|
+
*/
|
|
2384
|
+
marginalConfig?: MarginalConfig;
|
|
2385
|
+
/** CyclePlot: draws a line across each panel at each series' mean over the panel's cycles (default `true`). */
|
|
2386
|
+
mean?: boolean;
|
|
2387
|
+
/**
|
|
2388
|
+
CyclePlot: styles the `mean` lines like a `referenceLines` entry:
|
|
2389
|
+
`stroke` (the chart's text color for one series, else each series'
|
|
2390
|
+
color), `strokeOpacity` (`1`), `strokeWidth`, `dash`, `label`, and
|
|
2391
|
+
`layer`.
|
|
2392
|
+
*/
|
|
2393
|
+
meanConfig?: Omit<ReferenceLineConfig, "x" | "y" | "x2" | "y2">;
|
|
1931
2394
|
/** Bullet: the measure bar's thickness, as a fraction of the band's thickness. */
|
|
1932
2395
|
measureSize?: number;
|
|
1933
2396
|
/** Orders Violin and Ridgeline categories by median: `false` (default; data order), `"ascending"`, or `"descending"`. */
|
|
@@ -1948,7 +2411,7 @@ export interface D3plusConfig {
|
|
|
1948
2411
|
messageStyle?: Record<string, unknown>;
|
|
1949
2412
|
/** Metric key for the visualization. */
|
|
1950
2413
|
metric?: string;
|
|
1951
|
-
/** Shows a small overview + draggable-viewport minimap
|
|
2414
|
+
/** Shows a small overview + draggable-viewport minimap in the chart's top-right corner (beneath the zoom controls, when they show) once the chart is zoomed in. On by default whenever `zoom` is enabled. */
|
|
1952
2415
|
minimap?: boolean;
|
|
1953
2416
|
/**
|
|
1954
2417
|
An additional CSS class name (or space-separated list of class names) applied to the minimap's outer box, viewport box, and zoom-level label, alongside their fixed `d3plus-minimap` / `d3plus-minimap-viewport` / `d3plus-minimap-label` classes. Setting this automatically disables d3plus's built-in inline `minimapStyle`/`minimapViewportStyle`/`minimapViewportStyleActive`/`minimapLabelStyle` defaults (as long as you haven't already customized them yourself), so a host page's own styling applies through the cascade with no other configuration needed.
|
|
@@ -1993,14 +2456,36 @@ export interface D3plusConfig {
|
|
|
1993
2456
|
*/
|
|
1994
2457
|
noDataMessage?: boolean;
|
|
1995
2458
|
/**
|
|
1996
|
-
The order of ArcDiagram's nodes along its line
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2459
|
+
The order of ArcDiagram's nodes along its line, and of Network's
|
|
2460
|
+
around its circle (`layout: "circle"`): `"data"` (their order in
|
|
2461
|
+
`nodes`), `"label"` (alphabetical), `"group"` (by cluster while
|
|
2462
|
+
clusters color the chart, else by the top `groupBy` or `nodeGroupBy`
|
|
2463
|
+
level when there are several, else, in ArcDiagram, by the `color`
|
|
2464
|
+
value; then by label), `"degree"` (most connected first), or a
|
|
2465
|
+
comparator function receiving two node rows, as for
|
|
2466
|
+
`Array.prototype.sort`. ArcDiagram defaults to `"data"`; Network's
|
|
2467
|
+
circle keeps each cluster (or top-level group) together, largest
|
|
2468
|
+
first, its most connected nodes first.
|
|
2002
2469
|
*/
|
|
2003
2470
|
nodeSort?: "data" | "label" | "group" | "degree" | ((a: DataPoint, b: DataPoint) => number);
|
|
2471
|
+
/**
|
|
2472
|
+
Tree and RadialTree: sets how far each node sits from the root by a
|
|
2473
|
+
value instead of by its depth: its height above the leaves, such as
|
|
2474
|
+
the distance at which a hierarchical clustering merged its children.
|
|
2475
|
+
The root sits at the tallest height and nodes of height 0 at the far
|
|
2476
|
+
edge, so the leaves line up there as in a cluster dendrogram, spaced
|
|
2477
|
+
evenly in order. A key in the data, or an accessor function receiving
|
|
2478
|
+
the node's row (a branch's merged row), its index, and `{id, level,
|
|
2479
|
+
leaf}`: its `groupBy` value at its own level, that level (0 for the
|
|
2480
|
+
top), and whether it is drawn without children. A node with no number
|
|
2481
|
+
is 0 when it is a leaf, and as tall as its tallest child otherwise.
|
|
2482
|
+
Defaults to none, which spaces the levels evenly.
|
|
2483
|
+
*/
|
|
2484
|
+
nodeHeight?: string | ((d: DataPoint, i: number, node: {
|
|
2485
|
+
id: string;
|
|
2486
|
+
level: number;
|
|
2487
|
+
leaf: boolean;
|
|
2488
|
+
}) => number | undefined);
|
|
2004
2489
|
/**
|
|
2005
2490
|
Network, Rings, Sankey, Chord, and ArcDiagram: transforms `nodes`
|
|
2006
2491
|
before they are drawn. The function receives the loaded file (or the
|
|
@@ -2019,6 +2504,29 @@ export interface D3plusConfig {
|
|
|
2019
2504
|
in value (`linkSize`, or Sankey's `value`), and none when they don't.
|
|
2020
2505
|
*/
|
|
2021
2506
|
nodeTooltipLinks?: number | false;
|
|
2507
|
+
/**
|
|
2508
|
+
Network, Rings, ArcDiagram, and Sankey: the network measures a node's
|
|
2509
|
+
tooltip lists. `true` (the default) lists them all, `false` none, or
|
|
2510
|
+
an Array picks some, in the order to list them: `"degree"` (its number
|
|
2511
|
+
of links, as "In-degree" and "Out-degree" when the chart draws arrows
|
|
2512
|
+
and in Sankey; it replaces the "Connections" count), `"betweenness"`
|
|
2513
|
+
(the share of shortest paths between other nodes that pass through
|
|
2514
|
+
it, 0 to 1), `"closeness"` (how near it is to the nodes it can reach,
|
|
2515
|
+
0 to 1), and `"cluster"` (the name of its cluster, when clusters color
|
|
2516
|
+
the chart). Betweenness and closeness are worked out while the browser
|
|
2517
|
+
is idle after the chart draws, and an open tooltip fills them in once
|
|
2518
|
+
they are ready.
|
|
2519
|
+
*/
|
|
2520
|
+
nodeTooltipStats?: boolean | ("degree" | "betweenness" | "closeness" | "cluster")[];
|
|
2521
|
+
/**
|
|
2522
|
+
Network, Rings, ArcDiagram, and Sankey: settings for the network
|
|
2523
|
+
measures in node tooltips. `weighted: true` counts a strong link (by
|
|
2524
|
+
`linkSize`, or Sankey's `value`) as a shorter step than a weak one for
|
|
2525
|
+
betweenness and closeness; by default every link is one step.
|
|
2526
|
+
*/
|
|
2527
|
+
nodeTooltipStatsConfig?: {
|
|
2528
|
+
weighted?: boolean;
|
|
2529
|
+
};
|
|
2022
2530
|
/**
|
|
2023
2531
|
Ocean color for geomaps (any CSS value including 'transparent'), or a
|
|
2024
2532
|
`{light, dark}` pair chosen by the chart's `theme` (the page behind it
|
|
@@ -2028,17 +2536,34 @@ export interface D3plusConfig {
|
|
|
2028
2536
|
light: string;
|
|
2029
2537
|
dark: string;
|
|
2030
2538
|
};
|
|
2031
|
-
/**
|
|
2539
|
+
/**
|
|
2540
|
+
Event listeners keyed by event name. Besides pointer events (`click`,
|
|
2541
|
+
`mousemove`, … scoped as `click.shape` or `click.legend`), a chart
|
|
2542
|
+
fires `select` with the rows a box or lasso selection holds (see
|
|
2543
|
+
`selectMode`), and with no rows when it is cleared.
|
|
2544
|
+
*/
|
|
2032
2545
|
on?: Record<string, (event: Event) => void>;
|
|
2033
2546
|
/** Candlestick: accessor or data key for each period's opening value (default `"open"`). */
|
|
2034
2547
|
open?: string | ((d: DataPoint, i: number) => number);
|
|
2548
|
+
/**
|
|
2549
|
+
Plot charts: accessor function or string key for the field that orders
|
|
2550
|
+
each series' path, such as a year. Each series' points are joined by a
|
|
2551
|
+
line in that order (a Line follows it instead of the discrete axis), so
|
|
2552
|
+
the line can double back to trace the path two measures took together.
|
|
2553
|
+
Rows that share a series and an order value are aggregated. Arrowheads
|
|
2554
|
+
show the direction (`pathArrows`) and the first and last points are
|
|
2555
|
+
labeled (`pathLabels`). ConnectedScatter joins points in the data's
|
|
2556
|
+
order until it is set. Not used by stacked charts.
|
|
2557
|
+
*/
|
|
2558
|
+
order?: string | ((d: DataPoint, i: number) => unknown);
|
|
2035
2559
|
/**
|
|
2036
2560
|
Layout direction. Charts that can be drawn either way take
|
|
2037
|
-
`"horizontal"` or `"vertical"`, as do Box shapes.
|
|
2038
|
-
|
|
2039
|
-
|
|
2561
|
+
`"horizontal"` or `"vertical"`, as do Box shapes. Tree also takes
|
|
2562
|
+
`"radial"`, laying the tree around a circle (see `RadialTree`). Whisker
|
|
2563
|
+
shapes take the side they point toward: `"top"`, `"bottom"`, `"left"`,
|
|
2564
|
+
or `"right"`. Shapes also accept a per-datum accessor.
|
|
2040
2565
|
*/
|
|
2041
|
-
orient?: ConstOrAccessor<Orient | SideOrient>;
|
|
2566
|
+
orient?: ConstOrAccessor<Orient | SideOrient | "radial">;
|
|
2042
2567
|
/**
|
|
2043
2568
|
How far Ridgeline's tallest ridge rises, in category steps (default
|
|
2044
2569
|
1.5): 1 reaches the next baseline up, larger values overlap the ridges
|
|
@@ -2046,28 +2571,110 @@ export interface D3plusConfig {
|
|
|
2046
2571
|
*/
|
|
2047
2572
|
overlap?: number;
|
|
2048
2573
|
/**
|
|
2049
|
-
Room (px)
|
|
2050
|
-
`"auto"` (the default) curves every
|
|
2051
|
-
they all fit (see `labelPosition`),
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
the largest radius at which every label fits inside the chart,
|
|
2055
|
-
wrapping long labels onto two lines (and truncating what still doesn't
|
|
2056
|
-
fit) rather than shrinking the web below half its largest possible
|
|
2057
|
-
size; names that fit along the web at that radius still curve. A
|
|
2058
|
-
number reserves exactly that much room and wraps labels to that width.
|
|
2574
|
+
Room (px) reserved around a Radar's web (or a polar chart's circle) for
|
|
2575
|
+
its labels. `"auto"` (the default) curves every label along the edge
|
|
2576
|
+
when they all fit (see `labelPosition`), else sizes the circle to the
|
|
2577
|
+
labels measured along their spokes, wrapping long ones onto two lines.
|
|
2578
|
+
A number reserves exactly that much room.
|
|
2059
2579
|
*/
|
|
2060
2580
|
outerPadding?: number | "auto";
|
|
2581
|
+
/**
|
|
2582
|
+
Plot charts: rings each outlier and labels it with its name and value
|
|
2583
|
+
(see `outlierConfig`), and notes it in its tooltip and aria label. A
|
|
2584
|
+
mark is an outlier when its value-axis value lies past the fences of
|
|
2585
|
+
the values it's compared with. `true` uses Tukey's rule: more than 1.5
|
|
2586
|
+
interquartile ranges past the first or third quartile, the rule
|
|
2587
|
+
BoxWhisker's whiskers follow. An object picks the `method`: `"iqr"`
|
|
2588
|
+
(Tukey's rule, `k` interquartile ranges, default `1.5`), `"zscore"`
|
|
2589
|
+
(`k` standard deviations from the mean, default `3`), or `"mad"`
|
|
2590
|
+
(a modified z-score, 0.6745 × the distance from the median over the
|
|
2591
|
+
median absolute deviation, of at least `k`, default `3.5`). `group`
|
|
2592
|
+
sets what each mark is compared with: `"series"` (its line or series,
|
|
2593
|
+
or every point when each series is one point), `"discrete"` (the
|
|
2594
|
+
other marks in its category), `"all"`, or `"auto"` (the default: a
|
|
2595
|
+
line or area along its series, other marks within their category).
|
|
2596
|
+
A group needs three values or more. A function flags each row itself.
|
|
2597
|
+
BoxWhisker's boxes draw their own outliers and are left out. Off by
|
|
2598
|
+
default.
|
|
2599
|
+
|
|
2600
|
+
Box shapes: the shape each outlier draws as (see `BoxConfig`).
|
|
2601
|
+
*/
|
|
2602
|
+
outlier?: OutlierSetting | ConstOrAccessor<"Circle" | "Rect" | false>;
|
|
2603
|
+
/**
|
|
2604
|
+
Styles the `outlier` marks: the ring's `stroke` (default the chart's
|
|
2605
|
+
text color), `strokeWidth` (default `2`), `strokeOpacity`, and
|
|
2606
|
+
`strokeDasharray`; `gap`, the space between a mark and its ring
|
|
2607
|
+
(default `2`); `r`, the ring's radius around a line or area's point
|
|
2608
|
+
(default `6`); `label`, `false` to draw none or a function returning
|
|
2609
|
+
each outlier's text (default its name and value); `labelConfig`, the
|
|
2610
|
+
label's TextBox config (its `fontSize` defaults to
|
|
2611
|
+
`pointLabelConfig`'s); and `tooltip: false` to leave "Outlier" out of
|
|
2612
|
+
tooltips and aria labels. Style keys also take an accessor of the row.
|
|
2613
|
+
|
|
2614
|
+
Box shapes: the config of each outlier's shape (see `BoxConfig`).
|
|
2615
|
+
*/
|
|
2616
|
+
outlierConfig?: OutlierConfig | Record<string, unknown>;
|
|
2061
2617
|
/** Priestley and Gantt: the space between neighboring bars, as a share of each row (d3's band `paddingInner`). */
|
|
2062
2618
|
paddingInner?: number;
|
|
2063
2619
|
/** Priestley and Gantt: the space before the first row and after the last, as a share of a row (d3's band `paddingOuter`). */
|
|
2064
2620
|
paddingOuter?: number;
|
|
2621
|
+
/**
|
|
2622
|
+
Pareto: draws a reference line across the cumulative-share axis at this
|
|
2623
|
+
share of the total (0–1), labeled with it: `0.8` (default) marks the 80%
|
|
2624
|
+
that the Pareto principle expects the largest few categories to reach.
|
|
2625
|
+
`false` hides it.
|
|
2626
|
+
*/
|
|
2627
|
+
paretoThreshold?: number | false;
|
|
2628
|
+
/**
|
|
2629
|
+
Pareto: styles the `paretoThreshold` line like a `referenceLines` entry:
|
|
2630
|
+
`label` (defaults to the share, such as "80%"; `false` hides it),
|
|
2631
|
+
`labelPosition` (defaults to the end of the line over the smallest
|
|
2632
|
+
bars: `"end"` for upright bars, `"start"` for horizontal ones), font
|
|
2633
|
+
keys, `stroke`, `strokeOpacity`, `strokeWidth`, `dash` (`true` by
|
|
2634
|
+
default), and `layer`.
|
|
2635
|
+
*/
|
|
2636
|
+
paretoThresholdConfig?: Omit<ReferenceLineConfig, "x" | "y" | "x2" | "y2">;
|
|
2637
|
+
/** With `order`: draws an arrowhead on each segment of a series' path, pointing along it, wherever the segment has room for one (default `true`). */
|
|
2638
|
+
pathArrows?: boolean;
|
|
2639
|
+
/**
|
|
2640
|
+
With `order`: labels each series' first and last points. `true` (the
|
|
2641
|
+
default) shows their order values (such as the years), `false` none,
|
|
2642
|
+
and a function `(d, i) => string` any text. Each label sits beside
|
|
2643
|
+
its point on the most open side that keeps it in the plot and clear of
|
|
2644
|
+
the points, arrowheads, and other labels, and hides when no side is.
|
|
2645
|
+
*/
|
|
2646
|
+
pathLabels?: boolean | ((d: DataPoint, i: number) => string | false | null);
|
|
2065
2647
|
/** Pyramid: draws each value as a fraction of the frame's total, with the axis and tooltip reading percentages. */
|
|
2066
2648
|
percent?: boolean;
|
|
2067
|
-
/**
|
|
2068
|
-
|
|
2649
|
+
/**
|
|
2650
|
+
Calendar: what each block covers — `"year"` (the default; whole years,
|
|
2651
|
+
stacked) or `"month"` (whole months, as a grid of small calendars).
|
|
2652
|
+
CyclePlot: the season each panel shows, read from each row's `x` date —
|
|
2653
|
+
`"month"` (the default; across the years), `"quarter"` (across the
|
|
2654
|
+
years), `"weekday"` (across the weeks), or `"hour"` (across the days).
|
|
2655
|
+
*/
|
|
2656
|
+
period?: "year" | "month" | "quarter" | "weekday" | "hour";
|
|
2069
2657
|
/** Coordinate accessor for point-based geomaps. */
|
|
2070
2658
|
point?: (d: DataPoint) => number[];
|
|
2659
|
+
/**
|
|
2660
|
+
Geomap: combines coordinate points that sit near one another on screen
|
|
2661
|
+
into one bubble, while any two points' circles overlap on the map as
|
|
2662
|
+
first drawn. A bubble is sized by its points' summed `pointSize` (by
|
|
2663
|
+
their count when it's constant) and is a pie of its points' colors (a
|
|
2664
|
+
plain circle when they share one), labeled with how many points it
|
|
2665
|
+
holds; its tooltip lists the first few. Zooming in splits the bubbles as the
|
|
2666
|
+
points spread apart, and zooming out merges them, so the points and
|
|
2667
|
+
bubbles keep their pixel size through zoom. Clicking a bubble zooms
|
|
2668
|
+
in until it splits; one whose points sit too close to ever split fans
|
|
2669
|
+
them out around it instead (click it again to fold them back). Links
|
|
2670
|
+
to a point in a bubble run to the bubble. `{radius}` sets how near
|
|
2671
|
+
points combine, in pixels on screen (`40` by default); `false` draws
|
|
2672
|
+
every point. A `hexbin`, `cartogram`, or `tileGrid` leaves the points
|
|
2673
|
+
out. Defaults to `true`.
|
|
2674
|
+
*/
|
|
2675
|
+
pointCluster?: boolean | {
|
|
2676
|
+
radius?: number;
|
|
2677
|
+
};
|
|
2071
2678
|
/**
|
|
2072
2679
|
Hexbin: the style of the observations `points` draws: `r`, the dot
|
|
2073
2680
|
radius in pixels (default `1.5`); `fill` (defaults to the chart's text
|
|
@@ -2103,12 +2710,25 @@ export interface D3plusConfig {
|
|
|
2103
2710
|
outlined. A key also averages grouped rows' progress.
|
|
2104
2711
|
*/
|
|
2105
2712
|
progress?: string | ((d: DataPoint, i: number) => unknown) | false;
|
|
2713
|
+
/** KPI: each tile's previous value, the one its delta compares against (a data key, an accessor, or `false`). Defaults to the `previous` key, else, with `time` set, the period before the current one. */
|
|
2714
|
+
previous?: string | ((d: DataPoint, i: number) => unknown) | false;
|
|
2106
2715
|
/** Map projection name or function. */
|
|
2107
2716
|
projection?: string | ((x: number, y: number) => [number, number]);
|
|
2108
2717
|
/** Outer padding between the visualization edge and map shapes. */
|
|
2109
2718
|
projectionPadding?: number | string;
|
|
2110
2719
|
/** Rotation offset for the map projection center. */
|
|
2111
2720
|
projectionRotate?: [number, number];
|
|
2721
|
+
/**
|
|
2722
|
+
Venn: when `true` (default), each set is a circle whose area matches
|
|
2723
|
+
its size and each overlap's area its row's size, as closely as circles
|
|
2724
|
+
allow (exact for two sets, close for three, approximate beyond); sets
|
|
2725
|
+
that share nothing are drawn apart and a set inside another inside its
|
|
2726
|
+
circle. When `false`, the sets take the textbook arrangement in which
|
|
2727
|
+
every combination has a region: equal circles for two or three sets,
|
|
2728
|
+
Venn's four ellipses, Grünbaum's five symmetric ellipses, and a ring of
|
|
2729
|
+
equal circles for six or more (where not every combination appears).
|
|
2730
|
+
*/
|
|
2731
|
+
proportional?: boolean;
|
|
2112
2732
|
/**
|
|
2113
2733
|
How PolarArea maps values onto radii: `"sqrt"` (default) keeps each
|
|
2114
2734
|
wedge's area proportional to its value; `"linear"` its radius.
|
|
@@ -2124,53 +2744,45 @@ export interface D3plusConfig {
|
|
|
2124
2744
|
*/
|
|
2125
2745
|
reducedMotion?: "auto" | boolean;
|
|
2126
2746
|
/**
|
|
2127
|
-
Plot: shaded spans
|
|
2128
|
-
|
|
2129
|
-
`
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
`maxWidth`. The fill defaults to the chart's text color at `fillOpacity`
|
|
2136
|
-
`0.08`, so it reads on light and dark themes; `stroke`, `strokeWidth`,
|
|
2137
|
-
and `strokeOpacity` add edges. On a continuous or time axis the band's
|
|
2138
|
-
ends count toward the axis domain, widening it to show the whole band
|
|
2139
|
-
(an end set by `xDomain`/`yDomain`/`x2Domain`/`y2Domain` or the axis
|
|
2140
|
-
config's `domain` stays put). Each entry expands into a
|
|
2141
|
-
`"ReferenceBand"` annotation (see `annotations`) behind the data
|
|
2142
|
-
(`layer: "front"` to draw it over; its label always draws above), which follows zoom and never
|
|
2143
|
-
responds to the pointer or keyboard. A label that would cover a data
|
|
2144
|
-
label or another reference label moves to the band's other corners or
|
|
2145
|
-
along its length, inside the plot, and is hidden when no spot is free.
|
|
2747
|
+
Plot: shaded spans between two values, such as a recession or a target
|
|
2748
|
+
range. Give each entry `x` (vertical) or `y` (horizontal) as
|
|
2749
|
+
`[start, end]` in data units, `x2`/`y2` for the secondary axes, or
|
|
2750
|
+
`ref: "plot"` for fractions of the plot. Optional: a `label` (top-left;
|
|
2751
|
+
`labelPosition: "end"` for top-right) with font keys and `maxWidth`,
|
|
2752
|
+
`fill`/`fillOpacity` (default the text color at `0.08`), `stroke`,
|
|
2753
|
+
`strokeWidth`, `strokeOpacity`, and `layer: "front"` to draw over the
|
|
2754
|
+
data. A band widens a continuous axis's domain to fit.
|
|
2146
2755
|
*/
|
|
2147
2756
|
referenceBands?: ReferenceBandConfig[];
|
|
2148
2757
|
/**
|
|
2149
|
-
Plot: lines across the
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
defaults to the chart's text color at `strokeOpacity` `0.6`, `strokeWidth`
|
|
2158
|
-
`1`; `dash: true` dashes it ("4 4"), or give a dash pattern. On a
|
|
2159
|
-
continuous or time axis the value counts toward the axis domain,
|
|
2160
|
-
widening it to show the line (an end set by `xDomain`/`yDomain`/
|
|
2161
|
-
`x2Domain`/`y2Domain` or the axis config's `domain` stays put; a value
|
|
2162
|
-
outside such a domain is not drawn). Each entry
|
|
2163
|
-
expands into a `"ReferenceLine"` annotation (see `annotations`) behind
|
|
2164
|
-
the data (`layer: "front"` to draw it over; its label always draws
|
|
2165
|
-
above), which follows zoom and
|
|
2166
|
-
never responds to the pointer or keyboard. A label that would cover a
|
|
2167
|
-
data label or another reference label moves to the line's other side
|
|
2168
|
-
or end, or along it, inside the plot, and is hidden when no spot is
|
|
2169
|
-
free.
|
|
2758
|
+
Plot: lines across the plot at one value, such as a target or a launch
|
|
2759
|
+
date. Give each entry `x` (vertical) or `y` (horizontal) in data units,
|
|
2760
|
+
`x2`/`y2` for the secondary axes, or `ref: "plot"` for a fraction of the
|
|
2761
|
+
plot. Optional: a `label` at the line's `"end"` or `"start"`
|
|
2762
|
+
(`labelPosition`) with font keys and `maxWidth`, `stroke`/`strokeOpacity`
|
|
2763
|
+
(default the text color at `0.6`), `strokeWidth` (`1`), `dash` (`true`
|
|
2764
|
+
or a dash pattern), and `layer: "front"` to draw over the data. A line
|
|
2765
|
+
widens a continuous axis's domain to fit.
|
|
2170
2766
|
*/
|
|
2171
2767
|
referenceLines?: ReferenceLineConfig[];
|
|
2768
|
+
/**
|
|
2769
|
+
WordCloud: the angle, in degrees clockwise, each word is drawn at: a
|
|
2770
|
+
number for every word, an array of angles (each word takes one,
|
|
2771
|
+
picked from a hash of its id, so it keeps its angle across redraws),
|
|
2772
|
+
or an accessor `(d, i) => degrees`. Defaults to `0`, every word
|
|
2773
|
+
horizontal.
|
|
2774
|
+
*/
|
|
2775
|
+
rotate?: number | number[] | ((d: DataPoint, i: number) => unknown);
|
|
2172
2776
|
/** Row key for matrix-style layouts. */
|
|
2173
2777
|
row?: string;
|
|
2778
|
+
/** DensityPlot: draws a short tick for every observation just below the value axis, in its group's color, moving the axis's labels down to make room (default `false`; see `rugConfig`). */
|
|
2779
|
+
rug?: boolean;
|
|
2780
|
+
/** DensityPlot: the `rug` ticks' `size` (length in pixels, default 8), `strokeWidth` (1), and `opacity` (0.7). */
|
|
2781
|
+
rugConfig?: {
|
|
2782
|
+
size?: number;
|
|
2783
|
+
strokeWidth?: number;
|
|
2784
|
+
opacity?: number;
|
|
2785
|
+
};
|
|
2174
2786
|
/** Shows a top-left download button that saves the chart, as the reader sees it, as a PNG, SVG, or JPG file. On by default for every chart. */
|
|
2175
2787
|
saveControl?: boolean;
|
|
2176
2788
|
/**
|
|
@@ -2242,6 +2854,41 @@ export interface D3plusConfig {
|
|
|
2242
2854
|
An object containing CSS key/value pairs that is used to style the search toggle button on hover. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.searchControlClassName(...)` is set, unless you've explicitly customized this yourself.
|
|
2243
2855
|
*/
|
|
2244
2856
|
searchControlStyleHover?: Record<string, unknown> | false;
|
|
2857
|
+
/**
|
|
2858
|
+
The box and lasso selection tool a chart starts with: `"box"` or
|
|
2859
|
+
`"lasso"`, or `false` (the default) to start out panning. Whatever it
|
|
2860
|
+
starts with, the zoom controls' Box Select and Lasso Select buttons
|
|
2861
|
+
switch between the tools, or back to panning when the one on is
|
|
2862
|
+
pressed again (the brush-zoom button turns selection off too), and
|
|
2863
|
+
changing `selectMode` later resets the tool.
|
|
2864
|
+
|
|
2865
|
+
While a tool is on, a drag over the chart draws a box (or a freehand
|
|
2866
|
+
lasso) instead of panning, and releasing it selects the marks inside,
|
|
2867
|
+
which stay lit while the rest dim (as `activeOpacity` dims them), the
|
|
2868
|
+
legend included. A bar or other rectangle is inside when any part of
|
|
2869
|
+
it is, every other mark (a point, a point of a line or area) when its
|
|
2870
|
+
center is, and a line or area stays lit while any of its points is
|
|
2871
|
+
selected. Shift + drag adds to the selection, a click on a mark selects
|
|
2872
|
+
it (Shift + click toggles it, and the chart's own click action, such as
|
|
2873
|
+
drilling down, waits until no select tool is on), and Escape or a
|
|
2874
|
+
click on no mark clears it. With small multiples, a drag selects
|
|
2875
|
+
within the panel it starts in. A wheel or pinch still zooms. Each
|
|
2876
|
+
selection fires the chart's `select` event with the selected rows
|
|
2877
|
+
(`viz.on("select", rows => …)`), and `selection` reads or sets the
|
|
2878
|
+
selection from code.
|
|
2879
|
+
*/
|
|
2880
|
+
selectMode?: "box" | "lasso" | false;
|
|
2881
|
+
/**
|
|
2882
|
+
SVG attributes for the box or lasso a selection drag draws, such as
|
|
2883
|
+
`fill`, `fill-opacity`, `stroke`, and `stroke-dasharray`.
|
|
2884
|
+
*/
|
|
2885
|
+
selectStyle?: Record<string, string | number>;
|
|
2886
|
+
/**
|
|
2887
|
+
Venn: accessor or data key for the sets each row stands for: an array
|
|
2888
|
+
of set names (`["A", "B"]` for where A and B overlap) or a single name
|
|
2889
|
+
for a set on its own. Defaults to `"sets"`.
|
|
2890
|
+
*/
|
|
2891
|
+
sets?: string | ((d: DataPoint, i: number) => unknown);
|
|
2245
2892
|
/**
|
|
2246
2893
|
Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, "Rect" or "Circle"), or an accessor Function that returns the String class name to be used for each individual data point.
|
|
2247
2894
|
*/
|
|
@@ -2267,7 +2914,7 @@ export interface D3plusConfig {
|
|
|
2267
2914
|
/** Pyramid: draws the name of each side above its half of the chart. */
|
|
2268
2915
|
sideTitles?: boolean;
|
|
2269
2916
|
/**
|
|
2270
|
-
Whether to display the size legend: a nested-circle key, in the chart's bottom-right corner, for charts that size their marks with a `size` accessor (bubble plots, Geomap points via `pointSize`, Network, Rings). By default it shows whenever marks are sized by more than one value, unless it would take up more than a third of the chart's width or height. Pass `true` to always show it, `false` to hide it, or a function that receives the resolved chart config, the radius scale, and the legend's measured `{width, height, availableWidth, availableHeight}`, and returns a boolean.
|
|
2917
|
+
Whether to display the size legend: a nested-circle key, in the chart's bottom-right corner, for charts that size their marks with a `size` accessor (bubble plots, Geomap points via `pointSize` and Dorling or Demers cartograms via `cartogramSize`, Network, Rings). By default it shows whenever marks are sized by more than one value, unless it would take up more than a third of the chart's width or height. Pass `true` to always show it, `false` to hide it, or a function that receives the resolved chart config, the radius scale, and the legend's measured `{width, height, availableWidth, availableHeight}`, and returns a boolean.
|
|
2271
2918
|
*/
|
|
2272
2919
|
sizeLegend?: boolean | ((config: D3plusConfig, scale: SizeLegendScale, size: SizeLegendSize) => boolean);
|
|
2273
2920
|
/**
|
|
@@ -2277,8 +2924,13 @@ export interface D3plusConfig {
|
|
|
2277
2924
|
on a continuous time axis.
|
|
2278
2925
|
*/
|
|
2279
2926
|
skipGaps?: boolean;
|
|
2280
|
-
/**
|
|
2281
|
-
|
|
2927
|
+
/**
|
|
2928
|
+
Size accessor key: sizes a Plot's circles, and on BumpChart draws each
|
|
2929
|
+
series as a band as thick as its value (see `bandPadding`). WordCloud:
|
|
2930
|
+
each word's value, which sets its font size (a data key or an accessor
|
|
2931
|
+
`(d, i) => number`, default `"value"`); rows with the same id add up.
|
|
2932
|
+
*/
|
|
2933
|
+
size?: string | ((d: DataPoint, i: number) => number);
|
|
2282
2934
|
/**
|
|
2283
2935
|
Configuration object passed to the size legend's config method: `values` (an array of values to draw, or how many to pick), `tickFormat`, `title` (defaults to the `size` key when `size` is set to a string), `shapeConfig`, `lineConfig`, `labelConfig`, `titleConfig`, `padding`, `lineLength`, and `labelPadding`.
|
|
2284
2936
|
*/
|
|
@@ -2299,6 +2951,14 @@ export interface D3plusConfig {
|
|
|
2299
2951
|
The legend and markers follow.
|
|
2300
2952
|
*/
|
|
2301
2953
|
slopeColor?: SlopeColorSetting;
|
|
2954
|
+
/** KPI: how each tile draws its history when `time` is set — `"area"` (default), `"line"`, `"bar"`, or `false` for none. */
|
|
2955
|
+
sparkline?: "area" | "line" | "bar" | false;
|
|
2956
|
+
/**
|
|
2957
|
+
WordCloud: the path each word walks out from the middle while looking
|
|
2958
|
+
for room: `"archimedean"` (default) packs the words into a rounded
|
|
2959
|
+
cloud, `"rectangular"` into a boxier one.
|
|
2960
|
+
*/
|
|
2961
|
+
spiral?: "archimedean" | "rectangular";
|
|
2302
2962
|
/**
|
|
2303
2963
|
With two groupBy levels, Violin places violins by the first and sets
|
|
2304
2964
|
them side by side by the second. `split` draws a category holding
|
|
@@ -2314,6 +2974,29 @@ export interface D3plusConfig {
|
|
|
2314
2974
|
stagePadding?: number;
|
|
2315
2975
|
/** Whether to stack series. */
|
|
2316
2976
|
stacked?: boolean;
|
|
2977
|
+
/**
|
|
2978
|
+
DotPlot: where each stack's dots pile — `"up"` (default) from the
|
|
2979
|
+
baseline of its row (or of the chart), or `"center"`, spread evenly on
|
|
2980
|
+
both sides of the row's center.
|
|
2981
|
+
*/
|
|
2982
|
+
stackDirection?: "up" | "center";
|
|
2983
|
+
/**
|
|
2984
|
+
BarChart: centers a diverging stack on a neutral series, as a Likert
|
|
2985
|
+
chart does. Names the series by its id (matched against each row's
|
|
2986
|
+
`groupBy` ids) or with an accessor that is truthy for its rows. Each
|
|
2987
|
+
stack's neutral segment straddles the baseline, half on each side,
|
|
2988
|
+
and the other series stack outward from it by their place in the
|
|
2989
|
+
scale: series listed before the neutral one go on the negative side
|
|
2990
|
+
and series after it on the positive side, nearest answers next to it.
|
|
2991
|
+
The scale's order is the order the series first appear in the data,
|
|
2992
|
+
or `stackOrder` when set (an array of series ids, or any other
|
|
2993
|
+
order). Values are placed at their absolute value, so the data needs
|
|
2994
|
+
no negating (negated values work too). The legend and the shared
|
|
2995
|
+
tooltip list the series along the scale; tooltips and shares report
|
|
2996
|
+
the full neutral value. Applies only with the default `"diverging"`
|
|
2997
|
+
`stackOffset`.
|
|
2998
|
+
*/
|
|
2999
|
+
stackNeutral?: string | number | ((d: DataPoint, i: number) => unknown);
|
|
2317
3000
|
/**
|
|
2318
3001
|
Vertical offset applied to stacked series. One of `"diverging"`
|
|
2319
3002
|
(default — positive and negative values split around zero), `"none"`,
|
|
@@ -2347,16 +3030,14 @@ export interface D3plusConfig {
|
|
|
2347
3030
|
/** Accessor function or string for the visualization's subtitle. */
|
|
2348
3031
|
subtitle?: string | ((data: DataPoint[]) => string);
|
|
2349
3032
|
/**
|
|
2350
|
-
Packs a Plot's circles into a beeswarm: each
|
|
2351
|
-
|
|
2352
|
-
overlap. `"x"` or `"y"` names the value axis; `true`
|
|
2353
|
-
values are numeric, else y; `false` draws a plain scatter.
|
|
2354
|
-
axis
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
`"auto"`, swarms only when every mark is a Circle and every row lacks a y
|
|
2359
|
-
(or x) value.
|
|
3033
|
+
Packs a Plot's circles into a beeswarm: each keeps its value along one
|
|
3034
|
+
axis and is placed beside its neighbors along the other, so none
|
|
3035
|
+
overlap. `"x"` or `"y"` names the value axis; `true` picks x when its
|
|
3036
|
+
values are numeric, else y; `false` draws a plain scatter. A category
|
|
3037
|
+
axis gets one swarm per category. The default, `"auto"`, swarms only
|
|
3038
|
+
when every mark is a Circle and rows lack the other axis's value. Bars,
|
|
3039
|
+
areas, and boxes beside the circles keep their places, standing across
|
|
3040
|
+
the swarm's value axis.
|
|
2360
3041
|
*/
|
|
2361
3042
|
swarm?: boolean | "auto" | "x" | "y";
|
|
2362
3043
|
/**
|
|
@@ -2432,19 +3113,11 @@ export interface D3plusConfig {
|
|
|
2432
3113
|
targetConfig?: Record<string, unknown>;
|
|
2433
3114
|
/**
|
|
2434
3115
|
The chart's colors. `"auto"` (the default) paints no background and
|
|
2435
|
-
follows the page
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
`"dark"
|
|
2439
|
-
|
|
2440
|
-
from the theme. An object sets your own tokens on top of the preset its
|
|
2441
|
-
`base` names (`"light"` or `"dark"`), for example
|
|
2442
|
-
`{base: "dark", background: "#123", accent: "#ffd43b"}`. A dark theme
|
|
2443
|
-
also turns color scale ramps around, from a dim tint near the background
|
|
2444
|
-
up to a bright pole (see the `colorScale` tokens). Colors you set in the
|
|
2445
|
-
other config (`titleConfig.fontColor`, `tooltipConfig`,
|
|
2446
|
-
`colorScaleConfig.colorMax`, the `*Style` options, …) win over the
|
|
2447
|
-
theme.
|
|
3116
|
+
follows the page, light or dark. `"light"` and `"dark"` paint the
|
|
3117
|
+
theme's background and take every chrome color from it. An object
|
|
3118
|
+
overrides tokens on top of its `base` preset, e.g.
|
|
3119
|
+
`{base: "dark", background: "#123", accent: "#ffd43b"}`. Colors set
|
|
3120
|
+
elsewhere in the config win over the theme.
|
|
2448
3121
|
*/
|
|
2449
3122
|
theme?: ThemeSetting;
|
|
2450
3123
|
/**
|
|
@@ -2455,11 +3128,37 @@ export interface D3plusConfig {
|
|
|
2455
3128
|
merge into one series, labelled by `thresholdName` and stacked on top.
|
|
2456
3129
|
A bucket needs at least two items (a lone small item stays as
|
|
2457
3130
|
itself), and its tooltips list the items it holds with their values.
|
|
2458
|
-
Off by default on Plot charts.
|
|
3131
|
+
Off by default on Plot charts; `0.0001` (0.01%) elsewhere, as on
|
|
3132
|
+
Treemap. On WordCloud the bucket is drawn as one more word, sized by
|
|
3133
|
+
the summed value of the words it holds.
|
|
2459
3134
|
*/
|
|
2460
3135
|
threshold?: number;
|
|
2461
3136
|
/** Label for the threshold group, or a `(datum, index)` accessor. */
|
|
2462
3137
|
thresholdName?: string | ((d: DataPoint, i: number) => string);
|
|
3138
|
+
/**
|
|
3139
|
+
Geomap: draws each region as one equal tile at a fixed cell of a grid,
|
|
3140
|
+
colored, labeled, and hovered like the map's regions. `"us-states"` is
|
|
3141
|
+
the built-in hexagon grid of the 50 states and DC, which finds each
|
|
3142
|
+
state by its postal abbreviation (`"CA"`), its FIPS code (`"06"` or
|
|
3143
|
+
`6`), or an id ending in it (`"04000US06"`), and labels each tile with
|
|
3144
|
+
its abbreviation. A layout of your own, `{[id]: [column, row]}`, places
|
|
3145
|
+
the regions whose ids it names (odd rows sit half a tile to the right)
|
|
3146
|
+
and labels them with the chart's label when it fits. Labels grow with
|
|
3147
|
+
the tiles up to 14 pixels (`shapeConfig.Path.labelConfig.fontMax`
|
|
3148
|
+
changes it). Every cell gets a
|
|
3149
|
+
tile, with the no-data fill when no row names it. The grid fills the
|
|
3150
|
+
map, less `projectionPadding`. Without a `topojson`, the tiles are the
|
|
3151
|
+
layout's cells; with one, toggling the grid morphs each outline to and
|
|
3152
|
+
from its tile. `links` run between the tiles' centers; coordinate
|
|
3153
|
+
points, dots, bins, and the tiles are left out, and so is the `ocean`
|
|
3154
|
+
unless it is set. Takes the place of a `cartogram` (and shows no size
|
|
3155
|
+
legend). Defaults to `false`.
|
|
3156
|
+
*/
|
|
3157
|
+
tileGrid?: false | "us-states" | Record<string, [number, number]>;
|
|
3158
|
+
/** Geomap: the gap between neighboring `tileGrid` tiles, in pixels. Defaults to `2`. */
|
|
3159
|
+
tileGridPadding?: number;
|
|
3160
|
+
/** Geomap: the tiles of a `tileGrid`, `"hex"` for hexagons (the default) or `"square"` for squares. */
|
|
3161
|
+
tileGridShape?: "hex" | "square";
|
|
2463
3162
|
/**
|
|
2464
3163
|
URL template for XYZ map tiles, with `{z}`, `{x}`, `{y}` (and optional
|
|
2465
3164
|
`{s}` subdomain) placeholders — or a `{light, dark}` pair, chosen by the
|
|
@@ -2472,6 +3171,21 @@ export interface D3plusConfig {
|
|
|
2472
3171
|
};
|
|
2473
3172
|
/** Whether to show map tiles. */
|
|
2474
3173
|
tiles?: boolean;
|
|
3174
|
+
/**
|
|
3175
|
+
KPI: how the tiles fill the chart area (`aspect`, 1.75 by default;
|
|
3176
|
+
`columns` or `rows` for a fixed grid; `padding`, 12 by default) and how
|
|
3177
|
+
each tile's card looks (`fill`, `stroke`, `strokeWidth`, `rx`).
|
|
3178
|
+
*/
|
|
3179
|
+
tileConfig?: {
|
|
3180
|
+
aspect?: number;
|
|
3181
|
+
columns?: number;
|
|
3182
|
+
rows?: number;
|
|
3183
|
+
padding?: number;
|
|
3184
|
+
fill?: string;
|
|
3185
|
+
stroke?: string;
|
|
3186
|
+
strokeWidth?: number;
|
|
3187
|
+
rx?: number;
|
|
3188
|
+
};
|
|
2475
3189
|
/** Time key for temporal data. */
|
|
2476
3190
|
time?: string;
|
|
2477
3191
|
/**
|
|
@@ -2513,8 +3227,15 @@ export interface D3plusConfig {
|
|
|
2513
3227
|
`labelPosition`.
|
|
2514
3228
|
*/
|
|
2515
3229
|
todayConfig?: Omit<ReferenceLineConfig, "x" | "y" | "x2" | "y2" | "ref">;
|
|
2516
|
-
/**
|
|
2517
|
-
|
|
3230
|
+
/**
|
|
3231
|
+
Whether to show tooltips, or a
|
|
3232
|
+
`(datum, index, {depth, maxDepth, legend})` accessor deciding per mark
|
|
3233
|
+
and legend entry. `depth` is the `groupBy` level (from 0) the hovered
|
|
3234
|
+
item stands for and `maxDepth` the deepest level, so
|
|
3235
|
+
`depth === maxDepth` keeps tooltips to the deepest level; `legend` is
|
|
3236
|
+
true for a legend entry. Defaults to `true`.
|
|
3237
|
+
*/
|
|
3238
|
+
tooltip?: boolean | ((d: DataPoint, i: number, levels: TooltipLevels) => boolean);
|
|
2518
3239
|
/** Configuration for the tooltip component. */
|
|
2519
3240
|
tooltipConfig?: TooltipConfig;
|
|
2520
3241
|
/**
|
|
@@ -2536,20 +3257,28 @@ export interface D3plusConfig {
|
|
|
2536
3257
|
trackPadding?: number;
|
|
2537
3258
|
/**
|
|
2538
3259
|
Draws an automatic trend line fit to the plotted data: `true` (or
|
|
2539
|
-
`"linear"`) for a least-squares line,
|
|
2540
|
-
`"logarithmic"`, `"power"`, or `"polynomial"
|
|
3260
|
+
`"linear"`) for a least-squares line, `"exponential"`,
|
|
3261
|
+
`"logarithmic"`, `"power"`, or `"polynomial"`, or `"movingAverage"`
|
|
3262
|
+
for a rolling mean with bands ±2 standard deviations either side.
|
|
3263
|
+
`false` removes it.
|
|
2541
3264
|
*/
|
|
2542
|
-
trendLine?: boolean | "linear" | "exponential" | "logarithmic" | "power" | "polynomial";
|
|
3265
|
+
trendLine?: boolean | "linear" | "exponential" | "logarithmic" | "power" | "polynomial" | "movingAverage";
|
|
2543
3266
|
/**
|
|
2544
3267
|
Options for the trend lines: `group` (`"series"` or `"all"`), the
|
|
2545
|
-
polynomial `order`, a
|
|
3268
|
+
polynomial `order`, a moving average's `window`, `center`, and
|
|
3269
|
+
`bands`, a `confidence` band with `confidenceLevel` and
|
|
2546
3270
|
`confidenceConfig`, a `projection` into the future with
|
|
2547
3271
|
`projectionConfig`, `tooltip`, and Line styles (`stroke`,
|
|
2548
3272
|
`strokeWidth`, `strokeDasharray`, …).
|
|
2549
3273
|
*/
|
|
2550
3274
|
trendLineConfig?: TrendLineConfig;
|
|
2551
|
-
/**
|
|
2552
|
-
|
|
3275
|
+
/**
|
|
3276
|
+
Path or object for the topojson data, or (Geomap) a list of them, one
|
|
3277
|
+
per `groupBy` level, which makes the map's drill-down geographic:
|
|
3278
|
+
clicking a region zooms to it and draws its children over it and its
|
|
3279
|
+
faded neighbors.
|
|
3280
|
+
*/
|
|
3281
|
+
topojson?: string | object | false | (string | object)[];
|
|
2553
3282
|
/**
|
|
2554
3283
|
Geomap: transforms `topojson` before it is drawn. The function receives
|
|
2555
3284
|
the loaded file (or the object passed as `topojson`) and returns the
|
|
@@ -2563,17 +3292,23 @@ export interface D3plusConfig {
|
|
|
2563
3292
|
topojsonFill?: CssColor;
|
|
2564
3293
|
/** Accessor function for topojson feature IDs. */
|
|
2565
3294
|
topojsonId?: (obj: Record<string, unknown>) => string;
|
|
3295
|
+
/** Geomap: the key of the object in `topojson` to draw, or a key for each level of a `topojson` list. Defaults to the first object. */
|
|
3296
|
+
topojsonKey?: string | string[];
|
|
3297
|
+
/** Geomap: the opacity of the regions beside the ones a click drilled into, with a `topojson` list. Defaults to `0.5`. */
|
|
3298
|
+
topojsonNeighborOpacity?: number;
|
|
2566
3299
|
/** Waterfall: fill for subtotal bars. Defaults to `colorDefaults.sequential`. */
|
|
2567
3300
|
totalColor?: string;
|
|
2568
3301
|
/**
|
|
2569
3302
|
Tells the total whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the total appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.
|
|
2570
3303
|
*/
|
|
2571
3304
|
totalPadding?: boolean | ((viz: VizBase) => boolean);
|
|
3305
|
+
/** DotPlot: what one dot stands for, in units of `value`: each row draws `round(value / unit)` dots instead of one. */
|
|
3306
|
+
unit?: number;
|
|
2572
3307
|
/** Candlestick: the color of periods that closed at or above their open, or an accessor of the row. Defaults to green. */
|
|
2573
3308
|
upColor?: string | ((d: DataPoint, i: number) => string);
|
|
2574
3309
|
/** Value accessor for the visualization. */
|
|
2575
3310
|
value?: DataPointAccessor<number>;
|
|
2576
|
-
/** Funnel and
|
|
3311
|
+
/** Funnel, Gauge, KPI, and Venn: formats each value shown in labels and tooltips, as `(value, datum) => string`. */
|
|
2577
3312
|
valueFormat?: (value: number, d: DataPoint) => string;
|
|
2578
3313
|
/**
|
|
2579
3314
|
Candlestick: how each period draws — `"candlestick"` (default), a wick
|
|
@@ -2605,8 +3340,16 @@ export interface D3plusConfig {
|
|
|
2605
3340
|
weekStart?: number | string;
|
|
2606
3341
|
/** Overall width of the visualization in pixels. */
|
|
2607
3342
|
width?: number;
|
|
2608
|
-
/**
|
|
2609
|
-
|
|
3343
|
+
/** WordCloud: the clearance, in pixels, kept around each word's glyphs (default `2`). */
|
|
3344
|
+
wordPadding?: number;
|
|
3345
|
+
/**
|
|
3346
|
+
Key, index, or accessor function for x-axis values. On a Plot, an
|
|
3347
|
+
Array of keys or accessors, outermost first, draws a multi-level
|
|
3348
|
+
category axis, which is the chart's discrete axis: `["year", "quarter"]` labels each tick with
|
|
3349
|
+
its quarter and each year once, centered across its quarters, with a
|
|
3350
|
+
divider between neighboring years (see the axis's `levels`).
|
|
3351
|
+
*/
|
|
3352
|
+
x?: string | number | ((d: DataPoint, i: number) => unknown) | (string | ((d: DataPoint, i: number) => unknown))[];
|
|
2610
3353
|
/** Configuration for the x-axis. */
|
|
2611
3354
|
xConfig?: AxisConfig;
|
|
2612
3355
|
/**
|
|
@@ -2616,26 +3359,29 @@ export interface D3plusConfig {
|
|
|
2616
3359
|
*/
|
|
2617
3360
|
xBreak?: [number, number] | [number, number][];
|
|
2618
3361
|
/**
|
|
2619
|
-
The x domain
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
without stretching to the chart's `baseline`.
|
|
2629
|
-
*/
|
|
2630
|
-
xDomain?: (number | string | Date)[];
|
|
3362
|
+
The x domain: `[min, max]` on a continuous axis, or the categories to
|
|
3363
|
+
show, in order, on a discrete one (unless `xConfig.scale` draws it
|
|
3364
|
+
continuous, like `"linear"`). Setting one end (`[min]` or
|
|
3365
|
+
`[undefined, max]`) pins only that end; the data fills the other. An
|
|
3366
|
+
`xConfig.domain` overrides this. On a multi-level axis (an Array
|
|
3367
|
+
`x`), each category can be the list of its level values, outermost
|
|
3368
|
+
first: `[[2023, "Q1"], [2023, "Q2"]]`.
|
|
3369
|
+
*/
|
|
3370
|
+
xDomain?: (number | string | Date | (number | string | Date)[])[];
|
|
2631
3371
|
/** The x2 domain as an array. If either value is undefined, it is calculated from the data. */
|
|
2632
3372
|
x2Domain?: (number | Date)[];
|
|
2633
3373
|
/** Custom sort function for x-axis values. */
|
|
2634
3374
|
xSort?: (a: DataPoint, b: DataPoint) => number;
|
|
2635
3375
|
/** Defines a custom sorting comparator function for discrete x2 axes. */
|
|
2636
3376
|
x2Sort?: (a: DataPoint, b: DataPoint) => number;
|
|
2637
|
-
/**
|
|
2638
|
-
|
|
3377
|
+
/**
|
|
3378
|
+
Key, index, or accessor function for y-axis values. On a Plot, an
|
|
3379
|
+
Array of keys or accessors, outermost first, draws a multi-level
|
|
3380
|
+
category axis, which is the chart's discrete axis: `["year", "quarter"]` labels each tick with
|
|
3381
|
+
its quarter and each year once, centered across its quarters, with a
|
|
3382
|
+
divider between neighboring years (see the axis's `levels`).
|
|
3383
|
+
*/
|
|
3384
|
+
y?: string | number | ((d: DataPoint, i: number) => unknown) | (string | ((d: DataPoint, i: number) => unknown))[];
|
|
2639
3385
|
/** Configuration for the y-axis. */
|
|
2640
3386
|
yConfig?: AxisConfig;
|
|
2641
3387
|
/**
|
|
@@ -2646,18 +3392,15 @@ export interface D3plusConfig {
|
|
|
2646
3392
|
*/
|
|
2647
3393
|
yBreak?: [number, number] | [number, number][];
|
|
2648
3394
|
/**
|
|
2649
|
-
The y domain
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
without stretching to the chart's `baseline`.
|
|
2659
|
-
*/
|
|
2660
|
-
yDomain?: (number | string | Date)[];
|
|
3395
|
+
The y domain: `[min, max]` on a continuous axis, or the categories to
|
|
3396
|
+
show, in order, on a discrete one (unless `yConfig.scale` draws it
|
|
3397
|
+
continuous, like `"linear"`). Setting one end (`[min]` or
|
|
3398
|
+
`[undefined, max]`) pins only that end; the data fills the other. A
|
|
3399
|
+
`yConfig.domain` overrides this. On a multi-level axis (an Array
|
|
3400
|
+
`y`), each category can be the list of its level values, outermost
|
|
3401
|
+
first: `[[2023, "Q1"], [2023, "Q2"]]`.
|
|
3402
|
+
*/
|
|
3403
|
+
yDomain?: (number | string | Date | (number | string | Date)[])[];
|
|
2661
3404
|
/** The y2 domain as an array. If either value is undefined, it is calculated from the data. */
|
|
2662
3405
|
y2Domain?: (number | Date)[];
|
|
2663
3406
|
/** Custom sort function for y-axis values. */
|
|
@@ -2666,7 +3409,13 @@ export interface D3plusConfig {
|
|
|
2666
3409
|
y2Sort?: (a: DataPoint, b: DataPoint) => number;
|
|
2667
3410
|
/** Calendar: formats the year beside each year block — a d3-time-format specifier (default `"%Y"`), a function of the year's first day, or `false` for none. */
|
|
2668
3411
|
yearFormat?: string | ((date: Date) => string) | false;
|
|
2669
|
-
/**
|
|
3412
|
+
/**
|
|
3413
|
+
Enables pan and zoom: the mouse wheel or a pinch (see `zoomScroll`), a
|
|
3414
|
+
drag (see `zoomDrag`), a double-click (see `zoomDoubleClick`), the
|
|
3415
|
+
zoom-control buttons (see `zoomControls`), and the `zoomIn`, `zoomOut`,
|
|
3416
|
+
`zoomReset`, and `zoomBrush` methods. On by default for every chart;
|
|
3417
|
+
`false` turns all of them off.
|
|
3418
|
+
*/
|
|
2670
3419
|
zoom?: boolean;
|
|
2671
3420
|
/** The pixel stroke-width of the zoom brush area. */
|
|
2672
3421
|
zoomBrushHandleSize?: number;
|
|
@@ -2679,13 +3428,30 @@ export interface D3plusConfig {
|
|
|
2679
3428
|
*/
|
|
2680
3429
|
zoomBrushSelectionStyle?: Record<string, unknown> | false;
|
|
2681
3430
|
/**
|
|
2682
|
-
An additional CSS class name (or space-separated list of class names) applied to each zoom control button, alongside the fixed `zoom-control` / `zoom-in` / `zoom-out` / `zoom-reset` / `zoom-brush` classes. Setting this automatically disables d3plus's built-in inline `zoomControlStyle`/`zoomControlStyleActive`/`zoomControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.
|
|
3431
|
+
An additional CSS class name (or space-separated list of class names) applied to each zoom control button, alongside the fixed `zoom-control` / `zoom-in` / `zoom-out` / `zoom-reset` / `zoom-brush` / `select-box` / `select-lasso` / `zoom-more` classes. Setting this automatically disables d3plus's built-in inline `zoomControlStyle`/`zoomControlStyleActive`/`zoomControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.
|
|
2683
3432
|
*/
|
|
2684
3433
|
zoomControlClassName?: string;
|
|
2685
3434
|
/**
|
|
2686
|
-
|
|
3435
|
+
Whether the zoom-control buttons (zoom in, zoom out, reset, brush, and
|
|
3436
|
+
the box and lasso select tools, see `selectMode`) show in the chart's
|
|
3437
|
+
top-right corner; on a chart too narrow for all of them beside the
|
|
3438
|
+
top-left controls, the ones that don't fit move into a "More Controls"
|
|
3439
|
+
menu. `false` hides them and gives the room they take back
|
|
3440
|
+
to the chart's title, legend, and other top content, while zooming
|
|
3441
|
+
stays on: the wheel, pinch, drag, and double-click gestures still work,
|
|
3442
|
+
and the chart's `zoomIn`, `zoomOut`, `zoomReset`, and `zoomBrush`
|
|
3443
|
+
methods let buttons of your own drive it.
|
|
3444
|
+
Defaults to `true`.
|
|
2687
3445
|
*/
|
|
2688
|
-
|
|
3446
|
+
zoomControls?: boolean;
|
|
3447
|
+
/**
|
|
3448
|
+
Overrides the zoom-control icons (`zoomIn`, `zoomOut`, `zoomReset`,
|
|
3449
|
+
`zoomBrush`, `selectBox`, `selectLasso`). Each value is an HTML string, or a mount function
|
|
3450
|
+
`(el) => void | (() => void)` called with the button's 12×12px icon slot
|
|
3451
|
+
(for a React tree, an `<img>`, …); a returned cleanup runs when the
|
|
3452
|
+
buttons redraw.
|
|
3453
|
+
*/
|
|
3454
|
+
zoomControlIcons?: Partial<Record<"zoomIn" | "zoomOut" | "zoomReset" | "zoomBrush" | "selectBox" | "selectLasso", string | ((el: HTMLElement) => void | (() => void))>>;
|
|
2689
3455
|
/**
|
|
2690
3456
|
An object containing CSS key/value pairs that is used to style each zoom control button (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.
|
|
2691
3457
|
*/
|
|
@@ -2698,11 +3464,27 @@ export interface D3plusConfig {
|
|
|
2698
3464
|
An object containing CSS key/value pairs that is used to style each zoom control button on hover (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.
|
|
2699
3465
|
*/
|
|
2700
3466
|
zoomControlStyleHover?: Record<string, unknown> | false;
|
|
3467
|
+
/**
|
|
3468
|
+
What a double-click on the chart does: `"in"` (the default) doubles
|
|
3469
|
+
the zoom around the pointer (Shift + double-click halves it),
|
|
3470
|
+
`"reset"` returns to the chart's initial view, like the reset button,
|
|
3471
|
+
and `false` does nothing.
|
|
3472
|
+
*/
|
|
3473
|
+
zoomDoubleClick?: "in" | "reset" | false;
|
|
3474
|
+
/**
|
|
3475
|
+
What a mouse drag on the chart does. `"pan"` (the default) pans it
|
|
3476
|
+
(see `zoomPan`). `"brush"` draws a box and zooms into it on release,
|
|
3477
|
+
as the brush button does, without turning brush mode on: a click that
|
|
3478
|
+
doesn't drag still reaches the shape under it, and hovering still
|
|
3479
|
+
shows tooltips. Shift + drag pans in `"brush"` mode, and touch keeps
|
|
3480
|
+
panning and pinching as in `"pan"`.
|
|
3481
|
+
*/
|
|
3482
|
+
zoomDrag?: "pan" | "brush";
|
|
2701
3483
|
/** Multiplier applied to programmatic zoom steps. */
|
|
2702
3484
|
zoomFactor?: number;
|
|
2703
3485
|
/** Maximum zoom scale factor. Defaults to the scale at which the smallest shape fills the chart area. */
|
|
2704
3486
|
zoomMax?: number;
|
|
2705
|
-
/** A pixel value to be used to pad all sides of a zoomed area. */
|
|
3487
|
+
/** A pixel value to be used to pad all sides of a zoomed area. A Plot's brushed box fills its plot without it, so its axes show the brushed range. */
|
|
2706
3488
|
zoomPadding?: number;
|
|
2707
3489
|
/** Whether panning (drag) is enabled while zoomed. */
|
|
2708
3490
|
zoomPan?: boolean;
|