@d3plus/core 4.12.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 +155 -21
- package/es/src/charts/Alluvial/emit.js +3 -2
- 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 +56 -27
- package/es/src/charts/ArcDiagram/events.js +10 -6
- package/es/src/charts/ArcDiagram/index.js +1 -1
- package/es/src/charts/BarChart/index.js +11 -0
- 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 +14 -1
- package/es/src/charts/Candlestick/index.js +2 -1
- 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 +31 -9
- 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 +27 -11
- 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 +2 -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/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 +10 -4
- 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 +45 -4
- package/es/src/charts/Network/applyLayout.js +173 -82
- package/es/src/charts/Network/bundle.js +26 -6
- 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 +78 -18
- package/es/src/charts/Network/forceLayout.js +111 -0
- package/es/src/charts/Network/graph.js +45 -6
- package/es/src/charts/Network/index.js +111 -2
- 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/emit.js +3 -2
- package/es/src/charts/Pack/index.js +0 -14
- package/es/src/charts/ParallelCoordinates/emit.js +3 -2
- 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 +3 -2
- package/es/src/charts/Plot/areaEnter.js +5 -3
- 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 +15 -2
- 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 +49 -18
- 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/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 +59 -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/sharedHover.js +40 -12
- package/es/src/charts/Plot/sharedHoverScene.js +49 -13
- package/es/src/charts/Plot/sharedTooltip.js +55 -22
- 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/Priestley/applyLayout.js +9 -5
- package/es/src/charts/Priestley/emit.js +3 -2
- package/es/src/charts/Priestley/timeAxis.js +13 -5
- package/es/src/charts/Radar/emit.js +3 -2
- package/es/src/charts/RadialArea/index.js +51 -0
- package/es/src/charts/RadialBar/emit.js +3 -2
- 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/emit.js +3 -2
- package/es/src/charts/RadialTree/index.js +33 -0
- package/es/src/charts/Rings/applyLayout.js +22 -6
- package/es/src/charts/Rings/emit.js +43 -23
- package/es/src/charts/Rings/index.js +1 -1
- package/es/src/charts/Rings/ringsCurves.js +10 -8
- package/es/src/charts/Rings/ringsLoops.js +4 -2
- package/es/src/charts/Rings/ringsSizing.js +21 -13
- package/es/src/charts/Sankey/applyLayout.js +4 -0
- 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 +43 -0
- 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 +3 -2
- package/es/src/charts/TileGridMap/index.js +29 -0
- package/es/src/charts/Tree/applyLayout.js +91 -18
- package/es/src/charts/Tree/emit.js +56 -3
- package/es/src/charts/Tree/index.js +24 -3
- package/es/src/charts/Tree/nodeHeight.js +58 -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/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 +10 -2
- 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 +1 -1
- 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/zoomControls.js +59 -19
- package/es/src/charts/drawSteps/zoomControlsMarkup.js +212 -39
- package/es/src/charts/drawSteps/zoomControlsMenu.js +140 -0
- package/es/src/charts/drawSteps/zoomDrag.js +3 -1
- package/es/src/charts/events/mouseleave.js +6 -3
- package/es/src/charts/events/mousemove.legend.js +10 -5
- package/es/src/charts/events/mousemove.shape.js +15 -6
- 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 +4 -2
- package/es/src/charts/features/axesFinal.js +92 -8
- package/es/src/charts/features/axesMeasure.js +7 -4
- 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 +36 -17
- package/es/src/charts/features/circleLabelPlacement.js +288 -83
- package/es/src/charts/features/circleLabels.js +66 -14
- package/es/src/charts/features/colorScaleHover.js +7 -2
- package/es/src/charts/features/colorScaleTooltip.js +6 -21
- package/es/src/charts/features/colorScaleTop.js +12 -2
- package/es/src/charts/features/colorScaleValue.js +10 -1
- package/es/src/charts/features/curvedArrows.js +46 -28
- package/es/src/charts/features/edgeArrows.js +48 -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 +7 -4
- package/es/src/charts/features/featuresLegend.js +20 -0
- package/es/src/charts/features/hoverTicks.js +12 -7
- 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 +4 -1
- package/es/src/charts/features/linkLabelPath.js +2 -39
- 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/pathLabelBends.js +191 -0
- package/es/src/charts/features/plotAnnotations.js +8 -5
- package/es/src/charts/features/plotPaint.js +45 -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 +104 -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/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/interaction.js +2 -2
- package/es/src/charts/pipeline/insetPlacement.js +13 -6
- 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/viz/Viz.js +32 -18
- package/es/src/charts/viz/VizBase.js +39 -38
- package/es/src/charts/viz/appendRows.js +90 -0
- package/es/src/charts/viz/dataChanged.js +19 -0
- package/es/src/charts/viz/discrete.js +9 -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 +134 -29
- 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/setCursor.js +12 -0
- package/es/src/charts/viz/simpleHover.js +3 -4
- package/es/src/charts/viz/userClick.js +11 -0
- package/es/src/charts/viz/vizDefaults.js +10 -0
- package/es/src/charts/viz/vizFields.js +7 -0
- package/es/src/charts/viz/vizTypes.js +1 -1
- package/es/src/components/Axis/Axis.js +85 -12
- 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/axisDefaults.js +7 -0
- package/es/src/components/Axis/axisEndLabels.js +4 -1
- package/es/src/components/Axis/axisLabelSize.js +40 -16
- package/es/src/components/Axis/axisLabelThinning.js +69 -6
- package/es/src/components/Axis/axisLayout.js +5 -0
- package/es/src/components/Axis/axisLayoutLabels.js +11 -5
- package/es/src/components/Axis/axisLayoutScale.js +71 -25
- package/es/src/components/Axis/axisLevels.js +271 -0
- package/es/src/components/Axis/axisLimit.js +6 -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 +71 -29
- package/es/src/components/Axis/axisRounding.js +24 -2
- package/es/src/components/Axis/axisScaleType.js +55 -0
- package/es/src/components/Axis/axisScene.js +90 -5
- package/es/src/components/Axis/axisTickLookups.js +30 -0
- package/es/src/components/Axis/axisTooltipTargets.js +23 -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 +1 -0
- package/es/src/components/ColorScale/colorScaleScale.js +139 -41
- package/es/src/components/Legend/Legend.js +1 -0
- package/es/src/components/SizeLegend/SizeLegend.js +20 -1
- package/es/src/components/TextBox.js +1 -0
- package/es/src/components/Timeline/Timeline.js +11 -3
- package/es/src/components/Timeline/timelineRender.js +23 -13
- package/es/src/components/Tooltip.js +8 -1
- package/es/src/components/tooltipDom.js +73 -14
- package/es/src/fluent.js +77 -10
- 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 -57
- 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 +253 -27
- 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 +5 -4
- 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 +5 -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 +2 -1
- 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 +24 -0
- package/types/src/charts/Network/bundle.d.ts +23 -16
- 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 +18 -2
- 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/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/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 +17 -8
- 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/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/sharedHover.d.ts +5 -0
- package/types/src/charts/Plot/sharedTooltip.d.ts +24 -6
- 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 +6 -3
- 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/RadialTree/index.d.ts +16 -0
- package/types/src/charts/Rings/emit.d.ts +6 -5
- package/types/src/charts/Rings/ringsCurves.d.ts +10 -14
- package/types/src/charts/Rings/ringsGraph.d.ts +3 -0
- package/types/src/charts/Rings/ringsSizing.d.ts +5 -2
- 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/index.d.ts +2 -2
- package/types/src/charts/Tree/nodeHeight.d.ts +41 -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 +13 -0
- package/types/src/charts/definition/declaresField.d.ts +9 -0
- package/types/src/charts/definition/makeChart.d.ts +2 -2
- 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/zoomControls.d.ts +17 -7
- package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +94 -21
- package/types/src/charts/drawSteps/zoomControlsMenu.d.ts +30 -0
- package/types/src/charts/drawSteps/zoomDrag.d.ts +2 -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/bareRegion.d.ts +18 -0
- package/types/src/charts/features/boxGrid.d.ts +28 -0
- package/types/src/charts/features/centerLabel.d.ts +16 -2
- 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/colorScaleHover.d.ts +3 -2
- package/types/src/charts/features/colorScaleTooltip.d.ts +4 -9
- package/types/src/charts/features/colorScaleValue.d.ts +6 -0
- package/types/src/charts/features/curvedArrows.d.ts +28 -12
- package/types/src/charts/features/edgeArrows.d.ts +40 -30
- 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 +5 -2
- 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/linkLabelPath.d.ts +0 -7
- 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/pathLabelBends.d.ts +78 -0
- package/types/src/charts/features/plotAnnotations.d.ts +2 -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/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/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/viz/VizBase.d.ts +32 -1
- package/types/src/charts/viz/appendRows.d.ts +49 -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/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/setCursor.d.ts +12 -0
- package/types/src/charts/viz/simpleHover.d.ts +3 -3
- package/types/src/charts/viz/userClick.d.ts +8 -0
- package/types/src/charts/viz/vizFields.d.ts +7 -0
- package/types/src/charts/viz/vizTypes.d.ts +116 -2
- package/types/src/components/Axis/Axis.d.ts +35 -0
- package/types/src/components/Axis/axisDefaults.d.ts +2 -0
- package/types/src/components/Axis/axisLabelSize.d.ts +3 -3
- package/types/src/components/Axis/axisLabelThinning.d.ts +19 -1
- package/types/src/components/Axis/axisLayoutScale.d.ts +14 -2
- package/types/src/components/Axis/axisLevels.d.ts +137 -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 +15 -1
- 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/axisTooltipTargets.d.ts +16 -4
- 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/colorScaleScale.d.ts +45 -0
- package/types/src/components/Tooltip.d.ts +11 -2
- package/types/src/components/tooltipDom.d.ts +24 -0
- package/types/src/fluent.d.ts +30 -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/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 +991 -85
- 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/umd/d3plus-core.full.js +98950 -68731
- package/umd/d3plus-core.full.min.js +2 -2
- package/umd/d3plus-core.js +77484 -48545
- package/umd/d3plus-core.min.js +2 -2
|
@@ -28,16 +28,19 @@ type PanelPosition = Position | "auto";
|
|
|
28
28
|
type DataPointAccessor<T> = string | ((d: DataPoint) => T);
|
|
29
29
|
/** A config value that is either a constant or a `(datum, index)` accessor. */
|
|
30
30
|
type Accessor<T> = T | ((d: DataPoint, i?: number) => T);
|
|
31
|
-
|
|
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";
|
|
32
33
|
export interface AxisConfig {
|
|
33
34
|
barConfig?: Record<string, string | number>;
|
|
34
35
|
/**
|
|
35
36
|
The axis's domain: `[min, max]` on a continuous axis, or the categories
|
|
36
37
|
to show on a discrete one. In a Plot it overrides `xDomain`/`yDomain`
|
|
37
38
|
and isn't rounded unless `rounding` says so; a single end (`[min]` or
|
|
38
|
-
`[undefined, max]`) pins that end like `yDomain([min])`.
|
|
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"]]`.
|
|
39
42
|
*/
|
|
40
|
-
domain?: (number | string | Date | undefined)[];
|
|
43
|
+
domain?: (number | string | Date | undefined | (number | string | Date)[])[];
|
|
41
44
|
/**
|
|
42
45
|
The tick the axis's `baselineBreak` returns to. Defaults to `0`. To start
|
|
43
46
|
a Plot's value axis at a value, set the chart's `baseline` instead.
|
|
@@ -82,13 +85,24 @@ export interface AxisConfig {
|
|
|
82
85
|
so the data closes up around them: one rule or a list of them.
|
|
83
86
|
`"weekends"`; `{days: [5, 6]}` (0 is Sunday); `{hours: [17, 9]}`, daily,
|
|
84
87
|
wrapping past midnight (`9.5` is 9:30); `{values: [date, …]}`, whole
|
|
85
|
-
days; or `{bounds: [start, end]}`, one range. Rules use local time
|
|
86
|
-
rule's `marker` draws the `break` marker at the gap
|
|
87
|
-
`bounds` only).
|
|
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).
|
|
88
91
|
@example
|
|
89
92
|
{rangeBreaks: ["weekends", {hours: [16, 9.5]}, {values: ["2024-07-04"]}]}
|
|
90
93
|
*/
|
|
91
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;
|
|
92
106
|
/** Grid values of the axis. */
|
|
93
107
|
grid?: unknown[];
|
|
94
108
|
gridConfig?: Record<string, string | number>;
|
|
@@ -103,6 +117,47 @@ export interface AxisConfig {
|
|
|
103
117
|
*/
|
|
104
118
|
labels?: unknown[];
|
|
105
119
|
labelOffset?: false | number;
|
|
120
|
+
/**
|
|
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;
|
|
106
161
|
/**
|
|
107
162
|
Whether to rotate the axis labels: `true` rotates them -90 degrees,
|
|
108
163
|
`false` keeps them flat, and a number rotates them that many degrees
|
|
@@ -128,6 +183,34 @@ export interface AxisConfig {
|
|
|
128
183
|
{maxSize: size => size / 3}
|
|
129
184
|
*/
|
|
130
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;
|
|
131
214
|
/** Minimum size alloted for the space that contains the axis tick labels and title. */
|
|
132
215
|
minSize?: number;
|
|
133
216
|
/**
|
|
@@ -149,7 +232,16 @@ export interface AxisConfig {
|
|
|
149
232
|
`rounding` is set here.
|
|
150
233
|
*/
|
|
151
234
|
rounding?: "none" | "outside" | "inside";
|
|
152
|
-
/**
|
|
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
|
+
*/
|
|
153
245
|
scale?: AxisScale;
|
|
154
246
|
/**
|
|
155
247
|
The exponent of a `"pow"` axis (`scale: "pow"`): below 1 it spreads the
|
|
@@ -176,6 +268,21 @@ export interface AxisConfig {
|
|
|
176
268
|
shapeConfig?: Record<string, unknown>;
|
|
177
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. */
|
|
178
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";
|
|
179
286
|
/** Tick values of the axis. */
|
|
180
287
|
ticks?: unknown[];
|
|
181
288
|
/**
|
|
@@ -281,7 +388,12 @@ export interface TooltipConfig {
|
|
|
281
388
|
to drop the swatch from legend tooltips only.
|
|
282
389
|
*/
|
|
283
390
|
titleSwatch?: boolean;
|
|
284
|
-
/**
|
|
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
|
+
*/
|
|
285
397
|
tooltipStyle?: Record<string, string>;
|
|
286
398
|
body?: ((d: DataPoint) => string) | string;
|
|
287
399
|
/**
|
|
@@ -443,6 +555,14 @@ export interface TimelineConfig {
|
|
|
443
555
|
`xConfig.rangeBreaks`); set this to use others, or `false` for none.
|
|
444
556
|
*/
|
|
445
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;
|
|
446
566
|
/**
|
|
447
567
|
The maximum number of ticks (or buttons) a selection can span; unlimited
|
|
448
568
|
by default. A wider brush is pulled in to it on release, keeping the end
|
|
@@ -540,8 +660,10 @@ export interface SizeLegendConfig {
|
|
|
540
660
|
values?: number[] | number | ((domain: [number, number]) => number[]);
|
|
541
661
|
/** Formats each value's label. Defaults to the locale's abbreviated number format. */
|
|
542
662
|
tickFormat?: (value: number) => string;
|
|
543
|
-
/** 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). */
|
|
544
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";
|
|
545
667
|
/** Circle paint: `fill`, `fillOpacity`, `stroke`, `strokeWidth`, `strokeOpacity`. */
|
|
546
668
|
shapeConfig?: SizeLegendShapeConfig;
|
|
547
669
|
/** Leader-line paint: `stroke`, `strokeWidth`, `strokeOpacity`, `strokeDasharray`. */
|
|
@@ -557,8 +679,33 @@ export interface SizeLegendConfig {
|
|
|
557
679
|
labelPadding?: number;
|
|
558
680
|
}
|
|
559
681
|
export interface TrendLineConfig {
|
|
560
|
-
/** `"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. */
|
|
561
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;
|
|
562
709
|
/** The polynomial degree when `trendLine` is `"polynomial"`. Defaults to 2. */
|
|
563
710
|
order?: number;
|
|
564
711
|
/** Draws a confidence band around a linear fit. Defaults to `false`. */
|
|
@@ -568,7 +715,7 @@ export interface TrendLineConfig {
|
|
|
568
715
|
/** Area shape config for the confidence band. Its fill defaults to the line color. */
|
|
569
716
|
confidenceConfig?: Record<string, unknown>;
|
|
570
717
|
/**
|
|
571
|
-
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).
|
|
572
719
|
*/
|
|
573
720
|
projection?: number | {
|
|
574
721
|
to: number | string | Date;
|
|
@@ -586,20 +733,32 @@ export interface TrendLineConfig {
|
|
|
586
733
|
/**
|
|
587
734
|
Labels each trend line along its path, near its end, in the line's
|
|
588
735
|
color: `true` names the series, `"equation"` shows its fitted equation
|
|
589
|
-
and R
|
|
590
|
-
|
|
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"`;
|
|
591
740
|
`false` turns labels off.
|
|
592
741
|
*/
|
|
593
742
|
label?: boolean | "equation" | ((fit: {
|
|
594
743
|
label: string;
|
|
595
744
|
color: string;
|
|
596
745
|
fit: {
|
|
597
|
-
coefficients: number[];
|
|
598
|
-
r2: number;
|
|
599
746
|
type: string;
|
|
747
|
+
coefficients?: number[];
|
|
748
|
+
r2?: number;
|
|
749
|
+
window?: number;
|
|
750
|
+
center?: boolean;
|
|
751
|
+
deviations?: number;
|
|
600
752
|
};
|
|
601
753
|
}) => string | false | null | undefined);
|
|
602
|
-
/**
|
|
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
|
+
*/
|
|
603
762
|
labelConfig?: Record<string, unknown>;
|
|
604
763
|
/** Other Line shape config. */
|
|
605
764
|
[key: string]: unknown;
|
|
@@ -796,6 +955,114 @@ export interface PointLabelConfig extends Omit<TextBoxConfig, "fontMin" | "fontS
|
|
|
796
955
|
/** The space, in pixels, between a circle's edge and a label beside it (default `3`). */
|
|
797
956
|
padding?: number;
|
|
798
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
|
+
}
|
|
799
1066
|
export interface D3plusConfig {
|
|
800
1067
|
/** Data array or URL string to load data from. */
|
|
801
1068
|
data?: DataPoint[] | string;
|
|
@@ -826,6 +1093,20 @@ export interface D3plusConfig {
|
|
|
826
1093
|
arcSide?: "above" | "below" | "both";
|
|
827
1094
|
/** Hides the SVG from assistive technology when true (`aria-hidden`). */
|
|
828
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;
|
|
829
1110
|
/**
|
|
830
1111
|
The Radar's axis styles, named after the parts of a Plot axis: the
|
|
831
1112
|
inner level rings are its gridlines (`gridConfig`, a faint stroke like
|
|
@@ -912,6 +1193,9 @@ export interface D3plusConfig {
|
|
|
912
1193
|
`xDomain([n])` for horizontal charts); the far end comes from the data.
|
|
913
1194
|
Bars, areas, and stems still grow from `0`, so with `baselineBreak` on
|
|
914
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).
|
|
915
1199
|
*/
|
|
916
1200
|
baseline?: number;
|
|
917
1201
|
/**
|
|
@@ -923,8 +1207,14 @@ export interface D3plusConfig {
|
|
|
923
1207
|
(BarChart, AreaPlot, Histogram, Lollipop), else `false`.
|
|
924
1208
|
*/
|
|
925
1209
|
baselineBreak?: boolean;
|
|
926
|
-
/**
|
|
927
|
-
|
|
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 | {
|
|
928
1218
|
min?: number;
|
|
929
1219
|
max?: number;
|
|
930
1220
|
color?: string;
|
|
@@ -933,6 +1223,26 @@ export interface D3plusConfig {
|
|
|
933
1223
|
max?: number;
|
|
934
1224
|
color?: string;
|
|
935
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;
|
|
936
1246
|
/**
|
|
937
1247
|
Hexbin: the bin shape, `"hex"` (default) for hexagons or `"square"`
|
|
938
1248
|
for squares, or `false` to draw no bins (for contours alone).
|
|
@@ -945,6 +1255,13 @@ export interface D3plusConfig {
|
|
|
945
1255
|
`12`.
|
|
946
1256
|
*/
|
|
947
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;
|
|
948
1265
|
/**
|
|
949
1266
|
Hexbin: what each bin measures, which its color shows. `"count"`
|
|
950
1267
|
(default) is the number of observations in the bin; `{value, agg,
|
|
@@ -954,8 +1271,18 @@ export interface D3plusConfig {
|
|
|
954
1271
|
binValue?: BinValueOption;
|
|
955
1272
|
/** Candlestick: the share of each period's room its candle body (or OHLC ticks) spans, from 0 to 1. Defaults to `0.7`. */
|
|
956
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);
|
|
957
1276
|
/** BoxWhisker: accessor or data key for each summary row's upper whisker end. See `boxMedian`. */
|
|
958
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);
|
|
959
1286
|
/**
|
|
960
1287
|
BoxWhisker: accessor or data key for each summary row's median. Setting
|
|
961
1288
|
it, `boxMin`, `boxQ1`, `boxQ3`, or `boxMax` draws boxes from statistics
|
|
@@ -969,14 +1296,35 @@ export interface D3plusConfig {
|
|
|
969
1296
|
boxMedian?: string | ((d: DataPoint, i: number) => number);
|
|
970
1297
|
/** BoxWhisker: accessor or data key for each summary row's lower whisker end. See `boxMedian`. */
|
|
971
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]);
|
|
972
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`. */
|
|
973
1308
|
boxOutliers?: string | ((d: DataPoint, i: number) => number[]);
|
|
974
1309
|
/** Alluvial: the fill opacity of the bands between columns (default `0.5`). */
|
|
975
1310
|
bandOpacity?: number;
|
|
976
1311
|
/** BoxWhisker: accessor or data key for each summary row's lower quartile, where its box starts. See `boxMedian`. */
|
|
977
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;
|
|
978
1320
|
/** BoxWhisker: accessor or data key for each summary row's upper quartile, where its box ends. See `boxMedian`. */
|
|
979
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;
|
|
980
1328
|
/**
|
|
981
1329
|
ParallelCoordinates: the brush strips over each axis — `width` (px), the
|
|
982
1330
|
selection's `fill`, `fillOpacity`, `stroke`, and `strokeWidth`, and
|
|
@@ -1016,6 +1364,32 @@ export interface D3plusConfig {
|
|
|
1016
1364
|
fontSize?: number;
|
|
1017
1365
|
fontWeight?: number | string;
|
|
1018
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);
|
|
1019
1393
|
/** Matrix and Calendar: the gap between neighboring cells, in pixels. */
|
|
1020
1394
|
cellPadding?: number;
|
|
1021
1395
|
/** Calendar: each cell's corner radius, in pixels (kept below a third of the cell). Defaults to `2`. */
|
|
@@ -1161,6 +1535,8 @@ export interface D3plusConfig {
|
|
|
1161
1535
|
categoryPosition?: "center" | "left";
|
|
1162
1536
|
/** Pyramid: a comparison value per row (data key or accessor), drawn as an outline around each side's bars. */
|
|
1163
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;
|
|
1164
1540
|
/** Pyramid: line styles for the comparison outline (`stroke`, `strokeWidth`, `strokeOpacity`, `strokeDasharray`), each optionally a function of the side value and its index. */
|
|
1165
1541
|
comparisonConfig?: Record<string, unknown>;
|
|
1166
1542
|
/** Waterfall: draws a thin line from the end of each bar to the start of the next. */
|
|
@@ -1174,13 +1550,25 @@ export interface D3plusConfig {
|
|
|
1174
1550
|
nested bands around each line (a fan) — each a `[lower, upper]` pair,
|
|
1175
1551
|
`[lower, upper, label]`, or `{lower, upper, label}` — shaded by
|
|
1176
1552
|
`confidenceConfig.bandOpacity`, with each band's range listed in
|
|
1177
|
-
tooltips under its label (bars draw the first band).
|
|
1178
|
-
|
|
1179
|
-
|
|
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;
|
|
1180
1567
|
/**
|
|
1181
1568
|
Styles the `confidence` interval: a line's band (Area keys) or a bar's
|
|
1182
|
-
error bar (Path keys, plus `capWidth`, in pixels or a
|
|
1183
|
-
|
|
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.
|
|
1184
1572
|
`bandOpacity` ramps nested bands' opacity (default `[0.15, 0.6]`), and
|
|
1185
1573
|
`tooltip: false` leaves the bounds out of tooltips.
|
|
1186
1574
|
*/
|
|
@@ -1193,8 +1581,25 @@ export interface D3plusConfig {
|
|
|
1193
1581
|
`strokeDasharray` (default `"2 4"`), `strokeWidth`, and `opacity`.
|
|
1194
1582
|
*/
|
|
1195
1583
|
connectGaps?: ConnectGaps;
|
|
1196
|
-
/**
|
|
1197
|
-
|
|
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";
|
|
1198
1603
|
/**
|
|
1199
1604
|
Funnel: paint for the necks between stages (`fill`, `opacity`,
|
|
1200
1605
|
`stroke`, `strokeWidth`), each optionally a function of the stage the
|
|
@@ -1261,15 +1666,27 @@ export interface D3plusConfig {
|
|
|
1261
1666
|
else its `time`.
|
|
1262
1667
|
*/
|
|
1263
1668
|
date?: string | ((d: DataPoint, i: number) => Date | number | string);
|
|
1264
|
-
/** Waterfall: fill for bars that lower the running total. Defaults to `colorDefaults.off`. */
|
|
1265
|
-
decreaseColor?: string;
|
|
1266
1669
|
/**
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
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).
|
|
1273
1690
|
*/
|
|
1274
1691
|
densityConfig?: {
|
|
1275
1692
|
kernel?: "gaussian" | "epanechnikov" | ((u: number) => number);
|
|
@@ -1278,10 +1695,13 @@ export interface D3plusConfig {
|
|
|
1278
1695
|
cut?: number;
|
|
1279
1696
|
};
|
|
1280
1697
|
/**
|
|
1281
|
-
How Violin and
|
|
1282
|
-
|
|
1698
|
+
How Violin, Ridgeline, and DensityPlot curves are sized against each
|
|
1699
|
+
other: `"area"` gives every shape the same area, `"count"` makes areas
|
|
1283
1700
|
proportional to each group's observations, and `"width"` scales every
|
|
1284
|
-
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.
|
|
1285
1705
|
*/
|
|
1286
1706
|
densityScale?: "area" | "count" | "width";
|
|
1287
1707
|
/**
|
|
@@ -1354,10 +1774,54 @@ export interface D3plusConfig {
|
|
|
1354
1774
|
objects. A key is its column's title; a bare accessor has none. Rows
|
|
1355
1775
|
missing a category on any dimension (`undefined`, `null`, or `""`) are
|
|
1356
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`.
|
|
1357
1781
|
*/
|
|
1358
1782
|
dimensions?: AlluvialDimensionInput[];
|
|
1359
|
-
/**
|
|
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
|
+
*/
|
|
1360
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;
|
|
1361
1825
|
/** Candlestick: the color of periods that closed below their open, or an accessor of the row. Defaults to red. */
|
|
1362
1826
|
downColor?: string | ((d: DataPoint, i: number) => string);
|
|
1363
1827
|
/** Default duration of transitions, in milliseconds. */
|
|
@@ -1371,7 +1835,7 @@ export interface D3plusConfig {
|
|
|
1371
1835
|
emptyFill?: string;
|
|
1372
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. */
|
|
1373
1837
|
facet?: string | ((d: DataPoint, i: number) => unknown) | false;
|
|
1374
|
-
/** 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]}`). */
|
|
1375
1839
|
facetConfig?: FacetConfig;
|
|
1376
1840
|
/**
|
|
1377
1841
|
Fills the area between two series' lines, in the color of whichever
|
|
@@ -1398,6 +1862,23 @@ export interface D3plusConfig {
|
|
|
1398
1862
|
filter?: ((d: DataPoint, i: number) => boolean) | false;
|
|
1399
1863
|
/** Allows removing specific geographies from topojson file to improve zoom. */
|
|
1400
1864
|
fitFilter?: number | string | ((d: Record<string, unknown>) => boolean);
|
|
1865
|
+
/**
|
|
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);
|
|
1401
1882
|
/**
|
|
1402
1883
|
Marks a forecast: a shaded backdrop, a rule, and a "Forecast" label over
|
|
1403
1884
|
the forecast stretch, with lines dashed there (see `forecastConfig`).
|
|
@@ -1479,6 +1960,25 @@ export interface D3plusConfig {
|
|
|
1479
1960
|
groupPadding?: number;
|
|
1480
1961
|
/** Overall height of the visualization in pixels. */
|
|
1481
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
|
+
};
|
|
1482
1982
|
/**
|
|
1483
1983
|
Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).
|
|
1484
1984
|
*/
|
|
@@ -1505,7 +2005,11 @@ export interface D3plusConfig {
|
|
|
1505
2005
|
`false` fills both.
|
|
1506
2006
|
*/
|
|
1507
2007
|
hollow?: boolean;
|
|
1508
|
-
/**
|
|
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
|
+
*/
|
|
1509
2013
|
increaseColor?: string;
|
|
1510
2014
|
/**
|
|
1511
2015
|
What Violin draws inside each violin: `"box"` (default; a narrow box
|
|
@@ -1520,6 +2024,18 @@ export interface D3plusConfig {
|
|
|
1520
2024
|
quartiles?: Record<string, unknown>;
|
|
1521
2025
|
points?: Record<string, unknown>;
|
|
1522
2026
|
};
|
|
2027
|
+
/**
|
|
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;
|
|
1523
2039
|
/**
|
|
1524
2040
|
Lets keyboard users move between the chart's marks: the chart is one Tab
|
|
1525
2041
|
stop, the arrow keys move to the nearest mark in that direction, Home and
|
|
@@ -1535,6 +2051,13 @@ export interface D3plusConfig {
|
|
|
1535
2051
|
per-datum object key — pass a function for that).
|
|
1536
2052
|
*/
|
|
1537
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";
|
|
1538
2061
|
/**
|
|
1539
2062
|
Gantt: the most the task label column may take: a share of the chart's
|
|
1540
2063
|
width when 1 or below (default `0.3`), else pixels. The column fits the
|
|
@@ -1554,6 +2077,8 @@ export interface D3plusConfig {
|
|
|
1554
2077
|
is short. Stacked bars always label inside.
|
|
1555
2078
|
- Circles (Plot points, Network nodes, Geomap points): inside the
|
|
1556
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.
|
|
1557
2082
|
- Stacked areas: `"auto"` and `"along"` run each name along its band;
|
|
1558
2083
|
`"inside"` puts it in the band's largest box.
|
|
1559
2084
|
|
|
@@ -1561,6 +2086,15 @@ export interface D3plusConfig {
|
|
|
1561
2086
|
the default legend hides. Defaults to `"auto"`.
|
|
1562
2087
|
*/
|
|
1563
2088
|
labelPosition?: "auto" | "along" | "inside" | "outside" | ((d: DataPoint, i: number) => "auto" | "along" | "inside" | "outside");
|
|
2089
|
+
/**
|
|
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;
|
|
1564
2098
|
/**
|
|
1565
2099
|
Whether to display the legend. By default it shows when it has more than
|
|
1566
2100
|
one entry and each entry stands for a single group, or when entries are
|
|
@@ -1675,7 +2209,9 @@ export interface D3plusConfig {
|
|
|
1675
2209
|
/**
|
|
1676
2210
|
Labels each line with its series name: `true` or `"end"` past its right
|
|
1677
2211
|
end, `"start"` past its left end, `"both"` at both ends, or `"along"`
|
|
1678
|
-
written along the line itself, following its curve
|
|
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
|
|
1679
2215
|
row picks per series (or `false`). End labels that would overlap are
|
|
1680
2216
|
moved apart, and `lineLabelConfig` can add each end's value. When every
|
|
1681
2217
|
line is named along it, the default legend hides. Defaults to `"along"`
|
|
@@ -1687,7 +2223,11 @@ export interface D3plusConfig {
|
|
|
1687
2223
|
labeled end after the series name (e.g. "Brazil 37%"), formatted as the
|
|
1688
2224
|
y axis formats its ticks (its `tickFormat` when set). `valueFormat`
|
|
1689
2225
|
formats it instead, as a function of the value, the row it belongs to,
|
|
1690
|
-
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}`.
|
|
1691
2231
|
*/
|
|
1692
2232
|
lineLabelConfig?: LineLabelConfig;
|
|
1693
2233
|
/**
|
|
@@ -1695,6 +2235,25 @@ export interface D3plusConfig {
|
|
|
1695
2235
|
tracks and 360 for the circular bar chart.
|
|
1696
2236
|
*/
|
|
1697
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;
|
|
1698
2257
|
/**
|
|
1699
2258
|
Geomap: how far each link bows into an arc, as a share of the distance
|
|
1700
2259
|
between its ends: `0` draws the plain great-circle path, and the default
|
|
@@ -1791,6 +2350,47 @@ export interface D3plusConfig {
|
|
|
1791
2350
|
loadingHTML?: string | ((viz: VizBase) => string);
|
|
1792
2351
|
/** Candlestick: accessor or data key for each period's lowest value (default `"low"`). */
|
|
1793
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">;
|
|
1794
2394
|
/** Bullet: the measure bar's thickness, as a fraction of the band's thickness. */
|
|
1795
2395
|
measureSize?: number;
|
|
1796
2396
|
/** Orders Violin and Ridgeline categories by median: `false` (default; data order), `"ascending"`, or `"descending"`. */
|
|
@@ -1856,14 +2456,36 @@ export interface D3plusConfig {
|
|
|
1856
2456
|
*/
|
|
1857
2457
|
noDataMessage?: boolean;
|
|
1858
2458
|
/**
|
|
1859
|
-
The order of ArcDiagram's nodes along its line
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
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.
|
|
1865
2469
|
*/
|
|
1866
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);
|
|
1867
2489
|
/**
|
|
1868
2490
|
Network, Rings, Sankey, Chord, and ArcDiagram: transforms `nodes`
|
|
1869
2491
|
before they are drawn. The function receives the loaded file (or the
|
|
@@ -1914,17 +2536,34 @@ export interface D3plusConfig {
|
|
|
1914
2536
|
light: string;
|
|
1915
2537
|
dark: string;
|
|
1916
2538
|
};
|
|
1917
|
-
/**
|
|
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
|
+
*/
|
|
1918
2545
|
on?: Record<string, (event: Event) => void>;
|
|
1919
2546
|
/** Candlestick: accessor or data key for each period's opening value (default `"open"`). */
|
|
1920
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);
|
|
1921
2559
|
/**
|
|
1922
2560
|
Layout direction. Charts that can be drawn either way take
|
|
1923
|
-
`"horizontal"` or `"vertical"`, as do Box shapes.
|
|
1924
|
-
|
|
1925
|
-
|
|
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.
|
|
1926
2565
|
*/
|
|
1927
|
-
orient?: ConstOrAccessor<Orient | SideOrient>;
|
|
2566
|
+
orient?: ConstOrAccessor<Orient | SideOrient | "radial">;
|
|
1928
2567
|
/**
|
|
1929
2568
|
How far Ridgeline's tallest ridge rises, in category steps (default
|
|
1930
2569
|
1.5): 1 reaches the next baseline up, larger values overlap the ridges
|
|
@@ -1939,16 +2578,103 @@ export interface D3plusConfig {
|
|
|
1939
2578
|
A number reserves exactly that much room.
|
|
1940
2579
|
*/
|
|
1941
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>;
|
|
1942
2617
|
/** Priestley and Gantt: the space between neighboring bars, as a share of each row (d3's band `paddingInner`). */
|
|
1943
2618
|
paddingInner?: number;
|
|
1944
2619
|
/** Priestley and Gantt: the space before the first row and after the last, as a share of a row (d3's band `paddingOuter`). */
|
|
1945
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);
|
|
1946
2647
|
/** Pyramid: draws each value as a fraction of the frame's total, with the axis and tooltip reading percentages. */
|
|
1947
2648
|
percent?: boolean;
|
|
1948
|
-
/**
|
|
1949
|
-
|
|
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";
|
|
1950
2657
|
/** Coordinate accessor for point-based geomaps. */
|
|
1951
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
|
+
};
|
|
1952
2678
|
/**
|
|
1953
2679
|
Hexbin: the style of the observations `points` draws: `r`, the dot
|
|
1954
2680
|
radius in pixels (default `1.5`); `fill` (defaults to the chart's text
|
|
@@ -1984,12 +2710,25 @@ export interface D3plusConfig {
|
|
|
1984
2710
|
outlined. A key also averages grouped rows' progress.
|
|
1985
2711
|
*/
|
|
1986
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;
|
|
1987
2715
|
/** Map projection name or function. */
|
|
1988
2716
|
projection?: string | ((x: number, y: number) => [number, number]);
|
|
1989
2717
|
/** Outer padding between the visualization edge and map shapes. */
|
|
1990
2718
|
projectionPadding?: number | string;
|
|
1991
2719
|
/** Rotation offset for the map projection center. */
|
|
1992
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;
|
|
1993
2732
|
/**
|
|
1994
2733
|
How PolarArea maps values onto radii: `"sqrt"` (default) keeps each
|
|
1995
2734
|
wedge's area proportional to its value; `"linear"` its radius.
|
|
@@ -2026,8 +2765,24 @@ export interface D3plusConfig {
|
|
|
2026
2765
|
widens a continuous axis's domain to fit.
|
|
2027
2766
|
*/
|
|
2028
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);
|
|
2029
2776
|
/** Row key for matrix-style layouts. */
|
|
2030
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
|
+
};
|
|
2031
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. */
|
|
2032
2787
|
saveControl?: boolean;
|
|
2033
2788
|
/**
|
|
@@ -2099,6 +2854,41 @@ export interface D3plusConfig {
|
|
|
2099
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.
|
|
2100
2855
|
*/
|
|
2101
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);
|
|
2102
2892
|
/**
|
|
2103
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.
|
|
2104
2894
|
*/
|
|
@@ -2124,7 +2914,7 @@ export interface D3plusConfig {
|
|
|
2124
2914
|
/** Pyramid: draws the name of each side above its half of the chart. */
|
|
2125
2915
|
sideTitles?: boolean;
|
|
2126
2916
|
/**
|
|
2127
|
-
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.
|
|
2128
2918
|
*/
|
|
2129
2919
|
sizeLegend?: boolean | ((config: D3plusConfig, scale: SizeLegendScale, size: SizeLegendSize) => boolean);
|
|
2130
2920
|
/**
|
|
@@ -2134,8 +2924,13 @@ export interface D3plusConfig {
|
|
|
2134
2924
|
on a continuous time axis.
|
|
2135
2925
|
*/
|
|
2136
2926
|
skipGaps?: boolean;
|
|
2137
|
-
/**
|
|
2138
|
-
|
|
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);
|
|
2139
2934
|
/**
|
|
2140
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`.
|
|
2141
2936
|
*/
|
|
@@ -2156,6 +2951,14 @@ export interface D3plusConfig {
|
|
|
2156
2951
|
The legend and markers follow.
|
|
2157
2952
|
*/
|
|
2158
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";
|
|
2159
2962
|
/**
|
|
2160
2963
|
With two groupBy levels, Violin places violins by the first and sets
|
|
2161
2964
|
them side by side by the second. `split` draws a category holding
|
|
@@ -2171,6 +2974,29 @@ export interface D3plusConfig {
|
|
|
2171
2974
|
stagePadding?: number;
|
|
2172
2975
|
/** Whether to stack series. */
|
|
2173
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);
|
|
2174
3000
|
/**
|
|
2175
3001
|
Vertical offset applied to stacked series. One of `"diverging"`
|
|
2176
3002
|
(default — positive and negative values split around zero), `"none"`,
|
|
@@ -2209,7 +3035,9 @@ export interface D3plusConfig {
|
|
|
2209
3035
|
overlap. `"x"` or `"y"` names the value axis; `true` picks x when its
|
|
2210
3036
|
values are numeric, else y; `false` draws a plain scatter. A category
|
|
2211
3037
|
axis gets one swarm per category. The default, `"auto"`, swarms only
|
|
2212
|
-
when every mark is a Circle and rows lack the other axis's value.
|
|
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.
|
|
2213
3041
|
*/
|
|
2214
3042
|
swarm?: boolean | "auto" | "x" | "y";
|
|
2215
3043
|
/**
|
|
@@ -2300,11 +3128,37 @@ export interface D3plusConfig {
|
|
|
2300
3128
|
merge into one series, labelled by `thresholdName` and stacked on top.
|
|
2301
3129
|
A bucket needs at least two items (a lone small item stays as
|
|
2302
3130
|
itself), and its tooltips list the items it holds with their values.
|
|
2303
|
-
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.
|
|
2304
3134
|
*/
|
|
2305
3135
|
threshold?: number;
|
|
2306
3136
|
/** Label for the threshold group, or a `(datum, index)` accessor. */
|
|
2307
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";
|
|
2308
3162
|
/**
|
|
2309
3163
|
URL template for XYZ map tiles, with `{z}`, `{x}`, `{y}` (and optional
|
|
2310
3164
|
`{s}` subdomain) placeholders — or a `{light, dark}` pair, chosen by the
|
|
@@ -2317,6 +3171,21 @@ export interface D3plusConfig {
|
|
|
2317
3171
|
};
|
|
2318
3172
|
/** Whether to show map tiles. */
|
|
2319
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
|
+
};
|
|
2320
3189
|
/** Time key for temporal data. */
|
|
2321
3190
|
time?: string;
|
|
2322
3191
|
/**
|
|
@@ -2388,20 +3257,28 @@ export interface D3plusConfig {
|
|
|
2388
3257
|
trackPadding?: number;
|
|
2389
3258
|
/**
|
|
2390
3259
|
Draws an automatic trend line fit to the plotted data: `true` (or
|
|
2391
|
-
`"linear"`) for a least-squares line,
|
|
2392
|
-
`"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.
|
|
2393
3264
|
*/
|
|
2394
|
-
trendLine?: boolean | "linear" | "exponential" | "logarithmic" | "power" | "polynomial";
|
|
3265
|
+
trendLine?: boolean | "linear" | "exponential" | "logarithmic" | "power" | "polynomial" | "movingAverage";
|
|
2395
3266
|
/**
|
|
2396
3267
|
Options for the trend lines: `group` (`"series"` or `"all"`), the
|
|
2397
|
-
polynomial `order`, a
|
|
3268
|
+
polynomial `order`, a moving average's `window`, `center`, and
|
|
3269
|
+
`bands`, a `confidence` band with `confidenceLevel` and
|
|
2398
3270
|
`confidenceConfig`, a `projection` into the future with
|
|
2399
3271
|
`projectionConfig`, `tooltip`, and Line styles (`stroke`,
|
|
2400
3272
|
`strokeWidth`, `strokeDasharray`, …).
|
|
2401
3273
|
*/
|
|
2402
3274
|
trendLineConfig?: TrendLineConfig;
|
|
2403
|
-
/**
|
|
2404
|
-
|
|
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)[];
|
|
2405
3282
|
/**
|
|
2406
3283
|
Geomap: transforms `topojson` before it is drawn. The function receives
|
|
2407
3284
|
the loaded file (or the object passed as `topojson`) and returns the
|
|
@@ -2415,17 +3292,23 @@ export interface D3plusConfig {
|
|
|
2415
3292
|
topojsonFill?: CssColor;
|
|
2416
3293
|
/** Accessor function for topojson feature IDs. */
|
|
2417
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;
|
|
2418
3299
|
/** Waterfall: fill for subtotal bars. Defaults to `colorDefaults.sequential`. */
|
|
2419
3300
|
totalColor?: string;
|
|
2420
3301
|
/**
|
|
2421
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.
|
|
2422
3303
|
*/
|
|
2423
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;
|
|
2424
3307
|
/** Candlestick: the color of periods that closed at or above their open, or an accessor of the row. Defaults to green. */
|
|
2425
3308
|
upColor?: string | ((d: DataPoint, i: number) => string);
|
|
2426
3309
|
/** Value accessor for the visualization. */
|
|
2427
3310
|
value?: DataPointAccessor<number>;
|
|
2428
|
-
/** Funnel and
|
|
3311
|
+
/** Funnel, Gauge, KPI, and Venn: formats each value shown in labels and tooltips, as `(value, datum) => string`. */
|
|
2429
3312
|
valueFormat?: (value: number, d: DataPoint) => string;
|
|
2430
3313
|
/**
|
|
2431
3314
|
Candlestick: how each period draws — `"candlestick"` (default), a wick
|
|
@@ -2457,8 +3340,16 @@ export interface D3plusConfig {
|
|
|
2457
3340
|
weekStart?: number | string;
|
|
2458
3341
|
/** Overall width of the visualization in pixels. */
|
|
2459
3342
|
width?: number;
|
|
2460
|
-
/**
|
|
2461
|
-
|
|
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))[];
|
|
2462
3353
|
/** Configuration for the x-axis. */
|
|
2463
3354
|
xConfig?: AxisConfig;
|
|
2464
3355
|
/**
|
|
@@ -2469,19 +3360,28 @@ export interface D3plusConfig {
|
|
|
2469
3360
|
xBreak?: [number, number] | [number, number][];
|
|
2470
3361
|
/**
|
|
2471
3362
|
The x domain: `[min, max]` on a continuous axis, or the categories to
|
|
2472
|
-
show, in order, on a discrete one
|
|
3363
|
+
show, in order, on a discrete one (unless `xConfig.scale` draws it
|
|
3364
|
+
continuous, like `"linear"`). Setting one end (`[min]` or
|
|
2473
3365
|
`[undefined, max]`) pins only that end; the data fills the other. An
|
|
2474
|
-
`xConfig.domain` overrides this.
|
|
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"]]`.
|
|
2475
3369
|
*/
|
|
2476
|
-
xDomain?: (number | string | Date)[];
|
|
3370
|
+
xDomain?: (number | string | Date | (number | string | Date)[])[];
|
|
2477
3371
|
/** The x2 domain as an array. If either value is undefined, it is calculated from the data. */
|
|
2478
3372
|
x2Domain?: (number | Date)[];
|
|
2479
3373
|
/** Custom sort function for x-axis values. */
|
|
2480
3374
|
xSort?: (a: DataPoint, b: DataPoint) => number;
|
|
2481
3375
|
/** Defines a custom sorting comparator function for discrete x2 axes. */
|
|
2482
3376
|
x2Sort?: (a: DataPoint, b: DataPoint) => number;
|
|
2483
|
-
/**
|
|
2484
|
-
|
|
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))[];
|
|
2485
3385
|
/** Configuration for the y-axis. */
|
|
2486
3386
|
yConfig?: AxisConfig;
|
|
2487
3387
|
/**
|
|
@@ -2493,11 +3393,14 @@ export interface D3plusConfig {
|
|
|
2493
3393
|
yBreak?: [number, number] | [number, number][];
|
|
2494
3394
|
/**
|
|
2495
3395
|
The y domain: `[min, max]` on a continuous axis, or the categories to
|
|
2496
|
-
show, in order, on a discrete one
|
|
3396
|
+
show, in order, on a discrete one (unless `yConfig.scale` draws it
|
|
3397
|
+
continuous, like `"linear"`). Setting one end (`[min]` or
|
|
2497
3398
|
`[undefined, max]`) pins only that end; the data fills the other. A
|
|
2498
|
-
`yConfig.domain` overrides this.
|
|
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"]]`.
|
|
2499
3402
|
*/
|
|
2500
|
-
yDomain?: (number | string | Date)[];
|
|
3403
|
+
yDomain?: (number | string | Date | (number | string | Date)[])[];
|
|
2501
3404
|
/** The y2 domain as an array. If either value is undefined, it is calculated from the data. */
|
|
2502
3405
|
y2Domain?: (number | Date)[];
|
|
2503
3406
|
/** Custom sort function for y-axis values. */
|
|
@@ -2525,27 +3428,30 @@ export interface D3plusConfig {
|
|
|
2525
3428
|
*/
|
|
2526
3429
|
zoomBrushSelectionStyle?: Record<string, unknown> | false;
|
|
2527
3430
|
/**
|
|
2528
|
-
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.
|
|
2529
3432
|
*/
|
|
2530
3433
|
zoomControlClassName?: string;
|
|
2531
3434
|
/**
|
|
2532
|
-
Whether the zoom-control buttons (zoom in, zoom out, reset, and
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
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.
|
|
2538
3444
|
Defaults to `true`.
|
|
2539
3445
|
*/
|
|
2540
3446
|
zoomControls?: boolean;
|
|
2541
3447
|
/**
|
|
2542
3448
|
Overrides the zoom-control icons (`zoomIn`, `zoomOut`, `zoomReset`,
|
|
2543
|
-
`zoomBrush`). Each value is an HTML string, or a mount function
|
|
3449
|
+
`zoomBrush`, `selectBox`, `selectLasso`). Each value is an HTML string, or a mount function
|
|
2544
3450
|
`(el) => void | (() => void)` called with the button's 12×12px icon slot
|
|
2545
3451
|
(for a React tree, an `<img>`, …); a returned cleanup runs when the
|
|
2546
3452
|
buttons redraw.
|
|
2547
3453
|
*/
|
|
2548
|
-
zoomControlIcons?: Partial<Record<"zoomIn" | "zoomOut" | "zoomReset" | "zoomBrush", string | ((el: HTMLElement) => void | (() => void))>>;
|
|
3454
|
+
zoomControlIcons?: Partial<Record<"zoomIn" | "zoomOut" | "zoomReset" | "zoomBrush" | "selectBox" | "selectLasso", string | ((el: HTMLElement) => void | (() => void))>>;
|
|
2549
3455
|
/**
|
|
2550
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.
|
|
2551
3457
|
*/
|