@d3plus/core 4.3.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7406 -3676
- package/es/index.js +3 -3
- package/es/index.js.map +1 -1
- package/es/internal.js +13 -2
- package/es/internal.js.map +1 -1
- package/es/src/charts/AreaPlot/index.js +1 -2
- package/es/src/charts/AreaPlot/index.js.map +1 -1
- package/es/src/charts/BarChart/index.js +9 -3
- package/es/src/charts/BarChart/index.js.map +1 -1
- package/es/src/charts/BoxWhisker/index.js +6 -2
- package/es/src/charts/BoxWhisker/index.js.map +1 -1
- package/es/src/charts/BumpChart/index.js +1 -2
- package/es/src/charts/BumpChart/index.js.map +1 -1
- package/es/src/charts/Chord/applyLayout.js +205 -0
- package/es/src/charts/Chord/applyLayout.js.map +1 -0
- package/es/src/charts/Chord/emit.js +220 -0
- package/es/src/charts/Chord/emit.js.map +1 -0
- package/es/src/charts/Chord/index.js +249 -0
- package/es/src/charts/Chord/index.js.map +1 -0
- package/es/src/charts/Geomap/applyLayout.js +17 -10
- package/es/src/charts/Geomap/applyLayout.js.map +1 -1
- package/es/src/charts/Geomap/basemapTheme.js +78 -0
- package/es/src/charts/Geomap/basemapTheme.js.map +1 -0
- package/es/src/charts/Geomap/emit.js +18 -9
- package/es/src/charts/Geomap/emit.js.map +1 -1
- package/es/src/charts/Geomap/index.js +74 -105
- package/es/src/charts/Geomap/index.js.map +1 -1
- package/es/src/charts/Histogram/binData.js +225 -0
- package/es/src/charts/Histogram/binData.js.map +1 -0
- package/es/src/charts/Histogram/index.js +271 -0
- package/es/src/charts/Histogram/index.js.map +1 -0
- package/es/src/charts/LinePlot/index.js +1 -2
- package/es/src/charts/LinePlot/index.js.map +1 -1
- package/es/src/charts/Matrix/emit.js +6 -0
- package/es/src/charts/Matrix/emit.js.map +1 -1
- package/es/src/charts/Matrix/index.js +1 -2
- package/es/src/charts/Matrix/index.js.map +1 -1
- package/es/src/charts/Network/applyLayout.js +52 -4
- package/es/src/charts/Network/applyLayout.js.map +1 -1
- package/es/src/charts/Network/emit.js +61 -27
- package/es/src/charts/Network/emit.js.map +1 -1
- package/es/src/charts/Network/index.js +40 -55
- package/es/src/charts/Network/index.js.map +1 -1
- package/es/src/charts/Pack/emit.js +40 -2
- package/es/src/charts/Pack/emit.js.map +1 -1
- package/es/src/charts/Pack/index.js +14 -2
- package/es/src/charts/Pack/index.js.map +1 -1
- package/es/src/charts/Pie/applyLayout.js +20 -2
- package/es/src/charts/Pie/applyLayout.js.map +1 -1
- package/es/src/charts/Pie/emit.js +277 -32
- package/es/src/charts/Pie/emit.js.map +1 -1
- package/es/src/charts/Pie/index.js +47 -3
- package/es/src/charts/Pie/index.js.map +1 -1
- package/es/src/charts/Plot/discreteSpan.js +42 -0
- package/es/src/charts/Plot/discreteSpan.js.map +1 -0
- package/es/src/charts/Plot/draw.js +3 -1
- package/es/src/charts/Plot/draw.js.map +1 -1
- package/es/src/charts/Plot/index.js +152 -17
- package/es/src/charts/Plot/index.js.map +1 -1
- package/es/src/charts/Plot/pipeline.js +48 -22
- package/es/src/charts/Plot/pipeline.js.map +1 -1
- package/es/src/charts/Plot/pipelineDomains.js +84 -8
- package/es/src/charts/Plot/pipelineDomains.js.map +1 -1
- package/es/src/charts/Plot/plotZoom.js +278 -0
- package/es/src/charts/Plot/plotZoom.js.map +1 -0
- package/es/src/charts/Plot/shapeDefaults.js +3 -3
- package/es/src/charts/Plot/shapeDefaults.js.map +1 -1
- package/es/src/charts/Plot/sharedHover.js +431 -0
- package/es/src/charts/Plot/sharedHover.js.map +1 -0
- package/es/src/charts/Plot/sharedHoverScene.js +230 -0
- package/es/src/charts/Plot/sharedHoverScene.js.map +1 -0
- package/es/src/charts/Plot/sharedTooltip.js +163 -0
- package/es/src/charts/Plot/sharedTooltip.js.map +1 -0
- package/es/src/charts/Plot/stackShareLabels.js +137 -0
- package/es/src/charts/Plot/stackShareLabels.js.map +1 -0
- package/es/src/charts/Plot/stackShareTooltip.js +31 -0
- package/es/src/charts/Plot/stackShareTooltip.js.map +1 -0
- package/es/src/charts/Plot/trendLines.js +367 -0
- package/es/src/charts/Plot/trendLines.js.map +1 -0
- package/es/src/charts/Plot/trendScene.js +220 -0
- package/es/src/charts/Plot/trendScene.js.map +1 -0
- package/es/src/charts/Plot/trendTooltip.js +160 -0
- package/es/src/charts/Plot/trendTooltip.js.map +1 -0
- package/es/src/charts/Priestley/emit.js +36 -3
- package/es/src/charts/Priestley/emit.js.map +1 -1
- package/es/src/charts/Priestley/index.js +1 -2
- package/es/src/charts/Priestley/index.js.map +1 -1
- package/es/src/charts/Radar/emit.js +4 -1
- package/es/src/charts/Radar/emit.js.map +1 -1
- package/es/src/charts/Radar/index.js +16 -4
- package/es/src/charts/Radar/index.js.map +1 -1
- package/es/src/charts/RadialMatrix/emit.js +6 -0
- package/es/src/charts/RadialMatrix/emit.js.map +1 -1
- package/es/src/charts/RadialMatrix/index.js +18 -3
- package/es/src/charts/RadialMatrix/index.js.map +1 -1
- package/es/src/charts/Rings/applyLayout.js +72 -116
- package/es/src/charts/Rings/applyLayout.js.map +1 -1
- package/es/src/charts/Rings/emit.js +75 -10
- package/es/src/charts/Rings/emit.js.map +1 -1
- package/es/src/charts/Rings/index.js +24 -5
- package/es/src/charts/Rings/index.js.map +1 -1
- package/es/src/charts/Rings/ringsSizing.js +189 -0
- package/es/src/charts/Rings/ringsSizing.js.map +1 -0
- package/es/src/charts/Sankey/emit.js +55 -11
- package/es/src/charts/Sankey/emit.js.map +1 -1
- package/es/src/charts/Sankey/index.js +8 -2
- package/es/src/charts/Sankey/index.js.map +1 -1
- package/es/src/charts/StackedArea/index.js +9 -3
- package/es/src/charts/StackedArea/index.js.map +1 -1
- package/es/src/charts/Tree/emit.js +10 -4
- package/es/src/charts/Tree/emit.js.map +1 -1
- package/es/src/charts/Tree/index.js +6 -5
- package/es/src/charts/Tree/index.js.map +1 -1
- package/es/src/charts/Treemap/emit.js +56 -3
- package/es/src/charts/Treemap/emit.js.map +1 -1
- package/es/src/charts/Treemap/index.js +1 -2
- package/es/src/charts/Treemap/index.js.map +1 -1
- package/es/src/charts/definition/ChartDefinition.js.map +1 -1
- package/es/src/charts/definition/makeChart.js +8 -1
- package/es/src/charts/definition/makeChart.js.map +1 -1
- package/es/src/charts/drawSteps/backControl.js +85 -0
- package/es/src/charts/drawSteps/backControl.js.map +1 -0
- package/es/src/charts/drawSteps/bottomRightControls.js +193 -0
- package/es/src/charts/drawSteps/bottomRightControls.js.map +1 -0
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js +161 -0
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/controlButtonStyle.js +108 -0
- package/es/src/charts/drawSteps/controlButtonStyle.js.map +1 -0
- package/es/src/charts/drawSteps/minimap.js +395 -0
- package/es/src/charts/drawSteps/minimap.js.map +1 -0
- package/es/src/charts/drawSteps/minimapMarkup.js +147 -0
- package/es/src/charts/drawSteps/minimapMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/searchControls.js +358 -0
- package/es/src/charts/drawSteps/searchControls.js.map +1 -0
- package/es/src/charts/drawSteps/searchControlsMarkup.js +430 -0
- package/es/src/charts/drawSteps/searchControlsMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/tableView.js +173 -0
- package/es/src/charts/drawSteps/tableView.js.map +1 -0
- package/es/src/charts/drawSteps/tableViewControl.js +39 -0
- package/es/src/charts/drawSteps/tableViewControl.js.map +1 -0
- package/es/src/charts/drawSteps/tableViewMarkup.js +647 -0
- package/es/src/charts/drawSteps/tableViewMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/topLeftControls.js +73 -0
- package/es/src/charts/drawSteps/topLeftControls.js.map +1 -0
- package/es/src/charts/drawSteps/topLeftControlsMarkup.js +227 -0
- package/es/src/charts/drawSteps/topLeftControlsMarkup.js.map +1 -0
- package/es/src/charts/drawSteps/zoomControls.js +317 -175
- package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
- package/es/src/charts/drawSteps/zoomControlsMarkup.js +280 -0
- package/es/src/charts/drawSteps/zoomControlsMarkup.js.map +1 -0
- package/es/src/charts/events/click.shape.js +24 -1
- package/es/src/charts/events/click.shape.js.map +1 -1
- package/es/src/charts/events/mouseenter.js +3 -0
- package/es/src/charts/events/mouseenter.js.map +1 -1
- package/es/src/charts/events/mouseleave.js +3 -0
- package/es/src/charts/events/mouseleave.js.map +1 -1
- package/es/src/charts/events/mousemove.shape.js +2 -0
- package/es/src/charts/events/mousemove.shape.js.map +1 -1
- package/es/src/charts/features/attributionFeature.js +137 -0
- package/es/src/charts/features/attributionFeature.js.map +1 -0
- package/es/src/charts/features/axes.js +24 -9
- package/es/src/charts/features/axes.js.map +1 -1
- package/es/src/charts/features/chartGeometry.js +16 -2
- package/es/src/charts/features/chartGeometry.js.map +1 -1
- package/es/src/charts/features/edgeArrows.js +155 -0
- package/es/src/charts/features/edgeArrows.js.map +1 -0
- package/es/src/charts/features/emitHelpers.js +32 -0
- package/es/src/charts/features/emitHelpers.js.map +1 -1
- package/es/src/charts/features/ensureZoomDom.js +63 -12
- package/es/src/charts/features/ensureZoomDom.js.map +1 -1
- package/es/src/charts/features/features.js +89 -112
- package/es/src/charts/features/features.js.map +1 -1
- package/es/src/charts/features/featuresLegend.js +53 -17
- package/es/src/charts/features/featuresLegend.js.map +1 -1
- package/es/src/charts/features/plotPaint.js +81 -29
- package/es/src/charts/features/plotPaint.js.map +1 -1
- package/es/src/charts/features/shapeEmit.js +20 -2
- package/es/src/charts/features/shapeEmit.js.map +1 -1
- package/es/src/charts/features/zoomExtent.js +185 -0
- package/es/src/charts/features/zoomExtent.js.map +1 -0
- package/es/src/charts/helpers/tileAttributions.js +26 -0
- package/es/src/charts/helpers/tileAttributions.js.map +1 -1
- package/es/src/charts/index.js +2 -0
- package/es/src/charts/index.js.map +1 -1
- package/es/src/charts/pipeline/drillMorph.js +159 -0
- package/es/src/charts/pipeline/drillMorph.js.map +1 -0
- package/es/src/charts/pipeline/runChartDraw.js +35 -1
- package/es/src/charts/pipeline/runChartDraw.js.map +1 -1
- package/es/src/charts/pipeline/runVizPipeline.js +49 -15
- package/es/src/charts/pipeline/runVizPipeline.js.map +1 -1
- package/es/src/charts/pipeline/vizDrawPure.js +52 -6
- package/es/src/charts/pipeline/vizDrawPure.js.map +1 -1
- package/es/src/charts/viz/Viz.js +103 -59
- package/es/src/charts/viz/Viz.js.map +1 -1
- package/es/src/charts/viz/VizBase.js +186 -5
- package/es/src/charts/viz/VizBase.js.map +1 -1
- package/es/src/charts/viz/VizBaseConfig.js +41 -3
- package/es/src/charts/viz/VizBaseConfig.js.map +1 -1
- package/es/src/charts/viz/ordinalColor.js +2 -2
- package/es/src/charts/viz/ordinalColor.js.map +1 -1
- package/es/src/charts/viz/vizDefaults.js +270 -58
- package/es/src/charts/viz/vizDefaults.js.map +1 -1
- package/es/src/charts/viz/vizRender.js +54 -4
- package/es/src/charts/viz/vizRender.js.map +1 -1
- package/es/src/charts/viz/vizTypes.js.map +1 -1
- package/es/src/charts/viz/vizVisibility.js +145 -0
- package/es/src/charts/viz/vizVisibility.js.map +1 -0
- package/es/src/components/Axis/Axis.js +18 -9
- package/es/src/components/Axis/Axis.js.map +1 -1
- package/es/src/components/Axis/axisLayoutLabels.js +2 -1
- package/es/src/components/Axis/axisLayoutLabels.js.map +1 -1
- package/es/src/components/Axis/axisRender.js +5 -1
- package/es/src/components/Axis/axisRender.js.map +1 -1
- package/es/src/components/ColorScale/ColorScale.js +11 -11
- package/es/src/components/ColorScale/ColorScale.js.map +1 -1
- package/es/src/components/ColorScale/colorScaleScale.js +22 -10
- package/es/src/components/ColorScale/colorScaleScale.js.map +1 -1
- package/es/src/components/Legend/Legend.js +8 -5
- package/es/src/components/Legend/Legend.js.map +1 -1
- package/es/src/components/Legend/legendConfig.js +87 -21
- package/es/src/components/Legend/legendConfig.js.map +1 -1
- package/es/src/components/Legend/legendRender.js +29 -22
- package/es/src/components/Legend/legendRender.js.map +1 -1
- package/es/src/components/SizeLegend/SizeLegend.js +411 -0
- package/es/src/components/SizeLegend/SizeLegend.js.map +1 -0
- package/es/src/components/SizeLegend/sizeLegendLayout.js +285 -0
- package/es/src/components/SizeLegend/sizeLegendLayout.js.map +1 -0
- package/es/src/components/Timeline/timelineConfig.js +8 -4
- package/es/src/components/Timeline/timelineConfig.js.map +1 -1
- package/es/src/components/Timeline/timelineRender.js +1 -2
- package/es/src/components/Timeline/timelineRender.js.map +1 -1
- package/es/src/components/Tooltip.js +27 -7
- package/es/src/components/Tooltip.js.map +1 -1
- package/es/src/components/index.js +1 -0
- package/es/src/components/index.js.map +1 -1
- package/es/src/shapes/Box.js +4 -2
- package/es/src/shapes/Box.js.map +1 -1
- package/es/src/shapes/Shape.js +1 -1
- package/es/src/shapes/Shape.js.map +1 -1
- package/es/src/shapes/Whisker.js +3 -2
- package/es/src/shapes/Whisker.js.map +1 -1
- package/es/src/shapes/validateShapeConfig.js +141 -0
- package/es/src/shapes/validateShapeConfig.js.map +1 -0
- package/es/src/utils/BaseClass.js +134 -4
- package/es/src/utils/BaseClass.js.map +1 -1
- package/es/src/utils/D3plusConfig.js.map +1 -1
- package/es/src/utils/configDefault.js +17 -0
- package/es/src/utils/configDefault.js.map +1 -0
- package/es/src/utils/configPrep.js +2 -1
- package/es/src/utils/configPrep.js.map +1 -1
- package/es/src/utils/configWarnings.js +37 -0
- package/es/src/utils/configWarnings.js.map +1 -0
- package/es/src/utils/index.js +1 -0
- package/es/src/utils/index.js.map +1 -1
- package/package.json +13 -11
- package/types/index.d.ts +4 -4
- package/types/internal.d.ts +16 -2
- package/types/src/charts/BarChart/index.d.ts +2 -1
- package/types/src/charts/Chord/applyLayout.d.ts +43 -0
- package/types/src/charts/Chord/emit.d.ts +10 -0
- package/types/src/charts/Chord/index.d.ts +19 -0
- package/types/src/charts/Geomap/applyLayout.d.ts +9 -1
- package/types/src/charts/Geomap/basemapTheme.d.ts +35 -0
- package/types/src/charts/Histogram/binData.d.ts +37 -0
- package/types/src/charts/Histogram/index.d.ts +14 -0
- package/types/src/charts/Network/applyLayout.d.ts +8 -0
- package/types/src/charts/Plot/discreteSpan.d.ts +9 -0
- package/types/src/charts/Plot/index.d.ts +51 -3
- package/types/src/charts/Plot/pipeline.d.ts +14 -0
- package/types/src/charts/Plot/plotZoom.d.ts +65 -0
- package/types/src/charts/Plot/sharedHover.d.ts +79 -0
- package/types/src/charts/Plot/sharedHoverScene.d.ts +11 -0
- package/types/src/charts/Plot/sharedTooltip.d.ts +26 -0
- package/types/src/charts/Plot/stackShareLabels.d.ts +21 -0
- package/types/src/charts/Plot/stackShareTooltip.d.ts +9 -0
- package/types/src/charts/Plot/trendLines.d.ts +70 -0
- package/types/src/charts/Plot/trendScene.d.ts +18 -0
- package/types/src/charts/Plot/trendTooltip.d.ts +19 -0
- package/types/src/charts/Rings/applyLayout.d.ts +9 -0
- package/types/src/charts/Rings/ringsSizing.d.ts +49 -0
- package/types/src/charts/StackedArea/index.d.ts +2 -1
- package/types/src/charts/definition/ChartDefinition.d.ts +33 -1
- package/types/src/charts/definition/makeChart.d.ts +2 -1
- package/types/src/charts/drawSteps/backControl.d.ts +29 -0
- package/types/src/charts/drawSteps/bottomRightControls.d.ts +26 -0
- package/types/src/charts/drawSteps/bottomRightControlsMarkup.d.ts +108 -0
- package/types/src/charts/drawSteps/controlButtonStyle.d.ts +45 -0
- package/types/src/charts/drawSteps/minimap.d.ts +19 -0
- package/types/src/charts/drawSteps/minimapMarkup.d.ts +45 -0
- package/types/src/charts/drawSteps/searchControls.d.ts +3 -0
- package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +111 -0
- package/types/src/charts/drawSteps/tableView.d.ts +23 -0
- package/types/src/charts/drawSteps/tableViewControl.d.ts +21 -0
- package/types/src/charts/drawSteps/tableViewMarkup.d.ts +119 -0
- package/types/src/charts/drawSteps/topLeftControls.d.ts +32 -0
- package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +72 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +48 -8
- package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +138 -0
- package/types/src/charts/features/attributionFeature.d.ts +21 -0
- package/types/src/charts/features/axes.d.ts +1 -1
- package/types/src/charts/features/chartGeometry.d.ts +9 -3
- package/types/src/charts/features/edgeArrows.d.ts +92 -0
- package/types/src/charts/features/emitHelpers.d.ts +19 -0
- package/types/src/charts/features/ensureZoomDom.d.ts +6 -2
- package/types/src/charts/features/features.d.ts +32 -17
- package/types/src/charts/features/featuresLegend.d.ts +15 -0
- package/types/src/charts/features/plotPaint.d.ts +40 -2
- package/types/src/charts/features/zoomExtent.d.ts +25 -0
- package/types/src/charts/index.d.ts +2 -0
- package/types/src/charts/pipeline/drillMorph.d.ts +29 -0
- package/types/src/charts/pipeline/runVizPipeline.d.ts +14 -3
- package/types/src/charts/viz/Viz.d.ts +18 -1
- package/types/src/charts/viz/VizBase.d.ts +99 -4
- package/types/src/charts/viz/VizBaseConfig.d.ts +25 -3
- package/types/src/charts/viz/vizDefaults.d.ts +155 -0
- package/types/src/charts/viz/vizTypes.d.ts +204 -4
- package/types/src/charts/viz/vizVisibility.d.ts +34 -0
- package/types/src/components/Axis/Axis.d.ts +2 -0
- package/types/src/components/Legend/legendRender.d.ts +8 -2
- package/types/src/components/SizeLegend/SizeLegend.d.ts +107 -0
- package/types/src/components/SizeLegend/sizeLegendLayout.d.ts +101 -0
- package/types/src/components/Tooltip.d.ts +18 -3
- package/types/src/components/index.d.ts +1 -0
- package/types/src/shapes/validateShapeConfig.d.ts +10 -0
- package/types/src/utils/BaseClass.d.ts +15 -1
- package/types/src/utils/D3plusConfig.d.ts +200 -8
- package/types/src/utils/configDefault.d.ts +11 -0
- package/types/src/utils/configWarnings.d.ts +28 -0
- package/types/src/utils/index.d.ts +2 -1
- package/umd/d3plus-core.full.js +44507 -35766
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +7073 -4410
- package/umd/d3plus-core.js +16718 -9634
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +4615 -2322
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/charts/viz/VizBase.ts"],"sourcesContent":["import {select} from \"d3-selection\";\n\nimport {unique} from \"@d3plus/data\";\nimport {assign, date} from \"@d3plus/dom\";\nimport type {DataPoint} from \"@d3plus/data\";\n\nimport {accessor, constant} from \"../../utils/index.js\";\nimport type {D3plusConfig} from \"../../utils/index.js\";\nimport VizBaseConfig from \"./VizBaseConfig.js\";\n\n/**\n Second half of the fluent config accessors shared by every Viz chart\n (`loadingHTML` through `zoomPadding`), extending `VizBaseConfig` which\n holds the first half. Split purely so each file stays under the\n `max-lines` budget; the methods remain real prototype methods, so\n `BaseClass.config()` reflection and polymorphic `this` chaining are\n unchanged.\n*/\nexport default class VizBase extends VizBaseConfig {\n\n /**\n The inner HTML of the status message displayed when loading AJAX requests and displaying errors. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.\n*/\n loadingHTML(\n _?: string | ((viz: VizBase) => string),\n ): this | string | ((viz: VizBase) => string) {\n return arguments.length\n ? ((this.schema.loadingHTML = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.loadingHTML;\n }\n\n /**\n Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.\n*/\n loadingMessage(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.loadingMessage = _), this)\n : this.schema.loadingMessage;\n }\n\n /**\n The color of the mask displayed underneath the status message when loading AJAX requests and displaying errors. Set to `false` to turn off the mask completely.\n*/\n messageMask(_?: string | boolean): this | string | boolean {\n return arguments.length\n ? ((this.schema.messageMask = _), this)\n : this.schema.messageMask;\n }\n\n /**\n Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.\n*/\n messageStyle(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.messageStyle = assign(this.schema.messageStyle, _!)), this)\n : this.schema.messageStyle;\n }\n\n /**\n The inner HTML of the status message displayed when no data is supplied to the visualization. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.\n*/\n noDataHTML(\n _?: string | ((viz: VizBase) => string),\n ): this | string | ((viz: VizBase) => string) {\n return arguments.length\n ? ((this.schema.noDataHTML = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.noDataHTML;\n }\n\n /**\n Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.\n*/\n noDataMessage(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.noDataMessage = _), this)\n : this.schema.noDataMessage;\n }\n\n /**\n If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.\n*/\n scrollContainer(\n _?: string | HTMLElement | Window,\n ): this | string | HTMLElement | Window {\n return arguments.length\n ? ((this.schema.scrollContainer = _), this)\n : this.schema.scrollContainer;\n }\n\n /**\n The SVG container element as a d3 selector or DOM element. Defaults to `undefined`.\n*/\n select(_?: string | HTMLElement): this | ReturnType<typeof select> {\n return arguments.length\n ? ((this._select = select(_! as string)), this)\n : this._select;\n }\n\n /**\n Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, \"Rect\" or \"Circle\"), or an accessor Function that returns the String class name to be used for each individual data point.\n*/\n shape(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.shape = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.shape;\n }\n\n /**\n Configuration object with key/value pairs applied as method calls on each shape.\n*/\n shapeConfig(): D3plusConfig;\n shapeConfig(_: D3plusConfig): this;\n shapeConfig(_?: D3plusConfig): this | D3plusConfig {\n return arguments.length\n ? ((this.schema.shapeConfig = assign(this.schema.shapeConfig, _!)), this)\n : this.schema.shapeConfig;\n }\n\n /**\n Accessor function or string for the visualization's subtitle.\n*/\n subtitle(\n _?: string | ((data: DataPoint[]) => string),\n ): this | string | ((data: DataPoint[]) => string) {\n return arguments.length\n ? ((this.schema.subtitle = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.subtitle;\n }\n\n /**\n Configuration object for the subtitle.\n*/\n subtitleConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.subtitleConfig = assign(this.schema.subtitleConfig, _!)), this)\n : this.schema.subtitleConfig;\n }\n\n /**\n Tells the subtitle whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the subtitle appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n subtitlePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.subtitlePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.subtitlePadding;\n }\n\n /**\n The threshold value for bucketing small data points together.\n*/\n threshold(\n _?: number | ((data: DataPoint[]) => number),\n ): this | number | ((data: DataPoint[]) => number) {\n if (arguments.length) {\n if (typeof _ === \"function\") {\n this.schema.threshold = _;\n } else if (isFinite(_!) && !isNaN(_!)) {\n this.schema.threshold = constant(_! * 1);\n }\n return this;\n } else return this.schema.threshold;\n }\n\n /**\n Accessor for the value used in the threshold algorithm.\n @param key The data key used to group values for thresholding.\n*/\n thresholdKey(\n key?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]),\n ): this | string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) {\n if (arguments.length) {\n if (typeof key === \"function\") {\n this.schema.thresholdKey = key;\n } else {\n this.schema.thresholdKey = accessor(key!);\n }\n return this;\n } else return this.schema.thresholdKey;\n }\n\n /**\n The label displayed for bucketed threshold items.\n*/\n thresholdName(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.thresholdName = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.thresholdName;\n }\n\n /**\n Accessor function or string key for the time dimension of each data point.\n*/\n time(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n if (arguments.length) {\n if (typeof _ === \"function\") {\n this.schema.time = _;\n } else if (_) {\n this.schema.time = accessor(_);\n if (!this.schema.aggs[_]) {\n this.schema.aggs[_] = (\n a: DataPoint[],\n c: (d: DataPoint) => DataPoint[keyof DataPoint],\n ) => {\n const v = unique(a.map(c));\n return v.length === 1 ? v[0] : v;\n };\n }\n if (\n this._userTime &&\n JSON.stringify(_) !== JSON.stringify(this._userTime)\n ) {\n this.schema.timeFilter = false;\n this._timelineSelection = false;\n }\n this._userTime = _;\n } else {\n this.schema.time = undefined;\n this._userTime = undefined;\n this.schema.timeFilter = false;\n this._timelineSelection = false;\n }\n return this;\n } else return this.schema.time;\n }\n\n /**\n Configuration object for the timeline.\n*/\n timelineConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.timelineConfig = assign(this.schema.timelineConfig, _!)), this)\n : this.schema.timelineConfig;\n }\n\n /**\n The starting time or range for the timeline. Can be a single Date/String, or an Array of 2 values representing the min and max.\n*/\n timelineDefault(_?: Date | string | (Date | string)[]): this | Date[] {\n if (arguments.length) {\n if (!(_ instanceof Array)) _ = [_!, _!];\n this.schema.timelineDefault = (_ as (Date | string)[])\n .map(d => date(d as string | number | false))\n .filter((d): d is Date => d !== false);\n return this;\n } else return this.schema.timelineDefault;\n }\n\n /**\n Tells the timeline whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the timeline appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n timelinePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.timelinePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.timelinePadding;\n }\n\n /**\n Accessor function or string for the visualization's title.\n*/\n title(\n _?: string | ((data: DataPoint[]) => string),\n ): this | string | ((data: DataPoint[]) => string) {\n return arguments.length\n ? ((this.schema.title = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.title;\n }\n\n /**\n Configuration object for the title.\n*/\n titleConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.titleConfig = assign(this.schema.titleConfig, _!)), this)\n : this.schema.titleConfig;\n }\n\n /**\n Tells the title whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the title appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n titlePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.titlePadding = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.titlePadding;\n }\n\n /**\n Whether to display tooltips on hover.\n*/\n tooltip(\n _?: boolean | ((d: DataPoint, i: number) => boolean),\n ): this | boolean | ((d: DataPoint, i: number) => boolean) {\n return arguments.length\n ? ((this.schema.tooltip = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.tooltip;\n }\n\n /**\n Configuration object for the tooltip.\n*/\n tooltipConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.tooltipConfig = assign(this.schema.tooltipConfig, _!)), this)\n : this.schema.tooltipConfig;\n }\n\n /**\n Accessor function or string key for the total value displayed in the visualization.\n*/\n total(\n _?: boolean | string | ((d: DataPoint, i: number) => number),\n ): this | boolean | string | ((d: DataPoint, i: number) => number) {\n if (arguments.length) {\n if (typeof _ === \"function\") this.schema.total = _;\n else if (_) this.schema.total = accessor(_ as string);\n else this.schema.total = false;\n return this;\n } else return this.schema.total;\n }\n\n /**\n Configuration object for the total bar.\n*/\n totalConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.totalConfig = assign(this.schema.totalConfig, _!)), this)\n : this.schema.totalConfig;\n }\n\n /**\n Formatter function for the value in the total bar.\n*/\n totalFormat(_?: (d: number) => string): this | ((d: number) => string) {\n return arguments.length\n ? ((this.schema.totalFormat = _), this)\n : this.schema.totalFormat;\n }\n\n /**\n Tells the total whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the total appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n totalPadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.totalPadding = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.totalPadding;\n }\n\n /**\n The pixel stroke-width of the zoom brush area.\n*/\n zoomBrushHandleSize(_?: number): this | number {\n return arguments.length\n ? ((this.schema.zoomBrushHandleSize = _), this)\n : this.schema.zoomBrushHandleSize;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the outer handle area of the zoom brush. Passing `false` will remove all default styling.\n*/\n zoomBrushHandleStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomBrushHandleStyle = _), this)\n : this.schema.zoomBrushHandleStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the inner selection area of the zoom brush. Passing `false` will remove all default styling.\n*/\n zoomBrushSelectionStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomBrushSelectionStyle = _), this)\n : this.schema.zoomBrushSelectionStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style each zoom control button (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.\n*/\n zoomControlStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomControlStyle = _), this)\n : this.schema.zoomControlStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style each zoom control button when active (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling.\n*/\n zoomControlStyleActive(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomControlStyleActive = _), this)\n : this.schema.zoomControlStyleActive;\n }\n\n /**\n 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.\n*/\n zoomControlStyleHover(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomControlStyleHover = _), this)\n : this.schema.zoomControlStyleHover;\n }\n\n /**\n A pixel value to be used to pad all sides of a zoomed area.\n*/\n zoomPadding(_?: number): this | number {\n return arguments.length\n ? ((this.schema.zoomPadding = _), this)\n : this.schema.zoomPadding;\n }\n\n}\n"],"names":["select","unique","assign","date","accessor","constant","VizBaseConfig","VizBase","loadingHTML","_","arguments","length","schema","loadingMessage","messageMask","messageStyle","noDataHTML","noDataMessage","scrollContainer","_select","shape","shapeConfig","subtitle","subtitleConfig","subtitlePadding","threshold","isFinite","isNaN","thresholdKey","key","thresholdName","time","aggs","a","c","v","map","_userTime","JSON","stringify","timeFilter","_timelineSelection","undefined","timelineConfig","timelineDefault","Array","d","filter","timelinePadding","title","titleConfig","titlePadding","tooltip","tooltipConfig","total","totalConfig","totalFormat","totalPadding","zoomBrushHandleSize","zoomBrushHandleStyle","zoomBrushSelectionStyle","zoomControlStyle","zoomControlStyleActive","zoomControlStyleHover","zoomPadding"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,MAAM,QAAO,eAAe;AAEpC,SAAQC,MAAM,QAAO,eAAe;AACpC,SAAQC,MAAM,EAAEC,IAAI,QAAO,cAAc;AAGzC,SAA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,CAAC+C,oBAAoB;YACtC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,wBACEnD,CAAmC;gBAEnC,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACgD,uBAAuB,GAAGnD,GAAI,IAAI,AAAD,IAC/C,IAAI,CAACG,MAAM,CAACgD,uBAAuB;YACzC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,iBACEpD,CAAmC;gBAEnC,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACiD,gBAAgB,GAAGpD,GAAI,IAAI,AAAD,IACxC,IAAI,CAACG,MAAM,CAACiD,gBAAgB;YAClC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,uBACErD,CAAmC;gBAEnC,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACkD,sBAAsB,GAAGrD,GAAI,IAAI,AAAD,IAC9C,IAAI,CAACG,MAAM,CAACkD,sBAAsB;YACxC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,sBACEtD,CAAmC;gBAEnC,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACmD,qBAAqB,GAAGtD,GAAI,IAAI,AAAD,IAC7C,IAAI,CAACG,MAAM,CAACmD,qBAAqB;YACvC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,YAAYvD,CAAU;gBACpB,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACoD,WAAW,GAAGvD,GAAI,IAAI,AAAD,IACnC,IAAI,CAACG,MAAM,CAACoD,WAAW;YAC7B;;;WAvamBzD;EAAgBD;AARrC;;;;;;;AAOA,GACA,SAAqBC,qBAyapB"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/charts/viz/VizBase.ts"],"sourcesContent":["import {select} from \"d3-selection\";\n\nimport {unique} from \"@d3plus/data\";\nimport {assign, date} from \"@d3plus/dom\";\nimport type {DataPoint} from \"@d3plus/data\";\n\nimport {accessor, constant} from \"../../utils/index.js\";\nimport type {D3plusConfig} from \"../../utils/index.js\";\nimport type {ZoomControlIcons} from \"../drawSteps/zoomControlsMarkup.js\";\nimport type {SizeLegendScale, SizeLegendSize} from \"../../components/SizeLegend/sizeLegendLayout.js\";\nimport validateShapeConfig from \"../../shapes/validateShapeConfig.js\";\nimport VizBaseConfig from \"./VizBaseConfig.js\";\n\n/**\n Second half of the fluent config accessors shared by every Viz chart\n (`loadingHTML` through `tableViewPageSize`), extending `VizBaseConfig` which\n holds the first half. Split purely so each file stays under the\n `max-lines` budget; the methods remain real prototype methods, so\n `BaseClass.config()` reflection and polymorphic `this` chaining are\n unchanged.\n*/\nexport default class VizBase extends VizBaseConfig {\n\n /**\n The inner HTML of the status message displayed when loading AJAX requests and displaying errors. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.\n*/\n loadingHTML(\n _?: string | ((viz: VizBase) => string),\n ): this | string | ((viz: VizBase) => string) {\n return arguments.length\n ? ((this.schema.loadingHTML = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.loadingHTML;\n }\n\n /**\n Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.\n*/\n loadingMessage(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.loadingMessage = _), this)\n : this.schema.loadingMessage;\n }\n\n /**\n The color of the mask displayed underneath the status message when loading AJAX requests and displaying errors. Set to `false` to turn off the mask completely.\n*/\n messageMask(_?: string | boolean): this | string | boolean {\n return arguments.length\n ? ((this.schema.messageMask = _), this)\n : this.schema.messageMask;\n }\n\n /**\n Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.\n*/\n messageStyle(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.messageStyle = assign(this.schema.messageStyle, _!)), this)\n : this.schema.messageStyle;\n }\n\n /**\n 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.\n*/\n minimapClassName(_?: string): this | string {\n return arguments.length\n ? ((this.schema.minimapClassName = _), this)\n : this.schema.minimapClassName;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the minimap's zoom-level text label (e.g. \"2x\"). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n minimapLabelStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.minimapLabelStyle = _), this)\n : this.schema.minimapLabelStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the minimap's outer box (the full-scene overview). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n minimapStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.minimapStyle = _), this)\n : this.schema.minimapStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the minimap's draggable viewport box in its resting state. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n minimapViewportStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.minimapViewportStyle = _), this)\n : this.schema.minimapViewportStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the minimap's draggable viewport box while it's being dragged. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.minimapClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n minimapViewportStyleActive(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.minimapViewportStyleActive = _), this)\n : this.schema.minimapViewportStyleActive;\n }\n\n /**\n The inner HTML of the status message displayed when no data is supplied to the visualization. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.\n*/\n noDataHTML(\n _?: string | ((viz: VizBase) => string),\n ): this | string | ((viz: VizBase) => string) {\n return arguments.length\n ? ((this.schema.noDataHTML = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.noDataHTML;\n }\n\n /**\n Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.\n*/\n noDataMessage(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.noDataMessage = _), this)\n : this.schema.noDataMessage;\n }\n\n /**\n If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.\n*/\n scrollContainer(\n _?: string | HTMLElement | Window,\n ): this | string | HTMLElement | Window {\n return arguments.length\n ? ((this.schema.scrollContainer = _), this)\n : this.schema.scrollContainer;\n }\n\n /**\n Resolves the string the search box matches its typed term against, for\n a given datum. Defaults to the mark's resolved on-screen label\n (`viz._drawLabel`) — the same text the user reads on the chart.\n Override it to match against something else instead, e.g. a data\n field that isn't shown as the label.\n\n This is checked alongside, not instead of, every level of the datum's\n own groupBy hierarchy — searching a leaf's label also matches its\n ancestor group's cell/legend entry, and vice versa, regardless of\n this accessor's override.\n*/\n searchAccessor(\n _?: (d: DataPoint, i: number) => string,\n ): this | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.searchAccessor = _), this)\n : this.schema.searchAccessor;\n }\n\n /**\n An additional CSS class name (or space-separated list of class names) applied to the search toggle button and input, alongside their fixed `search-control` classes. Setting this automatically disables d3plus's built-in inline `searchControlStyle`/`searchControlStyleActive`/`searchControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.\n*/\n searchControlClassName(_?: string): this | string {\n return arguments.length\n ? ((this.schema.searchControlClassName = _), this)\n : this.schema.searchControlClassName;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the search toggle button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.searchControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n searchControlStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.searchControlStyle = _), this)\n : this.schema.searchControlStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the search toggle button while open. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.searchControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n searchControlStyleActive(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.searchControlStyleActive = _), this)\n : this.schema.searchControlStyleActive;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the search toggle button on hover. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.searchControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n searchControlStyleHover(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.searchControlStyleHover = _), this)\n : this.schema.searchControlStyleHover;\n }\n\n /**\n The SVG container element as a d3 selector or DOM element. Defaults to `undefined`.\n*/\n select(_?: string | HTMLElement): this | ReturnType<typeof select> {\n return arguments.length\n ? ((this._select = select(_! as string)), this)\n : this._select;\n }\n\n /**\n Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, \"Rect\" or \"Circle\"), or an accessor Function that returns the String class name to be used for each individual data point.\n*/\n shape(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.shape = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.shape;\n }\n\n /**\n Configuration object with key/value pairs applied as method calls on each shape.\n*/\n shapeConfig(): D3plusConfig;\n shapeConfig(_: D3plusConfig): this;\n shapeConfig(_?: D3plusConfig): this | D3plusConfig {\n if (!arguments.length) return this.schema.shapeConfig;\n validateShapeConfig(this.constructor.name, _!);\n this.schema.shapeConfig = assign(this.schema.shapeConfig, _!);\n return this;\n }\n\n /**\n Whether to display the size legend: a nested-circle key, in the chart's bottom-right corner, for charts that size their marks with a `size` accessor (bubble plots, Geomap points via `pointSize`, Network, Rings). By default it shows whenever marks are sized by more than one value, unless it would take up more than a third of the chart's width or height. Pass `true` to always show it, `false` to hide it, or a function that receives the resolved chart config, the radius scale, and the legend's measured `{width, height, availableWidth, availableHeight}`, and returns a boolean.\n*/\n sizeLegend(\n _?:\n | boolean\n | ((config: Record<string, unknown>, scale: SizeLegendScale, size: SizeLegendSize) => boolean),\n ):\n | this\n | boolean\n | ((config: Record<string, unknown>, scale: SizeLegendScale, size: SizeLegendSize) => boolean) {\n return arguments.length\n ? ((this.schema.sizeLegend = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.sizeLegend;\n }\n\n /**\n Configuration object passed to the size legend's config method: `values` (an array of values to draw, or how many to pick), `tickFormat`, `title` (defaults to the `size` key when `size` is set to a string), `shapeConfig`, `lineConfig`, `labelConfig`, `titleConfig`, `padding`, `lineLength`, and `labelPadding`.\n*/\n sizeLegendConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.sizeLegendConfig = assign(this.schema.sizeLegendConfig, _!)), this)\n : this.schema.sizeLegendConfig;\n }\n\n /**\n Which margin the size legend claims in the chart's bottom-right corner. `\"right\"` (the default) widens the right margin, so the chart keeps its full height and the legend sits at the bottom of the right column, below any right-side legend or colorScale. `\"bottom\"` deepens the bottom margin instead, so the chart keeps its full width and any bottom legend or colorScale narrows to sit beside it.\n*/\n sizeLegendPosition(_?: \"right\" | \"bottom\"): this | \"right\" | \"bottom\" {\n return arguments.length\n ? ((this.schema.sizeLegendPosition = _), this)\n : this.schema.sizeLegendPosition;\n }\n\n /**\n Accessor function or string for the visualization's subtitle.\n*/\n subtitle(\n _?: string | ((data: DataPoint[]) => string),\n ): this | string | ((data: DataPoint[]) => string) {\n return arguments.length\n ? ((this.schema.subtitle = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.subtitle;\n }\n\n /**\n Configuration object for the subtitle.\n*/\n subtitleConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.subtitleConfig = assign(this.schema.subtitleConfig, _!)), this)\n : this.schema.subtitleConfig;\n }\n\n /**\n Tells the subtitle whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the subtitle appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n subtitlePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.subtitlePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.subtitlePadding;\n }\n\n /**\n The threshold value for bucketing small data points together.\n*/\n threshold(\n _?: number | ((data: DataPoint[]) => number),\n ): this | number | ((data: DataPoint[]) => number) {\n if (arguments.length) {\n if (typeof _ === \"function\") {\n this.schema.threshold = _;\n } else if (isFinite(_!) && !isNaN(_!)) {\n this.schema.threshold = constant(_! * 1);\n }\n return this;\n } else return this.schema.threshold;\n }\n\n /**\n Accessor for the value used in the threshold algorithm.\n @param key The data key used to group values for thresholding.\n*/\n thresholdKey(\n key?: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]),\n ): this | string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]) {\n if (arguments.length) {\n if (typeof key === \"function\") {\n this.schema.thresholdKey = key;\n } else {\n this.schema.thresholdKey = accessor(key!);\n }\n return this;\n } else return this.schema.thresholdKey;\n }\n\n /**\n The label displayed for bucketed threshold items.\n*/\n thresholdName(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.thresholdName = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.thresholdName;\n }\n\n /**\n Accessor function or string key for the time dimension of each data point.\n*/\n time(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n if (arguments.length) {\n if (typeof _ === \"function\") {\n this.schema.time = _;\n } else if (_) {\n this.schema.time = accessor(_);\n if (!this.schema.aggs[_]) {\n this.schema.aggs[_] = (\n a: DataPoint[],\n c: (d: DataPoint) => DataPoint[keyof DataPoint],\n ) => {\n const v = unique(a.map(c));\n return v.length === 1 ? v[0] : v;\n };\n }\n if (\n this._userTime &&\n JSON.stringify(_) !== JSON.stringify(this._userTime)\n ) {\n this.schema.timeFilter = false;\n this._timelineSelection = false;\n }\n this._userTime = _;\n } else {\n this.schema.time = undefined;\n this._userTime = undefined;\n this.schema.timeFilter = false;\n this._timelineSelection = false;\n }\n return this;\n } else return this.schema.time;\n }\n\n /**\n Configuration object for the timeline.\n*/\n timelineConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.timelineConfig = assign(this.schema.timelineConfig, _!)), this)\n : this.schema.timelineConfig;\n }\n\n /**\n The starting time or range for the timeline. Can be a single Date/String, or an Array of 2 values representing the min and max.\n*/\n timelineDefault(_?: Date | string | (Date | string)[]): this | Date[] {\n if (arguments.length) {\n if (!(_ instanceof Array)) _ = [_!, _!];\n this.schema.timelineDefault = (_ as (Date | string)[])\n .map(d => date(d as string | number | false))\n .filter((d): d is Date => d !== false);\n return this;\n } else return this.schema.timelineDefault;\n }\n\n /**\n Tells the timeline whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the timeline appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n timelinePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.timelinePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.timelinePadding;\n }\n\n /**\n Accessor function or string for the visualization's title.\n*/\n title(\n _?: string | ((data: DataPoint[]) => string),\n ): this | string | ((data: DataPoint[]) => string) {\n return arguments.length\n ? ((this.schema.title = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.title;\n }\n\n /**\n Configuration object for the title.\n*/\n titleConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.titleConfig = assign(this.schema.titleConfig, _!)), this)\n : this.schema.titleConfig;\n }\n\n /**\n Tells the title whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the title appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n titlePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.titlePadding = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.titlePadding;\n }\n\n /**\n Whether to display tooltips on hover.\n*/\n tooltip(\n _?: boolean | ((d: DataPoint, i: number) => boolean),\n ): this | boolean | ((d: DataPoint, i: number) => boolean) {\n return arguments.length\n ? ((this.schema.tooltip = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.tooltip;\n }\n\n /**\n Configuration object for the tooltip.\n*/\n tooltipConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.tooltipConfig = assign(this.schema.tooltipConfig, _!)), this)\n : this.schema.tooltipConfig;\n }\n\n /**\n Accessor function or string key for the total value displayed in the visualization.\n*/\n total(\n _?: boolean | string | ((d: DataPoint, i: number) => number),\n ): this | boolean | string | ((d: DataPoint, i: number) => number) {\n if (arguments.length) {\n if (typeof _ === \"function\") this.schema.total = _;\n else if (_) this.schema.total = accessor(_ as string);\n else this.schema.total = false;\n return this;\n } else return this.schema.total;\n }\n\n /**\n Configuration object for the total bar.\n*/\n totalConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.totalConfig = assign(this.schema.totalConfig, _!)), this)\n : this.schema.totalConfig;\n }\n\n /**\n Formatter function for the value in the total bar.\n*/\n totalFormat(_?: (d: number) => string): this | ((d: number) => string) {\n return arguments.length\n ? ((this.schema.totalFormat = _), this)\n : this.schema.totalFormat;\n }\n\n /**\n Tells the total whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the total appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n totalPadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.totalPadding = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.totalPadding;\n }\n\n /**\n The pixel stroke-width of the zoom brush area.\n*/\n zoomBrushHandleSize(_?: number): this | number {\n return arguments.length\n ? ((this.schema.zoomBrushHandleSize = _), this)\n : this.schema.zoomBrushHandleSize;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the outer handle area of the zoom brush. Passing `false` will remove all default styling.\n*/\n zoomBrushHandleStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomBrushHandleStyle = _), this)\n : this.schema.zoomBrushHandleStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the inner selection area of the zoom brush. Passing `false` will remove all default styling.\n*/\n zoomBrushSelectionStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomBrushSelectionStyle = _), this)\n : this.schema.zoomBrushSelectionStyle;\n }\n\n /**\n An additional CSS class name (or space-separated list of class names) applied to each zoom control button, alongside the fixed `zoom-control` / `zoom-in` / `zoom-out` / `zoom-reset` / `zoom-brush` classes. Setting this automatically disables d3plus's built-in inline `zoomControlStyle`/`zoomControlStyleActive`/`zoomControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.\n*/\n zoomControlClassName(_?: string): this | string {\n return arguments.length\n ? ((this.schema.zoomControlClassName = _), this)\n : this.schema.zoomControlClassName;\n }\n\n /**\n Overrides one or more of the four built-in zoom-control icons (`zoomIn`, `zoomOut`, `zoomReset`, `zoomBrush`), which otherwise render as inline SVGs. Each value is either an HTML string — used as the button's content in place of the built-in icon — or a mount function, `(el: HTMLElement) => void | (() => void)`, called once with the button's reserved icon slot (a 12x12px element) so you can mount anything imperative into it: a React tree (`createRoot(el).render(<Icon/>)`), a Vue app, a canvas sprite, a brand `<img>`. Return a cleanup function from the mount function if there's teardown to do; it runs right before that slot is discarded — which happens whenever the whole button panel's markup regenerates (a `.locale(...)` change, a `zoomControlClassName` change, or the brush toggle switching), not just once per chart.\n*/\n zoomControlIcons(\n _?: ZoomControlIcons,\n ): this | ZoomControlIcons | undefined {\n return arguments.length\n ? ((this.schema.zoomControlIcons = _), this)\n : (this.schema.zoomControlIcons as ZoomControlIcons | undefined);\n }\n\n /**\n An object containing CSS key/value pairs that is used to style each zoom control button (`.zoom-in`, `.zoom-out`, `.zoom-reset`, and `.zoom-brush`). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.zoomControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n zoomControlStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomControlStyle = _), this)\n : this.schema.zoomControlStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style each zoom control button when active (`.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.\n*/\n zoomControlStyleActive(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomControlStyleActive = _), this)\n : this.schema.zoomControlStyleActive;\n }\n\n /**\n 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.\n*/\n zoomControlStyleHover(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.zoomControlStyleHover = _), this)\n : this.schema.zoomControlStyleHover;\n }\n\n /**\n A pixel value to be used to pad all sides of a zoomed area.\n*/\n zoomPadding(_?: number): this | number {\n return arguments.length\n ? ((this.schema.zoomPadding = _), this)\n : this.schema.zoomPadding;\n }\n\n /**\n An additional CSS class name (or space-separated list of class names) applied to the `<table>` element the table-view toggle renders, alongside the fixed `d3plus-table-view-table` class. Lets a host page style the data table with its own table styling (Tailwind, Bootstrap, a design system) via descendant selectors.\n*/\n tableViewClassName(_?: string): this | string {\n return arguments.length\n ? ((this.schema.tableViewClassName = _), this)\n : this.schema.tableViewClassName;\n }\n\n /**\n An additional CSS class name (or space-separated list of class names) applied to the table-view toggle button, alongside the fixed `table-view-control`/`table-view-toggle` classes. Setting this automatically disables d3plus's built-in inline `tableViewControlStyle`/`tableViewControlStyleActive`/`tableViewControlStyleHover` defaults (as long as you haven't already customized them yourself), so a host page's own button styling applies through the cascade with no other configuration needed.\n*/\n tableViewControlClassName(_?: string): this | string {\n return arguments.length\n ? ((this.schema.tableViewControlClassName = _), this)\n : this.schema.tableViewControlClassName;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the table-view toggle button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.tableViewControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n tableViewControlStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.tableViewControlStyle = _), this)\n : this.schema.tableViewControlStyle;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the table-view toggle button while it is active (showing the data table). Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.tableViewControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n tableViewControlStyleActive(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.tableViewControlStyleActive = _), this)\n : this.schema.tableViewControlStyleActive;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the table-view toggle button on hover. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.tableViewControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n tableViewControlStyleHover(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.tableViewControlStyleHover = _), this)\n : this.schema.tableViewControlStyleHover;\n }\n\n /**\n The number of data-table rows shown per page while in table view. Set to `false` (or any non-positive number) to disable pagination and show every row on one page.\n*/\n tableViewPageSize(_?: number | false): this | number | false {\n return arguments.length\n ? ((this.schema.tableViewPageSize = _), this)\n : this.schema.tableViewPageSize;\n }\n\n}\n"],"names":["select","unique","assign","date","accessor","constant","validateShapeConfig","VizBaseConfig","VizBase","loadingHTML","_","arguments","length","schema","loadingMessage","messageMask","messageStyle","minimapClassName","minimapLabelStyle","minimapStyle","minimapViewportStyle","minimapViewportStyleActive","noDataHTML","noDataMessage","scrollContainer","searchAccessor","searchControlClassName","searchControlStyle","searchControlStyleActive","searchControlStyleHover","_select","shape","shapeConfig","name","sizeLegend","sizeLegendConfig","sizeLegendPosition","subtitle","subtitleConfig","subtitlePadding","threshold","isFinite","isNaN","thresholdKey","key","thresholdName","time","aggs","a","c","v","map","_userTime","JSON","stringify","timeFilter","_timelineSelection","undefined","timelineConfig","timelineDefault","Array","d","filter","timelinePadding","title","titleConfig","titlePadding","tooltip","tooltipConfig","total","totalConfig","totalFormat","totalPadding","zoomBrushHandleSize","zoomBrushHandleStyle","zoomBrushSelectionStyle","zoomControlClassName","zoomControlIcons","zoomControlStyle","zoomControlStyleActive","zoomControlStyleHover","zoomPadding","tableViewClassName","tableViewControlClassName","tableViewControlStyle","tableViewControlStyleActive","tableViewControlStyleHover","tableViewPageSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,MAAM,QAAO,eAAe;AAEpC,SAAQC,MAAM,QAAO,eAAe;AACpC,SAAQC,MAAM,EAAEC,IAAI,QAAO,cAAc;AAGzC,SAAQC,QAAQ,EAAEC,QAAQ,QAAO,uBAAuB;AAIxD,OAAOC,yBAAyB,sCAAsC;AACtE,OAAOC,mBAAmB,qBAAqB;AAUhC,IAAA,AAAMC,wBAAN;;cAAMA;aAAAA;gCAAAA;QAAN,OAAA,kBAAMA;;kBAAAA;;YAEnB;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,YACEC,CAAuC;gBAEvC,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACJ,WAAW,GAAG,OAAOC,MAAM,aAAaA,IAAIL,SAASK,IAAK,IAAI,AAAD,IAC3E,IAAI,CAACG,MAAM,CAACJ,WAAW;YAC7B;;;YAEA;;AAEF,GACEK,KAAAA;mBAAAA,SAAAA,eAAeJ,CAAW;gBACxB,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACC,cAAc,GAAGJ,GAAI,IAAI,AAAD,IACtC,IAAI,CAACG,MAAM,CAACC,cAAc;YAChC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,YAAYL,CAAoB;gBAC9B,OAAOC,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACC,MAAM,CAACE,WAAW,GAAGL,GAAI,IAAI,AAAD,IACnC,IAAI,CAACG,MAAM,CAACE,WAAW;YAC7B;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,aAAaN,CAA2B;gBACtC,OAAOC,UAAUC,MAAM,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izBaseConfig = /*#__PURE__*/ function(BaseClass) {
|
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
/**
|
|
131
|
+
Overrides the "ⓘ" icon a long attribution collapses to (see `attribution`), which otherwise renders as an inline SVG. Accepts an HTML string — used as the toggle button's content — or a mount function, `(el: HTMLElement) => void | (() => void)`, called once with the button's reserved icon slot so a live component (a React tree via `createRoot(el).render(...)`, or anything else imperative) can be mounted into it. A returned cleanup function runs right before that slot is discarded, which happens whenever the credit's markup regenerates (its text or theme changes), not just once per chart.
|
|
132
|
+
*/ key: "attributionIcon",
|
|
133
|
+
value: function attributionIcon(_) {
|
|
134
|
+
return arguments.length ? (this.schema.attributionIcon = _, this) : this.schema.attributionIcon;
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
/**
|
|
131
139
|
Configuration object for the attribution style.
|
|
132
140
|
*/ key: "attributionStyle",
|
|
133
141
|
value: function attributionStyle(_) {
|
|
@@ -136,7 +144,11 @@ var VizBaseConfig = /*#__PURE__*/ function(BaseClass) {
|
|
|
136
144
|
},
|
|
137
145
|
{
|
|
138
146
|
/**
|
|
139
|
-
Configuration object for the back button.
|
|
147
|
+
Configuration object for the back button. Superseded by
|
|
148
|
+
`.backControlStyle()`/`.backControlClassName()` for the button's
|
|
149
|
+
appearance (it renders as a real `<button>`, like the zoom/search
|
|
150
|
+
controls, not a configurable text node) — kept for backwards
|
|
151
|
+
compatibility, but no longer affects how the button looks.
|
|
140
152
|
*/ key: "backConfig",
|
|
141
153
|
value: function backConfig(_) {
|
|
142
154
|
return arguments.length ? (this.schema.backConfig = assign(this.schema.backConfig, _), this) : this.schema.backConfig;
|
|
@@ -144,6 +156,22 @@ var VizBaseConfig = /*#__PURE__*/ function(BaseClass) {
|
|
|
144
156
|
},
|
|
145
157
|
{
|
|
146
158
|
/**
|
|
159
|
+
An additional CSS class name (or space-separated list of class names) applied to the back button, alongside its fixed `back-control` class. Setting this automatically disables d3plus's built-in inline `backControlStyle` default (as long as you haven't already customized it yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.
|
|
160
|
+
*/ key: "backControlClassName",
|
|
161
|
+
value: function backControlClassName(_) {
|
|
162
|
+
return arguments.length ? (this.schema.backControlClassName = _, this) : this.schema.backControlClassName;
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
/**
|
|
167
|
+
An object containing CSS key/value pairs that is used to style the back button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.backControlClassName(...)` is set, unless you've explicitly customized this yourself.
|
|
168
|
+
*/ key: "backControlStyle",
|
|
169
|
+
value: function backControlStyle(_) {
|
|
170
|
+
return arguments.length ? (this.schema.backControlStyle = _, this) : this.schema.backControlStyle;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
/**
|
|
147
175
|
Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.
|
|
148
176
|
*/ key: "color",
|
|
149
177
|
value: function color(_) {
|
|
@@ -244,7 +272,7 @@ Defaults to an empty array (`[]`).
|
|
|
244
272
|
},
|
|
245
273
|
{
|
|
246
274
|
/**
|
|
247
|
-
The interval, in milliseconds, for checking if the visualization is visible on the page.
|
|
275
|
+
The interval, in milliseconds, for checking if the visualization is visible on the page. When `detectVisible` defers a render until the visualization scrolls into view, this is also how long it must stay in view before it renders, so visualizations scrolled past quickly are never drawn.
|
|
248
276
|
*/ key: "detectVisibleInterval",
|
|
249
277
|
value: function detectVisibleInterval(_) {
|
|
250
278
|
return arguments.length ? (this.schema.detectVisibleInterval = _, this) : this.schema.detectVisibleInterval;
|
|
@@ -252,6 +280,14 @@ Defaults to an empty array (`[]`).
|
|
|
252
280
|
},
|
|
253
281
|
{
|
|
254
282
|
/**
|
|
283
|
+
When `true` (the default) and `detectVisible` is enabled, the Viz releases its DOM and scene while it is scrolled out of view and redraws when it returns, keeping the page light when there are many visualizations. Data and configuration are retained; interaction state such as zoom or selection is not, so set this to `false` to keep it. With `detectVisible` enabled, each chart's `<svg>` is also given `content-visibility: auto`, so the browser skips rendering its contents while it is far off-screen (this matters most when this is `false` and charts are kept). For a larger saving you can also apply `content-visibility: auto` and a `contain-intrinsic-size` to the container element yourself; that adds paint containment to an element you own, so it is not done automatically. Requires `IntersectionObserver`.
|
|
284
|
+
*/ key: "detectVisibleUnload",
|
|
285
|
+
value: function detectVisibleUnload(_) {
|
|
286
|
+
return arguments.length ? (this.schema.detectVisibleUnload = _, this) : this.schema.detectVisibleUnload;
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
/**
|
|
255
291
|
Shows a button that allows for downloading the current visualization.
|
|
256
292
|
*/ key: "downloadButton",
|
|
257
293
|
value: function downloadButton(_) {
|
|
@@ -436,7 +472,9 @@ Defaults to an empty array (`[]`).
|
|
|
436
472
|
},
|
|
437
473
|
{
|
|
438
474
|
/**
|
|
439
|
-
Accessor function or
|
|
475
|
+
Accessor function, or a constant string applied to every data point's
|
|
476
|
+
label (unlike `value`/`nodeId`/etc., a string here is not treated as a
|
|
477
|
+
per-datum object key — pass a function for that).
|
|
440
478
|
*/ key: "label",
|
|
441
479
|
value: function label(_) {
|
|
442
480
|
return arguments.length ? (this.schema.label = typeof _ === "function" ? _ : constant(_), this) : this.schema.label;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/charts/viz/VizBaseConfig.ts"],"sourcesContent":["import {merge as arrayMerge} from \"d3-array\";\n\nimport {addToQueue, unique} from \"@d3plus/data\";\nimport {assign} from \"@d3plus/dom\";\nimport {fontFamilyStringify} from \"@d3plus/text\";\nimport type {DataPoint} from \"@d3plus/data\";\n\nimport {accessor, BaseClass, constant} from \"../../utils/index.js\";\nimport type VizBase from \"./VizBase.js\";\n\n/**\n First half of the fluent config accessors shared by every Viz chart\n (`active` through `legendTooltip`). Split from `VizBase` purely so each\n file stays under the `max-lines` budget; the methods remain real prototype\n methods, so `BaseClass.config()` reflection and polymorphic `this` chaining\n are unchanged.\n*/\nexport default class VizBaseConfig extends BaseClass {\n // installFluent generates the config accessors (data, sum, x, …) and the\n // pipeline stamps derived `_`-prefixed state at runtime; the index signature\n // lets the chart code reach both through the type (same rationale as the\n // shape/component classes).\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n\n /**\n The active callback function for highlighting shapes.\n*/\n active(\n _?: ((d: DataPoint, i: number) => boolean) | false,\n ): this | ((d: DataPoint, i: number) => boolean) | false {\n this._active = _;\n\n if (this.schema.shapeConfig.activeOpacity !== 1) {\n this._shapes.forEach((s: {active: (...args: unknown[]) => unknown}) => s.active(_));\n if (this.schema.legend) this._legendClass.active(_);\n // See hover(): scene-rendered charts dim via the scene's\n // interaction-opacity pass, so repaint to apply/clear active state.\n if (this._sceneRenderer) this._scheduleSceneRepaint();\n }\n\n return this;\n }\n\n /**\n Custom aggregation methods for each data key.\n*/\n aggs(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.aggs = assign(this.schema.aggs, _!)), this)\n : this.schema.aggs;\n }\n\n /**\n Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).\n*/\n attribution(_?: string | boolean): this | string | boolean {\n return arguments.length\n ? ((this.schema.attribution = _), this)\n : this.schema.attribution;\n }\n\n /**\n Configuration object for the attribution style.\n*/\n attributionStyle(\n _?: Record<string, unknown>,\n ): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.attributionStyle = assign(this.schema.attributionStyle, _!)), this)\n : this.schema.attributionStyle;\n }\n\n /**\n Configuration object for the back button.\n*/\n backConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.backConfig = assign(this.schema.backConfig, _!)), this)\n : this.schema.backConfig;\n }\n\n /**\n Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.\n*/\n color(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n return arguments.length\n ? ((this.schema.color = !_ || typeof _ === \"function\" ? _ : accessor(_)), this)\n : this.schema.color;\n }\n\n /**\n 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.\n*/\n colorScale(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n return arguments.length\n ? ((this.schema.colorScale = !_ || typeof _ === \"function\" ? _ : accessor(_)),\n this)\n : this.schema.colorScale;\n }\n\n /**\n A pass-through to the config method of ColorScale.\n*/\n colorScaleConfig(\n _?: Record<string, unknown>,\n ): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.colorScaleConfig = assign(this.schema.colorScaleConfig, _!)), this)\n : this.schema.colorScaleConfig;\n }\n\n /**\n Tells the colorScale whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the colorScale appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n colorScalePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.colorScalePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.colorScalePadding;\n }\n\n /**\n Defines which side of the visualization to anchor the color scale. Acceptable values are `\"top\"`, `\"bottom\"`, `\"left\"`, `\"right\"`, and `false`. A `false` value will cause the color scale to not be displayed, but will still color shapes based on the scale.\n*/\n colorScalePosition(\n _?: string | boolean | (() => string | boolean),\n ): this | string | boolean | (() => string | boolean) {\n return arguments.length\n ? ((this.schema.colorScalePosition = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.colorScalePosition;\n }\n\n /**\n The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.\n*/\n colorScaleMaxSize(_?: number): this | number {\n return arguments.length\n ? ((this.schema.colorScaleMaxSize = _), this)\n : this.schema.colorScaleMaxSize;\n }\n\n /**\n The primary data array used to draw the visualization. The value passed should be an *Array* of objects or a *String* representing a filepath or URL to be loaded. The following filetypes are supported: `csv`, `tsv`, `txt`, and `json`.\n\nIf your data URL needs specific headers to be set, an Object with \"url\" and \"headers\" keys may also be passed.\n\nAdditionally, a custom formatting function can be passed as a second argument to this method. This custom function will be passed the data that has been loaded, as long as there are no errors. This function should return the final array of obejcts to be used as the primary data array. For example, some JSON APIs return the headers split from the data values to save bandwidth. These would need be joined using a custom formatter.\n\nIf you would like to specify certain configuration options based on the yet-to-be-loaded data, you can also return a full `config` object from the data formatter (including the new `data` array as a key in the object).\n\nDefaults to an empty array (`[]`).\n @param f The data array or a URL string to load data from.\n */\n data(\n _?: DataPoint[] | string | {url: string; headers: Record<string, string>},\n f?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>,\n ): this | DataPoint[] {\n if (arguments.length) {\n addToQueue.bind(this as unknown as ThisParameterType<typeof addToQueue>)(\n _!,\n f,\n \"data\",\n );\n this._hidden = [];\n this._solo = [];\n if (\n this._userData &&\n JSON.stringify(_) !== JSON.stringify(this._userData)\n ) {\n this.schema.timeFilter = false;\n this._timelineSelection = false;\n }\n this._userData = _;\n return this;\n }\n return this._data;\n }\n\n /**\n If the width and/or height of a Viz is not user-defined, it is determined by the size of it's parent element. When this method is set to `true`, the Viz will listen for the `window.onresize` event and adjust it's dimensions accordingly.\n*/\n detectResize(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.detectResize = _), this)\n : this.schema.detectResize;\n }\n\n /**\n When resizing the browser window, this is the millisecond delay to trigger the resize event.\n*/\n detectResizeDelay(_?: number): this | number {\n return arguments.length\n ? ((this.schema.detectResizeDelay = _), this)\n : this.schema.detectResizeDelay;\n }\n\n /**\n Toggles whether or not the Viz should try to detect if it visible in the current viewport. When this method is set to `true`, the Viz will only be rendered when it has entered the viewport either through scrolling or if it's display or visibility is changed.\n*/\n detectVisible(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.detectVisible = _), this)\n : this.schema.detectVisible;\n }\n\n /**\n The interval, in milliseconds, for checking if the visualization is visible on the page.\n*/\n detectVisibleInterval(_?: number): this | number {\n return arguments.length\n ? ((this.schema.detectVisibleInterval = _), this)\n : this.schema.detectVisibleInterval;\n }\n\n /**\n Shows a button that allows for downloading the current visualization.\n*/\n downloadButton(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.downloadButton = _), this)\n : this.schema.downloadButton;\n }\n\n /**\n Sets specific options of the saveElement function used when downloading the visualization.\n*/\n downloadConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.downloadConfig = assign(this.schema.downloadConfig, _!)), this)\n : this.schema.downloadConfig;\n }\n\n /**\n Defines which control group to add the download button into.\n*/\n downloadPosition(_?: string): this | string {\n return arguments.length\n ? ((this.schema.downloadPosition = _), this)\n : this.schema.downloadPosition;\n }\n\n /**\n The font family used throughout the visualization.\n*/\n fontFamily(_?: string | string[]): this | string | string[] {\n if (arguments.length) {\n const labelConfig = {fontFamily: _};\n\n const axisConfig = {titleConfig: labelConfig, shapeConfig: {labelConfig}};\n\n this.shapeConfig({labelConfig});\n this.colorScaleConfig({axisConfig});\n\n [\"axis\", \"column\", \"row\", \"timeline\", \"x\", \"y\", \"x2\", \"y2\"].forEach(\n (axis: string) => {\n const method = `${axis}Config`;\n if (this[method]) this[method](axisConfig);\n },\n );\n [\"back\", \"title\", \"total\", \"subtitle\"].forEach((label: string) => {\n const method = `${label}Config`;\n if (this[method]) this[method](labelConfig);\n });\n\n this.tooltipConfig({\n tooltipStyle: {\"font-family\": fontFamilyStringify(_!)},\n });\n\n this.schema.fontFamily = _;\n return this;\n }\n return this.schema.fontFamily;\n }\n\n /**\n Defines the mapping between data and shape. The value can be a String matching a key in each data point (default is \"id\"), or an accessor Function that returns a unique value for each data point. Additionally, an Array of these values may be provided if the visualization supports nested hierarchies.\n*/\n groupBy(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | (string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]))[],\n ): this | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])[] {\n if (!arguments.length) return this.schema.groupBy;\n this._groupByRaw = _;\n const arr: (string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]))[] =\n _ instanceof Array ? _ : [_!];\n return (\n (this.schema.groupBy = arr.map(\n (\n k: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]),\n ) => {\n if (typeof k === \"function\") return k;\n else {\n if (!this.schema.aggs[k]) {\n this.schema.aggs[k] = (\n a: DataPoint[],\n c: (d: DataPoint) => DataPoint[keyof DataPoint],\n ) => {\n const v = unique(a.map(c));\n return v.length === 1 ? v[0] : v;\n };\n }\n return accessor(k);\n }\n },\n )),\n this\n );\n }\n\n /**\n Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).\n*/\n hiddenColor(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.hiddenColor = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.hiddenColor;\n }\n\n /**\n Defines the opacity used for legend labels when the corresponding grouping is hidden from display (by clicking on the legend).\n*/\n hiddenOpacity(\n _?: number | ((d: DataPoint, i: number) => number),\n ): this | number | ((d: DataPoint, i: number) => number) {\n return arguments.length\n ? ((this.schema.hiddenOpacity = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.hiddenOpacity;\n }\n\n /**\n The hover callback function for highlighting shapes on mouseover.\n*/\n hover(_?: ((d: DataPoint, i: number) => boolean) | false): this {\n let hoverFunction = (this._hover = _);\n\n if (this.schema.shapeConfig.hoverOpacity !== 1 && _ !== undefined) {\n if (typeof _ === \"function\") {\n let shapeData = arrayMerge(\n this._shapes.map((s: {data: () => DataPoint[]}) => s.data()),\n );\n shapeData = shapeData.concat(this._legendClass.data());\n const activeData = _ ? (shapeData as DataPoint[]).filter(_ as (d: DataPoint) => boolean) : [];\n\n // Build a Set<string> of activeIds for O(1) membership lookup.\n // Previously `activeIds.filter((id, i) => activeIds.indexOf(id) === i)`\n // was O(N²) dedup, and the hover predicate did `activeIds.includes(...)`\n // — also O(N) per datum per repaint. With ~5k segments, hover\n // dispatch was ~250 ms on a 2023 laptop; Set drops it to <5 ms.\n const activeIds = new Set<string>();\n (activeData.map(this._ids) as string[][]).forEach((ids: string[]) => {\n for (let x = 1; x <= ids.length; x++) {\n activeIds.add(JSON.stringify(ids.slice(0, x)));\n }\n });\n\n if (activeIds.size)\n hoverFunction = (d: DataPoint, i: number) =>\n activeIds.has(JSON.stringify(this._ids(d, i)));\n }\n\n this._shapes.forEach((s: {hover: (...args: unknown[]) => unknown}) => s.hover(hoverFunction));\n if (this.schema.legend) this._legendClass.hover(hoverFunction);\n }\n\n // Scene-rendered charts emit into `_chartScene` (not `_shapes`), so the\n // forEach above is a no-op for them. Repaint so the scene's\n // interaction-opacity pass re-reads `_hover` and dims the non-matching\n // nodes (or restores them when `_` is `false`). Also repaint for a\n // colorScale-bucket hover even when per-shape dimming is off\n // (`hoverOpacity: 1`, e.g. Geomap): the bucket highlight is applied by that\n // same pass, so without a repaint the map would never re-compose. Coalesced\n // to one paint per frame so a fast pointer sweep doesn't saturate the main\n // thread.\n if (\n this._sceneRenderer &&\n _ !== undefined &&\n (this.schema.shapeConfig.hoverOpacity !== 1 || this._hoverBucket)\n )\n this._scheduleSceneRepaint();\n\n return this;\n }\n\n /**\n Persistently emphasizes the data points matching the given predicate: the\n matching marks keep their color while every other mark is de-emphasized to\n a neutral gray (the \"emphasis\" form — highlight one series, gray the rest).\n Unlike `hover`/`active` (transient, opacity-based), `highlight` is a\n standing state that survives pointer movement. Pass `false` to clear it.\n*/\n highlight(\n _?: ((d: DataPoint, i: number) => boolean) | false,\n ): this | ((d: DataPoint, i: number) => boolean) | false | undefined {\n if (!arguments.length) return this._highlight;\n this._highlight = _;\n // Scene-rendered charts express de-emphasis via the scene's\n // interaction-opacity pass, so repaint to apply/clear the gray treatment.\n if (this._sceneRenderer) this._scheduleSceneRepaint();\n return this;\n }\n\n /**\n Accessor function or string key for the label of each data point.\n*/\n label(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.label = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.label;\n }\n\n /**\n Whether to display the legend.\n*/\n legend(\n _?:\n | boolean\n | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean),\n ):\n | this\n | boolean\n | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean) {\n return arguments.length\n ? ((this.schema.legend = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.legend;\n }\n\n /**\n Configuration object passed to the legend's config method.\n*/\n legendConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.legendConfig = assign(this.schema.legendConfig, _!)), this)\n : this.schema.legendConfig;\n }\n\n /**\n Defines the click functionality of categorical legend squares. When set to false, clicking will hide that category and shift+clicking will solo that category. When set to true, clicking with solo that category and shift+clicking will hide that category.\n*/\n legendFilterInvert(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.legendFilterInvert = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.legendFilterInvert;\n }\n\n /**\n Tells the legend whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the legend appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n legendPadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.legendPadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.legendPadding;\n }\n\n /**\n Defines which side of the visualization to anchor the legend. Expected values are `\"top\"`, `\"bottom\"`, `\"left\"`, and `\"right\"`.\n*/\n legendPosition(_?: string | (() => string)): this | string | (() => string) {\n return arguments.length\n ? ((this.schema.legendPosition = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.legendPosition;\n }\n\n /**\n Configuration object for the legend tooltip.\n*/\n legendTooltip(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.legendTooltip = assign(this.schema.legendTooltip, _!)), this)\n : this.schema.legendTooltip;\n }\n}\n"],"names":["merge","arrayMerge","addToQueue","unique","assign","fontFamilyStringify","accessor","BaseClass","constant","VizBaseConfig","active","_","_active","schema","shapeConfig","activeOpacity","_shapes","forEach","s","legend","_legendClass","_sceneRenderer","_scheduleSceneRepaint","aggs","arguments","length","attribution","attributionStyle","backConfig","color","colorScale","colorScaleConfig","colorScalePadding","colorScalePosition","colorScaleMaxSize","data","f","bind","_hidden","_solo","_userData","JSON","stringify","timeFilter","_timelineSelection","_data","detectResize","detectResizeDelay","detectVisible","detectVisibleInterval","downloadButton","downloadConfig","downloadPosition","fontFamily","labelConfig","axisConfig","titleConfig","axis","method","label","tooltipConfig","tooltipStyle","groupBy","_groupByRaw","arr","Array","map","k","a","c","v","hiddenColor","hiddenOpacity","hover","hoverFunction","_hover","hoverOpacity","undefined","shapeData","concat","activeData","filter","activeIds","Set","_ids","ids","x","add","slice","size","d","i","has","_hoverBucket","highlight","_highlight","legendConfig","legendFilterInvert","legendPadding","legendPosition","legendTooltip"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,SAASC,UAAU,QAAO,WAAW;AAE7C,SAAQC,UA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F,CAAyC;gBAEzC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAACoF,kBAAkB,GAAG,OAAOtF,MAAM,aAAaA,IAAIH,SAASG,IAC1E,IAAI,AAAD,IACH,IAAI,CAACE,MAAM,CAACoF,kBAAkB;YACpC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,cACEvF,CAAyC;gBAEzC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAACqF,aAAa,GAAG,OAAOvF,MAAM,aAAaA,IAAIH,SAASG,IACrE,IAAI,AAAD,IACH,IAAI,CAACE,MAAM,CAACqF,aAAa;YAC/B;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,eAAexF,CAA2B;gBACxC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAACsF,cAAc,GAAG,OAAOxF,MAAM,aAAaA,IAAIH,SAASG,IACtE,IAAI,AAAD,IACH,IAAI,CAACE,MAAM,CAACsF,cAAc;YAChC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,cAAczF,CAA2B;gBACvC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAACuF,aAAa,GAAGhG,OAAO,IAAI,CAACS,MAAM,CAACuF,aAAa,EAAEzF,IAAM,IAAI,AAAD,IACzE,IAAI,CAACE,MAAM,CAACuF,aAAa;YAC/B;;;WAxemB3F;EAAsBF;AAP3C;;;;;;AAMA,GACA,SAAqBE,2BAyepB"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/charts/viz/VizBaseConfig.ts"],"sourcesContent":["import {merge as arrayMerge} from \"d3-array\";\n\nimport {addToQueue, unique} from \"@d3plus/data\";\nimport {assign} from \"@d3plus/dom\";\nimport {fontFamilyStringify} from \"@d3plus/text\";\nimport type {DataPoint} from \"@d3plus/data\";\n\nimport {accessor, BaseClass, constant} from \"../../utils/index.js\";\nimport type VizBase from \"./VizBase.js\";\n\n/**\n First half of the fluent config accessors shared by every Viz chart\n (`active` through `legendTooltip`). Split from `VizBase` purely so each\n file stays under the `max-lines` budget; the methods remain real prototype\n methods, so `BaseClass.config()` reflection and polymorphic `this` chaining\n are unchanged.\n*/\nexport default class VizBaseConfig extends BaseClass {\n // installFluent generates the config accessors (data, sum, x, …) and the\n // pipeline stamps derived `_`-prefixed state at runtime; the index signature\n // lets the chart code reach both through the type (same rationale as the\n // shape/component classes).\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n\n /**\n The active callback function for highlighting shapes.\n*/\n active(\n _?: ((d: DataPoint, i: number) => boolean) | false,\n ): this | ((d: DataPoint, i: number) => boolean) | false {\n this._active = _;\n\n if (this.schema.shapeConfig.activeOpacity !== 1) {\n this._shapes.forEach((s: {active: (...args: unknown[]) => unknown}) => s.active(_));\n if (this.schema.legend) this._legendClass.active(_);\n // See hover(): scene-rendered charts dim via the scene's\n // interaction-opacity pass, so repaint to apply/clear active state.\n if (this._sceneRenderer) this._scheduleSceneRepaint();\n }\n\n return this;\n }\n\n /**\n Custom aggregation methods for each data key.\n*/\n aggs(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.aggs = assign(this.schema.aggs, _!)), this)\n : this.schema.aggs;\n }\n\n /**\n Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).\n*/\n attribution(_?: string | boolean): this | string | boolean {\n return arguments.length\n ? ((this.schema.attribution = _), this)\n : this.schema.attribution;\n }\n\n /**\n Overrides the \"ⓘ\" icon a long attribution collapses to (see `attribution`), which otherwise renders as an inline SVG. Accepts an HTML string — used as the toggle button's content — or a mount function, `(el: HTMLElement) => void | (() => void)`, called once with the button's reserved icon slot so a live component (a React tree via `createRoot(el).render(...)`, or anything else imperative) can be mounted into it. A returned cleanup function runs right before that slot is discarded, which happens whenever the credit's markup regenerates (its text or theme changes), not just once per chart.\n*/\n attributionIcon(\n _?: string | ((el: HTMLElement) => void | (() => void)),\n ): this | string | ((el: HTMLElement) => void | (() => void)) | undefined {\n return arguments.length\n ? ((this.schema.attributionIcon = _), this)\n : (this.schema.attributionIcon as\n | string\n | ((el: HTMLElement) => void | (() => void))\n | undefined);\n }\n\n /**\n Configuration object for the attribution style.\n*/\n attributionStyle(\n _?: Record<string, unknown>,\n ): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.attributionStyle = assign(this.schema.attributionStyle, _!)), this)\n : this.schema.attributionStyle;\n }\n\n /**\n Configuration object for the back button. Superseded by\n `.backControlStyle()`/`.backControlClassName()` for the button's\n appearance (it renders as a real `<button>`, like the zoom/search\n controls, not a configurable text node) — kept for backwards\n compatibility, but no longer affects how the button looks.\n*/\n backConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.backConfig = assign(this.schema.backConfig, _!)), this)\n : this.schema.backConfig;\n }\n\n /**\n An additional CSS class name (or space-separated list of class names) applied to the back button, alongside its fixed `back-control` class. Setting this automatically disables d3plus's built-in inline `backControlStyle` default (as long as you haven't already customized it yourself), so a host page's own button styling — Tailwind, Bootstrap, a design system — applies through the cascade with no other configuration needed.\n*/\n backControlClassName(_?: string): this | string {\n return arguments.length\n ? ((this.schema.backControlClassName = _), this)\n : this.schema.backControlClassName;\n }\n\n /**\n An object containing CSS key/value pairs that is used to style the back button. Passing `false` will remove all default styling. Automatically skipped (as if `false`) once `.backControlClassName(...)` is set, unless you've explicitly customized this yourself.\n*/\n backControlStyle(\n _?: Record<string, unknown> | false,\n ): this | Record<string, unknown> | false {\n return arguments.length\n ? ((this.schema.backControlStyle = _), this)\n : this.schema.backControlStyle;\n }\n\n /**\n Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.\n*/\n color(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n return arguments.length\n ? ((this.schema.color = !_ || typeof _ === \"function\" ? _ : accessor(_)), this)\n : this.schema.color;\n }\n\n /**\n 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.\n*/\n colorScale(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false,\n ):\n | this\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | false {\n return arguments.length\n ? ((this.schema.colorScale = !_ || typeof _ === \"function\" ? _ : accessor(_)),\n this)\n : this.schema.colorScale;\n }\n\n /**\n A pass-through to the config method of ColorScale.\n*/\n colorScaleConfig(\n _?: Record<string, unknown>,\n ): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.colorScaleConfig = assign(this.schema.colorScaleConfig, _!)), this)\n : this.schema.colorScaleConfig;\n }\n\n /**\n Tells the colorScale whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the colorScale appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n colorScalePadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.colorScalePadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.colorScalePadding;\n }\n\n /**\n Defines which side of the visualization to anchor the color scale. Acceptable values are `\"top\"`, `\"bottom\"`, `\"left\"`, `\"right\"`, and `false`. A `false` value will cause the color scale to not be displayed, but will still color shapes based on the scale.\n*/\n colorScalePosition(\n _?: string | boolean | (() => string | boolean),\n ): this | string | boolean | (() => string | boolean) {\n return arguments.length\n ? ((this.schema.colorScalePosition = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.colorScalePosition;\n }\n\n /**\n The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.\n*/\n colorScaleMaxSize(_?: number): this | number {\n return arguments.length\n ? ((this.schema.colorScaleMaxSize = _), this)\n : this.schema.colorScaleMaxSize;\n }\n\n /**\n The primary data array used to draw the visualization. The value passed should be an *Array* of objects or a *String* representing a filepath or URL to be loaded. The following filetypes are supported: `csv`, `tsv`, `txt`, and `json`.\n\nIf your data URL needs specific headers to be set, an Object with \"url\" and \"headers\" keys may also be passed.\n\nAdditionally, a custom formatting function can be passed as a second argument to this method. This custom function will be passed the data that has been loaded, as long as there are no errors. This function should return the final array of obejcts to be used as the primary data array. For example, some JSON APIs return the headers split from the data values to save bandwidth. These would need be joined using a custom formatter.\n\nIf you would like to specify certain configuration options based on the yet-to-be-loaded data, you can also return a full `config` object from the data formatter (including the new `data` array as a key in the object).\n\nDefaults to an empty array (`[]`).\n @param f The data array or a URL string to load data from.\n */\n data(\n _?: DataPoint[] | string | {url: string; headers: Record<string, string>},\n f?: (data: DataPoint[]) => DataPoint[] | Record<string, unknown>,\n ): this | DataPoint[] {\n if (arguments.length) {\n addToQueue.bind(this as unknown as ThisParameterType<typeof addToQueue>)(\n _!,\n f,\n \"data\",\n );\n this._hidden = [];\n this._solo = [];\n if (\n this._userData &&\n JSON.stringify(_) !== JSON.stringify(this._userData)\n ) {\n this.schema.timeFilter = false;\n this._timelineSelection = false;\n }\n this._userData = _;\n return this;\n }\n return this._data;\n }\n\n /**\n If the width and/or height of a Viz is not user-defined, it is determined by the size of it's parent element. When this method is set to `true`, the Viz will listen for the `window.onresize` event and adjust it's dimensions accordingly.\n*/\n detectResize(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.detectResize = _), this)\n : this.schema.detectResize;\n }\n\n /**\n When resizing the browser window, this is the millisecond delay to trigger the resize event.\n*/\n detectResizeDelay(_?: number): this | number {\n return arguments.length\n ? ((this.schema.detectResizeDelay = _), this)\n : this.schema.detectResizeDelay;\n }\n\n /**\n Toggles whether or not the Viz should try to detect if it visible in the current viewport. When this method is set to `true`, the Viz will only be rendered when it has entered the viewport either through scrolling or if it's display or visibility is changed.\n*/\n detectVisible(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.detectVisible = _), this)\n : this.schema.detectVisible;\n }\n\n /**\n The interval, in milliseconds, for checking if the visualization is visible on the page. When `detectVisible` defers a render until the visualization scrolls into view, this is also how long it must stay in view before it renders, so visualizations scrolled past quickly are never drawn.\n*/\n detectVisibleInterval(_?: number): this | number {\n return arguments.length\n ? ((this.schema.detectVisibleInterval = _), this)\n : this.schema.detectVisibleInterval;\n }\n\n /**\n When `true` (the default) and `detectVisible` is enabled, the Viz releases its DOM and scene while it is scrolled out of view and redraws when it returns, keeping the page light when there are many visualizations. Data and configuration are retained; interaction state such as zoom or selection is not, so set this to `false` to keep it. With `detectVisible` enabled, each chart's `<svg>` is also given `content-visibility: auto`, so the browser skips rendering its contents while it is far off-screen (this matters most when this is `false` and charts are kept). For a larger saving you can also apply `content-visibility: auto` and a `contain-intrinsic-size` to the container element yourself; that adds paint containment to an element you own, so it is not done automatically. Requires `IntersectionObserver`.\n*/\n detectVisibleUnload(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.detectVisibleUnload = _), this)\n : this.schema.detectVisibleUnload;\n }\n\n /**\n Shows a button that allows for downloading the current visualization.\n*/\n downloadButton(_?: boolean): this | boolean {\n return arguments.length\n ? ((this.schema.downloadButton = _), this)\n : this.schema.downloadButton;\n }\n\n /**\n Sets specific options of the saveElement function used when downloading the visualization.\n*/\n downloadConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.downloadConfig = assign(this.schema.downloadConfig, _!)), this)\n : this.schema.downloadConfig;\n }\n\n /**\n Defines which control group to add the download button into.\n*/\n downloadPosition(_?: string): this | string {\n return arguments.length\n ? ((this.schema.downloadPosition = _), this)\n : this.schema.downloadPosition;\n }\n\n /**\n The font family used throughout the visualization.\n*/\n fontFamily(_?: string | string[]): this | string | string[] {\n if (arguments.length) {\n const labelConfig = {fontFamily: _};\n\n const axisConfig = {titleConfig: labelConfig, shapeConfig: {labelConfig}};\n\n this.shapeConfig({labelConfig});\n this.colorScaleConfig({axisConfig});\n\n [\"axis\", \"column\", \"row\", \"timeline\", \"x\", \"y\", \"x2\", \"y2\"].forEach(\n (axis: string) => {\n const method = `${axis}Config`;\n if (this[method]) this[method](axisConfig);\n },\n );\n [\"back\", \"title\", \"total\", \"subtitle\"].forEach((label: string) => {\n const method = `${label}Config`;\n if (this[method]) this[method](labelConfig);\n });\n\n this.tooltipConfig({\n tooltipStyle: {\"font-family\": fontFamilyStringify(_!)},\n });\n\n this.schema.fontFamily = _;\n return this;\n }\n return this.schema.fontFamily;\n }\n\n /**\n Defines the mapping between data and shape. The value can be a String matching a key in each data point (default is \"id\"), or an accessor Function that returns a unique value for each data point. Additionally, an Array of these values may be provided if the visualization supports nested hierarchies.\n*/\n groupBy(\n _?:\n | string\n | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])\n | (string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]))[],\n ): this | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint])[] {\n if (!arguments.length) return this.schema.groupBy;\n this._groupByRaw = _;\n const arr: (string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]))[] =\n _ instanceof Array ? _ : [_!];\n return (\n (this.schema.groupBy = arr.map(\n (\n k: string | ((d: DataPoint, i: number) => DataPoint[keyof DataPoint]),\n ) => {\n if (typeof k === \"function\") return k;\n else {\n if (!this.schema.aggs[k]) {\n this.schema.aggs[k] = (\n a: DataPoint[],\n c: (d: DataPoint) => DataPoint[keyof DataPoint],\n ) => {\n const v = unique(a.map(c));\n return v.length === 1 ? v[0] : v;\n };\n }\n return accessor(k);\n }\n },\n )),\n this\n );\n }\n\n /**\n Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).\n*/\n hiddenColor(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.hiddenColor = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.hiddenColor;\n }\n\n /**\n Defines the opacity used for legend labels when the corresponding grouping is hidden from display (by clicking on the legend).\n*/\n hiddenOpacity(\n _?: number | ((d: DataPoint, i: number) => number),\n ): this | number | ((d: DataPoint, i: number) => number) {\n return arguments.length\n ? ((this.schema.hiddenOpacity = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.hiddenOpacity;\n }\n\n /**\n The hover callback function for highlighting shapes on mouseover.\n*/\n hover(_?: ((d: DataPoint, i: number) => boolean) | false): this {\n let hoverFunction = (this._hover = _);\n\n if (this.schema.shapeConfig.hoverOpacity !== 1 && _ !== undefined) {\n if (typeof _ === \"function\") {\n let shapeData = arrayMerge(\n this._shapes.map((s: {data: () => DataPoint[]}) => s.data()),\n );\n shapeData = shapeData.concat(this._legendClass.data());\n const activeData = _ ? (shapeData as DataPoint[]).filter(_ as (d: DataPoint) => boolean) : [];\n\n // Build a Set<string> of activeIds for O(1) membership lookup.\n // Previously `activeIds.filter((id, i) => activeIds.indexOf(id) === i)`\n // was O(N²) dedup, and the hover predicate did `activeIds.includes(...)`\n // — also O(N) per datum per repaint. With ~5k segments, hover\n // dispatch was ~250 ms on a 2023 laptop; Set drops it to <5 ms.\n const activeIds = new Set<string>();\n (activeData.map(this._ids) as string[][]).forEach((ids: string[]) => {\n for (let x = 1; x <= ids.length; x++) {\n activeIds.add(JSON.stringify(ids.slice(0, x)));\n }\n });\n\n if (activeIds.size)\n hoverFunction = (d: DataPoint, i: number) =>\n activeIds.has(JSON.stringify(this._ids(d, i)));\n }\n\n this._shapes.forEach((s: {hover: (...args: unknown[]) => unknown}) => s.hover(hoverFunction));\n if (this.schema.legend) this._legendClass.hover(hoverFunction);\n }\n\n // Scene-rendered charts emit into `_chartScene` (not `_shapes`), so the\n // forEach above is a no-op for them. Repaint so the scene's\n // interaction-opacity pass re-reads `_hover` and dims the non-matching\n // nodes (or restores them when `_` is `false`). Also repaint for a\n // colorScale-bucket hover even when per-shape dimming is off\n // (`hoverOpacity: 1`, e.g. Geomap): the bucket highlight is applied by that\n // same pass, so without a repaint the map would never re-compose. Coalesced\n // to one paint per frame so a fast pointer sweep doesn't saturate the main\n // thread.\n if (\n this._sceneRenderer &&\n _ !== undefined &&\n (this.schema.shapeConfig.hoverOpacity !== 1 || this._hoverBucket)\n )\n this._scheduleSceneRepaint();\n\n return this;\n }\n\n /**\n Persistently emphasizes the data points matching the given predicate: the\n matching marks keep their color while every other mark is de-emphasized to\n a neutral gray (the \"emphasis\" form — highlight one series, gray the rest).\n Unlike `hover`/`active` (transient, opacity-based), `highlight` is a\n standing state that survives pointer movement. Pass `false` to clear it.\n*/\n highlight(\n _?: ((d: DataPoint, i: number) => boolean) | false,\n ): this | ((d: DataPoint, i: number) => boolean) | false | undefined {\n if (!arguments.length) return this._highlight;\n this._highlight = _;\n // Scene-rendered charts express de-emphasis via the scene's\n // interaction-opacity pass, so repaint to apply/clear the gray treatment.\n if (this._sceneRenderer) this._scheduleSceneRepaint();\n return this;\n }\n\n /**\n Accessor function, or a constant string applied to every data point's\n label (unlike `value`/`nodeId`/etc., a string here is not treated as a\n per-datum object key — pass a function for that).\n*/\n label(\n _?: string | ((d: DataPoint, i: number) => string),\n ): this | string | ((d: DataPoint, i: number) => string) {\n return arguments.length\n ? ((this.schema.label = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.label;\n }\n\n /**\n Whether to display the legend.\n*/\n legend(\n _?:\n | boolean\n | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean),\n ):\n | this\n | boolean\n | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean) {\n return arguments.length\n ? ((this.schema.legend = typeof _ === \"function\" ? _ : constant(_)), this)\n : this.schema.legend;\n }\n\n /**\n Configuration object passed to the legend's config method.\n*/\n legendConfig(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.legendConfig = assign(this.schema.legendConfig, _!)), this)\n : this.schema.legendConfig;\n }\n\n /**\n Defines the click functionality of categorical legend squares. When set to false, clicking will hide that category and shift+clicking will solo that category. When set to true, clicking with solo that category and shift+clicking will hide that category.\n*/\n legendFilterInvert(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.legendFilterInvert = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.legendFilterInvert;\n }\n\n /**\n Tells the legend whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the legend appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.\n*/\n legendPadding(\n _?: boolean | ((viz: VizBase) => boolean),\n ): this | boolean | ((viz: VizBase) => boolean) {\n return arguments.length\n ? ((this.schema.legendPadding = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.legendPadding;\n }\n\n /**\n Defines which side of the visualization to anchor the legend. Expected values are `\"top\"`, `\"bottom\"`, `\"left\"`, and `\"right\"`.\n*/\n legendPosition(_?: string | (() => string)): this | string | (() => string) {\n return arguments.length\n ? ((this.schema.legendPosition = typeof _ === \"function\" ? _ : constant(_)),\n this)\n : this.schema.legendPosition;\n }\n\n /**\n Configuration object for the legend tooltip.\n*/\n legendTooltip(_?: Record<string, unknown>): this | Record<string, unknown> {\n return arguments.length\n ? ((this.schema.legendTooltip = assign(this.schema.legendTooltip, _!)), this)\n : this.schema.legendTooltip;\n }\n}\n"],"names":["merge","arrayMerge","addToQueue","unique","assign","fontFamilyStringify","accessor","BaseClass","constant","VizBaseConfig","active","_","_active","schema","shapeConfig","activeOpacity","_shapes","forEach","s","legend","_legendClass","_sceneRenderer","_scheduleSceneRepaint","aggs","arguments","length","attribution","attributionIcon","attributionStyle","backConfig","backControlClassName","backControlStyle","color","colorScale","colorScaleConfig","colorScalePadding","colorScalePosition","colorScaleMaxSize","data","f","bind","_hidden","_solo","_userData","JSON","stringify","timeFilter","_timelineSelection","_data","detectResize","detectResizeDelay","detectVisible","detectVisibleInterval","detectVisibleUnload","downloadButton","downloadConfig","downloadPosition","fontFamily","labelConfig","axisConfig","titleConfig","axis","method","label","tooltipConfig","tooltipStyle","groupBy","_groupByRaw","arr","Array","map","k","a","c","v","hiddenColor","hiddenOpacity","hover","hoverFunction","_hover","hoverOpacity","undefined","shapeData","concat","activeData","filter","activeIds","Set","_ids","ids","x","add","slice","size","d","i","has","_hoverBucket","highlight","_highlight","legendConfig","legendFilterInvert","legendPadding","legendPosition","legendTooltip"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,SAASC,UAAU,QAAO,WAAW;AAE7C,SAAQC,UAAU,EAAEC,MAAM,QAAO,eAAe;AAChD,SAAQC,MAAM,QAAO,cAAc;AACnC,SAAQC,mBAAmB,QAAO,eAAe;AAGjD,SAAQC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,QAAO,uBAAuB;AAUpD,IAAA,AAAMC,8BAAN;;cAAMA;aAAAA;gCAAAA;QAAN,OAAA,kBAAMA;;kBAAAA;;YAQnB;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,OACEC,CAAkD;gBAElD,IAAI,CAACC,OAAO,GAAGD;gBAEf,IAAI,IAAI,CAACE,MAAM,CAACC,WAAW,CAACC,aAAa,KAAK,GAAG;oBAC/C,IAAI,CAACC,OAAO,CAACC,OAAO,CAAC,SAACC;+BAAiDA,EAAER,MAAM,CAACC;;oBAChF,IAAI,IAAI,CAACE,MAAM,CAACM,MAAM,EAAE,IAAI,CAACC,YAAY,CAACV,MAAM,CAACC;oBACjD,yDAAyD;oBACzD,oEAAoE;oBACpE,IAAI,IAAI,CAACU,cAAc,EAAE,IAAI,CAACC,qBAAqB;gBACrD;gBAEA,OAAO,IAAI;YACb;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,KAAKZ,CAA2B;gBAC9B,OAA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F,YAAY,EAAEzF,IAAM,IAAI,AAAD,IACvE,IAAI,CAACE,MAAM,CAACuF,YAAY;YAC9B;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,mBACE1F,CAAyC;gBAEzC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAACwF,kBAAkB,GAAG,OAAO1F,MAAM,aAAaA,IAAIH,SAASG,IAC1E,IAAI,AAAD,IACH,IAAI,CAACE,MAAM,CAACwF,kBAAkB;YACpC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,cACE3F,CAAyC;gBAEzC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAACyF,aAAa,GAAG,OAAO3F,MAAM,aAAaA,IAAIH,SAASG,IACrE,IAAI,AAAD,IACH,IAAI,CAACE,MAAM,CAACyF,aAAa;YAC/B;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,eAAe5F,CAA2B;gBACxC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAAC0F,cAAc,GAAG,OAAO5F,MAAM,aAAaA,IAAIH,SAASG,IACtE,IAAI,AAAD,IACH,IAAI,CAACE,MAAM,CAAC0F,cAAc;YAChC;;;YAEA;;AAEF,GACEC,KAAAA;mBAAAA,SAAAA,cAAc7F,CAA2B;gBACvC,OAAOa,UAAUC,MAAM,GAClB,CAAA,AAAC,IAAI,CAACZ,MAAM,CAAC2F,aAAa,GAAGpG,OAAO,IAAI,CAACS,MAAM,CAAC2F,aAAa,EAAE7F,IAAM,IAAI,AAAD,IACzE,IAAI,CAACE,MAAM,CAAC2F,aAAa;YAC/B;;;WAzhBmB/F;EAAsBF;AAP3C;;;;;;AAMA,GACA,SAAqBE,2BA0hBpB"}
|
|
@@ -37,7 +37,7 @@ import { colorDefaults, colorRamp } from "@d3plus/color";
|
|
|
37
37
|
control non-numeric ramps) — then maps them onto an OKLab ramp of the
|
|
38
38
|
default sequential hue. Clears the scale when the mode is off.
|
|
39
39
|
*/ export function configureOrdinalColor(viz) {
|
|
40
|
-
var _viz__filteredData;
|
|
40
|
+
var _viz__filteredData, _viz_schema_colorDefaults;
|
|
41
41
|
if (!viz.schema.colorOrdinal || viz.schema.colorScale) {
|
|
42
42
|
viz._ordinalColorScale = undefined;
|
|
43
43
|
return;
|
|
@@ -62,7 +62,7 @@ import { colorDefaults, colorRamp } from "@d3plus/color";
|
|
|
62
62
|
var keys = ordered.map(function(v) {
|
|
63
63
|
return typeof v === "string" ? v : JSON.stringify(v);
|
|
64
64
|
});
|
|
65
|
-
var range = colorRamp(colorDefaults.sequential, keys.length || 1, {
|
|
65
|
+
var range = colorRamp(((_viz_schema_colorDefaults = viz.schema.colorDefaults) !== null && _viz_schema_colorDefaults !== void 0 ? _viz_schema_colorDefaults : colorDefaults).sequential, keys.length || 1, {
|
|
66
66
|
ordinal: true
|
|
67
67
|
});
|
|
68
68
|
viz._ordinalColorScale = scaleOrdinal().domain(keys).range(range);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/charts/viz/ordinalColor.ts"],"sourcesContent":["import {scaleOrdinal} from \"d3-scale\";\n\nimport {colorDefaults, colorRamp} from \"@d3plus/color\";\nimport type {DataPoint} from \"@d3plus/data\";\n\nimport type {VizInstance} from \"./vizTypes.js\";\n\n/**\n Stamps `viz._ordinalColorScale` for ordinal color mode.\n\n When `colorOrdinal` is on (and no continuous `colorScale` is set), a discrete\n color field is treated as *ordered*: its distinct values take a single-hue\n light→dark ramp so the color encodes the order. This walks the drawn data to\n collect the distinct values in a stable order — numeric values sort\n ascending; everything else keeps the order it first appears in the data\n (pre-sort your data, or drive it with the existing ordering config, to\n control non-numeric ramps) — then maps them onto an OKLab ramp of the\n default sequential hue. Clears the scale when the mode is off.\n*/\nexport function configureOrdinalColor(viz: VizInstance): void {\n if (!viz.schema.colorOrdinal || viz.schema.colorScale) {\n viz._ordinalColorScale = undefined;\n return;\n }\n\n const data = (viz._filteredData ?? []) as DataPoint[];\n const color = viz.schema.color as (d: DataPoint, i: number) => unknown;\n\n const seen = new Set<string>();\n const values: unknown[] = [];\n data.forEach((d, i) => {\n const v = color(d, i);\n const key = typeof v === \"string\" ? v : JSON.stringify(v);\n if (!seen.has(key)) {\n seen.add(key);\n values.push(v);\n }\n });\n\n const ordered = values.every(v => typeof v === \"number\")\n ? [...values].sort((a, b) => (a as number) - (b as number))\n : values;\n const keys = ordered.map(v => (typeof v === \"string\" ? v : JSON.stringify(v)));\n\n const range = colorRamp(colorDefaults.sequential, keys.length || 1, {ordinal: true});\n viz._ordinalColorScale = scaleOrdinal<string, string>().domain(keys).range(range);\n}\n"],"names":["scaleOrdinal","colorDefaults","colorRamp","configureOrdinalColor","viz","schema","colorOrdinal","colorScale","_ordinalColorScale","undefined","data","_filteredData","color","seen","Set","values","forEach","d","i","v","key","JSON","stringify","has","add","push","ordered","every","sort","a","b","keys","map","range","sequential","length","ordinal","domain"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,YAAY,QAAO,WAAW;AAEtC,SAAQC,aAAa,EAAEC,SAAS,QAAO,gBAAgB;AAKvD;;;;;;;;;;;AAWA,GACA,OAAO,SAASC,sBAAsBC,GAAgB;QAMtCA;
|
|
1
|
+
{"version":3,"sources":["../../../../src/charts/viz/ordinalColor.ts"],"sourcesContent":["import {scaleOrdinal} from \"d3-scale\";\n\nimport {colorDefaults, colorRamp} from \"@d3plus/color\";\nimport type {DataPoint} from \"@d3plus/data\";\n\nimport type {VizInstance} from \"./vizTypes.js\";\n\n/**\n Stamps `viz._ordinalColorScale` for ordinal color mode.\n\n When `colorOrdinal` is on (and no continuous `colorScale` is set), a discrete\n color field is treated as *ordered*: its distinct values take a single-hue\n light→dark ramp so the color encodes the order. This walks the drawn data to\n collect the distinct values in a stable order — numeric values sort\n ascending; everything else keeps the order it first appears in the data\n (pre-sort your data, or drive it with the existing ordering config, to\n control non-numeric ramps) — then maps them onto an OKLab ramp of the\n default sequential hue. Clears the scale when the mode is off.\n*/\nexport function configureOrdinalColor(viz: VizInstance): void {\n if (!viz.schema.colorOrdinal || viz.schema.colorScale) {\n viz._ordinalColorScale = undefined;\n return;\n }\n\n const data = (viz._filteredData ?? []) as DataPoint[];\n const color = viz.schema.color as (d: DataPoint, i: number) => unknown;\n\n const seen = new Set<string>();\n const values: unknown[] = [];\n data.forEach((d, i) => {\n const v = color(d, i);\n const key = typeof v === \"string\" ? v : JSON.stringify(v);\n if (!seen.has(key)) {\n seen.add(key);\n values.push(v);\n }\n });\n\n const ordered = values.every(v => typeof v === \"number\")\n ? [...values].sort((a, b) => (a as number) - (b as number))\n : values;\n const keys = ordered.map(v => (typeof v === \"string\" ? v : JSON.stringify(v)));\n\n const range = colorRamp((viz.schema.colorDefaults ?? colorDefaults).sequential, keys.length || 1, {ordinal: true});\n viz._ordinalColorScale = scaleOrdinal<string, string>().domain(keys).range(range);\n}\n"],"names":["scaleOrdinal","colorDefaults","colorRamp","configureOrdinalColor","viz","schema","colorOrdinal","colorScale","_ordinalColorScale","undefined","data","_filteredData","color","seen","Set","values","forEach","d","i","v","key","JSON","stringify","has","add","push","ordered","every","sort","a","b","keys","map","range","sequential","length","ordinal","domain"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,YAAY,QAAO,WAAW;AAEtC,SAAQC,aAAa,EAAEC,SAAS,QAAO,gBAAgB;AAKvD;;;;;;;;;;;AAWA,GACA,OAAO,SAASC,sBAAsBC,GAAgB;QAMtCA,oBAmBWA;IAxBzB,IAAI,CAACA,IAAIC,MAAM,CAACC,YAAY,IAAIF,IAAIC,MAAM,CAACE,UAAU,EAAE;QACrDH,IAAII,kBAAkB,GAAGC;QACzB;IACF;IAEA,IAAMC,QAAQN,qBAAAA,IAAIO,aAAa,cAAjBP,gCAAAA,qBAAqB,EAAE;IACrC,IAAMQ,QAAQR,IAAIC,MAAM,CAACO,KAAK;IA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