@d3plus/core 4.11.0 → 4.12.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/internal.js +15 -5
- package/es/src/charts/Alluvial/emit.js +2 -2
- package/es/src/charts/Alluvial/index.js +7 -1
- package/es/src/charts/Alluvial/titles.js +24 -4
- package/es/src/charts/ArcDiagram/emit.js +27 -13
- package/es/src/charts/ArcDiagram/events.js +6 -2
- package/es/src/charts/ArcDiagram/index.js +2 -0
- package/es/src/charts/BarChart/index.js +3 -10
- package/es/src/charts/Calendar/index.js +2 -0
- package/es/src/charts/Candlestick/index.js +4 -10
- package/es/src/charts/Gantt/applyLayout.js +2 -4
- package/es/src/charts/Geomap/flowEmit.js +11 -6
- package/es/src/charts/Hexbin/index.js +2 -0
- package/es/src/charts/Icicle/index.js +3 -1
- package/es/src/charts/Matrix/applyLayout.js +20 -9
- package/es/src/charts/Matrix/index.js +19 -1
- package/es/src/charts/Network/applyLayout.js +36 -5
- package/es/src/charts/Network/bundle.js +5 -4
- package/es/src/charts/Network/emit.js +39 -40
- package/es/src/charts/Network/graph.js +34 -5
- package/es/src/charts/Network/graphFluent.js +5 -3
- package/es/src/charts/Network/index.js +6 -1
- package/es/src/charts/Pack/applyLayout.js +16 -5
- package/es/src/charts/Pack/emit.js +15 -8
- package/es/src/charts/Pack/groupRows.js +61 -0
- package/es/src/charts/Pack/index.js +3 -0
- package/es/src/charts/Pack/neutralPaint.js +20 -0
- package/es/src/charts/Pack/nodeNames.js +35 -0
- package/es/src/charts/ParallelCoordinates/axes.js +22 -22
- package/es/src/charts/ParallelCoordinates/chrome.js +18 -0
- package/es/src/charts/ParallelCoordinates/index.js +3 -1
- package/es/src/charts/ParallelCoordinates/titles.js +17 -9
- package/es/src/charts/Pie/emit.js +9 -1
- package/es/src/charts/Pie/index.js +10 -0
- package/es/src/charts/Plot/areaEnter.js +68 -0
- package/es/src/charts/Plot/draw.js +26 -12
- package/es/src/charts/Plot/index.js +4 -10
- package/es/src/charts/Plot/lineMarkerKeys.js +19 -0
- package/es/src/charts/Plot/plotInit.js +6 -0
- package/es/src/charts/Plot/shapeLabelLegend.js +67 -0
- package/es/src/charts/Plot/sharedHover.js +2 -1
- package/es/src/charts/Plot/sharedTooltip.js +13 -3
- package/es/src/charts/PolarArea/index.js +2 -1
- package/es/src/charts/Priestley/applyLayout.js +11 -7
- package/es/src/charts/Priestley/index.js +0 -2
- package/es/src/charts/Priestley/timeAxis.js +11 -8
- package/es/src/charts/Pyramid/gutter.js +52 -16
- package/es/src/charts/Pyramid/index.js +55 -7
- package/es/src/charts/Pyramid/scene.js +4 -4
- package/es/src/charts/Radar/applyLayout.js +31 -33
- package/es/src/charts/Radar/axisDecorations.js +29 -17
- package/es/src/charts/Radar/curvedLabels.js +43 -2
- package/es/src/charts/Radar/emit.js +30 -15
- package/es/src/charts/Radar/index.js +41 -2
- package/es/src/charts/Radar/points.js +85 -0
- package/es/src/charts/RadialBar/emit.js +6 -1
- package/es/src/charts/RadialBar/index.js +10 -0
- package/es/src/charts/RadialMatrix/applyLayout.js +115 -31
- package/es/src/charts/RadialMatrix/index.js +15 -2
- package/es/src/charts/Rings/applyLayout.js +11 -150
- package/es/src/charts/Rings/emit.js +80 -40
- package/es/src/charts/Rings/index.js +27 -4
- package/es/src/charts/Rings/ringsCurves.js +156 -0
- package/es/src/charts/Rings/ringsParallel.js +20 -3
- package/es/src/charts/Rings/ringsPlacement.js +152 -0
- package/es/src/charts/Rings/ringsSizing.js +61 -38
- package/es/src/charts/Sankey/applyLayout.js +18 -4
- package/es/src/charts/Sankey/index.js +7 -1
- package/es/src/charts/Sunburst/emit.js +9 -1
- package/es/src/charts/Sunburst/index.js +13 -1
- package/es/src/charts/Tree/applyLayout.js +44 -14
- package/es/src/charts/Tree/emit.js +5 -5
- package/es/src/charts/Tree/index.js +10 -12
- package/es/src/charts/Tree/keys.js +33 -0
- package/es/src/charts/Tree/nodeLabel.js +15 -0
- package/es/src/charts/Treemap/emitGroupHeaders.js +3 -5
- package/es/src/charts/definition/makeChart.js +6 -2
- package/es/src/charts/drawSteps/minimap.js +4 -20
- package/es/src/charts/drawSteps/zoomActions.js +36 -0
- package/es/src/charts/drawSteps/zoomControls.js +31 -18
- package/es/src/charts/drawSteps/zoomControlsMarkup.js +23 -4
- package/es/src/charts/drawSteps/zoomDrag.js +188 -0
- package/es/src/charts/drawSteps/zoomFit.js +69 -0
- package/es/src/charts/events/click.legend.js +4 -2
- package/es/src/charts/events/click.shape.js +5 -3
- package/es/src/charts/events/mouseenter.js +6 -16
- package/es/src/charts/events/mouseleave.js +9 -2
- package/es/src/charts/events/mousemove.legend.js +28 -32
- package/es/src/charts/events/mousemove.shape.js +44 -44
- package/es/src/charts/features/axes.js +15 -4
- package/es/src/charts/features/axesFinal.js +7 -2
- package/es/src/charts/features/axesMeasure.js +26 -8
- package/es/src/charts/features/axisTooltip.js +138 -0
- package/es/src/charts/features/centerLabel.js +177 -0
- package/es/src/charts/features/colorScaleBivariate.js +83 -0
- package/es/src/charts/features/colorScaleBucket.js +18 -0
- package/es/src/charts/features/colorScaleHover.js +30 -5
- package/es/src/charts/features/colorScaleLimit.js +73 -0
- package/es/src/charts/features/colorScaleTooltip.js +77 -0
- package/es/src/charts/features/colorScaleTop.js +61 -0
- package/es/src/charts/features/curvedArrows.js +33 -0
- package/es/src/charts/features/depthKey.js +26 -0
- package/es/src/charts/features/edgeArrows.js +61 -2
- package/es/src/charts/features/featuresColorScale.js +57 -16
- package/es/src/charts/features/hoverTicks.js +41 -0
- package/es/src/charts/features/idleQueue.js +72 -0
- package/es/src/charts/features/linkInteraction.js +59 -7
- package/es/src/charts/features/networkMeasures.js +241 -0
- package/es/src/charts/features/nodeStats.js +309 -0
- package/es/src/charts/features/plotEndLabels.js +28 -7
- package/es/src/charts/features/plotPaint.js +9 -2
- package/es/src/charts/features/shapeEmit.js +7 -1
- package/es/src/charts/features/textHalo.js +3 -2
- package/es/src/charts/partition/chartFields.js +12 -3
- package/es/src/charts/partition/interaction.js +10 -5
- package/es/src/charts/pipeline/insetPlacement.js +8 -3
- package/es/src/charts/polar/chrome.js +81 -9
- package/es/src/charts/polar/config.js +4 -0
- package/es/src/charts/polar/wedgeLayout.js +2 -1
- package/es/src/charts/viz/Viz.js +24 -15
- package/es/src/charts/viz/VizBase.js +39 -4
- package/es/src/charts/viz/backgroundInk.js +10 -0
- package/es/src/charts/viz/emphasis.js +14 -0
- package/es/src/charts/viz/fillStroke.js +10 -0
- package/es/src/charts/viz/interactionOpacity.js +115 -32
- package/es/src/charts/viz/reportDrawError.js +15 -0
- package/es/src/charts/viz/setCursor.js +29 -0
- package/es/src/charts/viz/tooltipEnabled.js +38 -0
- package/es/src/charts/viz/userClick.js +34 -0
- package/es/src/charts/viz/vizDataPolling.js +0 -1
- package/es/src/charts/viz/vizDefaults.js +13 -34
- package/es/src/charts/viz/vizFields.js +6 -1
- package/es/src/charts/viz/vizRender.js +35 -5
- package/es/src/charts/viz/vizVisibility.js +12 -2
- package/es/src/components/Axis/Axis.js +29 -2
- package/es/src/components/Axis/axisBreak.js +29 -7
- package/es/src/components/Axis/axisDefaults.js +11 -0
- package/es/src/components/Axis/axisLabelKinds.js +36 -0
- package/es/src/components/Axis/axisLabelLineHeight.js +19 -0
- package/es/src/components/Axis/axisLabelRoom.js +37 -0
- package/es/src/components/Axis/axisLabelSize.js +171 -0
- package/es/src/components/Axis/axisLabelThinning.js +98 -4
- package/es/src/components/Axis/axisLayout.js +71 -46
- package/es/src/components/Axis/axisLayoutLabels.js +82 -140
- package/es/src/components/Axis/axisLayoutScale.js +9 -10
- package/es/src/components/Axis/axisLimit.js +27 -0
- package/es/src/components/Axis/axisMaxSize.js +39 -0
- package/es/src/components/Axis/axisRender.js +20 -8
- package/es/src/components/Axis/axisRounding.js +16 -1
- package/es/src/components/Axis/axisScene.js +11 -2
- package/es/src/components/Axis/axisTitle.js +53 -0
- package/es/src/components/Axis/axisTooltipTargets.js +128 -0
- package/es/src/components/ColorScale/ColorScale.js +62 -18
- package/es/src/components/ColorScale/bivariateRender.js +353 -0
- package/es/src/components/ColorScale/bivariateScale.js +150 -0
- package/es/src/components/ColorScale/colorScaleRender.js +32 -2
- package/es/src/components/ColorScale/colorScaleSwatchTooltips.js +77 -0
- package/es/src/components/Legend/Legend.js +10 -2
- package/es/src/components/Legend/legendCut.js +108 -0
- package/es/src/components/Legend/legendRender.js +38 -13
- package/es/src/components/TextBox.js +5 -2
- package/es/src/components/Timeline/timelineRender.js +2 -1
- package/es/src/components/textBoxScene.js +3 -0
- package/es/src/components/textEllipsis.js +7 -0
- package/es/src/components/tooltipDom.js +8 -5
- package/es/src/fluent.js +48 -0
- package/es/src/utils/BaseClass.js +7 -2
- package/es/src/utils/configValue.js +9 -0
- package/package.json +10 -10
- package/types/index.d.ts +1 -1
- package/types/internal.d.ts +22 -5
- package/types/src/charts/Alluvial/titles.d.ts +16 -3
- package/types/src/charts/ArcDiagram/emit.d.ts +3 -2
- package/types/src/charts/ArcDiagram/events.d.ts +2 -1
- package/types/src/charts/Geomap/flowEmit.d.ts +3 -2
- package/types/src/charts/Matrix/applyLayout.d.ts +4 -2
- package/types/src/charts/Network/applyLayout.d.ts +11 -0
- package/types/src/charts/Network/bundle.d.ts +3 -1
- package/types/src/charts/Network/graph.d.ts +12 -4
- package/types/src/charts/Pack/applyLayout.d.ts +2 -0
- package/types/src/charts/Pack/groupRows.d.ts +46 -0
- package/types/src/charts/Pack/index.d.ts +3 -0
- package/types/src/charts/Pack/neutralPaint.d.ts +14 -0
- package/types/src/charts/Pack/nodeNames.d.ts +23 -0
- package/types/src/charts/ParallelCoordinates/chrome.d.ts +12 -0
- package/types/src/charts/ParallelCoordinates/index.d.ts +1 -0
- package/types/src/charts/ParallelCoordinates/titles.d.ts +7 -2
- package/types/src/charts/Plot/areaEnter.d.ts +34 -0
- package/types/src/charts/Plot/index.d.ts +4 -10
- package/types/src/charts/Plot/lineMarkerKeys.d.ts +11 -0
- package/types/src/charts/Plot/shapeLabelLegend.d.ts +19 -0
- package/types/src/charts/Plot/sharedTooltip.d.ts +7 -1
- package/types/src/charts/Priestley/timeAxis.d.ts +7 -4
- package/types/src/charts/Pyramid/gutter.d.ts +28 -6
- package/types/src/charts/Pyramid/scene.d.ts +1 -1
- package/types/src/charts/Radar/applyLayout.d.ts +2 -3
- package/types/src/charts/Radar/axisDecorations.d.ts +5 -2
- package/types/src/charts/Radar/curvedLabels.d.ts +35 -0
- package/types/src/charts/Radar/emit.d.ts +5 -2
- package/types/src/charts/Radar/index.d.ts +7 -2
- package/types/src/charts/Radar/points.d.ts +50 -0
- package/types/src/charts/RadialMatrix/applyLayout.d.ts +6 -4
- package/types/src/charts/Rings/emit.d.ts +24 -2
- package/types/src/charts/Rings/index.d.ts +4 -2
- package/types/src/charts/Rings/ringsCurves.d.ts +50 -0
- package/types/src/charts/Rings/ringsGraph.d.ts +29 -5
- package/types/src/charts/Rings/ringsParallel.d.ts +4 -2
- package/types/src/charts/Rings/ringsPlacement.d.ts +47 -0
- package/types/src/charts/Rings/ringsSizing.d.ts +36 -9
- package/types/src/charts/Tree/applyLayout.d.ts +20 -0
- package/types/src/charts/Tree/keys.d.ts +25 -0
- package/types/src/charts/Tree/nodeLabel.d.ts +11 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +13 -0
- package/types/src/charts/definition/makeChart.d.ts +2 -2
- package/types/src/charts/drawSteps/zoomActions.d.ts +30 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +15 -0
- package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +16 -1
- package/types/src/charts/drawSteps/zoomDrag.d.ts +71 -0
- package/types/src/charts/drawSteps/zoomFit.d.ts +30 -0
- package/types/src/charts/features/axisTooltip.d.ts +49 -0
- package/types/src/charts/features/centerLabel.d.ts +75 -0
- package/types/src/charts/features/colorScaleBivariate.d.ts +50 -0
- package/types/src/charts/features/colorScaleBucket.d.ts +10 -0
- package/types/src/charts/features/colorScaleHover.d.ts +13 -3
- package/types/src/charts/features/colorScaleLimit.d.ts +60 -0
- package/types/src/charts/features/colorScaleTooltip.d.ts +43 -0
- package/types/src/charts/features/colorScaleTop.d.ts +30 -0
- package/types/src/charts/features/curvedArrows.d.ts +14 -0
- package/types/src/charts/features/depthKey.d.ts +19 -0
- package/types/src/charts/features/edgeArrows.d.ts +29 -2
- package/types/src/charts/features/hoverTicks.d.ts +30 -0
- package/types/src/charts/features/idleQueue.d.ts +46 -0
- package/types/src/charts/features/linkInteraction.d.ts +13 -4
- package/types/src/charts/features/networkMeasures.d.ts +53 -0
- package/types/src/charts/features/nodeStats.d.ts +93 -0
- package/types/src/charts/features/plotEndLabels.d.ts +14 -1
- package/types/src/charts/features/textHalo.d.ts +4 -3
- package/types/src/charts/partition/chartFields.d.ts +6 -1
- package/types/src/charts/pipeline/insetPlacement.d.ts +6 -0
- package/types/src/charts/polar/chrome.d.ts +19 -6
- package/types/src/charts/viz/Viz.d.ts +10 -3
- package/types/src/charts/viz/VizBase.d.ts +31 -2
- package/types/src/charts/viz/backgroundInk.d.ts +8 -0
- package/types/src/charts/viz/emphasis.d.ts +17 -0
- package/types/src/charts/viz/fillStroke.d.ts +7 -0
- package/types/src/charts/viz/reportDrawError.d.ts +12 -0
- package/types/src/charts/viz/setCursor.d.ts +26 -0
- package/types/src/charts/viz/tooltipEnabled.d.ts +31 -0
- package/types/src/charts/viz/userClick.d.ts +35 -0
- package/types/src/charts/viz/vizFields.d.ts +5 -0
- package/types/src/charts/viz/vizTypes.d.ts +16 -0
- package/types/src/charts/viz/vizVisibility.d.ts +7 -0
- package/types/src/components/Axis/Axis.d.ts +33 -3
- package/types/src/components/Axis/axisBreak.d.ts +19 -3
- package/types/src/components/Axis/axisDefaults.d.ts +12 -0
- package/types/src/components/Axis/axisLabelKinds.d.ts +22 -0
- package/types/src/components/Axis/axisLabelLineHeight.d.ts +27 -0
- package/types/src/components/Axis/axisLabelRoom.d.ts +17 -0
- package/types/src/components/Axis/axisLabelSize.d.ts +82 -0
- package/types/src/components/Axis/axisLabelThinning.d.ts +38 -2
- package/types/src/components/Axis/axisLayout.d.ts +9 -2
- package/types/src/components/Axis/axisLayoutLabels.d.ts +28 -33
- package/types/src/components/Axis/axisLayoutScale.d.ts +3 -1
- package/types/src/components/Axis/axisLimit.d.ts +18 -0
- package/types/src/components/Axis/axisMaxSize.d.ts +48 -0
- package/types/src/components/Axis/axisRounding.d.ts +8 -0
- package/types/src/components/Axis/axisTitle.d.ts +30 -0
- package/types/src/components/Axis/axisTooltipTargets.d.ts +82 -0
- package/types/src/components/ColorScale/ColorScale.d.ts +21 -11
- package/types/src/components/ColorScale/bivariateRender.d.ts +53 -0
- package/types/src/components/ColorScale/bivariateScale.d.ts +92 -0
- package/types/src/components/ColorScale/colorScaleSwatchTooltips.d.ts +48 -0
- package/types/src/components/Legend/Legend.d.ts +5 -0
- package/types/src/components/Legend/legendCut.d.ts +31 -0
- package/types/src/components/Legend/legendRender.d.ts +6 -1
- package/types/src/components/TextBox.d.ts +4 -0
- package/types/src/components/textEllipsis.d.ts +6 -0
- package/types/src/fluent.d.ts +18 -0
- package/types/src/shapes/emitLabels.d.ts +1 -1
- package/types/src/utils/D3plusConfig.d.ts +485 -609
- package/types/src/utils/configValue.d.ts +8 -0
- package/types/src/utils/index.d.ts +1 -1
- package/types/umd-entry.d.ts +4 -0
- package/umd/d3plus-core.full.js +22930 -17936
- package/umd/d3plus-core.full.min.js +2 -2
- package/umd/d3plus-core.js +21240 -16404
- package/umd/d3plus-core.min.js +2 -2
|
@@ -21,6 +21,8 @@ import type { ReferenceBandConfig, ReferenceLineConfig } from "../charts/feature
|
|
|
21
21
|
import type { RangeBreakRule } from "../components/Axis/rangeBreaks.js";
|
|
22
22
|
import type { BinValueOption, ContourConfig, ContoursOption, PointConfig } from "../charts/Hexbin/settings.js";
|
|
23
23
|
type Position = "top" | "right" | "bottom" | "left";
|
|
24
|
+
/** One variable of a bivariate `colorScale`: a data key, or an accessor returning a number. */
|
|
25
|
+
export type ColorScaleField = string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]);
|
|
24
26
|
/** A legend or colorScale side, or `"auto"` to let the chart choose (inside the chart when it fits, else right on wide charts and bottom otherwise). */
|
|
25
27
|
type PanelPosition = Position | "auto";
|
|
26
28
|
type DataPointAccessor<T> = string | ((d: DataPoint) => T);
|
|
@@ -30,96 +32,61 @@ type AxisScale = "auto" | "band" | "diverging" | "divergingLog" | "divergingPow"
|
|
|
30
32
|
export interface AxisConfig {
|
|
31
33
|
barConfig?: Record<string, string | number>;
|
|
32
34
|
/**
|
|
33
|
-
The axis's domain: `[min, max]` on a continuous axis, or the
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`xDomain`/`yDomain`: it wins over them, isn't stretched to the
|
|
38
|
-
chart's `baseline`, and isn't rounded by Plot's own "outside"
|
|
39
|
-
default. In `xConfig`/`yConfig`, one with a single end set (`[min]`
|
|
40
|
-
or `[undefined, max]`) on a continuous axis works exactly like
|
|
41
|
-
`yDomain([min])` instead: it pins that end, and the data fills the
|
|
42
|
-
other, rounded as `rounding` says.
|
|
35
|
+
The axis's domain: `[min, max]` on a continuous axis, or the categories
|
|
36
|
+
to show on a discrete one. In a Plot it overrides `xDomain`/`yDomain`
|
|
37
|
+
and isn't rounded unless `rounding` says so; a single end (`[min]` or
|
|
38
|
+
`[undefined, max]`) pins that end like `yDomain([min])`.
|
|
43
39
|
*/
|
|
44
40
|
domain?: (number | string | Date | undefined)[];
|
|
45
41
|
/**
|
|
46
|
-
The
|
|
47
|
-
|
|
48
|
-
a value, set the chart's `baseline` instead, which sets the axis's
|
|
49
|
-
minimum exactly like `yDomain([n])`, break back to this tick included.
|
|
42
|
+
The tick the axis's `baselineBreak` returns to. Defaults to `0`. To start
|
|
43
|
+
a Plot's value axis at a value, set the chart's `baseline` instead.
|
|
50
44
|
*/
|
|
51
45
|
baseline?: number;
|
|
52
46
|
/**
|
|
53
|
-
When
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
value domain (`yDomain`/`yConfig.domain`, or the x versions for
|
|
60
|
-
horizontal charts), and bars and areas start at the baseline tick,
|
|
61
|
-
with the break's gap cut across them (`baselineBreakConfig`'s
|
|
62
|
-
`mask`); turned off, a `yDomain` stretches to reach the baseline while a
|
|
63
|
-
`yConfig.domain` is kept and cuts its bars off at the axis. Defaults
|
|
64
|
-
to `true` for the Plots whose marks grow from `0`, such as BarChart,
|
|
65
|
-
AreaPlot, Histogram, and Lollipop (each chart lists its own default),
|
|
66
|
-
and `false` for other Plots and a standalone Axis.
|
|
47
|
+
When a linear value axis's domain stops short of the `baseline` (e.g.
|
|
48
|
+
`[1100, 2100]` with a baseline of `0`), keeps the baseline tick and
|
|
49
|
+
breaks the axis between it and the domain, styled by
|
|
50
|
+
`baselineBreakConfig`. Turned off, a Plot's `yDomain` stretches to the
|
|
51
|
+
baseline instead. Defaults to `true` for Plots whose marks grow from `0`
|
|
52
|
+
(BarChart, AreaPlot, Histogram, Lollipop), else `false`.
|
|
67
53
|
*/
|
|
68
54
|
baselineBreak?: boolean;
|
|
69
55
|
/**
|
|
70
|
-
Style of the baseline break: `space` (pixels
|
|
71
|
-
tick and the
|
|
72
|
-
|
|
73
|
-
`
|
|
74
|
-
|
|
75
|
-
(
|
|
76
|
-
`
|
|
77
|
-
foot of each mark, perpendicular to the axis, default `true`; they take
|
|
78
|
-
the axis line's `barConfig` style), `lineConfig` (those lines'
|
|
79
|
-
`stroke`, `stroke-width`, and other line styles, layered over the axis
|
|
80
|
-
line style), `mask` (whether a Plot cuts the gap between the two
|
|
81
|
-
lines straight across the shapes, default `true`), plus `stroke`,
|
|
82
|
-
`stroke-width`, and the other line styles `barConfig` takes, for the
|
|
83
|
-
marks.
|
|
56
|
+
Style of the baseline break: `space` (axis pixels between the baseline
|
|
57
|
+
tick and the domain, default `36`), `gap` (pixels between the two marks,
|
|
58
|
+
default `5`), `size` (mark length, default `10`), `angle` (mark tilt in
|
|
59
|
+
degrees, default `30`), `lines` (whether a Plot draws lines across the
|
|
60
|
+
plot at the break, default `true`), `lineConfig` (their style), `mask`
|
|
61
|
+
(whether a Plot cuts the gap across its shapes, default `true`), and
|
|
62
|
+
`stroke`, `stroke-width`, and other line styles for the marks.
|
|
84
63
|
*/
|
|
85
64
|
baselineBreakConfig?: Record<string, string | number | boolean | Record<string, string | number>>;
|
|
86
65
|
/**
|
|
87
|
-
Value ranges to remove from a linear axis: one `[start, end]` pair
|
|
88
|
-
list of them
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
on either side keep one shared scale. Reversed pairs are flipped,
|
|
92
|
-
overlapping ones merged, and ranges that don't lie strictly inside the
|
|
93
|
-
domain (or that don't leave room for the data) are ignored. Only
|
|
94
|
-
positions change — tooltips and labels still show the real values.
|
|
66
|
+
Value ranges to remove from a linear axis: one `[start, end]` pair or a
|
|
67
|
+
list of them. Each collapses to a short marked gap (styled by
|
|
68
|
+
`breakConfig`); values either side share one scale, and tooltips still
|
|
69
|
+
show real values. Ranges outside the domain are ignored.
|
|
95
70
|
*/
|
|
96
71
|
break?: false | [number, number] | [number, number][];
|
|
97
72
|
/**
|
|
98
73
|
Style of the ranges set with `break`: the same `space`, `gap`, `size`,
|
|
99
74
|
`angle`, `lines`, `lineConfig`, `mask`, and mark line styles, with the
|
|
100
|
-
same defaults, as `baselineBreakConfig
|
|
75
|
+
same defaults, as `baselineBreakConfig`, plus `spaceMin`: the least
|
|
76
|
+
`space` a break shrinks to on an axis too short for it (by default it
|
|
77
|
+
is dropped instead).
|
|
101
78
|
*/
|
|
102
79
|
breakConfig?: Record<string, string | number | boolean | Record<string, string | number>>;
|
|
103
80
|
/**
|
|
104
|
-
Stretches of time to hide from a time axis,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`{
|
|
108
|
-
`{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
as holidays; and `{bounds: [start, end]}` hides one range, from `start`
|
|
112
|
-
up to `end`. Rules read the calendar in local time, as the axis's date
|
|
113
|
-
labels do. In a Plot, rules on an axis whose values are dates make it
|
|
114
|
-
a time axis even without `time`, and a chart's timeline takes the
|
|
115
|
-
rules of the axis that plots its `time` (see `timelineConfig`). Shown time keeps one shared scale, ticks and labels never
|
|
116
|
-
land in hidden time, lines and areas connect across it, and rows whose
|
|
117
|
-
time is hidden are not drawn. A rule's `marker` draws the `break`
|
|
118
|
-
marker where its time was removed, in a gap of `breakConfig.space`
|
|
119
|
-
pixels: on by default for `bounds`, off for the others, which recur
|
|
120
|
-
too often to mark.
|
|
81
|
+
Stretches of time to hide from a time axis (weekends, nights, holidays),
|
|
82
|
+
so the data closes up around them: one rule or a list of them.
|
|
83
|
+
`"weekends"`; `{days: [5, 6]}` (0 is Sunday); `{hours: [17, 9]}`, daily,
|
|
84
|
+
wrapping past midnight (`9.5` is 9:30); `{values: [date, …]}`, whole
|
|
85
|
+
days; or `{bounds: [start, end]}`, one range. Rules use local time. A
|
|
86
|
+
rule's `marker` draws the `break` marker at the gap (on by default for
|
|
87
|
+
`bounds` only).
|
|
121
88
|
@example
|
|
122
|
-
|
|
89
|
+
{rangeBreaks: ["weekends", {hours: [16, 9.5]}, {values: ["2024-07-04"]}]}
|
|
123
90
|
*/
|
|
124
91
|
rangeBreaks?: false | RangeBreakRule | RangeBreakRule[];
|
|
125
92
|
/** Grid values of the axis. */
|
|
@@ -137,15 +104,10 @@ export interface AxisConfig {
|
|
|
137
104
|
labels?: unknown[];
|
|
138
105
|
labelOffset?: false | number;
|
|
139
106
|
/**
|
|
140
|
-
Whether to rotate the axis labels
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
across from its tick, and wrapping onto up to three lines when its
|
|
145
|
-
neighbors leave room. Left `undefined` (the default), a horizontal
|
|
146
|
-
axis of categories slants its labels 30 degrees when they would not
|
|
147
|
-
fit flat, or stands them at -90 when they are too crowded to slant.
|
|
148
|
-
See Axis's `labelRotation`.
|
|
107
|
+
Whether to rotate the axis labels: `true` rotates them -90 degrees,
|
|
108
|
+
`false` keeps them flat, and a number rotates them that many degrees
|
|
109
|
+
clockwise (`-45` rises to the right). Unset (the default), a horizontal
|
|
110
|
+
axis of categories slants its labels when they don't fit flat.
|
|
149
111
|
*/
|
|
150
112
|
labelRotation?: boolean | number;
|
|
151
113
|
/**
|
|
@@ -154,8 +116,18 @@ export interface AxisConfig {
|
|
|
154
116
|
line; zooming pins a rescaled axis this way so it doesn't shift.
|
|
155
117
|
*/
|
|
156
118
|
fixedSize?: number;
|
|
157
|
-
/**
|
|
158
|
-
|
|
119
|
+
/**
|
|
120
|
+
Maximum size allowed for the space that contains the axis tick labels
|
|
121
|
+
and title: a number of pixels, or a function that is given the room the
|
|
122
|
+
axis has across its labels and returns that maximum. The room is a
|
|
123
|
+
horizontal axis's `height` or a vertical axis's `width`; in a chart, it
|
|
124
|
+
is the chart's height (for a horizontal axis) or width (for a vertical
|
|
125
|
+
one) inside its margins. A chart can call the function more than once
|
|
126
|
+
in a draw, so it should depend only on its argument.
|
|
127
|
+
@example
|
|
128
|
+
{maxSize: size => size / 3}
|
|
129
|
+
*/
|
|
130
|
+
maxSize?: number | ((size: number) => number);
|
|
159
131
|
/** Minimum size alloted for the space that contains the axis tick labels and title. */
|
|
160
132
|
minSize?: number;
|
|
161
133
|
/**
|
|
@@ -170,18 +142,11 @@ export interface AxisConfig {
|
|
|
170
142
|
*/
|
|
171
143
|
rotatedTickFormat?: (d: number | string) => string | number;
|
|
172
144
|
/**
|
|
173
|
-
How a linear or log axis rounds its domain to "nice" values:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
full `domain`, which is rounded only when asked for here. With a
|
|
179
|
-
user domain on a Plot (`xDomain`/`yDomain`, `baseline`, or a
|
|
180
|
-
one-sided `domain` here) only an end left open is rounded:
|
|
181
|
-
`yDomain([n])` keeps `n` exactly and rounds the far end where the
|
|
182
|
-
axis would with no domain set, and "none" leaves that end at the
|
|
183
|
-
data. A `yDomain` with both ends set isn't rounded unless `rounding`
|
|
184
|
-
is set here.
|
|
145
|
+
How a linear or log axis rounds its domain to "nice" values: "outside"
|
|
146
|
+
widens each end past the data, "inside" pulls each end in, and "none"
|
|
147
|
+
keeps it as given. Defaults to "none" on an Axis and "outside" in a
|
|
148
|
+
Plot. A Plot only rounds the ends a user domain leaves open, unless
|
|
149
|
+
`rounding` is set here.
|
|
185
150
|
*/
|
|
186
151
|
rounding?: "none" | "outside" | "inside";
|
|
187
152
|
/** Scale of the axis. */
|
|
@@ -228,11 +193,62 @@ export interface AxisConfig {
|
|
|
228
193
|
[d3-time-format](https://github.com/d3/d3-time-format/blob/master/README.md#timeFormatLocale)).
|
|
229
194
|
*/
|
|
230
195
|
timeLocale?: Record<string, unknown>;
|
|
196
|
+
/**
|
|
197
|
+
The tooltip shown when a tick label is hovered, in a chart: its text
|
|
198
|
+
(the same on every tick), a function that receives the tick's value (as
|
|
199
|
+
`tickFormat` does) and its index and returns the text, or a tooltip
|
|
200
|
+
config (as `tooltipConfig`) whose accessors receive the same. The index
|
|
201
|
+
counts the axis's labels from the start of its domain (0 is the bottom
|
|
202
|
+
label of a y axis, the left one of an x axis). Unset (the default) or
|
|
203
|
+
when the function returns nothing, a label cut short with an ellipsis
|
|
204
|
+
shows its whole text; `false`, set or returned, shows no tooltip.
|
|
205
|
+
@example
|
|
206
|
+
{tickTooltip: value => notes[value]}
|
|
207
|
+
*/
|
|
208
|
+
tickTooltip?: string | ((value: number | string, index: number) => string | false | void) | AxisTooltipConfig<[value: number | string, index: number]> | false;
|
|
231
209
|
/** Title of the axis. */
|
|
232
210
|
title?: string;
|
|
233
211
|
/** Title configuration of the axis. */
|
|
234
212
|
titleConfig?: Record<string, unknown>;
|
|
213
|
+
/**
|
|
214
|
+
The tooltip shown when the axis title is hovered, in a chart: the
|
|
215
|
+
tooltip's text, a function that receives the title and returns it, or a
|
|
216
|
+
tooltip config (as `tooltipConfig`) whose accessors receive the title.
|
|
217
|
+
Unset (the default) or when the function returns nothing, a title cut
|
|
218
|
+
short with an ellipsis shows its whole text; `false`, set or returned,
|
|
219
|
+
shows no tooltip.
|
|
220
|
+
@example
|
|
221
|
+
{title: "GDP per capita", titleTooltip: "Constant 2015 US$"}
|
|
222
|
+
*/
|
|
223
|
+
titleTooltip?: string | ((title: string) => string | false | void) | AxisTooltipConfig<[title: string]> | false;
|
|
235
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
The `groupBy` levels a `tooltip` accessor receives as its third argument,
|
|
227
|
+
and whether it is asked about a legend entry.
|
|
228
|
+
*/
|
|
229
|
+
export interface TooltipLevels {
|
|
230
|
+
/**
|
|
231
|
+
The `groupBy` level, from 0, the hovered item stands for: the level the
|
|
232
|
+
chart draws, or the item's own level where a chart draws several at
|
|
233
|
+
once (a Sunburst or Icicle node, a Tree node, a Treemap group header).
|
|
234
|
+
A legend entry stands for the level its label is read from.
|
|
235
|
+
*/
|
|
236
|
+
depth: number;
|
|
237
|
+
/** The deepest `groupBy` level: `groupBy.length - 1`. */
|
|
238
|
+
maxDepth: number;
|
|
239
|
+
/** Whether the hovered item is a legend entry, not a mark. */
|
|
240
|
+
legend: boolean;
|
|
241
|
+
}
|
|
242
|
+
/** `T` with every accessor in it called with `Args`. */
|
|
243
|
+
type WithAccessorArgs<T, Args extends unknown[]> = T extends (...args: never[]) => infer R ? (...args: Args) => R : T extends Array<infer U> ? Array<WithAccessorArgs<U, Args>> : T;
|
|
244
|
+
/**
|
|
245
|
+
A tooltip config for an axis label (see `titleTooltip` and
|
|
246
|
+
`tickTooltip`): a `TooltipConfig` whose accessors are called with `Args`
|
|
247
|
+
in place of a data point.
|
|
248
|
+
*/
|
|
249
|
+
export type AxisTooltipConfig<Args extends unknown[]> = {
|
|
250
|
+
[K in keyof TooltipConfig]: WithAccessorArgs<TooltipConfig[K], Args>;
|
|
251
|
+
};
|
|
236
252
|
export interface TooltipConfig {
|
|
237
253
|
/** The inner HTML content of the arrow element, empty by default. */
|
|
238
254
|
arrow?: ((d: DataPoint) => string) | string;
|
|
@@ -320,9 +336,10 @@ export interface TextBoxConfig {
|
|
|
320
336
|
overflow?: Accessor<boolean>;
|
|
321
337
|
/**
|
|
322
338
|
Handles truncated lines, returning the new line value. Passed the line's
|
|
323
|
-
text and number; by default
|
|
324
|
-
|
|
325
|
-
measured, and words come off its
|
|
339
|
+
text and number; by default drops the line's trailing periods, commas,
|
|
340
|
+
and spaces and appends "...", except for a first word that cannot fit
|
|
341
|
+
(which returns ""). The ended line is measured, and words come off its
|
|
342
|
+
end until it fits the box.
|
|
326
343
|
*/
|
|
327
344
|
ellipsis?: (text: string, line: number) => string;
|
|
328
345
|
/**
|
|
@@ -567,19 +584,11 @@ export interface TrendLineConfig {
|
|
|
567
584
|
/** Line dash pattern. Defaults to `"6 4"`. */
|
|
568
585
|
strokeDasharray?: string;
|
|
569
586
|
/**
|
|
570
|
-
Labels each trend line along its
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
`coefficients` and `r2`) returns any text. The text follows the line's
|
|
576
|
-
curve, reads upright whichever way the line runs, and is cut short with
|
|
577
|
-
an ellipsis when the line is too short for it; a line too short for a
|
|
578
|
-
few letters gets no label. It labels the fitted stretch, not a
|
|
579
|
-
projection. Labels never overlap one another or the line labels: one
|
|
580
|
-
whose spot near its line's end is taken slides back along the line, or
|
|
581
|
-
moves below it, and is skipped only when no clear spot exists.
|
|
582
|
-
Defaults to `"equation"`; `false` turns labels off.
|
|
587
|
+
Labels each trend line along its path, near its end, in the line's
|
|
588
|
+
color: `true` names the series, `"equation"` shows its fitted equation
|
|
589
|
+
and R², and a function of the fit (`label`, `color`, and `fit` with
|
|
590
|
+
`coefficients` and `r2`) returns any text. Defaults to `"equation"`;
|
|
591
|
+
`false` turns labels off.
|
|
583
592
|
*/
|
|
584
593
|
label?: boolean | "equation" | ((fit: {
|
|
585
594
|
label: string;
|
|
@@ -678,6 +687,12 @@ export interface ColorScaleConfig {
|
|
|
678
687
|
outside this range map to the nearest color.
|
|
679
688
|
*/
|
|
680
689
|
domain?: number[];
|
|
690
|
+
/**
|
|
691
|
+
Draws a bucket-type scale ("jenks", "quantile", …) as one bar with an
|
|
692
|
+
axis along it, labeled where the buckets start, instead of a labeled
|
|
693
|
+
swatch for each bucket. Defaults to `false`.
|
|
694
|
+
*/
|
|
695
|
+
bucketAxis?: boolean;
|
|
681
696
|
/**
|
|
682
697
|
Formats the label for each bucket in a bucket-type scale ("jenks",
|
|
683
698
|
"quantile", …). Passed the bucket's start value, its index, the full
|
|
@@ -698,16 +713,10 @@ export interface ColorScaleConfig {
|
|
|
698
713
|
*/
|
|
699
714
|
scale?: ColorScaleTypeSetting;
|
|
700
715
|
/**
|
|
701
|
-
Whether hovering a
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
end). A bucketed bar (`bucketAxis`) also outlines the value's bucket.
|
|
706
|
-
A scale drawn as discrete swatches gets no mark; the value's swatch
|
|
707
|
-
stays lit and the others dim instead. On charts whose shape hover is
|
|
708
|
-
off (`hoverOpacity: 1`, as on Geomap and Calendar or past
|
|
709
|
-
`dataCutoff`), that swatch highlight comes from this option too, so
|
|
710
|
-
`false` turns it off there. Defaults to `true`.
|
|
716
|
+
Whether hovering a shape marks its value on the color scale: a tick and
|
|
717
|
+
a badge with the value (and, on a `bucketAxis`, an outline around its
|
|
718
|
+
bucket). A swatch scale lights the value's swatch instead. Defaults to
|
|
719
|
+
`true`.
|
|
711
720
|
*/
|
|
712
721
|
hoverMark?: boolean;
|
|
713
722
|
/**
|
|
@@ -718,21 +727,30 @@ export interface ColorScaleConfig {
|
|
|
718
727
|
*/
|
|
719
728
|
ordinalRamp?: boolean;
|
|
720
729
|
/**
|
|
721
|
-
Styles the `hoverMark
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
contrasting the fill by default), `fontFamily`, `fontSize` (default
|
|
727
|
-
`11`), `fontWeight` (default `400`), `padding` around the text (default
|
|
728
|
-
`3`; across the bar it is padded to sit as far out as the tick
|
|
729
|
-
labels), and `rx` corner radius (default `2`). `outlineConfig`, the
|
|
730
|
-
bucket outline on a `bucketAxis` bar, takes `stroke` (the
|
|
731
|
-
background-legible text color by default) and `strokeWidth` (default
|
|
732
|
-
`2`). Each is a value or a function of the
|
|
733
|
-
hovered value.
|
|
730
|
+
Styles the `hoverMark`: `tickConfig` (`stroke`, `strokeWidth`, `length`),
|
|
731
|
+
`badgeConfig` (`fill`, `stroke`, `strokeWidth`, `fontColor`,
|
|
732
|
+
`fontFamily`, `fontSize`, `fontWeight`, `padding`, `rx`), and
|
|
733
|
+
`outlineConfig`, the bucket outline on a `bucketAxis` bar (`stroke`,
|
|
734
|
+
`strokeWidth`). Each is a value or a function of the hovered value.
|
|
734
735
|
*/
|
|
735
736
|
hoverMarkConfig?: ColorScaleHoverMarkConfig;
|
|
737
|
+
/**
|
|
738
|
+
Draws the scale as a bivariate key: each row's `value` is a pair of
|
|
739
|
+
numbers, and a chart sets this when its `colorScale` names two fields.
|
|
740
|
+
Defaults to `false`.
|
|
741
|
+
*/
|
|
742
|
+
bivariate?: boolean;
|
|
743
|
+
/** How many quantile bins a bivariate scale splits each variable into, from `2` to `4`. Defaults to `3`. */
|
|
744
|
+
bivariateBuckets?: number;
|
|
745
|
+
/**
|
|
746
|
+
A bivariate scale's colors: a square grid, row-major from the low/low
|
|
747
|
+
corner, each row one bin of the second variable and each column one bin
|
|
748
|
+
of the first. A grid of another size than `bivariateBuckets` is blended
|
|
749
|
+
to fit. Defaults to Joshua Stevens' blue–red 3×3 scheme.
|
|
750
|
+
*/
|
|
751
|
+
bivariateColors?: string[];
|
|
752
|
+
/** A bivariate key's names for its two variables, in `colorScale` order. Defaults to the two field names. */
|
|
753
|
+
bivariateLabels?: [string, string];
|
|
736
754
|
}
|
|
737
755
|
/** `colorDefaults` input: any subset of the color defaults, with `scale` also accepting an array of colors. */
|
|
738
756
|
export type ColorDefaultsConfig = Partial<Omit<ColorDefaults, "scale">> & {
|
|
@@ -824,16 +842,9 @@ export interface D3plusConfig {
|
|
|
824
842
|
shapeConfig?: Record<string, unknown>;
|
|
825
843
|
};
|
|
826
844
|
/**
|
|
827
|
-
Whether hovering a Plot's mark draws a dashed guide
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
`tickFormat` when set). `"x"` or `"y"` draws them for that direction
|
|
831
|
-
only (each including its secondary axis). A bar is badged on its value
|
|
832
|
-
axis only. With a discrete axis, the shared tooltip's crosshair is that
|
|
833
|
-
axis's guide, and the value axis follows the hovered series' point (or
|
|
834
|
-
the one nearest the pointer). Defaults to `true` (`"x"` on BumpChart,
|
|
835
|
-
whose y axes label series rather than values, and on Streamgraph, whose
|
|
836
|
-
y positions name no values).
|
|
845
|
+
Whether hovering a Plot's mark draws a dashed guide to each axis with a
|
|
846
|
+
badge showing its value there. `"x"` or `"y"` limits it to that
|
|
847
|
+
direction. Defaults to `true` (`"x"` on BumpChart and Streamgraph).
|
|
837
848
|
*/
|
|
838
849
|
axisHover?: boolean | "x" | "y";
|
|
839
850
|
/**
|
|
@@ -881,20 +892,10 @@ export interface D3plusConfig {
|
|
|
881
892
|
barWidth?: string | false | ((d: DataPoint, i?: number) => number);
|
|
882
893
|
/**
|
|
883
894
|
BarChart/Marimekko with `barWidth`: whether each category's axis label
|
|
884
|
-
also shows its bar's share of the total width
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
still can't fit is left out, and the labels rotate, showing the name
|
|
889
|
-
alone, only when half or more can't fit. The tooltip always shows the
|
|
890
|
-
share. `"opposite"` moves the shares to the axis across the bars from
|
|
891
|
-
the names, above them along a horizontal axis and to their right along
|
|
892
|
-
a vertical one, leaving the names alone on their own axis; style it
|
|
893
|
-
with `x2Config` (or `y2Config`). In small
|
|
894
|
-
multiples (`facet`), each panel's shares are of that panel's own total
|
|
895
|
-
width and add to 100%, even when shared scales draw a smaller panel
|
|
896
|
-
narrower. `barWidthShareFormat` changes what the label says.
|
|
897
|
-
`"opposite"` for Marimekko, off for BarChart.
|
|
895
|
+
also shows its bar's share of the total width ("Retail" over "50%").
|
|
896
|
+
`"opposite"` puts the shares on the axis across from the names (styled
|
|
897
|
+
with `x2Config`/`y2Config`). `barWidthShareFormat` changes the text.
|
|
898
|
+
Defaults to `"opposite"` for Marimekko, `false` for BarChart.
|
|
898
899
|
*/
|
|
899
900
|
barWidthShare?: boolean | "opposite";
|
|
900
901
|
/**
|
|
@@ -907,39 +908,19 @@ export interface D3plusConfig {
|
|
|
907
908
|
*/
|
|
908
909
|
barWidthShareFormat?: (d: DataPoint, info: BarShareInfo) => unknown;
|
|
909
910
|
/**
|
|
910
|
-
Starts a Plot's value axis
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
Histogram, and Lollipop), so with `baselineBreak` on (their default)
|
|
915
|
-
the axis breaks back to a `0`
|
|
916
|
-
tick and bars run through the break, with its gap cut across them,
|
|
917
|
-
and with it off the axis
|
|
918
|
-
stretches down to `0`. As with `yDomain([n])`, only `n` is
|
|
919
|
-
pinned: the far end comes from the data and is rounded where the
|
|
920
|
-
axis would round it with no domain set (left at the data when the
|
|
921
|
-
axis config's `rounding` is "none"), and marks for values past `n`
|
|
922
|
-
stop at the axis's edge.
|
|
923
|
-
When every value sits at or below `n`, it ends the axis instead,
|
|
924
|
-
like `yDomain([undefined, n])`. A bound given in
|
|
925
|
-
`yDomain`/`xDomain` wins.
|
|
911
|
+
Starts a Plot's value axis at a value, like `yDomain([n])` (or
|
|
912
|
+
`xDomain([n])` for horizontal charts); the far end comes from the data.
|
|
913
|
+
Bars, areas, and stems still grow from `0`, so with `baselineBreak` on
|
|
914
|
+
the axis breaks back to a `0` tick. A bound in `yDomain`/`xDomain` wins.
|
|
926
915
|
*/
|
|
927
916
|
baseline?: number;
|
|
928
917
|
/**
|
|
929
|
-
When
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
value domain (`yDomain`/`yConfig.domain`, or the x versions for
|
|
936
|
-
horizontal charts), and bars and areas start at the baseline tick,
|
|
937
|
-
with the break's gap cut across them (`baselineBreakConfig`'s
|
|
938
|
-
`mask`); turned off, a `yDomain` stretches to reach the baseline while a
|
|
939
|
-
`yConfig.domain` is kept and cuts its bars off at the axis. Defaults
|
|
940
|
-
to `true` for the Plots whose marks grow from `0`, such as BarChart,
|
|
941
|
-
AreaPlot, Histogram, and Lollipop (each chart lists its own default),
|
|
942
|
-
and `false` for other Plots and a standalone Axis.
|
|
918
|
+
When a linear value axis's domain stops short of the `baseline` (e.g.
|
|
919
|
+
`[1100, 2100]` with a baseline of `0`), keeps the baseline tick and
|
|
920
|
+
breaks the axis between it and the domain, styled by
|
|
921
|
+
`baselineBreakConfig`. Turned off, a Plot's `yDomain` stretches to the
|
|
922
|
+
baseline instead. Defaults to `true` for Plots whose marks grow from `0`
|
|
923
|
+
(BarChart, AreaPlot, Histogram, Lollipop), else `false`.
|
|
943
924
|
*/
|
|
944
925
|
baselineBreak?: boolean;
|
|
945
926
|
/** Bullet: the qualitative ranges behind each measure, as threshold values (`[60, 85]`) or band objects (`{min, max, color}`), or a `(d, i) => bands` accessor for per-row bands. */
|
|
@@ -1019,15 +1000,13 @@ export interface D3plusConfig {
|
|
|
1019
1000
|
/** Bullet: the most each bullet's band can be thick, in pixels (default 40); raise it to let rows fill a tall chart. */
|
|
1020
1001
|
bulletSize?: number;
|
|
1021
1002
|
/**
|
|
1022
|
-
Whether the chart
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
from the cache
|
|
1029
|
-
fetch on every load, or use `dataPollingInterval` to re-fetch `data` on
|
|
1030
|
-
a schedule (polls always fetch).
|
|
1003
|
+
Whether the chart uses the data cache that every chart on the page
|
|
1004
|
+
shares for the files fetched by `data`, `links`, `nodes`, `topojson`,
|
|
1005
|
+
and `fitObject`, so charts loading the same URL share one request and
|
|
1006
|
+
loading it again, or changing a formatter, needs none. The cache uses
|
|
1007
|
+
up to about 50 MB of memory, dropping the least recently used files
|
|
1008
|
+
first. Defaults to `true`; `false` fetches on every load.
|
|
1009
|
+
`clearDataCache()` from `@d3plus/data` empties the cache.
|
|
1031
1010
|
*/
|
|
1032
1011
|
cache?: boolean;
|
|
1033
1012
|
/** Calendar: styles the weekday, month, and year labels (`fontColor`, `fontFamily`, `fontSize`, default `11`, and `fontWeight`). */
|
|
@@ -1042,31 +1021,37 @@ export interface D3plusConfig {
|
|
|
1042
1021
|
/** Calendar: each cell's corner radius, in pixels (kept below a third of the cell). Defaults to `2`. */
|
|
1043
1022
|
cellRadius?: number;
|
|
1044
1023
|
/**
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1024
|
+
Pie (when `innerRadius` leaves a hole, as in a Donut), Sunburst and
|
|
1025
|
+
RadialBar: text drawn in the chart's empty middle. `true` draws the sum
|
|
1026
|
+
of every drawn row's value (Sunburst's `sum`), formatted the way the
|
|
1027
|
+
tooltips format values; a string draws that string; a function
|
|
1028
|
+
receives the drawn rows (after filters and hidden legend entries) and
|
|
1029
|
+
their total and returns the text. The text wraps and shrinks to fit
|
|
1030
|
+
the hole (see `centerLabelConfig`) and is left out when it can't fit
|
|
1031
|
+
whole, or, on a Sunburst, once a click zooms into a node. Defaults to
|
|
1032
|
+
`false`.
|
|
1033
|
+
*/
|
|
1034
|
+
centerLabel?: boolean | string | ((data: DataPoint[], total: number) => string | false);
|
|
1035
|
+
/**
|
|
1036
|
+
Pie, Sunburst and RadialBar: styles the `centerLabel` with TextBox keys
|
|
1037
|
+
(`fontColor`, `fontFamily`, `fontWeight`, `lineHeight`, `padding`, …).
|
|
1038
|
+
The text shrinks from `fontMax` (default `40`) to fit the hole, down to
|
|
1039
|
+
`fontMin` (default `10`); a `fontSize` fixes its size instead. Defaults
|
|
1040
|
+
to the chart's text color and `padding: 5`. Merged into the current
|
|
1041
|
+
config.
|
|
1042
|
+
*/
|
|
1043
|
+
centerLabelConfig?: TextBoxConfig;
|
|
1044
|
+
/**
|
|
1045
|
+
Sankey: draws links that loop back to a node they left (A → B → A, or a
|
|
1046
|
+
node to itself) as bands that run in a lane above or below the nodes.
|
|
1047
|
+
`false` leaves them out, with a warning. Defaults to `true`.
|
|
1055
1048
|
*/
|
|
1056
1049
|
circularLinks?: boolean;
|
|
1057
1050
|
/**
|
|
1058
|
-
Network and ArcDiagram: colors each node by
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
from `nodes` alone; clicking a cluster zooms to it. A Network also writes each name
|
|
1063
|
-
inside its cluster, where it fits clear of the nodes and their labels.
|
|
1064
|
-
Applies only while the chart's color is its default: setting `color`,
|
|
1065
|
-
`colorScale`, `colorOrdinal`, or a `shapeConfig` fill, or more than one
|
|
1066
|
-
`groupBy` level, colors nodes as configured instead. A network with
|
|
1067
|
-
fewer than two clusters of two or more nodes keeps one color per node.
|
|
1068
|
-
A node with no links keeps its own color and label. `false` turns
|
|
1069
|
-
clustering off. Defaults to `true`.
|
|
1051
|
+
Network and ArcDiagram: colors each node by its cluster (found with the
|
|
1052
|
+
Louvain method, weighted by `linkSize`), named after its most-connected
|
|
1053
|
+
node and listed in the legend; clicking a cluster zooms to it. Applies
|
|
1054
|
+
only while the chart's color is its default. Defaults to `true`.
|
|
1070
1055
|
*/
|
|
1071
1056
|
cluster?: boolean;
|
|
1072
1057
|
/**
|
|
@@ -1102,14 +1087,39 @@ export interface D3plusConfig {
|
|
|
1102
1087
|
/** Treat a discrete color field as ordered: color it with a single-hue light→dark ramp instead of nominal categorical hues. */
|
|
1103
1088
|
colorOrdinal?: boolean;
|
|
1104
1089
|
/**
|
|
1105
|
-
Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point.
|
|
1090
|
+
Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point. Two of them (`["a", "b"]`) make a bivariate scale: each variable is split into quantile bins, the pair of bins picks a color from a grid, and the key is that grid turned into a diamond (see `colorScaleConfig.bivariateBuckets`, `bivariateColors`, and `bivariateLabels`). A row missing either value gets no colorScale color.
|
|
1106
1091
|
*/
|
|
1107
|
-
colorScale?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | false;
|
|
1092
|
+
colorScale?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) | [ColorScaleField, ColorScaleField] | false;
|
|
1108
1093
|
/** A pass-through to the config method of ColorScale. */
|
|
1109
1094
|
colorScaleConfig?: {
|
|
1095
|
+
/** Configures the axis that labels a gradient or `bucketAxis` scale: `labels` lists the values it labels, `ticks` the values it marks, and `tickFormat` writes their text. Along a side of the chart, the whole scale (its bar, ticks, labels and title) takes at most a third of the chart's width (a scale at the left or right) or height (top or bottom), leaving out its title, and then its labels, when they don't fit; `maxSize` sets the room for the axis's labels and title instead. On a scale drawn as swatches, `title` and `titleTooltip` apply to the swatches' title, and `tickTooltip` to each swatch's label, given the value and index of the label at that bucket's start on a `bucketAxis` bar. */
|
|
1110
1096
|
axisConfig?: AxisConfig;
|
|
1097
|
+
/** Draws a bucket-type scale as one bar with an axis along it instead of a labeled swatch for each bucket (see `ColorScaleConfig.bucketAxis`). Defaults to `false`. */
|
|
1098
|
+
bucketAxis?: boolean;
|
|
1099
|
+
/** Formats the label for each bucket in a bucket-type scale (see `ColorScaleConfig.bucketFormat`). */
|
|
1100
|
+
bucketFormat?: ColorScaleConfig["bucketFormat"];
|
|
1101
|
+
/** Given a bucket's minimum and maximum labels, returns the full label (see `ColorScaleConfig.bucketJoiner`). */
|
|
1102
|
+
bucketJoiner?: ColorScaleConfig["bucketJoiner"];
|
|
1103
|
+
/** How many buckets a bucket-type scale splits its values into, or the value each bucket starts at. Defaults to `5`. */
|
|
1104
|
+
buckets?: number | number[];
|
|
1105
|
+
/** Splits a diverging scale evenly on either side of its `midpoint`. Defaults to `true`. */
|
|
1111
1106
|
centered?: boolean;
|
|
1112
|
-
colors
|
|
1107
|
+
/** The scale's colors (see `ColorScaleConfig.color`). */
|
|
1108
|
+
color?: ColorScaleConfig["color"];
|
|
1109
|
+
/** The `[min, max]` values a linear scale spans (see `ColorScaleConfig.domain`). */
|
|
1110
|
+
domain?: number[];
|
|
1111
|
+
/** The value a diverging scale turns at. Defaults to `0`. */
|
|
1112
|
+
midpoint?: number;
|
|
1113
|
+
/** The thickness of a gradient's or a `bucketAxis` scale's bar, in pixels. Defaults to `10`. */
|
|
1114
|
+
size?: number;
|
|
1115
|
+
/** The space around the scale, in pixels. Defaults to `5`. */
|
|
1116
|
+
padding?: number;
|
|
1117
|
+
/** Styles the bar of a gradient or a `bucketAxis` scale, as a Rect config (`stroke`, `strokeWidth`, …). */
|
|
1118
|
+
rectConfig?: Record<string, unknown>;
|
|
1119
|
+
/** A scale at the left or right takes at most this many pixels of the chart's width, in place of a third of it. At the top or bottom, it is the scale's length, in place of `colorScaleMaxSize`. */
|
|
1120
|
+
width?: number;
|
|
1121
|
+
/** A scale at the top or bottom takes at most this many pixels of the chart's height, in place of a third of it. At the left or right, it is the scale's length, in place of `colorScaleMaxSize`. */
|
|
1122
|
+
height?: number;
|
|
1113
1123
|
/** The negative pole of a diverging scale, and the hue of an all-negative ramp. Defaults to `colorDefaults.off`, or the theme's `colorScale.min` on a dark or custom theme. */
|
|
1114
1124
|
colorMin?: CssColor;
|
|
1115
1125
|
/** The midpoint of a diverging scale. Defaults to `colorDefaults.light`, or the theme's `colorScale.mid` on a dark or custom theme. */
|
|
@@ -1122,6 +1132,14 @@ export interface D3plusConfig {
|
|
|
1122
1132
|
hoverMark?: boolean;
|
|
1123
1133
|
/** Styles the hover mark (see `ColorScaleConfig.hoverMarkConfig`). */
|
|
1124
1134
|
hoverMarkConfig?: ColorScaleHoverMarkConfig;
|
|
1135
|
+
/** Configures the Legend that draws a bucket-type scale as a swatch for each bucket. Along a side of the chart, the swatches, their labels and title take at most a third of the chart's width (a scale at the left or right) or height (top or bottom): the title and labels wrap onto more lines, and when they still don't fit, the title is left out and then the labels are cut short. Its `width` (left or right) or `height` (top or bottom) sets another limit. */
|
|
1136
|
+
legendConfig?: Record<string, unknown>;
|
|
1137
|
+
/** How many quantile bins a bivariate `colorScale` splits each variable into, from `2` to `4`. Defaults to `3`. */
|
|
1138
|
+
bivariateBuckets?: number;
|
|
1139
|
+
/** A bivariate `colorScale`'s colors (see `ColorScaleConfig.bivariateColors`). Defaults to Joshua Stevens' blue–red 3×3 scheme. */
|
|
1140
|
+
bivariateColors?: string[];
|
|
1141
|
+
/** A bivariate key's names for its two variables. Defaults to the two field names. */
|
|
1142
|
+
bivariateLabels?: [string, string];
|
|
1125
1143
|
/** Holds the palest step of a light theme's single-hue ramp darker (see `ColorScaleConfig.ordinalRamp`). Defaults to `true` when links are colored by number (`linkColor`), so the lowest-valued links still read as lines, and `false` otherwise. */
|
|
1126
1144
|
ordinalRamp?: boolean;
|
|
1127
1145
|
};
|
|
@@ -1160,36 +1178,19 @@ export interface D3plusConfig {
|
|
|
1160
1178
|
*/
|
|
1161
1179
|
confidence?: ConfidenceBandSetting | ConfidenceBandSetting[] | false;
|
|
1162
1180
|
/**
|
|
1163
|
-
Styles the `confidence` interval: a line's band (
|
|
1164
|
-
error bar (
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
false` leaves the bounds out of tooltips.
|
|
1168
|
-
`bandOpacity` sets how each band looks where it is the innermost band
|
|
1169
|
-
drawn — an array ramps from the outermost band to the innermost
|
|
1170
|
-
(default `[0.15, 0.6]`), a number gives every band that opacity — in
|
|
1171
|
-
place of `fillOpacity`. Accepted keys: any Area or Path key,
|
|
1172
|
-
`bandOpacity`, `capWidth`, `tooltip`, `Area` (Area keys), and `Bar`
|
|
1173
|
-
(Path keys and `capWidth`); any other key logs a warning.
|
|
1181
|
+
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 percentage of the
|
|
1183
|
+
bar). Keys under `Area` or `Bar` apply to that shape only.
|
|
1184
|
+
`bandOpacity` ramps nested bands' opacity (default `[0.15, 0.6]`), and
|
|
1185
|
+
`tooltip: false` leaves the bounds out of tooltips.
|
|
1174
1186
|
*/
|
|
1175
1187
|
confidenceConfig?: Record<string, unknown>;
|
|
1176
1188
|
/**
|
|
1177
|
-
How a line crosses a missing value
|
|
1178
|
-
|
|
1179
|
-
`
|
|
1180
|
-
|
|
1181
|
-
`"
|
|
1182
|
-
(`"2 4"`) in the line's color, distinct from a forecast's longer dash.
|
|
1183
|
-
An object styles the bridge: `stroke` (default the line's color),
|
|
1184
|
-
`strokeDasharray` (default `"2 4"`; `false` for a solid bridge),
|
|
1185
|
-
`strokeWidth` (default the line's width), and `opacity` (default `1`).
|
|
1186
|
-
A bridge follows the line's curve, since it is drawn along the same
|
|
1187
|
-
path, and is decoration only: it has no tooltip, takes no keyboard
|
|
1188
|
-
focus, and a shared tooltip at a missing step lists no value for that
|
|
1189
|
-
line. Confidence bands are clipped to the stretches between gaps. A
|
|
1190
|
-
point with a gap on both sides draws no line of its own, so turn on
|
|
1191
|
-
`lineMarkers` to show it. Areas, including stacked ones, are drawn as
|
|
1192
|
-
before.
|
|
1189
|
+
How a line crosses a missing value (a skipped step, or a `null`/`NaN`
|
|
1190
|
+
value): `true` (the default) or `"solid"` draws straight through,
|
|
1191
|
+
`false` breaks the line, and `"dashed"` breaks it and bridges the gap
|
|
1192
|
+
with a short dash. An object styles the bridge: `stroke`,
|
|
1193
|
+
`strokeDasharray` (default `"2 4"`), `strokeWidth`, and `opacity`.
|
|
1193
1194
|
*/
|
|
1194
1195
|
connectGaps?: ConnectGaps;
|
|
1195
1196
|
/** Funnel: fills the gap between consecutive stages with a neck joining their widths. */
|
|
@@ -1203,24 +1204,14 @@ export interface D3plusConfig {
|
|
|
1203
1204
|
*/
|
|
1204
1205
|
connectorConfig?: Record<string, unknown>;
|
|
1205
1206
|
/**
|
|
1206
|
-
Hexbin
|
|
1207
|
-
|
|
1208
|
-
levels
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
beneath it, reading upright, and clear of the other contours and
|
|
1215
|
-
labels. A long contour takes more than one label, at least
|
|
1216
|
-
`labelSpacing` pixels apart (default `"auto"`: 20 ems or half the
|
|
1217
|
-
plot's mean side, whichever is longer); `labelStep` labels every n-th
|
|
1218
|
-
level (`1` all of them, `2` every other one, keeping the multiples of
|
|
1219
|
-
twice the levels' spacing; default `"auto"`: all of up to five levels,
|
|
1220
|
-
else every other one); and a level with no clear, gently curving
|
|
1221
|
-
stretch goes unlabelled. `labelConfig` is TextBox config for the
|
|
1222
|
-
labels (`fontSize` defaults to `10`), and `levelFormat` formats their
|
|
1223
|
-
values. Merged into the current config.
|
|
1207
|
+
Hexbin contour options: `bandwidth` (density kernel standard deviation,
|
|
1208
|
+
px, default `20`), `thresholds` (a level count, default `8`, or the
|
|
1209
|
+
levels themselves), `strokeWidth` (`"lines"` outline width, default
|
|
1210
|
+
`1.5`), `fillOpacity` (top `"filled"` level, default `0.8`), `labels`
|
|
1211
|
+
(write each level's value along its lines, default `true`),
|
|
1212
|
+
`labelSpacing` (px between labels on a line, default `"auto"`),
|
|
1213
|
+
`labelStep` (label every n-th level, default `"auto"`), `labelConfig`
|
|
1214
|
+
(TextBox config), and `levelFormat`.
|
|
1224
1215
|
*/
|
|
1225
1216
|
contourConfig?: ContourConfig;
|
|
1226
1217
|
/**
|
|
@@ -1249,22 +1240,18 @@ export interface D3plusConfig {
|
|
|
1249
1240
|
/** Maximum number of data points to render before downsampling. */
|
|
1250
1241
|
dataCutoff?: number;
|
|
1251
1242
|
/**
|
|
1252
|
-
Transforms `data` before it is drawn
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
`data` key, and the rest of that object is applied to the chart, so a
|
|
1257
|
-
response can set options such as `title` from what it contains.
|
|
1258
|
-
|
|
1259
|
-
It runs when the chart renders, whichever order `data` and `dataFormat`
|
|
1260
|
-
are set in, and setting it again re-runs it on the next render, over the
|
|
1261
|
-
cached response (see `cache`). Every `dataPollingInterval` poll runs it too. Passing a
|
|
1262
|
-
formatter as the second argument of `data(url, format)` sets it, and
|
|
1263
|
-
setting `data` alone keeps it.
|
|
1243
|
+
Transforms `data` before it is drawn: receives the loaded file (or the
|
|
1244
|
+
Array passed as `data`) and returns the rows to draw, or a config object
|
|
1245
|
+
holding them as `data` (its other keys are applied to the chart). Also
|
|
1246
|
+
set by `data(url, format)`.
|
|
1264
1247
|
*/
|
|
1265
1248
|
dataFormat?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>;
|
|
1266
1249
|
/**
|
|
1267
|
-
When `data`
|
|
1250
|
+
When `data` comes from a URL, re-fetches it every this many milliseconds
|
|
1251
|
+
and redraws when it changes, keeping hover, zoom, and legend state.
|
|
1252
|
+
Polling pauses while the tab (or, with `detectVisible`, the chart) is
|
|
1253
|
+
hidden, and a failed request keeps the last data. Only `data` is polled.
|
|
1254
|
+
Defaults to `false` (load once).
|
|
1268
1255
|
*/
|
|
1269
1256
|
dataPollingInterval?: number | false;
|
|
1270
1257
|
/**
|
|
@@ -1330,17 +1317,33 @@ export interface D3plusConfig {
|
|
|
1330
1317
|
*/
|
|
1331
1318
|
detectVisibleInterval?: number;
|
|
1332
1319
|
/**
|
|
1333
|
-
|
|
1320
|
+
With `detectVisible` on, releases the chart's DOM and scene while it is
|
|
1321
|
+
scrolled out of view and redraws it when it returns, keeping pages with
|
|
1322
|
+
many charts light. Data and config are kept; zoom and selection are not,
|
|
1323
|
+
so set `false` to keep them. Defaults to `true`.
|
|
1334
1324
|
*/
|
|
1335
1325
|
detectVisibleUnload?: boolean;
|
|
1336
1326
|
/**
|
|
1337
1327
|
ParallelCoordinates: per-dimension options, keyed by dimension — `domain`
|
|
1338
1328
|
(either end of a numeric domain may be `undefined`), `reverse`, `title`,
|
|
1339
|
-
and any Axis config (`tickFormat`, `ticks`, `scale`,
|
|
1329
|
+
and any Axis config (`tickFormat`, `ticks`, `scale`, `tickTooltip`,
|
|
1330
|
+
`titleTooltip`, …).
|
|
1340
1331
|
*/
|
|
1341
1332
|
dimensionConfig?: Record<string, DimensionOptions>;
|
|
1342
|
-
/**
|
|
1343
|
-
|
|
1333
|
+
/**
|
|
1334
|
+
Alluvial: styles the column titles drawn above each column (any TextBox
|
|
1335
|
+
config), and takes a `titleTooltip`: the tooltip shown when a title is
|
|
1336
|
+
hovered, as its text, a function that receives the title and returns it,
|
|
1337
|
+
or a tooltip config (as `tooltipConfig`) whose accessors receive the
|
|
1338
|
+
title. Unset (the default) or when the
|
|
1339
|
+
function returns nothing, a title cut short with an ellipsis shows its
|
|
1340
|
+
whole text; `false`, set or returned, shows no tooltip.
|
|
1341
|
+
@example
|
|
1342
|
+
{maxLines: 1, titleTooltip: title => notes[title]}
|
|
1343
|
+
*/
|
|
1344
|
+
dimensionTitleConfig?: Record<string, unknown> & {
|
|
1345
|
+
titleTooltip?: string | ((title: string) => string | false | void) | AxisTooltipConfig<[title: string]> | false;
|
|
1346
|
+
};
|
|
1344
1347
|
/**
|
|
1345
1348
|
ParallelCoordinates: the data keys to draw an axis for, in order.
|
|
1346
1349
|
Defaults to every numeric key except the `groupBy` keys and `id`; a key
|
|
@@ -1396,48 +1399,29 @@ export interface D3plusConfig {
|
|
|
1396
1399
|
/** Allows removing specific geographies from topojson file to improve zoom. */
|
|
1397
1400
|
fitFilter?: number | string | ((d: Record<string, unknown>) => boolean);
|
|
1398
1401
|
/**
|
|
1399
|
-
Marks a forecast:
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
`
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
backdrop starts at the earliest of those. `"auto"` (or `true`) flags
|
|
1406
|
-
the rows whose `confidence` bounds spread away from their line. A
|
|
1407
|
-
discrete-axis value (a date or year on a time axis) starts the
|
|
1408
|
-
forecast there. Unset (the default), only a trend line projection
|
|
1409
|
-
(`trendLineConfig.projection`) is marked, from the last fitted value;
|
|
1410
|
-
`false` marks nothing, not even a projection. On bar charts the
|
|
1411
|
-
backdrop starts at the edge of the first forecast bar, and bars keep
|
|
1412
|
-
their own styles. Defaults to `"auto"` on a FanChart.
|
|
1402
|
+
Marks a forecast: a shaded backdrop, a rule, and a "Forecast" label over
|
|
1403
|
+
the forecast stretch, with lines dashed there (see `forecastConfig`).
|
|
1404
|
+
A function flags the forecast rows; `"auto"` (or `true`) flags rows whose
|
|
1405
|
+
`confidence` bounds spread from their line; a discrete-axis value starts
|
|
1406
|
+
the forecast there; `false` marks nothing. Unset (the default), only a
|
|
1407
|
+
trend line projection is marked. Defaults to `"auto"` on a FanChart.
|
|
1413
1408
|
|
|
1414
|
-
Bullet: each row's forecast (or other comparative measure), drawn as
|
|
1415
|
-
|
|
1416
|
-
|
|
1409
|
+
Bullet: each row's forecast (or other comparative measure), drawn as a
|
|
1410
|
+
paler bar behind the measure: a data key, an accessor, a number, or
|
|
1411
|
+
`false`.
|
|
1417
1412
|
*/
|
|
1418
1413
|
forecast?: boolean | "auto" | number | string | Date | ((d: DataPoint, i: number) => boolean | number);
|
|
1419
1414
|
/**
|
|
1420
|
-
Styles
|
|
1421
|
-
|
|
1422
|
-
`
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
`
|
|
1427
|
-
line's forecast stretch (default `"6 4"`; `false` keeps lines solid).
|
|
1428
|
-
Colors default to the chart's text color for its background. The
|
|
1429
|
-
backdrop is chart chrome with no data row, so `shapeConfig.texture`
|
|
1430
|
-
and `shapeConfig.backgroundImage` leave it plain; give it its own
|
|
1431
|
-
`texture` (a textures.js name or config, drawn in the backdrop's color
|
|
1432
|
-
over its shade at `textureOpacity`, default `0.3`, with
|
|
1433
|
-
`textureDefault`) or `backgroundImage` (a URL,
|
|
1434
|
-
fit by `backgroundImageFit`, `"cover"` or `"contain"`). Both are off
|
|
1435
|
-
by default.
|
|
1415
|
+
Styles the `forecast` marker: the backdrop's `fill` and `fillOpacity`
|
|
1416
|
+
(default `0.05`), the rule's `stroke`, `strokeWidth`, `strokeOpacity`,
|
|
1417
|
+
and `strokeDasharray`, the `label` text (default "Forecast"; `false`
|
|
1418
|
+
hides it) and its font keys, `lineDasharray` for each line's forecast
|
|
1419
|
+
stretch (default `"6 4"`; `false` keeps lines solid), and an optional
|
|
1420
|
+
`texture` or `backgroundImage` for the backdrop. `fill: false` or
|
|
1421
|
+
`stroke: false` hides the backdrop or rule.
|
|
1436
1422
|
|
|
1437
|
-
Bullet: the forecast bar's `size` (a
|
|
1438
|
-
|
|
1439
|
-
`backgroundImage`/`backgroundImageFit`, each a value or a `(d, i)`
|
|
1440
|
-
accessor.
|
|
1423
|
+
Bullet: the forecast bar's `size` (a share of the band), `opacity`,
|
|
1424
|
+
`fill`, `texture`, and `backgroundImage`/`backgroundImageFit`.
|
|
1441
1425
|
*/
|
|
1442
1426
|
forecastConfig?: Record<string, unknown>;
|
|
1443
1427
|
/**
|
|
@@ -1506,19 +1490,9 @@ export interface D3plusConfig {
|
|
|
1506
1490
|
/** The hover callback function for highlighting shapes on mouseover. */
|
|
1507
1491
|
hover?: ((d: DataPoint, i: number) => boolean) | false | null;
|
|
1508
1492
|
/**
|
|
1509
|
-
How close
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
whose edge lies within this distance: its tooltip, hover highlight, and
|
|
1513
|
-
axis guides show, and a click there clicks it. A point's tooltip points
|
|
1514
|
-
at the top of the point (on it or near it) and holds still until
|
|
1515
|
-
another point takes over. Applies to the point
|
|
1516
|
-
marks of scatter and bubble plots (Circle and Rect shapes, Beeswarm
|
|
1517
|
-
included), Network nodes, and Geomap points; bars, areas, lines, and
|
|
1518
|
-
other area-filling marks keep exact hit-testing.
|
|
1519
|
-
Plots with a discrete axis and `tooltipShared` on snap to the nearest
|
|
1520
|
-
column instead. Defaults to `20`; `0` turns it off, along with the
|
|
1521
|
-
anchored tooltip.
|
|
1493
|
+
How close (px) the pointer must come to a point mark (scatter and
|
|
1494
|
+
bubble points, Network nodes, Geomap points, Radar dots) to hover it, so small
|
|
1495
|
+
points are easy to reach. Defaults to `20`; `0` turns it off.
|
|
1522
1496
|
*/
|
|
1523
1497
|
hoverDistance?: number;
|
|
1524
1498
|
/** Candlestick: accessor or data key for each period's highest value (default `"high"`). */
|
|
@@ -1547,17 +1521,10 @@ export interface D3plusConfig {
|
|
|
1547
1521
|
points?: Record<string, unknown>;
|
|
1548
1522
|
};
|
|
1549
1523
|
/**
|
|
1550
|
-
Lets keyboard users move between the chart's
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
jump to the first and last mark, Enter or Space selects the focused
|
|
1555
|
-
mark as a click would (drilling down, or toggling a legend item), and
|
|
1556
|
-
Escape clears it. The focused mark shows its tooltip and hover
|
|
1557
|
-
highlight, a ring outlines it (see `keyboardNavConfig`), and a live
|
|
1558
|
-
region announces its label to screen readers. Legend items are
|
|
1559
|
-
included after the chart's marks; Line and Area series are visited
|
|
1560
|
-
point by point. On by default; `false` removes the Tab stop.
|
|
1524
|
+
Lets keyboard users move between the chart's marks: the chart is one Tab
|
|
1525
|
+
stop, the arrow keys move to the nearest mark in that direction, Home and
|
|
1526
|
+
End jump to the ends, Enter or Space click the focused mark, and Escape
|
|
1527
|
+
clears it. Defaults to `true`; `false` removes the Tab stop.
|
|
1561
1528
|
*/
|
|
1562
1529
|
keyboardNav?: boolean;
|
|
1563
1530
|
/** Styles the focus ring around the mark keyboard navigation has focused (see `KeyboardNavConfig`). */
|
|
@@ -1575,96 +1542,34 @@ export interface D3plusConfig {
|
|
|
1575
1542
|
*/
|
|
1576
1543
|
labelWidth?: number;
|
|
1577
1544
|
/**
|
|
1578
|
-
Where each shape's label goes
|
|
1579
|
-
`(d, i) => string` accessor
|
|
1545
|
+
Where each shape's label goes: `"auto"`, `"along"`, `"inside"`, or
|
|
1546
|
+
`"outside"`, or a `(d, i) => string` accessor. `"auto"` picks
|
|
1547
|
+
whichever fits best per shape, and a label with no room is left out.
|
|
1580
1548
|
|
|
1581
|
-
-
|
|
1582
|
-
|
|
1583
|
-
`"
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
inside
|
|
1591
|
-
or Donut (any `innerRadius`, and partial rings such as a half pie),
|
|
1592
|
-
a slice whose label inside can't show its whole name under
|
|
1593
|
-
`"auto"` is labelled outside the ring instead, and `"outside"`
|
|
1594
|
-
labels every slice there: its name and share, horizontal, in the
|
|
1595
|
-
Path `labelConfig`'s font at its `fontSize` (12px by default), in
|
|
1596
|
-
the theme's text color unless `labelConfig.fontColor` sets one,
|
|
1597
|
-
joined to the slice by a thin leader line. These labels stack in a
|
|
1598
|
-
column on the side of the ring their slice faces, wrapping onto a
|
|
1599
|
-
second line between words when their column is narrow; the ring
|
|
1600
|
-
shrinks (its hole with it) to leave room for them, never below 60%
|
|
1601
|
-
of its full radius, and when they don't all fit, the smallest
|
|
1602
|
-
slices' labels are left out (those slices keep their label inside,
|
|
1603
|
-
if any). `"inside"` keeps a Pie or Donut's labels straight inside
|
|
1604
|
-
their slices, and on the other ring segments both `"inside"` and
|
|
1605
|
-
`"outside"` keep the straight labels. A Donut's curves
|
|
1606
|
-
follow the middle of its ring (the rim, when its hole is small),
|
|
1607
|
-
with the slice's share on a smaller second line when there is room.
|
|
1608
|
-
A Sunburst also weighs a label turned along its radius, which suits
|
|
1609
|
-
the narrow arcs of the outer rings. Curved Donut and Sunburst names
|
|
1610
|
-
keep 5px from the ring's edges and at least 0.3em from the
|
|
1611
|
-
segment's ends, at the largest size from the Path `labelConfig`'s
|
|
1612
|
-
`fontSize` (else `fontMax`, 24px by default) down to its `fontMin`
|
|
1613
|
-
(8px). A Chord curves its group names just outside the ring when
|
|
1614
|
-
every name fits along its arc, which leaves the ring more room;
|
|
1615
|
-
otherwise it curves those that fit and turns the rest along their
|
|
1616
|
-
spokes, all at the Path `labelConfig`'s `fontSize` (11px by
|
|
1617
|
-
default). A Radar does the same with its metric names, just outside
|
|
1618
|
-
the web, each between its neighbors' spokes, wrapping a long name
|
|
1619
|
-
onto a second curved line. A RadialBar curves each track's name along the track, inside
|
|
1620
|
-
its bar (or past its end when the bar is too short), when the sweep
|
|
1621
|
-
leaves no room before the start for the straight labels, and at any
|
|
1622
|
-
sweep for `"along"`; when every track is named this way, the default
|
|
1623
|
-
legend hides. Curved text takes the color that contrasts with what
|
|
1624
|
-
lies under it (the theme's ink outside the ring) and dims with its
|
|
1625
|
-
segment on hover. A label with no room is left out.
|
|
1626
|
-
- Bars: `"inside"` or `"outside"` the bar, or `"auto"`, which goes
|
|
1627
|
-
outside when the bar is shorter than half the room along its axis.
|
|
1628
|
-
Stacked bars always label inside.
|
|
1629
|
-
- Circles (scatter and bubble points, Beeswarm points given a `label`,
|
|
1630
|
-
Network nodes, and Geomap coordinate points): `"auto"` keeps a label
|
|
1631
|
-
inside its circle when it fits there at `pointLabelConfig.fontMin` or
|
|
1632
|
-
larger, else moves it beside the circle, else hides it. A Network or
|
|
1633
|
-
Geomap's labels beside their circles stay in the chart area, a
|
|
1634
|
-
Plot's in its plot area. `"inside"` keeps every label
|
|
1635
|
-
inside, shrinking it to fit (a label that can't fit is dropped).
|
|
1636
|
-
`"outside"` always puts it beside the circle. A label goes beside its
|
|
1637
|
-
circle on the side with the most open room: the side facing its
|
|
1638
|
-
Voronoi cell's centroid first, then right, left, top, bottom, and the
|
|
1639
|
-
diagonals. A side is taken only where the label lies mostly in the
|
|
1640
|
-
circle's Voronoi cell, stays in that area, and overlaps no circle and
|
|
1641
|
-
no label placed before it. Larger circles are
|
|
1642
|
-
placed first. A label with no room is hidden; the circle's tooltip and
|
|
1643
|
-
aria-label still name it. Geomap points are labeled by
|
|
1644
|
-
`shapeConfig.Circle.label` when it is set (`false` turns their labels
|
|
1645
|
-
off), else by `label`. Labels are placed when the chart draws: a
|
|
1646
|
-
zoomed Plot places them again for its new scales, while a zoomed
|
|
1647
|
-
Network or Geomap scales them with the picture.
|
|
1648
|
-
- Stacked areas (StackedArea, Streamgraph, and a stacked AreaPlot):
|
|
1649
|
-
`"auto"` or `"along"` runs each series' name along its band's
|
|
1650
|
-
centerline, following its curve, on the stretch where the band is at
|
|
1651
|
-
least the font size plus 4px thick under the whole label and flattest.
|
|
1652
|
-
The text reads upright, in the color that contrasts with the band's
|
|
1653
|
-
fill (or the Area `labelConfig`'s `fontColor`, when you set one), and
|
|
1654
|
-
dims with its band on hover. It starts at the Area `labelConfig`'s
|
|
1655
|
-
`fontSize` (or `fontMax`, else 16px) and shrinks a pixel at a time
|
|
1656
|
-
down to its `fontMin`, but no lower than 8px, before giving up; a
|
|
1657
|
-
band too thin for its name everywhere goes unlabeled. When every band
|
|
1658
|
-
gets a name, the default legend hides (a `legend` of your own always
|
|
1659
|
-
wins, and the legend stays while a series is hidden from it).
|
|
1660
|
-
`"inside"` (or `"outside"`) puts the label in the band's largest box
|
|
1661
|
-
instead. `shapeConfig.Area.label` sets the text, or `false` for none.
|
|
1549
|
+
- Rings (Pie, Donut, Sunburst, Chord, RadialBar) and polar charts
|
|
1550
|
+
(Radar, PolarArea, RadialMatrix): `"along"` curves the name along its
|
|
1551
|
+
arc. `"inside"` keeps it straight; on a Pie or Donut, `"outside"`
|
|
1552
|
+
moves it beside the ring with a leader line.
|
|
1553
|
+
- Bars: inside or outside the bar. `"auto"` goes outside when the bar
|
|
1554
|
+
is short. Stacked bars always label inside.
|
|
1555
|
+
- Circles (Plot points, Network nodes, Geomap points): inside the
|
|
1556
|
+
circle, or beside it when it doesn't fit (`"outside"` always beside).
|
|
1557
|
+
- Stacked areas: `"auto"` and `"along"` run each name along its band;
|
|
1558
|
+
`"inside"` puts it in the band's largest box.
|
|
1662
1559
|
|
|
1663
|
-
|
|
1560
|
+
When every stacked area or RadialBar track is named along its shape,
|
|
1561
|
+
the default legend hides. Defaults to `"auto"`.
|
|
1664
1562
|
*/
|
|
1665
1563
|
labelPosition?: "auto" | "along" | "inside" | "outside" | ((d: DataPoint, i: number) => "auto" | "along" | "inside" | "outside");
|
|
1666
1564
|
/**
|
|
1667
|
-
Whether to display the legend. By default
|
|
1565
|
+
Whether to display the legend. By default it shows when it has more than
|
|
1566
|
+
one entry and each entry stands for a single group, or when entries are
|
|
1567
|
+
colored by a category that isn't a `groupBy` level. It hides when the
|
|
1568
|
+
chart's own labels already name every entry (see `labelPosition`), or
|
|
1569
|
+
when every Circle, Rect, and Bar of a Plot shows its whole label as its
|
|
1570
|
+
legend entry would, and stays while a series is hidden or soloed.
|
|
1571
|
+
`false` hides it, `true` always shows it, and a `(config, data) =>
|
|
1572
|
+
boolean` function decides.
|
|
1668
1573
|
*/
|
|
1669
1574
|
legend?: boolean | ((config: D3plusConfig, arr: DataPoint[]) => boolean);
|
|
1670
1575
|
/** Configuration object passed to the legend's config method. */
|
|
@@ -1684,11 +1589,17 @@ export interface D3plusConfig {
|
|
|
1684
1589
|
*/
|
|
1685
1590
|
legendFilterInvert?: boolean | ((viz: VizBase) => boolean);
|
|
1686
1591
|
/**
|
|
1687
|
-
Whether legend clicks go on the chart's Back history
|
|
1592
|
+
Whether legend clicks go on the chart's Back history, so Back undoes
|
|
1593
|
+
them along with drill-downs, in order. Defaults to `true`; `false` leaves
|
|
1594
|
+
them off, so Back only steps out of drill-downs.
|
|
1688
1595
|
*/
|
|
1689
1596
|
legendHistory?: boolean;
|
|
1690
1597
|
/**
|
|
1691
|
-
Whether the chart may draw
|
|
1598
|
+
Whether the chart may draw a legend, size legend, or colorScale inside
|
|
1599
|
+
empty space around its marks (over a translucent box, see
|
|
1600
|
+
`legendInsetConfig`) instead of in a margin. Only a legend whose position
|
|
1601
|
+
is `"auto"` can move inside. Defaults to `true`; also accepts a function
|
|
1602
|
+
of the resolved config.
|
|
1692
1603
|
*/
|
|
1693
1604
|
legendInset?: boolean | ((config: D3plusConfig) => boolean);
|
|
1694
1605
|
/**
|
|
@@ -1722,10 +1633,10 @@ export interface D3plusConfig {
|
|
|
1722
1633
|
/** Configuration object for the legend tooltip. */
|
|
1723
1634
|
legendTooltip?: TooltipConfig;
|
|
1724
1635
|
/**
|
|
1725
|
-
Formats the Radar's level value labels, or the
|
|
1726
|
-
labels and tooltips. Receives the
|
|
1727
|
-
Defaults to the abbreviated number format the axes
|
|
1728
|
-
…).
|
|
1636
|
+
Formats the Radar's level value labels and dot tooltip values, or the
|
|
1637
|
+
Hexbin's contour level labels and tooltips. Receives the value and
|
|
1638
|
+
returns its label. Defaults to the abbreviated number format the axes
|
|
1639
|
+
use (`1.5k`, `2M`, …).
|
|
1729
1640
|
*/
|
|
1730
1641
|
levelFormat?: (d: number) => string | number;
|
|
1731
1642
|
/**
|
|
@@ -1762,28 +1673,13 @@ export interface D3plusConfig {
|
|
|
1762
1673
|
/** ParallelCoordinates: the lines' stroke opacity, or `"auto"` (default) to fade them as their number grows. */
|
|
1763
1674
|
lineOpacity?: number | "auto";
|
|
1764
1675
|
/**
|
|
1765
|
-
Labels each line
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
an ellipsis, then hides. Labels that would overlap are moved apart,
|
|
1773
|
-
each side on its own, with a dotted connector back to their line; when
|
|
1774
|
-
the plot is too short for them all, the last that fits reads "+N more".
|
|
1775
|
-
`lineLabelConfig` adds each end's value to its label.
|
|
1776
|
-
|
|
1777
|
-
`"along"` writes each series name along its own line instead, following
|
|
1778
|
-
its curve: on the stretch that bends and slopes least and stays clear
|
|
1779
|
-
of the other lines and labels, reading upright whichever way the line
|
|
1780
|
-
runs. A line with no clear stretch for its name goes unlabeled, a chart
|
|
1781
|
-
(or small-multiples panel) with a single line names none, and the plot
|
|
1782
|
-
leaves no room past the lines for these labels. The Line shape's
|
|
1783
|
-
`labelConfig` sets their `fontSize`, `fontFamily`, and `fontWeight`.
|
|
1784
|
-
When every line gets a name, the default legend hides (a `legend` of
|
|
1785
|
-
your own always wins). LinePlot defaults to `"along"`; other charts
|
|
1786
|
-
default to no labels.
|
|
1676
|
+
Labels each line with its series name: `true` or `"end"` past its right
|
|
1677
|
+
end, `"start"` past its left end, `"both"` at both ends, or `"along"`
|
|
1678
|
+
written along the line itself, following its curve. A function of each
|
|
1679
|
+
row picks per series (or `false`). End labels that would overlap are
|
|
1680
|
+
moved apart, and `lineLabelConfig` can add each end's value. When every
|
|
1681
|
+
line is named along it, the default legend hides. Defaults to `"along"`
|
|
1682
|
+
on LinePlot, no labels elsewhere.
|
|
1787
1683
|
*/
|
|
1788
1684
|
lineLabels?: LineLabelsSetting;
|
|
1789
1685
|
/**
|
|
@@ -1801,28 +1697,16 @@ export interface D3plusConfig {
|
|
|
1801
1697
|
maxAngle?: number;
|
|
1802
1698
|
/**
|
|
1803
1699
|
Geomap: how far each link bows into an arc, as a share of the distance
|
|
1804
|
-
between its ends
|
|
1805
|
-
`0.2`
|
|
1806
|
-
|
|
1807
|
-
running both ways between two places stay apart. On a flat map, a
|
|
1808
|
-
link whose great circle the projection cuts (across the antimeridian,
|
|
1809
|
-
or between `"geoAlbersUsa"`'s insets) is drawn on the screen between
|
|
1810
|
-
its ends, bowed the same way, so it crosses the map instead of leaving
|
|
1811
|
-
by one edge. On a projection that clips to a circle (a globe such as
|
|
1812
|
-
`"geoOrthographic"`), links follow the great circle without the lift.
|
|
1700
|
+
between its ends: `0` draws the plain great-circle path, and the default
|
|
1701
|
+
`0.2` bows it to the left of its direction (negative bows right), so
|
|
1702
|
+
links running both ways stay apart. Globes ignore it.
|
|
1813
1703
|
*/
|
|
1814
1704
|
linkCurve?: number;
|
|
1815
1705
|
/**
|
|
1816
|
-
Network and Geomap: bundles the
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
Arrowheads, labels, hover, and click focus follow each bundled curve.
|
|
1821
|
-
A Network's links from a node to itself, and a Geomap's links on a
|
|
1822
|
-
globe or cut by its projection, are drawn as usual; a bundled Geomap
|
|
1823
|
-
link ignores `linkCurve`. The bundling is worked out once per layout
|
|
1824
|
-
(under a second for 2,500 links) and reused while the chart zooms,
|
|
1825
|
-
pans, or is hovered. Defaults to `false`.
|
|
1706
|
+
Network and Geomap: bundles links that run the same way into shared
|
|
1707
|
+
curves (force-directed edge bundling), so the main flows read through
|
|
1708
|
+
the clutter of a dense chart. A bundled Geomap link ignores
|
|
1709
|
+
`linkCurve`. Defaults to `false`.
|
|
1826
1710
|
*/
|
|
1827
1711
|
linkBundle?: boolean;
|
|
1828
1712
|
/**
|
|
@@ -1846,18 +1730,11 @@ export interface D3plusConfig {
|
|
|
1846
1730
|
*/
|
|
1847
1731
|
linkSizeMin?: number;
|
|
1848
1732
|
/**
|
|
1849
|
-
Colors each link of a Network, Rings, Sankey, ArcDiagram, or Geomap
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
colorScale, which then shows the links' values beside the nodes' color
|
|
1855
|
-
legend (when the chart also has a `colorScale` for its nodes, nodes and
|
|
1856
|
-
links share it, on one domain); a string is a color when it parses as
|
|
1857
|
-
one, or else a category in the chart's palette, as `color` colors
|
|
1858
|
-
nodes. `false` (the default) draws every link in the theme's `link`
|
|
1859
|
-
gray (on a Geomap, a gray halfway between the chart's background and
|
|
1860
|
-
text colors, which reads over land and water alike).
|
|
1733
|
+
Colors each link of a Network, Rings, Sankey, ArcDiagram, or Geomap (and
|
|
1734
|
+
its arrowheads): `"source"` or `"target"` takes that node's color, and a
|
|
1735
|
+
key or accessor reads a value from each link: a number is colored on the
|
|
1736
|
+
colorScale, and a string is a color or a palette category. `false` (the
|
|
1737
|
+
default) draws every link in the theme's link gray.
|
|
1861
1738
|
*/
|
|
1862
1739
|
linkColor?: false | "source" | "target" | string | ((d: DataPoint, i: number) => unknown);
|
|
1863
1740
|
/**
|
|
@@ -1873,35 +1750,21 @@ export interface D3plusConfig {
|
|
|
1873
1750
|
*/
|
|
1874
1751
|
linkLabel?: string | ((d: DataPoint, i: number) => unknown);
|
|
1875
1752
|
/**
|
|
1876
|
-
Styles the link labels (see `linkLabel`): `rotate
|
|
1877
|
-
default
|
|
1878
|
-
`fontSize` (10)
|
|
1879
|
-
`backgroundOpacity
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
(defaults to the chart's text color), `fontFamily`, or `fontWeight`.
|
|
1883
|
-
Along a curved link (a Rings spline or fanned parallel link, an
|
|
1884
|
-
ArcDiagram arc, a self-loop, a bundled Network edge, a Geomap flow
|
|
1885
|
-
arc, or a Sankey band or return lane), an `"along"` label follows the
|
|
1886
|
-
curve, centered where a straight label would sit, over a pad that
|
|
1887
|
-
curves with it, and is cut short with an ellipsis when the curve has
|
|
1888
|
-
too little room (or left out when fewer than three letters fit). A
|
|
1889
|
-
loop bending tighter than `minRadius` keeps a straight label.
|
|
1753
|
+
Styles the link labels (see `linkLabel`): `rotate` (`"along"`, the
|
|
1754
|
+
default, runs text along its link, curves included; `"horizontal"`
|
|
1755
|
+
keeps it flat), `fontSize` (default `10`), `padding` (default `2`),
|
|
1756
|
+
`backgroundOpacity` of the pad behind the text (default `0.85`),
|
|
1757
|
+
`minRadius`, the tightest bend a label follows in ems (default `2`), and
|
|
1758
|
+
any other TextBox setting, such as `fontColor`.
|
|
1890
1759
|
*/
|
|
1891
1760
|
linkLabelConfig?: LinkLabelConfig;
|
|
1892
1761
|
/** Links this chart to every other chart with the same group name, so hovering, `active`, `highlight` (including search), and legend hide/solo clicks in one are mirrored in the rest, and a value gets the same categorical color in every chart. Rows match across charts by the value of `by` (a data key or accessor), which defaults to the chart's own id. A string is shorthand for `{group}`; set `hover`, `active`, `highlight`, `legend`, or `color` to `false` to stop sharing that behavior. */
|
|
1893
1762
|
link?: LinkOption;
|
|
1894
1763
|
/**
|
|
1895
|
-
Network, Rings, ArcDiagram, and Geomap:
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
smallest node's radius on the first two, and 10 pixels on a Geomap),
|
|
1900
|
-
or up to the smallest node's radius on an ArcDiagram. The
|
|
1901
|
-
function receives each link with its own fields, with `source` and
|
|
1902
|
-
`target` set to the data of the nodes at its ends (not their ids or
|
|
1903
|
-
indices), and its index in `links`. Link `shapeConfig` functions, arrow
|
|
1904
|
-
accessors, and tooltip accessors receive the same object.
|
|
1764
|
+
Network, Rings, ArcDiagram, and Geomap: each link's thickness, as a
|
|
1765
|
+
pixel number, or an accessor whose values are scaled (see
|
|
1766
|
+
`linkSizeScale`) between `linkSizeMin` and `linkSizeMax`. The accessor
|
|
1767
|
+
receives each link with `source` and `target` set to its nodes' data.
|
|
1905
1768
|
*/
|
|
1906
1769
|
linkSize?: number | ((d: DataPoint & {
|
|
1907
1770
|
source: DataPoint;
|
|
@@ -1948,7 +1811,7 @@ export interface D3plusConfig {
|
|
|
1948
1811
|
messageStyle?: Record<string, unknown>;
|
|
1949
1812
|
/** Metric key for the visualization. */
|
|
1950
1813
|
metric?: string;
|
|
1951
|
-
/** Shows a small overview + draggable-viewport minimap
|
|
1814
|
+
/** Shows a small overview + draggable-viewport minimap in the chart's top-right corner (beneath the zoom controls, when they show) once the chart is zoomed in. On by default whenever `zoom` is enabled. */
|
|
1952
1815
|
minimap?: boolean;
|
|
1953
1816
|
/**
|
|
1954
1817
|
An additional CSS class name (or space-separated list of class names) applied to the minimap's outer box, viewport box, and zoom-level label, alongside their fixed `d3plus-minimap` / `d3plus-minimap-viewport` / `d3plus-minimap-label` classes. Setting this automatically disables d3plus's built-in inline `minimapStyle`/`minimapViewportStyle`/`minimapViewportStyleActive`/`minimapLabelStyle` defaults (as long as you haven't already customized them yourself), so a host page's own styling applies through the cascade with no other configuration needed.
|
|
@@ -2019,6 +1882,29 @@ export interface D3plusConfig {
|
|
|
2019
1882
|
in value (`linkSize`, or Sankey's `value`), and none when they don't.
|
|
2020
1883
|
*/
|
|
2021
1884
|
nodeTooltipLinks?: number | false;
|
|
1885
|
+
/**
|
|
1886
|
+
Network, Rings, ArcDiagram, and Sankey: the network measures a node's
|
|
1887
|
+
tooltip lists. `true` (the default) lists them all, `false` none, or
|
|
1888
|
+
an Array picks some, in the order to list them: `"degree"` (its number
|
|
1889
|
+
of links, as "In-degree" and "Out-degree" when the chart draws arrows
|
|
1890
|
+
and in Sankey; it replaces the "Connections" count), `"betweenness"`
|
|
1891
|
+
(the share of shortest paths between other nodes that pass through
|
|
1892
|
+
it, 0 to 1), `"closeness"` (how near it is to the nodes it can reach,
|
|
1893
|
+
0 to 1), and `"cluster"` (the name of its cluster, when clusters color
|
|
1894
|
+
the chart). Betweenness and closeness are worked out while the browser
|
|
1895
|
+
is idle after the chart draws, and an open tooltip fills them in once
|
|
1896
|
+
they are ready.
|
|
1897
|
+
*/
|
|
1898
|
+
nodeTooltipStats?: boolean | ("degree" | "betweenness" | "closeness" | "cluster")[];
|
|
1899
|
+
/**
|
|
1900
|
+
Network, Rings, ArcDiagram, and Sankey: settings for the network
|
|
1901
|
+
measures in node tooltips. `weighted: true` counts a strong link (by
|
|
1902
|
+
`linkSize`, or Sankey's `value`) as a shorter step than a weak one for
|
|
1903
|
+
betweenness and closeness; by default every link is one step.
|
|
1904
|
+
*/
|
|
1905
|
+
nodeTooltipStatsConfig?: {
|
|
1906
|
+
weighted?: boolean;
|
|
1907
|
+
};
|
|
2022
1908
|
/**
|
|
2023
1909
|
Ocean color for geomaps (any CSS value including 'transparent'), or a
|
|
2024
1910
|
`{light, dark}` pair chosen by the chart's `theme` (the page behind it
|
|
@@ -2046,16 +1932,11 @@ export interface D3plusConfig {
|
|
|
2046
1932
|
*/
|
|
2047
1933
|
overlap?: number;
|
|
2048
1934
|
/**
|
|
2049
|
-
Room (px)
|
|
2050
|
-
`"auto"` (the default) curves every
|
|
2051
|
-
they all fit (see `labelPosition`),
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
the largest radius at which every label fits inside the chart,
|
|
2055
|
-
wrapping long labels onto two lines (and truncating what still doesn't
|
|
2056
|
-
fit) rather than shrinking the web below half its largest possible
|
|
2057
|
-
size; names that fit along the web at that radius still curve. A
|
|
2058
|
-
number reserves exactly that much room and wraps labels to that width.
|
|
1935
|
+
Room (px) reserved around a Radar's web (or a polar chart's circle) for
|
|
1936
|
+
its labels. `"auto"` (the default) curves every label along the edge
|
|
1937
|
+
when they all fit (see `labelPosition`), else sizes the circle to the
|
|
1938
|
+
labels measured along their spokes, wrapping long ones onto two lines.
|
|
1939
|
+
A number reserves exactly that much room.
|
|
2059
1940
|
*/
|
|
2060
1941
|
outerPadding?: number | "auto";
|
|
2061
1942
|
/** Priestley and Gantt: the space between neighboring bars, as a share of each row (d3's band `paddingInner`). */
|
|
@@ -2124,49 +2005,25 @@ export interface D3plusConfig {
|
|
|
2124
2005
|
*/
|
|
2125
2006
|
reducedMotion?: "auto" | boolean;
|
|
2126
2007
|
/**
|
|
2127
|
-
Plot: shaded spans
|
|
2128
|
-
|
|
2129
|
-
`
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
`maxWidth`. The fill defaults to the chart's text color at `fillOpacity`
|
|
2136
|
-
`0.08`, so it reads on light and dark themes; `stroke`, `strokeWidth`,
|
|
2137
|
-
and `strokeOpacity` add edges. On a continuous or time axis the band's
|
|
2138
|
-
ends count toward the axis domain, widening it to show the whole band
|
|
2139
|
-
(an end set by `xDomain`/`yDomain`/`x2Domain`/`y2Domain` or the axis
|
|
2140
|
-
config's `domain` stays put). Each entry expands into a
|
|
2141
|
-
`"ReferenceBand"` annotation (see `annotations`) behind the data
|
|
2142
|
-
(`layer: "front"` to draw it over; its label always draws above), which follows zoom and never
|
|
2143
|
-
responds to the pointer or keyboard. A label that would cover a data
|
|
2144
|
-
label or another reference label moves to the band's other corners or
|
|
2145
|
-
along its length, inside the plot, and is hidden when no spot is free.
|
|
2008
|
+
Plot: shaded spans between two values, such as a recession or a target
|
|
2009
|
+
range. Give each entry `x` (vertical) or `y` (horizontal) as
|
|
2010
|
+
`[start, end]` in data units, `x2`/`y2` for the secondary axes, or
|
|
2011
|
+
`ref: "plot"` for fractions of the plot. Optional: a `label` (top-left;
|
|
2012
|
+
`labelPosition: "end"` for top-right) with font keys and `maxWidth`,
|
|
2013
|
+
`fill`/`fillOpacity` (default the text color at `0.08`), `stroke`,
|
|
2014
|
+
`strokeWidth`, `strokeOpacity`, and `layer: "front"` to draw over the
|
|
2015
|
+
data. A band widens a continuous axis's domain to fit.
|
|
2146
2016
|
*/
|
|
2147
2017
|
referenceBands?: ReferenceBandConfig[];
|
|
2148
2018
|
/**
|
|
2149
|
-
Plot: lines across the
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
defaults to the chart's text color at `strokeOpacity` `0.6`, `strokeWidth`
|
|
2158
|
-
`1`; `dash: true` dashes it ("4 4"), or give a dash pattern. On a
|
|
2159
|
-
continuous or time axis the value counts toward the axis domain,
|
|
2160
|
-
widening it to show the line (an end set by `xDomain`/`yDomain`/
|
|
2161
|
-
`x2Domain`/`y2Domain` or the axis config's `domain` stays put; a value
|
|
2162
|
-
outside such a domain is not drawn). Each entry
|
|
2163
|
-
expands into a `"ReferenceLine"` annotation (see `annotations`) behind
|
|
2164
|
-
the data (`layer: "front"` to draw it over; its label always draws
|
|
2165
|
-
above), which follows zoom and
|
|
2166
|
-
never responds to the pointer or keyboard. A label that would cover a
|
|
2167
|
-
data label or another reference label moves to the line's other side
|
|
2168
|
-
or end, or along it, inside the plot, and is hidden when no spot is
|
|
2169
|
-
free.
|
|
2019
|
+
Plot: lines across the plot at one value, such as a target or a launch
|
|
2020
|
+
date. Give each entry `x` (vertical) or `y` (horizontal) in data units,
|
|
2021
|
+
`x2`/`y2` for the secondary axes, or `ref: "plot"` for a fraction of the
|
|
2022
|
+
plot. Optional: a `label` at the line's `"end"` or `"start"`
|
|
2023
|
+
(`labelPosition`) with font keys and `maxWidth`, `stroke`/`strokeOpacity`
|
|
2024
|
+
(default the text color at `0.6`), `strokeWidth` (`1`), `dash` (`true`
|
|
2025
|
+
or a dash pattern), and `layer: "front"` to draw over the data. A line
|
|
2026
|
+
widens a continuous axis's domain to fit.
|
|
2170
2027
|
*/
|
|
2171
2028
|
referenceLines?: ReferenceLineConfig[];
|
|
2172
2029
|
/** Row key for matrix-style layouts. */
|
|
@@ -2347,16 +2204,12 @@ export interface D3plusConfig {
|
|
|
2347
2204
|
/** Accessor function or string for the visualization's subtitle. */
|
|
2348
2205
|
subtitle?: string | ((data: DataPoint[]) => string);
|
|
2349
2206
|
/**
|
|
2350
|
-
Packs a Plot's circles into a beeswarm: each
|
|
2351
|
-
|
|
2352
|
-
overlap. `"x"` or `"y"` names the value axis; `true`
|
|
2353
|
-
values are numeric, else y; `false` draws a plain scatter.
|
|
2354
|
-
axis
|
|
2355
|
-
|
|
2356
|
-
Circles keep their ids, so switching a chart between `false` and `true`
|
|
2357
|
-
animates each circle between its scatter and swarm position. The default,
|
|
2358
|
-
`"auto"`, swarms only when every mark is a Circle and every row lacks a y
|
|
2359
|
-
(or x) value.
|
|
2207
|
+
Packs a Plot's circles into a beeswarm: each keeps its value along one
|
|
2208
|
+
axis and is placed beside its neighbors along the other, so none
|
|
2209
|
+
overlap. `"x"` or `"y"` names the value axis; `true` picks x when its
|
|
2210
|
+
values are numeric, else y; `false` draws a plain scatter. A category
|
|
2211
|
+
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.
|
|
2360
2213
|
*/
|
|
2361
2214
|
swarm?: boolean | "auto" | "x" | "y";
|
|
2362
2215
|
/**
|
|
@@ -2432,19 +2285,11 @@ export interface D3plusConfig {
|
|
|
2432
2285
|
targetConfig?: Record<string, unknown>;
|
|
2433
2286
|
/**
|
|
2434
2287
|
The chart's colors. `"auto"` (the default) paints no background and
|
|
2435
|
-
follows the page
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
`"dark"
|
|
2439
|
-
|
|
2440
|
-
from the theme. An object sets your own tokens on top of the preset its
|
|
2441
|
-
`base` names (`"light"` or `"dark"`), for example
|
|
2442
|
-
`{base: "dark", background: "#123", accent: "#ffd43b"}`. A dark theme
|
|
2443
|
-
also turns color scale ramps around, from a dim tint near the background
|
|
2444
|
-
up to a bright pole (see the `colorScale` tokens). Colors you set in the
|
|
2445
|
-
other config (`titleConfig.fontColor`, `tooltipConfig`,
|
|
2446
|
-
`colorScaleConfig.colorMax`, the `*Style` options, …) win over the
|
|
2447
|
-
theme.
|
|
2288
|
+
follows the page, light or dark. `"light"` and `"dark"` paint the
|
|
2289
|
+
theme's background and take every chrome color from it. An object
|
|
2290
|
+
overrides tokens on top of its `base` preset, e.g.
|
|
2291
|
+
`{base: "dark", background: "#123", accent: "#ffd43b"}`. Colors set
|
|
2292
|
+
elsewhere in the config win over the theme.
|
|
2448
2293
|
*/
|
|
2449
2294
|
theme?: ThemeSetting;
|
|
2450
2295
|
/**
|
|
@@ -2513,8 +2358,15 @@ export interface D3plusConfig {
|
|
|
2513
2358
|
`labelPosition`.
|
|
2514
2359
|
*/
|
|
2515
2360
|
todayConfig?: Omit<ReferenceLineConfig, "x" | "y" | "x2" | "y2" | "ref">;
|
|
2516
|
-
/**
|
|
2517
|
-
|
|
2361
|
+
/**
|
|
2362
|
+
Whether to show tooltips, or a
|
|
2363
|
+
`(datum, index, {depth, maxDepth, legend})` accessor deciding per mark
|
|
2364
|
+
and legend entry. `depth` is the `groupBy` level (from 0) the hovered
|
|
2365
|
+
item stands for and `maxDepth` the deepest level, so
|
|
2366
|
+
`depth === maxDepth` keeps tooltips to the deepest level; `legend` is
|
|
2367
|
+
true for a legend entry. Defaults to `true`.
|
|
2368
|
+
*/
|
|
2369
|
+
tooltip?: boolean | ((d: DataPoint, i: number, levels: TooltipLevels) => boolean);
|
|
2518
2370
|
/** Configuration for the tooltip component. */
|
|
2519
2371
|
tooltipConfig?: TooltipConfig;
|
|
2520
2372
|
/**
|
|
@@ -2616,16 +2468,10 @@ export interface D3plusConfig {
|
|
|
2616
2468
|
*/
|
|
2617
2469
|
xBreak?: [number, number] | [number, number][];
|
|
2618
2470
|
/**
|
|
2619
|
-
The x domain
|
|
2620
|
-
|
|
2621
|
-
end
|
|
2622
|
-
|
|
2623
|
-
is "none"; time axes aren't rounded). With both ends set, neither is
|
|
2624
|
-
rounded. On a discrete axis it lists the categories to show, in
|
|
2625
|
-
order; data in other categories is not drawn. A full `xConfig`
|
|
2626
|
-
`domain` is the lower-level override: it wins over this, and is drawn
|
|
2627
|
-
exactly as given (rounded only by `xConfig`'s own `rounding`),
|
|
2628
|
-
without stretching to the chart's `baseline`.
|
|
2471
|
+
The x domain: `[min, max]` on a continuous axis, or the categories to
|
|
2472
|
+
show, in order, on a discrete one. Setting one end (`[min]` or
|
|
2473
|
+
`[undefined, max]`) pins only that end; the data fills the other. An
|
|
2474
|
+
`xConfig.domain` overrides this.
|
|
2629
2475
|
*/
|
|
2630
2476
|
xDomain?: (number | string | Date)[];
|
|
2631
2477
|
/** The x2 domain as an array. If either value is undefined, it is calculated from the data. */
|
|
@@ -2646,16 +2492,10 @@ export interface D3plusConfig {
|
|
|
2646
2492
|
*/
|
|
2647
2493
|
yBreak?: [number, number] | [number, number][];
|
|
2648
2494
|
/**
|
|
2649
|
-
The y domain
|
|
2650
|
-
|
|
2651
|
-
end
|
|
2652
|
-
|
|
2653
|
-
is "none"; time axes aren't rounded). With both ends set, neither is
|
|
2654
|
-
rounded. On a discrete axis it lists the categories to show, in
|
|
2655
|
-
order; data in other categories is not drawn. A full `yConfig`
|
|
2656
|
-
`domain` is the lower-level override: it wins over this, and is drawn
|
|
2657
|
-
exactly as given (rounded only by `yConfig`'s own `rounding`),
|
|
2658
|
-
without stretching to the chart's `baseline`.
|
|
2495
|
+
The y domain: `[min, max]` on a continuous axis, or the categories to
|
|
2496
|
+
show, in order, on a discrete one. Setting one end (`[min]` or
|
|
2497
|
+
`[undefined, max]`) pins only that end; the data fills the other. A
|
|
2498
|
+
`yConfig.domain` overrides this.
|
|
2659
2499
|
*/
|
|
2660
2500
|
yDomain?: (number | string | Date)[];
|
|
2661
2501
|
/** The y2 domain as an array. If either value is undefined, it is calculated from the data. */
|
|
@@ -2666,7 +2506,13 @@ export interface D3plusConfig {
|
|
|
2666
2506
|
y2Sort?: (a: DataPoint, b: DataPoint) => number;
|
|
2667
2507
|
/** Calendar: formats the year beside each year block — a d3-time-format specifier (default `"%Y"`), a function of the year's first day, or `false` for none. */
|
|
2668
2508
|
yearFormat?: string | ((date: Date) => string) | false;
|
|
2669
|
-
/**
|
|
2509
|
+
/**
|
|
2510
|
+
Enables pan and zoom: the mouse wheel or a pinch (see `zoomScroll`), a
|
|
2511
|
+
drag (see `zoomDrag`), a double-click (see `zoomDoubleClick`), the
|
|
2512
|
+
zoom-control buttons (see `zoomControls`), and the `zoomIn`, `zoomOut`,
|
|
2513
|
+
`zoomReset`, and `zoomBrush` methods. On by default for every chart;
|
|
2514
|
+
`false` turns all of them off.
|
|
2515
|
+
*/
|
|
2670
2516
|
zoom?: boolean;
|
|
2671
2517
|
/** The pixel stroke-width of the zoom brush area. */
|
|
2672
2518
|
zoomBrushHandleSize?: number;
|
|
@@ -2683,7 +2529,21 @@ export interface D3plusConfig {
|
|
|
2683
2529
|
*/
|
|
2684
2530
|
zoomControlClassName?: string;
|
|
2685
2531
|
/**
|
|
2686
|
-
|
|
2532
|
+
Whether the zoom-control buttons (zoom in, zoom out, reset, and brush)
|
|
2533
|
+
show in the chart's top-right corner. `false` hides them and gives the
|
|
2534
|
+
room they take back to the chart's title, legend, and other top
|
|
2535
|
+
content, while zooming stays on: the wheel, pinch, drag, and
|
|
2536
|
+
double-click gestures still work, and the chart's `zoomIn`, `zoomOut`,
|
|
2537
|
+
`zoomReset`, and `zoomBrush` methods let buttons of your own drive it.
|
|
2538
|
+
Defaults to `true`.
|
|
2539
|
+
*/
|
|
2540
|
+
zoomControls?: boolean;
|
|
2541
|
+
/**
|
|
2542
|
+
Overrides the zoom-control icons (`zoomIn`, `zoomOut`, `zoomReset`,
|
|
2543
|
+
`zoomBrush`). Each value is an HTML string, or a mount function
|
|
2544
|
+
`(el) => void | (() => void)` called with the button's 12×12px icon slot
|
|
2545
|
+
(for a React tree, an `<img>`, …); a returned cleanup runs when the
|
|
2546
|
+
buttons redraw.
|
|
2687
2547
|
*/
|
|
2688
2548
|
zoomControlIcons?: Partial<Record<"zoomIn" | "zoomOut" | "zoomReset" | "zoomBrush", string | ((el: HTMLElement) => void | (() => void))>>;
|
|
2689
2549
|
/**
|
|
@@ -2698,11 +2558,27 @@ export interface D3plusConfig {
|
|
|
2698
2558
|
An object containing CSS key/value pairs that is used to style each zoom control button on hover (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.
|
|
2699
2559
|
*/
|
|
2700
2560
|
zoomControlStyleHover?: Record<string, unknown> | false;
|
|
2561
|
+
/**
|
|
2562
|
+
What a double-click on the chart does: `"in"` (the default) doubles
|
|
2563
|
+
the zoom around the pointer (Shift + double-click halves it),
|
|
2564
|
+
`"reset"` returns to the chart's initial view, like the reset button,
|
|
2565
|
+
and `false` does nothing.
|
|
2566
|
+
*/
|
|
2567
|
+
zoomDoubleClick?: "in" | "reset" | false;
|
|
2568
|
+
/**
|
|
2569
|
+
What a mouse drag on the chart does. `"pan"` (the default) pans it
|
|
2570
|
+
(see `zoomPan`). `"brush"` draws a box and zooms into it on release,
|
|
2571
|
+
as the brush button does, without turning brush mode on: a click that
|
|
2572
|
+
doesn't drag still reaches the shape under it, and hovering still
|
|
2573
|
+
shows tooltips. Shift + drag pans in `"brush"` mode, and touch keeps
|
|
2574
|
+
panning and pinching as in `"pan"`.
|
|
2575
|
+
*/
|
|
2576
|
+
zoomDrag?: "pan" | "brush";
|
|
2701
2577
|
/** Multiplier applied to programmatic zoom steps. */
|
|
2702
2578
|
zoomFactor?: number;
|
|
2703
2579
|
/** Maximum zoom scale factor. Defaults to the scale at which the smallest shape fills the chart area. */
|
|
2704
2580
|
zoomMax?: number;
|
|
2705
|
-
/** A pixel value to be used to pad all sides of a zoomed area. */
|
|
2581
|
+
/** A pixel value to be used to pad all sides of a zoomed area. A Plot's brushed box fills its plot without it, so its axes show the brushed range. */
|
|
2706
2582
|
zoomPadding?: number;
|
|
2707
2583
|
/** Whether panning (drag) is enabled while zoomed. */
|
|
2708
2584
|
zoomPan?: boolean;
|