@d3plus/core 4.7.0 → 4.9.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 +1 -26117
- package/es/index.js +1 -3
- package/es/internal.js +148 -7
- package/es/src/charts/AreaPlot/index.js +7 -10
- package/es/src/charts/BarChart/index.js +50 -17
- package/es/src/charts/Beeswarm/index.js +39 -0
- package/es/src/charts/BoxWhisker/index.js +6 -16
- package/es/src/charts/Bullet/applyLayout.js +157 -0
- package/es/src/charts/Bullet/bulletGeometry.js +215 -0
- package/es/src/charts/Bullet/bulletLayout.js +111 -0
- package/es/src/charts/Bullet/bulletStyle.js +44 -0
- package/es/src/charts/Bullet/emit.js +258 -0
- package/es/src/charts/Bullet/index.js +268 -0
- package/es/src/charts/BumpChart/index.js +21 -49
- package/es/src/charts/Calendar/applyLayout.js +120 -0
- package/es/src/charts/Calendar/calendarDates.js +151 -0
- package/es/src/charts/Calendar/calendarFormat.js +40 -0
- package/es/src/charts/Calendar/calendarGrid.js +138 -0
- package/es/src/charts/Calendar/calendarInset.js +22 -0
- package/es/src/charts/Calendar/calendarLayout.js +242 -0
- package/es/src/charts/Calendar/emit.js +179 -0
- package/es/src/charts/Calendar/index.js +206 -0
- package/es/src/charts/Candlestick/aggregate.js +154 -0
- package/es/src/charts/Candlestick/buffer.js +83 -0
- package/es/src/charts/Candlestick/emit.js +198 -0
- package/es/src/charts/Candlestick/index.js +257 -0
- package/es/src/charts/Candlestick/ohlc.js +114 -0
- package/es/src/charts/Candlestick/periods.js +191 -0
- package/es/src/charts/Candlestick/tooltip.js +116 -0
- package/es/src/charts/Candlestick/volume.js +278 -0
- package/es/src/charts/Chord/applyLayout.js +75 -111
- package/es/src/charts/Chord/emit.js +82 -173
- package/es/src/charts/Chord/index.js +92 -106
- package/es/src/charts/Donut/index.js +6 -12
- package/es/src/charts/Dumbbell/emit.js +106 -0
- package/es/src/charts/Dumbbell/gapSort.js +79 -0
- package/es/src/charts/Dumbbell/index.js +84 -0
- package/es/src/charts/FanChart/index.js +28 -0
- package/es/src/charts/Funnel/applyLayout.js +103 -0
- package/es/src/charts/Funnel/emit.js +99 -0
- package/es/src/charts/Funnel/funnelFacet.js +53 -0
- package/es/src/charts/Funnel/funnelGeometry.js +171 -0
- package/es/src/charts/Funnel/funnelLabels.js +118 -0
- package/es/src/charts/Funnel/index.js +180 -0
- package/es/src/charts/Funnel/labelNodes.js +202 -0
- package/es/src/charts/Gauge/applyLayout.js +70 -0
- package/es/src/charts/Gauge/dialLayout.js +106 -0
- package/es/src/charts/Gauge/emit.js +214 -0
- package/es/src/charts/Gauge/emitDial.js +167 -0
- package/es/src/charts/Gauge/gaugeGeometry.js +157 -0
- package/es/src/charts/Gauge/index.js +148 -0
- package/es/src/charts/Geomap/applyLayout.js +42 -73
- package/es/src/charts/Geomap/basemapTheme.js +16 -31
- package/es/src/charts/Geomap/emit.js +94 -162
- package/es/src/charts/Geomap/index.js +186 -193
- package/es/src/charts/Geomap/projections.js +37 -0
- package/es/src/charts/Histogram/binData.js +60 -209
- package/es/src/charts/Histogram/index.js +104 -137
- package/es/src/charts/Icicle/applyLayout.js +124 -0
- package/es/src/charts/Icicle/emit.js +162 -0
- package/es/src/charts/Icicle/enterStagger.js +55 -0
- package/es/src/charts/Icicle/geometry.js +101 -0
- package/es/src/charts/Icicle/index.js +130 -0
- package/es/src/charts/Icicle/interaction.js +20 -0
- package/es/src/charts/Icicle/labelFit.js +55 -0
- package/es/src/charts/Icicle/layout.js +20 -0
- package/es/src/charts/LinePlot/index.js +1 -9
- package/es/src/charts/Lollipop/emit.js +85 -0
- package/es/src/charts/Lollipop/index.js +97 -0
- package/es/src/charts/Lollipop/stemLayout.js +97 -0
- package/es/src/charts/Marimekko/axis.js +46 -0
- package/es/src/charts/Marimekko/index.js +77 -0
- package/es/src/charts/Matrix/applyLayout.js +22 -27
- package/es/src/charts/Matrix/emit.js +33 -34
- package/es/src/charts/Matrix/index.js +56 -80
- package/es/src/charts/Network/applyLayout.js +95 -172
- package/es/src/charts/Network/emit.js +132 -266
- package/es/src/charts/Network/index.js +148 -132
- package/es/src/charts/Pack/applyLayout.js +12 -17
- package/es/src/charts/Pack/emit.js +44 -106
- package/es/src/charts/Pack/index.js +63 -107
- package/es/src/charts/Pack/recursionCircles.js +2 -5
- package/es/src/charts/ParallelCoordinates/applyLayout.js +99 -0
- package/es/src/charts/ParallelCoordinates/axes.js +213 -0
- package/es/src/charts/ParallelCoordinates/brushDom.js +187 -0
- package/es/src/charts/ParallelCoordinates/brushFilter.js +79 -0
- package/es/src/charts/ParallelCoordinates/dimensions.js +102 -0
- package/es/src/charts/ParallelCoordinates/emit.js +72 -0
- package/es/src/charts/ParallelCoordinates/format.js +23 -0
- package/es/src/charts/ParallelCoordinates/index.js +190 -0
- package/es/src/charts/ParallelCoordinates/lineStates.js +62 -0
- package/es/src/charts/ParallelCoordinates/paths.js +31 -0
- package/es/src/charts/ParallelCoordinates/titles.js +56 -0
- package/es/src/charts/Pie/applyLayout.js +20 -28
- package/es/src/charts/Pie/emit.js +109 -219
- package/es/src/charts/Pie/index.js +49 -78
- package/es/src/charts/Plot/axisInk.js +31 -0
- package/es/src/charts/Plot/barConfidence.js +273 -0
- package/es/src/charts/Plot/barWidth.js +255 -0
- package/es/src/charts/Plot/baselineBreak.js +139 -0
- package/es/src/charts/Plot/baselineDomain.js +120 -0
- package/es/src/charts/Plot/columnHighlight.js +39 -0
- package/es/src/charts/Plot/confidenceBands.js +143 -0
- package/es/src/charts/Plot/confidenceConfig.js +50 -0
- package/es/src/charts/Plot/confidenceTooltip.js +102 -0
- package/es/src/charts/Plot/curveLength.js +97 -0
- package/es/src/charts/Plot/discreteDomain.js +19 -0
- package/es/src/charts/Plot/discreteSpan.js +6 -24
- package/es/src/charts/Plot/domainClip.js +190 -0
- package/es/src/charts/Plot/draw.js +164 -295
- package/es/src/charts/Plot/facetScales.js +27 -0
- package/es/src/charts/Plot/fillBetween.js +233 -0
- package/es/src/charts/Plot/forecast.js +211 -0
- package/es/src/charts/Plot/forecastScene.js +316 -0
- package/es/src/charts/Plot/index.js +355 -930
- package/es/src/charts/Plot/insetRegion.js +5 -10
- package/es/src/charts/Plot/labelPlacement.js +12 -14
- package/es/src/charts/Plot/lineBands.js +48 -0
- package/es/src/charts/Plot/lineCurve.js +25 -0
- package/es/src/charts/Plot/openDomainEnds.js +92 -0
- package/es/src/charts/Plot/pipeline.js +143 -480
- package/es/src/charts/Plot/pipelineAxisLayout.js +132 -0
- package/es/src/charts/Plot/pipelineDomains.js +121 -239
- package/es/src/charts/Plot/pipelineLineLabels.js +81 -147
- package/es/src/charts/Plot/pipelineScales.js +177 -0
- package/es/src/charts/Plot/plotBreaks.js +223 -0
- package/es/src/charts/Plot/plotFacet.js +172 -0
- package/es/src/charts/Plot/plotInit.js +252 -0
- package/es/src/charts/Plot/plotZoom.js +105 -206
- package/es/src/charts/Plot/shapeDefaults.js +66 -81
- package/es/src/charts/Plot/sharedHover.js +185 -308
- package/es/src/charts/Plot/sharedHoverScene.js +115 -157
- package/es/src/charts/Plot/sharedTooltip.js +96 -104
- package/es/src/charts/Plot/stackEnter.js +87 -0
- package/es/src/charts/Plot/stackHelpers.js +36 -69
- package/es/src/charts/Plot/stackShareLabels.js +34 -88
- package/es/src/charts/Plot/stackShareTooltip.js +10 -15
- package/es/src/charts/Plot/swarm.js +96 -0
- package/es/src/charts/Plot/swarmLayout.js +102 -0
- package/es/src/charts/Plot/trendLines.js +105 -321
- package/es/src/charts/Plot/trendProjection.js +27 -69
- package/es/src/charts/Plot/trendScene.js +27 -171
- package/es/src/charts/Plot/trendTooltip.js +50 -132
- package/es/src/charts/PolarArea/applyLayout.js +26 -0
- package/es/src/charts/PolarArea/emit.js +12 -0
- package/es/src/charts/PolarArea/index.js +183 -0
- package/es/src/charts/Priestley/applyLayout.js +33 -53
- package/es/src/charts/Priestley/emit.js +50 -111
- package/es/src/charts/Priestley/index.js +35 -35
- package/es/src/charts/Pyramid/gutter.js +208 -0
- package/es/src/charts/Pyramid/index.js +373 -0
- package/es/src/charts/Pyramid/pyramidData.js +65 -0
- package/es/src/charts/Pyramid/scene.js +224 -0
- package/es/src/charts/Pyramid/stackOrder.js +39 -0
- package/es/src/charts/Radar/applyLayout.js +52 -291
- package/es/src/charts/Radar/axisDecorations.js +200 -0
- package/es/src/charts/Radar/axisLabels.js +109 -0
- package/es/src/charts/Radar/emit.js +23 -19
- package/es/src/charts/Radar/index.js +64 -45
- package/es/src/charts/Radar/levels.js +136 -0
- package/es/src/charts/Radar/rings.js +72 -0
- package/es/src/charts/RadialBar/applyLayout.js +47 -0
- package/es/src/charts/RadialBar/emit.js +38 -0
- package/es/src/charts/RadialBar/index.js +221 -0
- package/es/src/charts/RadialBar/trackLayout.js +330 -0
- package/es/src/charts/RadialBar/tracks.js +53 -0
- package/es/src/charts/RadialMatrix/applyLayout.js +42 -80
- package/es/src/charts/RadialMatrix/emit.js +23 -23
- package/es/src/charts/RadialMatrix/index.js +65 -67
- package/es/src/charts/Ridgeline/emit.js +75 -0
- package/es/src/charts/Ridgeline/index.js +55 -0
- package/es/src/charts/Rings/applyLayout.js +124 -266
- package/es/src/charts/Rings/emit.js +127 -236
- package/es/src/charts/Rings/index.js +118 -98
- package/es/src/charts/Rings/ringsGraph.js +88 -0
- package/es/src/charts/Rings/ringsSizing.js +41 -89
- package/es/src/charts/Sankey/applyLayout.js +32 -60
- package/es/src/charts/Sankey/emit.js +94 -150
- package/es/src/charts/Sankey/index.js +130 -104
- package/es/src/charts/Sankey/sankeyLayout.js +283 -0
- package/es/src/charts/StackedArea/index.js +3 -10
- package/es/src/charts/Sunburst/applyLayout.js +116 -0
- package/es/src/charts/Sunburst/emit.js +181 -0
- package/es/src/charts/Sunburst/geometry.js +98 -0
- package/es/src/charts/Sunburst/index.js +168 -0
- package/es/src/charts/Sunburst/interaction.js +23 -0
- package/es/src/charts/Sunburst/labelFit.js +159 -0
- package/es/src/charts/Sunburst/partition.js +32 -0
- package/es/src/charts/Tree/applyLayout.js +78 -130
- package/es/src/charts/Tree/emit.js +76 -184
- package/es/src/charts/Tree/index.js +26 -37
- package/es/src/charts/Treemap/applyLayout.js +34 -57
- package/es/src/charts/Treemap/emit.js +57 -136
- package/es/src/charts/Treemap/index.js +57 -95
- package/es/src/charts/Treemap/thresholdFunction.js +14 -75
- package/es/src/charts/Violin/emit.js +80 -0
- package/es/src/charts/Violin/index.js +88 -0
- package/es/src/charts/Violin/inner.js +196 -0
- package/es/src/charts/Violin/violinLayout.js +80 -0
- package/es/src/charts/Waffle/applyLayout.js +90 -0
- package/es/src/charts/Waffle/emit.js +89 -0
- package/es/src/charts/Waffle/index.js +170 -0
- package/es/src/charts/Waffle/tooltip.js +37 -0
- package/es/src/charts/Waffle/waffleLayout.js +104 -0
- package/es/src/charts/Waterfall/buffer.js +65 -0
- package/es/src/charts/Waterfall/connectors.js +103 -0
- package/es/src/charts/Waterfall/index.js +211 -0
- package/es/src/charts/Waterfall/labels.js +82 -0
- package/es/src/charts/Waterfall/state.js +147 -0
- package/es/src/charts/Waterfall/steps.js +138 -0
- package/es/src/charts/definition/ChartDefinition.js +2 -4
- package/es/src/charts/definition/applyDefinition.js +4 -88
- package/es/src/charts/definition/makeChart.js +35 -141
- package/es/src/charts/drawSteps/backControl.js +15 -14
- package/es/src/charts/drawSteps/bottomRightControls.js +39 -115
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js +60 -174
- package/es/src/charts/drawSteps/controlButtonStyle.js +39 -63
- package/es/src/charts/drawSteps/minimap.js +82 -139
- package/es/src/charts/drawSteps/minimapMarkup.js +13 -93
- package/es/src/charts/drawSteps/searchControls.js +48 -105
- package/es/src/charts/drawSteps/searchControlsMarkup.js +62 -176
- package/es/src/charts/drawSteps/tableView.js +23 -40
- package/es/src/charts/drawSteps/tableViewControl.js +2 -8
- package/es/src/charts/drawSteps/tableViewMarkup.js +152 -233
- package/es/src/charts/drawSteps/topLeftControls.js +8 -28
- package/es/src/charts/drawSteps/topLeftControlsMarkup.js +49 -119
- package/es/src/charts/drawSteps/zoomControls.js +72 -145
- package/es/src/charts/drawSteps/zoomControlsMarkup.js +59 -124
- package/es/src/charts/drawSteps/zoomGesture.js +17 -0
- package/es/src/charts/drawSteps/zoomShown.js +40 -0
- package/es/src/charts/events/click.legend.js +12 -23
- package/es/src/charts/events/click.shape.js +6 -11
- package/es/src/charts/events/mouseenter.js +14 -24
- package/es/src/charts/events/mouseleave.js +29 -14
- package/es/src/charts/events/mousemove.legend.js +20 -30
- package/es/src/charts/events/mousemove.shape.js +12 -21
- package/es/src/charts/events/touchstart.body.js +0 -2
- package/es/src/charts/facet/drawFacets.js +332 -0
- package/es/src/charts/facet/facetConfig.js +72 -0
- package/es/src/charts/facet/facetData.js +97 -0
- package/es/src/charts/facet/facetGrid.js +107 -0
- package/es/src/charts/facet/facetGutter.js +131 -0
- package/es/src/charts/facet/facetPanel.js +56 -0
- package/es/src/charts/facet/facetScene.js +111 -0
- package/es/src/charts/features/attributionFeature.js +38 -38
- package/es/src/charts/features/axes.js +105 -304
- package/es/src/charts/features/axesFinal.js +134 -0
- package/es/src/charts/features/axesMeasure.js +138 -0
- package/es/src/charts/features/backgroundImageEmit.js +61 -0
- package/es/src/charts/features/chartGeometry.js +3 -5
- package/es/src/charts/features/colorScaleBucket.js +17 -21
- package/es/src/charts/features/edgeArrows.js +36 -70
- package/es/src/charts/features/emitHelpers.js +42 -137
- package/es/src/charts/features/ensureZoomDom.js +27 -40
- package/es/src/charts/features/features.js +216 -256
- package/es/src/charts/features/featuresColorScale.js +40 -39
- package/es/src/charts/features/featuresLegend.js +152 -188
- package/es/src/charts/features/frozenAxis.js +14 -0
- package/es/src/charts/features/insetState.js +25 -90
- package/es/src/charts/features/legendCategory.js +61 -0
- package/es/src/charts/features/legendLabel.js +5 -9
- package/es/src/charts/features/lineLabels.js +20 -87
- package/es/src/charts/features/plotAnnotations.js +105 -0
- package/es/src/charts/features/plotEndLabels.js +209 -0
- package/es/src/charts/features/plotPaint.js +192 -404
- package/es/src/charts/features/sceneBounds.js +57 -164
- package/es/src/charts/features/shapeEmit.js +183 -184
- package/es/src/charts/features/shareKey.js +32 -0
- package/es/src/charts/features/sharedFields.js +38 -0
- package/es/src/charts/features/tooltipSwatch.js +99 -42
- package/es/src/charts/features/xAxisConfig.js +19 -0
- package/es/src/charts/features/zoomExtent.js +23 -108
- package/es/src/charts/helpers/densityChart.js +267 -0
- package/es/src/charts/helpers/densityData.js +116 -0
- package/es/src/charts/helpers/densityEnter.js +64 -0
- package/es/src/charts/helpers/matrixData.js +11 -82
- package/es/src/charts/helpers/tileAttributions.js +1 -3
- package/es/src/charts/helpers/valueTitle.js +29 -0
- package/es/src/charts/index.js +20 -2
- package/es/src/charts/partition/chartFields.js +43 -0
- package/es/src/charts/partition/hierarchy.js +174 -0
- package/es/src/charts/partition/interaction.js +158 -0
- package/es/src/charts/partition/labelWords.js +95 -0
- package/es/src/charts/partition/shade.js +56 -0
- package/es/src/charts/partition/zoom.js +80 -0
- package/es/src/charts/pipeline/drillMorph.js +16 -37
- package/es/src/charts/pipeline/insetPlacement.js +95 -188
- package/es/src/charts/pipeline/preDrawData.js +74 -0
- package/es/src/charts/pipeline/resolveSpec.js +1 -3
- package/es/src/charts/pipeline/runChartDraw.js +14 -69
- package/es/src/charts/pipeline/runVizPipeline.js +13 -35
- package/es/src/charts/pipeline/stages.js +24 -61
- package/es/src/charts/pipeline/vizDraw.js +165 -30
- package/es/src/charts/pipeline/vizPreDraw.js +145 -106
- package/es/src/charts/plotBuffers/Bar.js +7 -108
- package/es/src/charts/plotBuffers/Box.js +6 -102
- package/es/src/charts/plotBuffers/Circle.js +11 -14
- package/es/src/charts/plotBuffers/Line.js +7 -13
- package/es/src/charts/plotBuffers/Rect.js +11 -15
- package/es/src/charts/plotBuffers/defaultBuffers.js +12 -0
- package/es/src/charts/plotBuffers/discreteBuffer.js +5 -9
- package/es/src/charts/plotBuffers/numericBuffer.js +24 -33
- package/es/src/charts/plotBuffers/rectLikeBuffer.js +39 -0
- package/es/src/charts/polar/chrome.js +170 -0
- package/es/src/charts/polar/config.js +82 -0
- package/es/src/charts/polar/geometry.js +92 -0
- package/es/src/charts/polar/labels.js +124 -0
- package/es/src/charts/polar/polarFacet.js +43 -0
- package/es/src/charts/polar/wedgeLayout.js +140 -0
- package/es/src/charts/viz/Viz.js +503 -991
- package/es/src/charts/viz/VizBase.js +260 -613
- package/es/src/charts/viz/backgroundInk.js +17 -0
- package/es/src/charts/viz/interactionOpacity.js +92 -135
- package/es/src/charts/viz/labelDefaults.js +61 -0
- package/es/src/charts/viz/linkGroup.js +63 -237
- package/es/src/charts/viz/ordinalColor.js +12 -44
- package/es/src/charts/viz/reserveContainerSize.js +49 -0
- package/es/src/charts/viz/resetChromeBoxes.js +41 -0
- package/es/src/charts/viz/sceneRows.js +7 -9
- package/es/src/charts/viz/shapeClassTargets.js +33 -0
- package/es/src/charts/viz/shapeHover.js +9 -0
- package/es/src/charts/viz/simpleHover.js +14 -0
- package/es/src/charts/viz/trailCatchup.js +28 -87
- package/es/src/charts/viz/vizDefaults.js +113 -385
- package/es/src/charts/viz/vizFields.js +197 -0
- package/es/src/charts/viz/vizRender.js +84 -78
- package/es/src/charts/viz/vizTypes.js +1 -3
- package/es/src/charts/viz/vizVisibility.js +32 -51
- package/es/src/components/Axis/Axis.js +304 -469
- package/es/src/components/Axis/AxisBottom.js +9 -74
- package/es/src/components/Axis/AxisLeft.js +9 -74
- package/es/src/components/Axis/AxisRight.js +9 -74
- package/es/src/components/Axis/AxisTop.js +9 -74
- package/es/src/components/Axis/axisBreak.js +243 -0
- package/es/src/components/Axis/axisDefaults.js +65 -0
- package/es/src/components/Axis/axisEndLabels.js +60 -0
- package/es/src/components/Axis/axisLabelThinning.js +123 -0
- package/es/src/components/Axis/axisLayout.js +211 -160
- package/es/src/components/Axis/axisLayoutLabels.js +187 -108
- package/es/src/components/Axis/axisLayoutScale.js +130 -247
- package/es/src/components/Axis/axisRender.js +82 -411
- package/es/src/components/Axis/axisRounding.js +68 -0
- package/es/src/components/Axis/axisScene.js +184 -0
- package/es/src/components/Axis/brokenScale.js +183 -0
- package/es/src/components/Axis/gridStroke.js +10 -0
- package/es/src/components/Axis/timeValues.js +155 -0
- package/es/src/components/Axis/yearValues.js +32 -0
- package/es/src/components/ColorScale/ColorScale.js +187 -345
- package/es/src/components/ColorScale/colorScaleRender.js +72 -108
- package/es/src/components/ColorScale/colorScaleScale.js +101 -164
- package/es/src/components/Legend/Legend.js +164 -352
- package/es/src/components/Legend/legendConfig.js +43 -55
- package/es/src/components/Legend/legendRender.js +61 -109
- package/es/src/components/Message.js +50 -98
- package/es/src/components/SizeLegend/SizeLegend.js +188 -330
- package/es/src/components/SizeLegend/sizeLegendLayout.js +65 -161
- package/es/src/components/TextBox.js +156 -615
- package/es/src/components/Timeline/Timeline.js +345 -554
- package/es/src/components/Timeline/timelineConfig.js +23 -56
- package/es/src/components/Timeline/timelineRender.js +58 -112
- package/es/src/components/Tooltip.js +128 -607
- package/es/src/components/index.js +0 -2
- package/es/src/components/textBoxLayout.js +230 -0
- package/es/src/components/tooltipDom.js +218 -0
- package/es/src/fluent.js +177 -203
- package/es/src/shapes/Area.js +128 -329
- package/es/src/shapes/Bar.js +92 -245
- package/es/src/shapes/Box.js +231 -405
- package/es/src/shapes/Circle.js +46 -199
- package/es/src/shapes/Image.js +98 -210
- package/es/src/shapes/Line.js +73 -251
- package/es/src/shapes/Path.js +34 -149
- package/es/src/shapes/Rect.js +57 -210
- package/es/src/shapes/Shape.js +328 -655
- package/es/src/shapes/Whisker.js +166 -371
- package/es/src/shapes/buildLabelData.js +31 -80
- package/es/src/shapes/emitLabels.js +17 -49
- package/es/src/shapes/hitAreaNode.js +8 -10
- package/es/src/shapes/index.js +0 -2
- package/es/src/shapes/interactionPoints.js +5 -7
- package/es/src/shapes/sceneSort.js +61 -161
- package/es/src/shapes/shapeConfig.js +0 -2
- package/es/src/shapes/shapeOwners.js +37 -0
- package/es/src/shapes/shapeStandalone.js +71 -0
- package/es/src/shapes/textureKey.js +11 -61
- package/es/src/shapes/uniqueIds.js +19 -0
- package/es/src/shapes/validateShapeConfig.js +23 -119
- package/es/src/utils/AccessorFn.js +0 -2
- package/es/src/utils/BaseClass.js +114 -262
- package/es/src/utils/D3Scale.js +0 -2
- package/es/src/utils/D3plusConfig.js +0 -2
- package/es/src/utils/RESET.js +1 -3
- package/es/src/utils/accessor.js +2 -8
- package/es/src/utils/configDefault.js +1 -3
- package/es/src/utils/configPrep.js +15 -35
- package/es/src/utils/configWarnings.js +11 -13
- package/es/src/utils/constant.js +0 -2
- package/es/src/utils/getProp.js +0 -2
- package/es/src/utils/index.js +0 -2
- package/es/src/utils/paintComponentScene.js +12 -23
- package/es/src/utils/wholeWords.js +44 -0
- package/package.json +16 -25
- package/types/index.d.ts +12 -4
- package/types/internal.d.ts +210 -12
- package/types/src/charts/AreaPlot/index.d.ts +2 -1
- package/types/src/charts/BarChart/index.d.ts +4 -2
- package/types/src/charts/Beeswarm/index.d.ts +15 -0
- package/types/src/charts/Bullet/applyLayout.d.ts +65 -0
- package/types/src/charts/Bullet/bulletGeometry.d.ts +91 -0
- package/types/src/charts/Bullet/bulletLayout.d.ts +54 -0
- package/types/src/charts/Bullet/bulletStyle.d.ts +33 -0
- package/types/src/charts/Bullet/emit.d.ts +25 -0
- package/types/src/charts/Bullet/index.d.ts +40 -0
- package/types/src/charts/Calendar/applyLayout.d.ts +37 -0
- package/types/src/charts/Calendar/calendarDates.d.ts +68 -0
- package/types/src/charts/Calendar/calendarFormat.d.ts +24 -0
- package/types/src/charts/Calendar/calendarGrid.d.ts +84 -0
- package/types/src/charts/Calendar/calendarInset.d.ts +13 -0
- package/types/src/charts/Calendar/calendarLayout.d.ts +84 -0
- package/types/src/charts/Calendar/emit.d.ts +31 -0
- package/types/src/charts/Calendar/index.d.ts +26 -0
- package/types/src/charts/Candlestick/aggregate.d.ts +91 -0
- package/types/src/charts/Candlestick/buffer.d.ts +37 -0
- package/types/src/charts/Candlestick/emit.d.ts +54 -0
- package/types/src/charts/Candlestick/index.d.ts +16 -0
- package/types/src/charts/Candlestick/ohlc.d.ts +94 -0
- package/types/src/charts/Candlestick/periods.d.ts +84 -0
- package/types/src/charts/Candlestick/tooltip.d.ts +50 -0
- package/types/src/charts/Candlestick/volume.d.ts +129 -0
- package/types/src/charts/Chord/emit.d.ts +2 -2
- package/types/src/charts/Dumbbell/emit.d.ts +34 -0
- package/types/src/charts/Dumbbell/gapSort.d.ts +47 -0
- package/types/src/charts/Dumbbell/index.d.ts +21 -0
- package/types/src/charts/FanChart/index.d.ts +17 -0
- package/types/src/charts/Funnel/applyLayout.d.ts +89 -0
- package/types/src/charts/Funnel/emit.d.ts +29 -0
- package/types/src/charts/Funnel/funnelFacet.d.ts +33 -0
- package/types/src/charts/Funnel/funnelGeometry.d.ts +78 -0
- package/types/src/charts/Funnel/funnelLabels.d.ts +101 -0
- package/types/src/charts/Funnel/index.d.ts +30 -0
- package/types/src/charts/Funnel/labelNodes.d.ts +57 -0
- package/types/src/charts/Gauge/applyLayout.d.ts +41 -0
- package/types/src/charts/Gauge/dialLayout.d.ts +78 -0
- package/types/src/charts/Gauge/emit.d.ts +22 -0
- package/types/src/charts/Gauge/emitDial.d.ts +41 -0
- package/types/src/charts/Gauge/gaugeGeometry.d.ts +89 -0
- package/types/src/charts/Gauge/index.d.ts +21 -0
- package/types/src/charts/Geomap/projections.d.ts +8 -0
- package/types/src/charts/Histogram/binData.d.ts +9 -1
- package/types/src/charts/Icicle/applyLayout.d.ts +54 -0
- package/types/src/charts/Icicle/emit.d.ts +20 -0
- package/types/src/charts/Icicle/enterStagger.d.ts +30 -0
- package/types/src/charts/Icicle/geometry.d.ts +72 -0
- package/types/src/charts/Icicle/index.d.ts +25 -0
- package/types/src/charts/Icicle/interaction.d.ts +16 -0
- package/types/src/charts/Icicle/labelFit.d.ts +37 -0
- package/types/src/charts/Icicle/layout.d.ts +21 -0
- package/types/src/charts/Lollipop/emit.d.ts +19 -0
- package/types/src/charts/Lollipop/index.d.ts +17 -0
- package/types/src/charts/Lollipop/stemLayout.d.ts +82 -0
- package/types/src/charts/Marimekko/axis.d.ts +27 -0
- package/types/src/charts/Marimekko/index.d.ts +19 -0
- package/types/src/charts/ParallelCoordinates/applyLayout.d.ts +27 -0
- package/types/src/charts/ParallelCoordinates/axes.d.ts +40 -0
- package/types/src/charts/ParallelCoordinates/brushDom.d.ts +47 -0
- package/types/src/charts/ParallelCoordinates/brushFilter.d.ts +39 -0
- package/types/src/charts/ParallelCoordinates/dimensions.d.ts +63 -0
- package/types/src/charts/ParallelCoordinates/emit.d.ts +27 -0
- package/types/src/charts/ParallelCoordinates/format.d.ts +13 -0
- package/types/src/charts/ParallelCoordinates/index.d.ts +27 -0
- package/types/src/charts/ParallelCoordinates/lineStates.d.ts +21 -0
- package/types/src/charts/ParallelCoordinates/paths.d.ts +27 -0
- package/types/src/charts/ParallelCoordinates/titles.d.ts +21 -0
- package/types/src/charts/Plot/axisInk.d.ts +8 -0
- package/types/src/charts/Plot/barConfidence.d.ts +120 -0
- package/types/src/charts/Plot/barWidth.d.ts +119 -0
- package/types/src/charts/Plot/baselineBreak.d.ts +52 -0
- package/types/src/charts/Plot/baselineDomain.d.ts +67 -0
- package/types/src/charts/Plot/columnHighlight.d.ts +23 -0
- package/types/src/charts/Plot/confidenceBands.d.ts +72 -0
- package/types/src/charts/Plot/confidenceConfig.d.ts +16 -0
- package/types/src/charts/Plot/confidenceTooltip.d.ts +70 -0
- package/types/src/charts/Plot/curveLength.d.ts +27 -0
- package/types/src/charts/Plot/discreteDomain.d.ts +14 -0
- package/types/src/charts/Plot/domainClip.d.ts +21 -0
- package/types/src/charts/Plot/facetScales.d.ts +27 -0
- package/types/src/charts/Plot/fillBetween.d.ts +69 -0
- package/types/src/charts/Plot/forecast.d.ts +102 -0
- package/types/src/charts/Plot/forecastScene.d.ts +88 -0
- package/types/src/charts/Plot/index.d.ts +24 -5
- package/types/src/charts/Plot/lineBands.d.ts +7 -0
- package/types/src/charts/Plot/lineCurve.d.ts +15 -0
- package/types/src/charts/Plot/openDomainEnds.d.ts +25 -0
- package/types/src/charts/Plot/pipeline.d.ts +5 -30
- package/types/src/charts/Plot/pipelineAxisLayout.d.ts +2 -0
- package/types/src/charts/Plot/pipelineScales.d.ts +20 -0
- package/types/src/charts/Plot/plotBreaks.d.ts +61 -0
- package/types/src/charts/Plot/plotFacet.d.ts +36 -0
- package/types/src/charts/Plot/plotInit.d.ts +44 -0
- package/types/src/charts/Plot/plotZoom.d.ts +14 -8
- package/types/src/charts/Plot/sharedHover.d.ts +5 -0
- package/types/src/charts/Plot/sharedHoverScene.d.ts +3 -6
- package/types/src/charts/Plot/sharedTooltip.d.ts +13 -8
- package/types/src/charts/Plot/stackEnter.d.ts +42 -0
- package/types/src/charts/Plot/swarm.d.ts +66 -0
- package/types/src/charts/Plot/swarmLayout.d.ts +59 -0
- package/types/src/charts/PolarArea/applyLayout.d.ts +17 -0
- package/types/src/charts/PolarArea/emit.d.ts +3 -0
- package/types/src/charts/PolarArea/index.d.ts +19 -0
- package/types/src/charts/Pyramid/gutter.d.ts +76 -0
- package/types/src/charts/Pyramid/index.d.ts +19 -0
- package/types/src/charts/Pyramid/pyramidData.d.ts +48 -0
- package/types/src/charts/Pyramid/scene.d.ts +106 -0
- package/types/src/charts/Pyramid/stackOrder.d.ts +9 -0
- package/types/src/charts/Radar/applyLayout.d.ts +7 -5
- package/types/src/charts/Radar/axisDecorations.d.ts +67 -0
- package/types/src/charts/Radar/axisLabels.d.ts +79 -0
- package/types/src/charts/Radar/emit.d.ts +2 -2
- package/types/src/charts/Radar/index.d.ts +5 -1
- package/types/src/charts/Radar/levels.d.ts +68 -0
- package/types/src/charts/Radar/rings.d.ts +30 -0
- package/types/src/charts/RadialBar/applyLayout.d.ts +19 -0
- package/types/src/charts/RadialBar/emit.d.ts +6 -0
- package/types/src/charts/RadialBar/index.d.ts +21 -0
- package/types/src/charts/RadialBar/trackLayout.d.ts +46 -0
- package/types/src/charts/RadialBar/tracks.d.ts +32 -0
- package/types/src/charts/Ridgeline/emit.d.ts +11 -0
- package/types/src/charts/Ridgeline/index.d.ts +16 -0
- package/types/src/charts/Rings/index.d.ts +2 -0
- package/types/src/charts/Rings/ringsGraph.d.ts +72 -0
- package/types/src/charts/Sankey/applyLayout.d.ts +1 -1
- package/types/src/charts/Sankey/sankeyLayout.d.ts +57 -0
- package/types/src/charts/StackedArea/index.d.ts +2 -1
- package/types/src/charts/Sunburst/applyLayout.d.ts +67 -0
- package/types/src/charts/Sunburst/emit.d.ts +29 -0
- package/types/src/charts/Sunburst/geometry.d.ts +65 -0
- package/types/src/charts/Sunburst/index.d.ts +21 -0
- package/types/src/charts/Sunburst/interaction.d.ts +20 -0
- package/types/src/charts/Sunburst/labelFit.d.ts +73 -0
- package/types/src/charts/Sunburst/partition.d.ts +34 -0
- package/types/src/charts/Violin/emit.d.ts +4 -0
- package/types/src/charts/Violin/index.d.ts +16 -0
- package/types/src/charts/Violin/inner.d.ts +31 -0
- package/types/src/charts/Violin/violinLayout.d.ts +64 -0
- package/types/src/charts/Waffle/applyLayout.d.ts +36 -0
- package/types/src/charts/Waffle/emit.d.ts +29 -0
- package/types/src/charts/Waffle/index.d.ts +21 -0
- package/types/src/charts/Waffle/tooltip.d.ts +20 -0
- package/types/src/charts/Waffle/waffleLayout.d.ts +81 -0
- package/types/src/charts/Waterfall/buffer.d.ts +31 -0
- package/types/src/charts/Waterfall/connectors.d.ts +40 -0
- package/types/src/charts/Waterfall/index.d.ts +24 -0
- package/types/src/charts/Waterfall/labels.d.ts +59 -0
- package/types/src/charts/Waterfall/state.d.ts +62 -0
- package/types/src/charts/Waterfall/steps.d.ts +84 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +28 -7
- package/types/src/charts/definition/makeChart.d.ts +3 -1
- package/types/src/charts/drawSteps/bottomRightControls.d.ts +19 -0
- package/types/src/charts/drawSteps/bottomRightControlsMarkup.d.ts +1 -1
- package/types/src/charts/drawSteps/controlButtonStyle.d.ts +21 -0
- package/types/src/charts/drawSteps/searchControlsMarkup.d.ts +2 -6
- package/types/src/charts/drawSteps/topLeftControlsMarkup.d.ts +10 -2
- package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +9 -0
- package/types/src/charts/drawSteps/zoomGesture.d.ts +17 -0
- package/types/src/charts/drawSteps/zoomShown.d.ts +32 -0
- package/types/src/charts/facet/drawFacets.d.ts +52 -0
- package/types/src/charts/facet/facetConfig.d.ts +178 -0
- package/types/src/charts/facet/facetData.d.ts +47 -0
- package/types/src/charts/facet/facetGrid.d.ts +62 -0
- package/types/src/charts/facet/facetGutter.d.ts +68 -0
- package/types/src/charts/facet/facetPanel.d.ts +24 -0
- package/types/src/charts/facet/facetScene.d.ts +39 -0
- package/types/src/charts/features/axes.d.ts +4 -89
- package/types/src/charts/features/axesFinal.d.ts +66 -0
- package/types/src/charts/features/axesMeasure.d.ts +88 -0
- package/types/src/charts/features/backgroundImageEmit.d.ts +32 -0
- package/types/src/charts/features/features.d.ts +40 -12
- package/types/src/charts/features/featuresLegend.d.ts +10 -2
- package/types/src/charts/features/frozenAxis.d.ts +8 -0
- package/types/src/charts/features/insetState.d.ts +3 -4
- package/types/src/charts/features/legendCategory.d.ts +36 -0
- package/types/src/charts/features/legendLabel.d.ts +3 -6
- package/types/src/charts/features/plotAnnotations.d.ts +38 -0
- package/types/src/charts/features/plotEndLabels.d.ts +108 -0
- package/types/src/charts/features/plotPaint.d.ts +10 -25
- package/types/src/charts/features/sceneBounds.d.ts +8 -2
- package/types/src/charts/features/shapeEmit.d.ts +14 -1
- package/types/src/charts/features/shareKey.d.ts +24 -0
- package/types/src/charts/features/sharedFields.d.ts +22 -0
- package/types/src/charts/features/tooltipSwatch.d.ts +36 -4
- package/types/src/charts/features/xAxisConfig.d.ts +6 -0
- package/types/src/charts/helpers/densityChart.d.ts +62 -0
- package/types/src/charts/helpers/densityData.d.ts +88 -0
- package/types/src/charts/helpers/densityEnter.d.ts +23 -0
- package/types/src/charts/helpers/valueTitle.d.ts +23 -0
- package/types/src/charts/index.d.ts +20 -0
- package/types/src/charts/partition/chartFields.d.ts +29 -0
- package/types/src/charts/partition/hierarchy.d.ts +109 -0
- package/types/src/charts/partition/interaction.d.ts +57 -0
- package/types/src/charts/partition/labelWords.d.ts +50 -0
- package/types/src/charts/partition/shade.d.ts +61 -0
- package/types/src/charts/partition/zoom.d.ts +51 -0
- package/types/src/charts/pipeline/preDrawData.d.ts +34 -0
- package/types/src/charts/pipeline/stages.d.ts +11 -3
- package/types/src/charts/pipeline/vizDraw.d.ts +25 -20
- package/types/src/charts/pipeline/vizPreDraw.d.ts +23 -17
- package/types/src/charts/plotBuffers/Bar.d.ts +9 -12
- package/types/src/charts/plotBuffers/Box.d.ts +8 -11
- package/types/src/charts/plotBuffers/defaultBuffers.d.ts +25 -0
- package/types/src/charts/plotBuffers/numericBuffer.d.ts +1 -1
- package/types/src/charts/plotBuffers/rectLikeBuffer.d.ts +25 -0
- package/types/src/charts/polar/chrome.d.ts +62 -0
- package/types/src/charts/polar/config.d.ts +21 -0
- package/types/src/charts/polar/geometry.d.ts +68 -0
- package/types/src/charts/polar/labels.d.ts +87 -0
- package/types/src/charts/polar/polarFacet.d.ts +33 -0
- package/types/src/charts/polar/wedgeLayout.d.ts +81 -0
- package/types/src/charts/viz/Viz.d.ts +24 -24
- package/types/src/charts/viz/VizBase.d.ts +59 -204
- package/types/src/charts/viz/backgroundInk.d.ts +15 -0
- package/types/src/charts/viz/labelDefaults.d.ts +11 -0
- package/types/src/charts/viz/reserveContainerSize.d.ts +15 -0
- package/types/src/charts/viz/resetChromeBoxes.d.ts +4 -0
- package/types/src/charts/viz/shapeClassTargets.d.ts +25 -0
- package/types/src/charts/viz/shapeHover.d.ts +10 -0
- package/types/src/charts/viz/simpleHover.d.ts +9 -0
- package/types/src/charts/viz/vizDefaults.d.ts +10 -0
- package/types/src/charts/viz/vizFields.d.ts +199 -0
- package/types/src/charts/viz/vizTypes.d.ts +107 -39
- package/types/src/components/Axis/Axis.d.ts +59 -4
- package/types/src/components/Axis/axisBreak.d.ts +86 -0
- package/types/src/components/Axis/axisDefaults.d.ts +11 -0
- package/types/src/components/Axis/axisEndLabels.d.ts +37 -0
- package/types/src/components/Axis/axisLabelThinning.d.ts +48 -0
- package/types/src/components/Axis/axisLayout.d.ts +10 -0
- package/types/src/components/Axis/axisLayoutLabels.d.ts +30 -0
- package/types/src/components/Axis/axisLayoutScale.d.ts +13 -2
- package/types/src/components/Axis/axisRender.d.ts +1 -30
- package/types/src/components/Axis/axisRounding.d.ts +14 -0
- package/types/src/components/Axis/axisScene.d.ts +33 -0
- package/types/src/components/Axis/brokenScale.d.ts +66 -0
- package/types/src/components/Axis/gridStroke.d.ts +8 -0
- package/types/src/components/Axis/timeValues.d.ts +63 -0
- package/types/src/components/Axis/yearValues.d.ts +21 -0
- package/types/src/components/TextBox.d.ts +1 -36
- package/types/src/components/textBoxLayout.d.ts +45 -0
- package/types/src/components/tooltipDom.d.ts +30 -0
- package/types/src/fluent.d.ts +103 -34
- package/types/src/shapes/Box.d.ts +12 -1
- package/types/src/shapes/Shape.d.ts +2 -3
- package/types/src/shapes/Whisker.d.ts +4 -1
- package/types/src/shapes/emitLabels.d.ts +15 -0
- package/types/src/shapes/shapeConfig.d.ts +35 -5
- package/types/src/shapes/shapeOwners.d.ts +10 -0
- package/types/src/shapes/shapeStandalone.d.ts +7 -0
- package/types/src/shapes/uniqueIds.d.ts +6 -0
- package/types/src/shapes/validateShapeConfig.d.ts +20 -3
- package/types/src/utils/BaseClass.d.ts +6 -0
- package/types/src/utils/D3Scale.d.ts +3 -0
- package/types/src/utils/D3plusConfig.d.ts +940 -99
- package/types/src/utils/configPrep.d.ts +3 -2
- package/types/src/utils/configWarnings.d.ts +5 -0
- package/types/src/utils/index.d.ts +1 -1
- package/types/src/utils/wholeWords.d.ts +28 -0
- package/umd/d3plus-core.full.js +74785 -75059
- package/umd/d3plus-core.full.min.js +2 -10702
- package/umd/d3plus-core.js +44707 -23629
- package/umd/d3plus-core.min.js +2 -6671
- package/es/index.js.map +0 -1
- package/es/internal.js.map +0 -1
- package/es/src/charts/AreaPlot/index.js.map +0 -1
- package/es/src/charts/BarChart/index.js.map +0 -1
- package/es/src/charts/BoxWhisker/index.js.map +0 -1
- package/es/src/charts/BumpChart/index.js.map +0 -1
- package/es/src/charts/Chord/applyLayout.js.map +0 -1
- package/es/src/charts/Chord/emit.js.map +0 -1
- package/es/src/charts/Chord/index.js.map +0 -1
- package/es/src/charts/Donut/index.js.map +0 -1
- package/es/src/charts/Geomap/applyLayout.js.map +0 -1
- package/es/src/charts/Geomap/basemapTheme.js.map +0 -1
- package/es/src/charts/Geomap/emit.js.map +0 -1
- package/es/src/charts/Geomap/index.js.map +0 -1
- package/es/src/charts/Histogram/binData.js.map +0 -1
- package/es/src/charts/Histogram/index.js.map +0 -1
- package/es/src/charts/LinePlot/index.js.map +0 -1
- package/es/src/charts/Matrix/applyLayout.js.map +0 -1
- package/es/src/charts/Matrix/emit.js.map +0 -1
- package/es/src/charts/Matrix/index.js.map +0 -1
- package/es/src/charts/Network/applyLayout.js.map +0 -1
- package/es/src/charts/Network/emit.js.map +0 -1
- package/es/src/charts/Network/index.js.map +0 -1
- package/es/src/charts/Pack/applyLayout.js.map +0 -1
- package/es/src/charts/Pack/emit.js.map +0 -1
- package/es/src/charts/Pack/index.js.map +0 -1
- package/es/src/charts/Pack/recursionCircles.js.map +0 -1
- package/es/src/charts/Pie/applyLayout.js.map +0 -1
- package/es/src/charts/Pie/emit.js.map +0 -1
- package/es/src/charts/Pie/index.js.map +0 -1
- package/es/src/charts/Plot/discreteSpan.js.map +0 -1
- package/es/src/charts/Plot/draw.js.map +0 -1
- package/es/src/charts/Plot/index.js.map +0 -1
- package/es/src/charts/Plot/insetRegion.js.map +0 -1
- package/es/src/charts/Plot/labelPlacement.js.map +0 -1
- package/es/src/charts/Plot/pipeline.js.map +0 -1
- package/es/src/charts/Plot/pipelineDomains.js.map +0 -1
- package/es/src/charts/Plot/pipelineLineLabels.js.map +0 -1
- package/es/src/charts/Plot/plotZoom.js.map +0 -1
- package/es/src/charts/Plot/shapeDefaults.js.map +0 -1
- package/es/src/charts/Plot/sharedHover.js.map +0 -1
- package/es/src/charts/Plot/sharedHoverScene.js.map +0 -1
- package/es/src/charts/Plot/sharedTooltip.js.map +0 -1
- package/es/src/charts/Plot/stackHelpers.js.map +0 -1
- package/es/src/charts/Plot/stackShareLabels.js.map +0 -1
- package/es/src/charts/Plot/stackShareTooltip.js.map +0 -1
- package/es/src/charts/Plot/trendLines.js.map +0 -1
- package/es/src/charts/Plot/trendProjection.js.map +0 -1
- package/es/src/charts/Plot/trendScene.js.map +0 -1
- package/es/src/charts/Plot/trendTooltip.js.map +0 -1
- package/es/src/charts/Priestley/applyLayout.js.map +0 -1
- package/es/src/charts/Priestley/emit.js.map +0 -1
- package/es/src/charts/Priestley/index.js.map +0 -1
- package/es/src/charts/Radar/applyLayout.js.map +0 -1
- package/es/src/charts/Radar/emit.js.map +0 -1
- package/es/src/charts/Radar/index.js.map +0 -1
- package/es/src/charts/RadialMatrix/applyLayout.js.map +0 -1
- package/es/src/charts/RadialMatrix/emit.js.map +0 -1
- package/es/src/charts/RadialMatrix/index.js.map +0 -1
- package/es/src/charts/Rings/applyLayout.js.map +0 -1
- package/es/src/charts/Rings/emit.js.map +0 -1
- package/es/src/charts/Rings/index.js.map +0 -1
- package/es/src/charts/Rings/ringsSizing.js.map +0 -1
- package/es/src/charts/Sankey/applyLayout.js.map +0 -1
- package/es/src/charts/Sankey/emit.js.map +0 -1
- package/es/src/charts/Sankey/index.js.map +0 -1
- package/es/src/charts/StackedArea/index.js.map +0 -1
- package/es/src/charts/Tree/applyLayout.js.map +0 -1
- package/es/src/charts/Tree/emit.js.map +0 -1
- package/es/src/charts/Tree/index.js.map +0 -1
- package/es/src/charts/Treemap/applyLayout.js.map +0 -1
- package/es/src/charts/Treemap/emit.js.map +0 -1
- package/es/src/charts/Treemap/index.js.map +0 -1
- package/es/src/charts/Treemap/thresholdFunction.js.map +0 -1
- package/es/src/charts/definition/ChartDefinition.js.map +0 -1
- package/es/src/charts/definition/applyDefinition.js.map +0 -1
- package/es/src/charts/definition/makeChart.js.map +0 -1
- package/es/src/charts/drawSteps/backControl.js.map +0 -1
- package/es/src/charts/drawSteps/bottomRightControls.js.map +0 -1
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js.map +0 -1
- package/es/src/charts/drawSteps/controlButtonStyle.js.map +0 -1
- package/es/src/charts/drawSteps/minimap.js.map +0 -1
- package/es/src/charts/drawSteps/minimapMarkup.js.map +0 -1
- package/es/src/charts/drawSteps/searchControls.js.map +0 -1
- package/es/src/charts/drawSteps/searchControlsMarkup.js.map +0 -1
- package/es/src/charts/drawSteps/tableView.js.map +0 -1
- package/es/src/charts/drawSteps/tableViewControl.js.map +0 -1
- package/es/src/charts/drawSteps/tableViewMarkup.js.map +0 -1
- package/es/src/charts/drawSteps/topLeftControls.js.map +0 -1
- package/es/src/charts/drawSteps/topLeftControlsMarkup.js.map +0 -1
- package/es/src/charts/drawSteps/zoomControls.js.map +0 -1
- package/es/src/charts/drawSteps/zoomControlsMarkup.js.map +0 -1
- package/es/src/charts/events/click.legend.js.map +0 -1
- package/es/src/charts/events/click.shape.js.map +0 -1
- package/es/src/charts/events/mouseenter.js.map +0 -1
- package/es/src/charts/events/mouseleave.js.map +0 -1
- package/es/src/charts/events/mousemove.legend.js.map +0 -1
- package/es/src/charts/events/mousemove.shape.js.map +0 -1
- package/es/src/charts/events/touchstart.body.js.map +0 -1
- package/es/src/charts/features/attributionFeature.js.map +0 -1
- package/es/src/charts/features/axes.js.map +0 -1
- package/es/src/charts/features/chartGeometry.js.map +0 -1
- package/es/src/charts/features/colorScaleBucket.js.map +0 -1
- package/es/src/charts/features/edgeArrows.js.map +0 -1
- package/es/src/charts/features/emitHelpers.js.map +0 -1
- package/es/src/charts/features/ensureZoomDom.js.map +0 -1
- package/es/src/charts/features/features.js.map +0 -1
- package/es/src/charts/features/featuresColorScale.js.map +0 -1
- package/es/src/charts/features/featuresLegend.js.map +0 -1
- package/es/src/charts/features/insetState.js.map +0 -1
- package/es/src/charts/features/legendLabel.js.map +0 -1
- package/es/src/charts/features/lineLabels.js.map +0 -1
- package/es/src/charts/features/plotPaint.js.map +0 -1
- package/es/src/charts/features/sceneBounds.js.map +0 -1
- package/es/src/charts/features/shapeEmit.js.map +0 -1
- package/es/src/charts/features/tooltipSwatch.js.map +0 -1
- package/es/src/charts/features/zoomExtent.js.map +0 -1
- package/es/src/charts/helpers/matrixData.js.map +0 -1
- package/es/src/charts/helpers/tileAttributions.js.map +0 -1
- package/es/src/charts/index.js.map +0 -1
- package/es/src/charts/pipeline/drillMorph.js.map +0 -1
- package/es/src/charts/pipeline/insetPlacement.js.map +0 -1
- package/es/src/charts/pipeline/resolveSpec.js.map +0 -1
- package/es/src/charts/pipeline/runChartDraw.js.map +0 -1
- package/es/src/charts/pipeline/runVizPipeline.js.map +0 -1
- package/es/src/charts/pipeline/stages.js.map +0 -1
- package/es/src/charts/pipeline/vizContext.js +0 -29
- package/es/src/charts/pipeline/vizContext.js.map +0 -1
- package/es/src/charts/pipeline/vizDraw.js.map +0 -1
- package/es/src/charts/pipeline/vizDrawPure.js +0 -220
- package/es/src/charts/pipeline/vizDrawPure.js.map +0 -1
- package/es/src/charts/pipeline/vizPreDraw.js.map +0 -1
- package/es/src/charts/pipeline/vizPreDrawPure.js +0 -279
- package/es/src/charts/pipeline/vizPreDrawPure.js.map +0 -1
- package/es/src/charts/plotBuffers/Bar.js.map +0 -1
- package/es/src/charts/plotBuffers/Box.js.map +0 -1
- package/es/src/charts/plotBuffers/Circle.js.map +0 -1
- package/es/src/charts/plotBuffers/Line.js.map +0 -1
- package/es/src/charts/plotBuffers/Rect.js.map +0 -1
- package/es/src/charts/plotBuffers/discreteBuffer.js.map +0 -1
- package/es/src/charts/plotBuffers/numericBuffer.js.map +0 -1
- package/es/src/charts/viz/Viz.js.map +0 -1
- package/es/src/charts/viz/VizBase.js.map +0 -1
- package/es/src/charts/viz/VizBaseConfig.js +0 -538
- package/es/src/charts/viz/VizBaseConfig.js.map +0 -1
- package/es/src/charts/viz/interactionOpacity.js.map +0 -1
- package/es/src/charts/viz/linkGroup.js.map +0 -1
- package/es/src/charts/viz/ordinalColor.js.map +0 -1
- package/es/src/charts/viz/sceneRows.js.map +0 -1
- package/es/src/charts/viz/trailCatchup.js.map +0 -1
- package/es/src/charts/viz/vizDefaults.js.map +0 -1
- package/es/src/charts/viz/vizRender.js.map +0 -1
- package/es/src/charts/viz/vizTypes.js.map +0 -1
- package/es/src/charts/viz/vizVisibility.js.map +0 -1
- package/es/src/components/Axis/Axis.js.map +0 -1
- package/es/src/components/Axis/AxisBottom.js.map +0 -1
- package/es/src/components/Axis/AxisLeft.js.map +0 -1
- package/es/src/components/Axis/AxisRight.js.map +0 -1
- package/es/src/components/Axis/AxisTop.js.map +0 -1
- package/es/src/components/Axis/axisLayout.js.map +0 -1
- package/es/src/components/Axis/axisLayoutLabels.js.map +0 -1
- package/es/src/components/Axis/axisLayoutScale.js.map +0 -1
- package/es/src/components/Axis/axisRender.js.map +0 -1
- package/es/src/components/ColorScale/ColorScale.js.map +0 -1
- package/es/src/components/ColorScale/colorScaleRender.js.map +0 -1
- package/es/src/components/ColorScale/colorScaleScale.js.map +0 -1
- package/es/src/components/Legend/Legend.js.map +0 -1
- package/es/src/components/Legend/legendConfig.js.map +0 -1
- package/es/src/components/Legend/legendRender.js.map +0 -1
- package/es/src/components/Message.js.map +0 -1
- package/es/src/components/SizeLegend/SizeLegend.js.map +0 -1
- package/es/src/components/SizeLegend/sizeLegendLayout.js.map +0 -1
- package/es/src/components/TextBox.js.map +0 -1
- package/es/src/components/Timeline/Timeline.js.map +0 -1
- package/es/src/components/Timeline/timelineConfig.js.map +0 -1
- package/es/src/components/Timeline/timelineRender.js.map +0 -1
- package/es/src/components/Tooltip.js.map +0 -1
- package/es/src/components/index.js.map +0 -1
- package/es/src/fluent.js.map +0 -1
- package/es/src/shapes/Area.js.map +0 -1
- package/es/src/shapes/Bar.js.map +0 -1
- package/es/src/shapes/Box.js.map +0 -1
- package/es/src/shapes/Circle.js.map +0 -1
- package/es/src/shapes/Image.js.map +0 -1
- package/es/src/shapes/Line.js.map +0 -1
- package/es/src/shapes/Path.js.map +0 -1
- package/es/src/shapes/Rect.js.map +0 -1
- package/es/src/shapes/Shape.js.map +0 -1
- package/es/src/shapes/Whisker.js.map +0 -1
- package/es/src/shapes/buildLabelData.js.map +0 -1
- package/es/src/shapes/emitLabels.js.map +0 -1
- package/es/src/shapes/hitAreaNode.js.map +0 -1
- package/es/src/shapes/index.js.map +0 -1
- package/es/src/shapes/interactionPoints.js.map +0 -1
- package/es/src/shapes/sceneSort.js.map +0 -1
- package/es/src/shapes/shapeConfig.js.map +0 -1
- package/es/src/shapes/textureKey.js.map +0 -1
- package/es/src/shapes/validateShapeConfig.js.map +0 -1
- package/es/src/utils/AccessorFn.js.map +0 -1
- package/es/src/utils/BaseClass.js.map +0 -1
- package/es/src/utils/D3Scale.js.map +0 -1
- package/es/src/utils/D3plusConfig.js.map +0 -1
- package/es/src/utils/RESET.js.map +0 -1
- package/es/src/utils/accessor.js.map +0 -1
- package/es/src/utils/configDefault.js.map +0 -1
- package/es/src/utils/configPrep.js.map +0 -1
- package/es/src/utils/configWarnings.js.map +0 -1
- package/es/src/utils/constant.js.map +0 -1
- package/es/src/utils/getProp.js.map +0 -1
- package/es/src/utils/index.js.map +0 -1
- package/es/src/utils/paintComponentScene.js.map +0 -1
- package/es/umd-entry.js +0 -16
- package/es/umd-entry.js.map +0 -1
- package/types/src/charts/AreaPlot.d.ts +0 -16
- package/types/src/charts/BarChart.d.ts +0 -16
- package/types/src/charts/BoxWhisker.d.ts +0 -11
- package/types/src/charts/BumpChart.d.ts +0 -36
- package/types/src/charts/ChartDefinition.d.ts +0 -75
- package/types/src/charts/Donut.d.ts +0 -11
- package/types/src/charts/Geomap.d.ts +0 -126
- package/types/src/charts/LinePlot.d.ts +0 -15
- package/types/src/charts/Matrix.d.ts +0 -48
- package/types/src/charts/Network.d.ts +0 -54
- package/types/src/charts/Pack.d.ts +0 -34
- package/types/src/charts/Pie.d.ts +0 -17
- package/types/src/charts/Plot.d.ts +0 -150
- package/types/src/charts/Priestley.d.ts +0 -37
- package/types/src/charts/Radar.d.ts +0 -38
- package/types/src/charts/RadialMatrix.d.ts +0 -63
- package/types/src/charts/Rings.d.ts +0 -61
- package/types/src/charts/Sankey.d.ts +0 -77
- package/types/src/charts/StackedArea.d.ts +0 -14
- package/types/src/charts/Tree.d.ts +0 -17
- package/types/src/charts/Treemap.d.ts +0 -42
- package/types/src/charts/Viz.d.ts +0 -90
- package/types/src/charts/VizBase.d.ts +0 -158
- package/types/src/charts/VizBaseConfig.d.ts +0 -148
- package/types/src/charts/applyDefinition.d.ts +0 -13
- package/types/src/charts/axes.d.ts +0 -134
- package/types/src/charts/chartGeometry.d.ts +0 -58
- package/types/src/charts/drawSteps/drawAttribution.d.ts +0 -7
- package/types/src/charts/drawSteps/drawBack.d.ts +0 -6
- package/types/src/charts/drawSteps/drawColorScale.d.ts +0 -6
- package/types/src/charts/drawSteps/drawLegend.d.ts +0 -12
- package/types/src/charts/drawSteps/drawSubtitle.d.ts +0 -7
- package/types/src/charts/drawSteps/drawTimeline.d.ts +0 -7
- package/types/src/charts/drawSteps/drawTitle.d.ts +0 -7
- package/types/src/charts/drawSteps/drawTotal.d.ts +0 -7
- package/types/src/charts/emitHelpers.d.ts +0 -122
- package/types/src/charts/ensureZoomDom.d.ts +0 -39
- package/types/src/charts/factories.d.ts +0 -73
- package/types/src/charts/features/colorScaleBucketShare.d.ts +0 -16
- package/types/src/charts/features.d.ts +0 -152
- package/types/src/charts/featuresLegend.d.ts +0 -12
- package/types/src/charts/legendLabel.d.ts +0 -11
- package/types/src/charts/lineLabels.d.ts +0 -40
- package/types/src/charts/makeChart.d.ts +0 -22
- package/types/src/charts/pipeline/vizContext.d.ts +0 -45
- package/types/src/charts/pipeline/vizDrawPure.d.ts +0 -46
- package/types/src/charts/pipeline/vizPreDrawPure.d.ts +0 -68
- package/types/src/charts/plotPaint.d.ts +0 -233
- package/types/src/charts/resolveSpec.d.ts +0 -50
- package/types/src/charts/runChartDraw.d.ts +0 -38
- package/types/src/charts/runVizPipeline.d.ts +0 -31
- package/types/src/charts/shapeEmit.d.ts +0 -61
- package/types/src/charts/stages.d.ts +0 -117
- package/types/src/charts/viz/VizBaseConfig.d.ts +0 -175
- package/types/src/charts/vizContext.d.ts +0 -46
- package/types/src/charts/vizDefaults.d.ts +0 -8
- package/types/src/charts/vizDraw.d.ts +0 -25
- package/types/src/charts/vizDrawPure.d.ts +0 -17
- package/types/src/charts/vizPreDraw.d.ts +0 -22
- package/types/src/charts/vizPreDrawPure.d.ts +0 -40
- package/types/src/charts/vizRender.d.ts +0 -8
- package/types/src/charts/vizTypes.d.ts +0 -202
- package/types/src/components/Axis.d.ts +0 -183
- package/types/src/components/AxisBottom.d.ts +0 -11
- package/types/src/components/AxisLeft.d.ts +0 -11
- package/types/src/components/AxisRight.d.ts +0 -11
- package/types/src/components/AxisTop.d.ts +0 -11
- package/types/src/components/ColorScale.d.ts +0 -80
- package/types/src/components/Legend.d.ts +0 -93
- package/types/src/components/Timeline.d.ts +0 -83
- package/types/src/components/axisLayout.d.ts +0 -27
- package/types/src/components/axisLayoutLabels.d.ts +0 -42
- package/types/src/components/axisLayoutScale.d.ts +0 -12
- package/types/src/components/axisRender.d.ts +0 -65
- package/types/src/components/colorScaleRender.d.ts +0 -15
- package/types/src/components/colorScaleScale.d.ts +0 -19
- package/types/src/components/legendConfig.d.ts +0 -7
- package/types/src/components/legendRender.d.ts +0 -16
- package/types/src/components/timelineConfig.d.ts +0 -6
- package/types/src/components/timelineRender.d.ts +0 -14
- package/umd/d3plus-core.full.js.map +0 -1
- package/umd/d3plus-core.js.map +0 -1
|
@@ -1,101 +1,3 @@
|
|
|
1
|
-
function _array_like_to_array(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _array_with_holes(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return arr;
|
|
8
|
-
}
|
|
9
|
-
function _define_property(obj, key, value) {
|
|
10
|
-
if (key in obj) {
|
|
11
|
-
Object.defineProperty(obj, key, {
|
|
12
|
-
value: value,
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true
|
|
16
|
-
});
|
|
17
|
-
} else {
|
|
18
|
-
obj[key] = value;
|
|
19
|
-
}
|
|
20
|
-
return obj;
|
|
21
|
-
}
|
|
22
|
-
function _iterable_to_array_limit(arr, i) {
|
|
23
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24
|
-
if (_i == null) return;
|
|
25
|
-
var _arr = [];
|
|
26
|
-
var _n = true;
|
|
27
|
-
var _d = false;
|
|
28
|
-
var _s, _e;
|
|
29
|
-
try {
|
|
30
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
31
|
-
_arr.push(_s.value);
|
|
32
|
-
if (i && _arr.length === i) break;
|
|
33
|
-
}
|
|
34
|
-
} catch (err) {
|
|
35
|
-
_d = true;
|
|
36
|
-
_e = err;
|
|
37
|
-
} finally{
|
|
38
|
-
try {
|
|
39
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
40
|
-
} finally{
|
|
41
|
-
if (_d) throw _e;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return _arr;
|
|
45
|
-
}
|
|
46
|
-
function _non_iterable_rest() {
|
|
47
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
48
|
-
}
|
|
49
|
-
function _object_spread(target) {
|
|
50
|
-
for(var i = 1; i < arguments.length; i++){
|
|
51
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
52
|
-
var ownKeys = Object.keys(source);
|
|
53
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
54
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
55
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
ownKeys.forEach(function(key) {
|
|
59
|
-
_define_property(target, key, source[key]);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return target;
|
|
63
|
-
}
|
|
64
|
-
function ownKeys(object, enumerableOnly) {
|
|
65
|
-
var keys = Object.keys(object);
|
|
66
|
-
if (Object.getOwnPropertySymbols) {
|
|
67
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
68
|
-
if (enumerableOnly) {
|
|
69
|
-
symbols = symbols.filter(function(sym) {
|
|
70
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
keys.push.apply(keys, symbols);
|
|
74
|
-
}
|
|
75
|
-
return keys;
|
|
76
|
-
}
|
|
77
|
-
function _object_spread_props(target, source) {
|
|
78
|
-
source = source != null ? source : {};
|
|
79
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
80
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
81
|
-
} else {
|
|
82
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
83
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return target;
|
|
87
|
-
}
|
|
88
|
-
function _sliced_to_array(arr, i) {
|
|
89
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
90
|
-
}
|
|
91
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
92
|
-
if (!o) return;
|
|
93
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
94
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
95
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
96
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
97
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
98
|
-
}
|
|
99
1
|
/**
|
|
100
2
|
Plot's chart-specific pipeline stages + the `plotDef` value.
|
|
101
3
|
|
|
@@ -108,21 +10,19 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
108
10
|
from.
|
|
109
11
|
*/ import { date } from "@d3plus/dom";
|
|
110
12
|
import { merge as d3plusMerge, unique } from "@d3plus/data";
|
|
111
|
-
import
|
|
112
|
-
import { deviation, extent, groups, max, mean, min, range, rollups } from "d3-array";
|
|
13
|
+
import { extent, groups, min, rollups } from "d3-array";
|
|
113
14
|
import discreteBufferFn from "../plotBuffers/discreteBuffer.js";
|
|
114
|
-
import {
|
|
15
|
+
import { applyBarWidths } from "./barWidth.js";
|
|
16
|
+
import { discreteDomainCategories } from "./discreteDomain.js";
|
|
17
|
+
import { extraBandValues } from "./confidenceBands.js";
|
|
18
|
+
import { applySwarmLanes, resolveSwarm } from "./swarm.js";
|
|
19
|
+
import { applyPaddedDomains } from "./facetScales.js";
|
|
20
|
+
import { scaleConstructors } from "./pipelineScales.js";
|
|
115
21
|
import constant from "../../utils/constant.js";
|
|
116
|
-
import { shapeConfigFor } from "../features/emitHelpers.js";
|
|
117
|
-
import { subtitleFeature, titleFeature, totalFeature } from "../features/features.js";
|
|
118
|
-
/** d3-scale's scale constructors, indexed by the dynamic `scale<Type>` name. */ var scaleConstructors = scales;
|
|
119
22
|
export { computePlotInitialDomains } from "./pipelineDomains.js";
|
|
120
23
|
export { measurePlotLineLabels } from "./pipelineLineLabels.js";
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
subtitleFeature,
|
|
124
|
-
totalFeature
|
|
125
|
-
];
|
|
24
|
+
export { computePlotScales } from "./pipelineScales.js";
|
|
25
|
+
export { preparePlotAxisLayout } from "./pipelineAxisLayout.js";
|
|
126
26
|
/**
|
|
127
27
|
A plotted axis value that can't be turned into a pixel coordinate: a
|
|
128
28
|
non-finite number (`NaN`/`±Infinity`), `null`, or the empty-array sentinel
|
|
@@ -131,25 +31,21 @@ var defaultChartFeatures = [
|
|
|
131
31
|
`translate(NaN,…)` or `…L268.75,NaN` — which the browser rejects. A bare
|
|
132
32
|
`undefined` is NOT bad: it's how an unused secondary axis (x2/y2) reports
|
|
133
33
|
"no value on this row".
|
|
134
|
-
*/
|
|
135
|
-
return v === null || typeof v === "number" && !Number.isFinite(v) || Array.isArray(v) && v.length === 0;
|
|
136
|
-
};
|
|
34
|
+
*/ const isBadAxisValue = (v)=>v === null || typeof v === "number" && !Number.isFinite(v) || Array.isArray(v) && v.length === 0;
|
|
137
35
|
/**
|
|
138
36
|
A formatted row is plottable when its x/y — and any *defined* x2/y2 — are
|
|
139
37
|
real coordinates. Rows failing this are dropped in `formatPlotData` before
|
|
140
38
|
domains, stacking, and paint ever read `_formattedData`, so a NaN measure
|
|
141
39
|
no longer widens a domain, stacks as 0, or emits a broken coordinate.
|
|
142
40
|
Resolves d3plus/d3plus#776.
|
|
143
|
-
*/
|
|
144
|
-
return !isBadAxisValue(d.x) && !isBadAxisValue(d.y) && (d.x2 === undefined || !isBadAxisValue(d.x2)) && (d.y2 === undefined || !isBadAxisValue(d.y2));
|
|
145
|
-
};
|
|
41
|
+
*/ const isPlottableRow = (d)=>!isBadAxisValue(d.x) && !isBadAxisValue(d.y) && (d.x2 === undefined || !isBadAxisValue(d.x2)) && (d.y2 === undefined || !isBadAxisValue(d.y2));
|
|
146
42
|
/**
|
|
147
43
|
The bubble radius scale: `sizeScale` over the extent of `sizes`, ranging
|
|
148
44
|
from `sizeMin` (capped at half of `sizeMax`) to `sizeMax`. A single-value
|
|
149
45
|
extent maps everything to `sizeMax`.
|
|
150
46
|
*/ export function plotSizeScale(viz, sizes) {
|
|
151
|
-
|
|
152
|
-
return scaleConstructors[
|
|
47
|
+
const rExtent = extent(sizes);
|
|
48
|
+
return scaleConstructors[`scale${viz.schema.sizeScale.charAt(0).toUpperCase()}${viz.schema.sizeScale.slice(1)}`]().domain(rExtent).range([
|
|
153
49
|
rExtent[0] === rExtent[1] ? viz.schema.sizeMax : min([
|
|
154
50
|
viz.schema.sizeMax / 2,
|
|
155
51
|
viz.schema.sizeMin
|
|
@@ -157,37 +53,103 @@ var defaultChartFeatures = [
|
|
|
157
53
|
viz.schema.sizeMax
|
|
158
54
|
]);
|
|
159
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
Whether rows of `shape` draw as circles sized by `size`, so the size
|
|
58
|
+
legend keys them: `"Circle"` rows, or the shapes a chart names in
|
|
59
|
+
`viz._plotCircleShapes`.
|
|
60
|
+
*/ const drawsSizedCircle = (viz, shape)=>(viz._plotCircleShapes ?? [
|
|
61
|
+
"Circle"
|
|
62
|
+
]).includes(shape);
|
|
160
63
|
/**
|
|
161
64
|
Plot's size-legend scale, available before layout: the same scale
|
|
162
65
|
`formatPlotData` builds, over the plottable rows. Null when there's no
|
|
163
|
-
`size` accessor or none of those rows draws as a circle.
|
|
66
|
+
`size` accessor or none of those rows draws as a sized circle.
|
|
164
67
|
*/ export function plotSizeLegendScale(viz) {
|
|
165
68
|
if (!viz._size) return null;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
rows.forEach(
|
|
69
|
+
const rows = viz._axisPersist ? viz._data : viz._filteredData || [];
|
|
70
|
+
const sizes = [];
|
|
71
|
+
let circles = false;
|
|
72
|
+
rows.forEach((d, i)=>{
|
|
170
73
|
if (isBadAxisValue(viz._x(d, i)) || isBadAxisValue(viz._y(d, i))) return;
|
|
171
74
|
sizes.push(viz._size(d, i));
|
|
172
|
-
if (viz.schema.shape(d, i)
|
|
75
|
+
if (drawsSizedCircle(viz, viz.schema.shape(d, i))) circles = true;
|
|
173
76
|
});
|
|
174
77
|
return circles ? plotSizeScale(viz, sizes) : null;
|
|
175
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
Detects which axes plot the chart's `time` values (the first row's time
|
|
81
|
+
equals that axis's value) and stores the flags on `viz` as
|
|
82
|
+
`_x2Time`/`_xTime`/`_y2Time`/`_yTime`.
|
|
83
|
+
*/ function detectTimeAxes(viz) {
|
|
84
|
+
const firstElemTime = viz.schema.time ? viz.schema.time(viz._filteredData[0], 0) : false;
|
|
85
|
+
const x2Time = viz._x2Time = firstElemTime && viz._x2(viz._filteredData[0], 0) === firstElemTime;
|
|
86
|
+
const xTime = viz._xTime = firstElemTime && viz._x(viz._filteredData[0], 0) === firstElemTime;
|
|
87
|
+
const y2Time = viz._y2Time = firstElemTime && viz._y2(viz._filteredData[0], 0) === firstElemTime;
|
|
88
|
+
const yTime = viz._yTime = firstElemTime && viz._y(viz._filteredData[0], 0) === firstElemTime;
|
|
89
|
+
return {
|
|
90
|
+
xTime,
|
|
91
|
+
x2Time,
|
|
92
|
+
yTime,
|
|
93
|
+
y2Time
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
The per-row formatter `formatPlotData` maps rows through: the PlotDatum
|
|
98
|
+
shape (x/y/x2/y2 + id + group + shape + lci/hci + discrete), with time
|
|
99
|
+
axis values parsed into Dates. Also returns the stack-group accessor.
|
|
100
|
+
*/ function plotRowPrep(viz, times) {
|
|
101
|
+
const { xTime, x2Time, yTime, y2Time } = times;
|
|
102
|
+
const timeAxis = xTime || x2Time || yTime || y2Time;
|
|
103
|
+
const stackSeries = (d, i)=>viz._stackGroup ? viz._stackGroup(d, i) : viz.schema.groupBy.length > 1 ? viz._ids(d, i).slice(0, -1).join("_") : "group";
|
|
104
|
+
const stackGroup = (d, i)=>`${!timeAxis && viz.schema.time ? viz.schema.time(d, i) : "time"}_${viz.schema.stacked ? stackSeries(d, i) : `${viz._ids(d, i).join("_")}`}`;
|
|
105
|
+
const prepData = (d, i)=>{
|
|
106
|
+
const newD = {
|
|
107
|
+
__d3plus__: true,
|
|
108
|
+
data: d,
|
|
109
|
+
group: stackGroup(d, i),
|
|
110
|
+
i,
|
|
111
|
+
hci: viz._confidence && viz._confidence[1] && viz._confidence[1](d, i),
|
|
112
|
+
id: viz._ids(d, i).slice(0, viz._drawDepth + 1).join("_"),
|
|
113
|
+
lci: viz._confidence && viz._confidence[0] && viz._confidence[0](d, i),
|
|
114
|
+
shape: viz.schema.shape(d, i),
|
|
115
|
+
x: xTime ? date(viz._x(d, i)) : viz._x(d, i),
|
|
116
|
+
x2: x2Time ? date(viz._x2(d, i)) : viz._x2(d, i),
|
|
117
|
+
y: yTime ? date(viz._y(d, i)) : viz._y(d, i),
|
|
118
|
+
y2: y2Time ? date(viz._y2(d, i)) : viz._y2(d, i)
|
|
119
|
+
};
|
|
120
|
+
newD.discrete = newD.shape === "Bar" ? `${newD[viz.schema.discrete]}_${newD.group}` : `${newD[viz.schema.discrete]}`;
|
|
121
|
+
newD.id = newD.shape === "Bar" ? `${newD.id}_${newD[viz.schema.discrete]}` : newD.id;
|
|
122
|
+
return newD;
|
|
123
|
+
};
|
|
124
|
+
return {
|
|
125
|
+
prepData,
|
|
126
|
+
stackGroup
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
Builds `viz._sizeScaleD3` (the bubble radius scale, or a constant
|
|
131
|
+
`sizeMin`) and `viz._sizeLegendFinal` (the scale, when any row draws as a
|
|
132
|
+
sized circle).
|
|
133
|
+
*/ function applyPlotSizeScale(viz, axisData) {
|
|
134
|
+
viz._sizeScaleD3 = viz._size ? viz._plotFacetScales?.size ?? plotSizeScale(viz, axisData.map((d)=>viz._size(d.data))) : ()=>viz.schema.sizeMin;
|
|
135
|
+
viz._sizeLegendFinal = viz._size && axisData.some((d)=>drawsSizedCircle(viz, d.shape)) ? viz._sizeScaleD3 : null;
|
|
136
|
+
}
|
|
176
137
|
/**
|
|
177
138
|
`formatPlotData` — first stage of Plot's chart-specific pipeline. Detects
|
|
178
139
|
time axes (sets viz._xTime / _x2Time / _yTime / _y2Time), maps the
|
|
179
140
|
filtered data through `prepData` to produce the per-row PlotDatum shape
|
|
180
141
|
(x/y/x2/y2 + id + group + shape + lci/hci + discrete), drops rows whose
|
|
181
|
-
axis values can't be plotted (`isPlottableRow` — see #776)
|
|
142
|
+
axis values can't be plotted (`isPlottableRow` — see #776) or whose
|
|
143
|
+
category a discrete axis's user domain leaves out, and constructs
|
|
182
144
|
the `_sizeScaleD3` if `_size` is set.
|
|
183
145
|
|
|
184
146
|
Pure compute. Returns `{formattedData, axisData, x2Exists, y2Exists}`
|
|
185
147
|
for downstream stages + the paint phase. Side-effects on viz: stores
|
|
186
148
|
`_formattedData`, `_xTime`/`_x2Time`/`_yTime`/`_y2Time`, `_sizeScaleD3`.
|
|
187
|
-
*/ export
|
|
188
|
-
var viz = param.viz;
|
|
149
|
+
*/ export const formatPlotData = ({ viz })=>{
|
|
189
150
|
if (!viz._filteredData || !viz._filteredData.length) {
|
|
190
151
|
viz._sizeLegendFinal = null;
|
|
152
|
+
viz._swarm = null;
|
|
191
153
|
return {
|
|
192
154
|
plotFormattedData: [],
|
|
193
155
|
plotAxisData: [],
|
|
@@ -195,55 +157,25 @@ var defaultChartFeatures = [
|
|
|
195
157
|
y2Exists: false
|
|
196
158
|
};
|
|
197
159
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
i: i,
|
|
213
|
-
hci: viz._confidence && viz._confidence[1] && viz._confidence[1](d, i),
|
|
214
|
-
id: viz._ids(d, i).slice(0, viz._drawDepth + 1).join("_"),
|
|
215
|
-
lci: viz._confidence && viz._confidence[0] && viz._confidence[0](d, i),
|
|
216
|
-
shape: viz.schema.shape(d, i),
|
|
217
|
-
x: xTime ? date(viz._x(d, i)) : viz._x(d, i),
|
|
218
|
-
x2: x2Time ? date(viz._x2(d, i)) : viz._x2(d, i),
|
|
219
|
-
y: yTime ? date(viz._y(d, i)) : viz._y(d, i),
|
|
220
|
-
y2: y2Time ? date(viz._y2(d, i)) : viz._y2(d, i)
|
|
221
|
-
};
|
|
222
|
-
newD.discrete = newD.shape === "Bar" ? "".concat(newD[viz.schema.discrete], "_").concat(newD.group) : "".concat(newD[viz.schema.discrete]);
|
|
223
|
-
newD.id = newD.shape === "Bar" ? "".concat(newD.id, "_").concat(newD[viz.schema.discrete]) : newD.id;
|
|
224
|
-
return newD;
|
|
225
|
-
};
|
|
226
|
-
var formattedData = viz._formattedData = viz._filteredData.map(prepData).filter(isPlottableRow);
|
|
227
|
-
var axisData = viz._axisPersist ? viz._data.map(prepData).filter(isPlottableRow) : formattedData;
|
|
228
|
-
viz._sizeScaleD3 = viz._size ? plotSizeScale(viz, axisData.map(function(d) {
|
|
229
|
-
return viz._size(d.data);
|
|
230
|
-
})) : function() {
|
|
231
|
-
return viz.schema.sizeMin;
|
|
232
|
-
};
|
|
233
|
-
viz._sizeLegendFinal = viz._size && axisData.some(function(d) {
|
|
234
|
-
return d.shape === "Circle";
|
|
235
|
-
}) ? viz._sizeScaleD3 : null;
|
|
236
|
-
var x2Exists = axisData.some(function(d) {
|
|
237
|
-
return d.x2 !== undefined;
|
|
238
|
-
});
|
|
239
|
-
var y2Exists = axisData.some(function(d) {
|
|
240
|
-
return d.y2 !== undefined;
|
|
241
|
-
});
|
|
160
|
+
const { prepData, stackGroup } = plotRowPrep(viz, detectTimeAxes(viz));
|
|
161
|
+
const categories = discreteDomainCategories(viz);
|
|
162
|
+
const keepRow = (d)=>isPlottableRow(d) && (!categories || categories.has(d[viz.schema.discrete]));
|
|
163
|
+
const plotted = viz._filteredData.map(prepData).filter(keepRow);
|
|
164
|
+
const [formattedData, axisData] = applyBarWidths(viz, plotted, viz._axisPersist ? viz._data.map(prepData).filter(keepRow) : plotted);
|
|
165
|
+
viz._formattedData = formattedData;
|
|
166
|
+
const swarm = viz._swarm = resolveSwarm(viz.schema.swarm, axisData);
|
|
167
|
+
if (swarm) {
|
|
168
|
+
applySwarmLanes(formattedData, swarm);
|
|
169
|
+
if (axisData !== formattedData) applySwarmLanes(axisData, swarm);
|
|
170
|
+
}
|
|
171
|
+
applyPlotSizeScale(viz, axisData);
|
|
172
|
+
const x2Exists = axisData.some((d)=>d.x2 !== undefined);
|
|
173
|
+
const y2Exists = axisData.some((d)=>d.y2 !== undefined);
|
|
242
174
|
return {
|
|
243
175
|
plotFormattedData: formattedData,
|
|
244
176
|
plotAxisData: axisData,
|
|
245
|
-
x2Exists
|
|
246
|
-
y2Exists
|
|
177
|
+
x2Exists,
|
|
178
|
+
y2Exists,
|
|
247
179
|
plotStackGroup: stackGroup
|
|
248
180
|
};
|
|
249
181
|
};
|
|
@@ -255,53 +187,32 @@ var defaultChartFeatures = [
|
|
|
255
187
|
|
|
256
188
|
Takes the axis name + the two data sources + the viz state and returns
|
|
257
189
|
the sorted/unique values for that axis.
|
|
258
|
-
*/ export
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
190
|
+
*/ export const computePlotAxisValues = ({ viz, plotFormattedData, plotAxisData })=>{
|
|
191
|
+
const data = plotFormattedData || [];
|
|
192
|
+
const axisData = plotAxisData || [];
|
|
193
|
+
function getAxisValues(axis) {
|
|
194
|
+
const timeData = viz[`_${axis}Time`];
|
|
195
|
+
const localData = timeData ? data : axisData;
|
|
196
|
+
const filteredData = localData.filter((d)=>![
|
|
265
197
|
NaN,
|
|
266
198
|
undefined,
|
|
267
199
|
false
|
|
268
|
-
].includes(d[axis]);
|
|
269
|
-
});
|
|
200
|
+
].includes(d[axis]));
|
|
270
201
|
if (!filteredData.length) return [];
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}, function(d) {
|
|
277
|
-
return d[axis];
|
|
278
|
-
}).sort(function(a, b) {
|
|
279
|
-
if (viz.schema["".concat(axis, "Sort")]) return viz.schema["".concat(axis, "Sort")](a[1], b[1]);
|
|
280
|
-
var aKey = timeData || numericValue ? parseFloat(a[0]) : a[0];
|
|
281
|
-
var bKey = timeData || numericValue ? parseFloat(b[0]) : b[0];
|
|
202
|
+
const numericValue = typeof filteredData[0][axis] === "number";
|
|
203
|
+
let myData = viz.schema.discrete === axis ? rollups(filteredData, (leaves)=>leaves.length === 1 ? leaves[0].data : d3plusMerge(leaves.map((d)=>d.data), viz.schema.aggs), (d)=>d[axis]).sort((a, b)=>{
|
|
204
|
+
if (viz.schema[`${axis}Sort`]) return viz.schema[`${axis}Sort`](a[1], b[1]);
|
|
205
|
+
const aKey = timeData || numericValue ? parseFloat(a[0]) : a[0];
|
|
206
|
+
const bKey = timeData || numericValue ? parseFloat(b[0]) : b[0];
|
|
282
207
|
return aKey - bKey;
|
|
283
|
-
}).map(
|
|
284
|
-
var _param = _sliced_to_array(param, 1), key = _param[0];
|
|
285
|
-
return timeData ? date(key) : numericValue ? parseFloat(key) : key;
|
|
286
|
-
}) : unique(filteredData.sort(function(a, b) {
|
|
287
|
-
return viz.schema["".concat(axis, "Sort")] ? viz.schema["".concat(axis, "Sort")](a.data, b.data) : a[axis] - b[axis];
|
|
288
|
-
}).map(function(d) {
|
|
289
|
-
return d[axis];
|
|
290
|
-
}), function(d) {
|
|
291
|
-
return "".concat(d);
|
|
292
|
-
});
|
|
208
|
+
}).map(([key])=>timeData ? date(key) : numericValue ? parseFloat(key) : key) : unique(filteredData.sort((a, b)=>viz.schema[`${axis}Sort`] ? viz.schema[`${axis}Sort`](a.data, b.data) : a[axis] - b[axis]).map((d)=>d[axis]), (d)=>`${d}`);
|
|
293
209
|
if (viz.schema.discrete !== axis.charAt(0) && viz._confidence) {
|
|
294
|
-
if (viz._confidence[0]) myData = myData.concat(localData.map(
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if (viz._confidence[1]) myData = myData.concat(localData.map(function(d) {
|
|
298
|
-
return d.hci;
|
|
299
|
-
}));
|
|
210
|
+
if (viz._confidence[0]) myData = myData.concat(localData.map((d)=>d.lci));
|
|
211
|
+
if (viz._confidence[1]) myData = myData.concat(localData.map((d)=>d.hci));
|
|
212
|
+
myData = myData.concat(extraBandValues(viz, localData));
|
|
300
213
|
}
|
|
301
214
|
return myData;
|
|
302
|
-
}
|
|
303
|
-
var data = plotFormattedData || [];
|
|
304
|
-
var axisData = plotAxisData || [];
|
|
215
|
+
}
|
|
305
216
|
return {
|
|
306
217
|
xData: getAxisValues("x"),
|
|
307
218
|
x2Data: getAxisValues("x2"),
|
|
@@ -322,20 +233,16 @@ var defaultChartFeatures = [
|
|
|
322
233
|
|
|
323
234
|
Returns the extended scales. Side-effect-free on viz (only on the scale
|
|
324
235
|
instances, which are passed through the context).
|
|
325
|
-
*/ export
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
var oppScale = viz.schema.discrete === "x" ? yScale : xScale;
|
|
236
|
+
*/ export const extendPlotOppScales = ({ viz, plotFormattedData, plotAxisData, plotScales, plotConfigScales })=>{
|
|
237
|
+
const data = plotFormattedData || [];
|
|
238
|
+
const axisData = plotAxisData || [];
|
|
239
|
+
let { x, y, x2, y2 } = plotScales;
|
|
240
|
+
const { xConfigScale, yConfigScale, x2ConfigScale, y2ConfigScale } = plotConfigScales;
|
|
241
|
+
const xScale = plotScales.xScale, yScale = plotScales.yScale;
|
|
242
|
+
const oppScale = viz.schema.discrete === "x" || viz._swarm?.axis === "y" ? yScale : xScale;
|
|
333
243
|
if (oppScale !== "Point") {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
});
|
|
337
|
-
allShapeData.forEach(function(param) {
|
|
338
|
-
var _param = _sliced_to_array(param, 2), key = _param[0], values = _param[1];
|
|
244
|
+
const allShapeData = groups(axisData, (d)=>d.shape);
|
|
245
|
+
allShapeData.forEach(([key, values])=>{
|
|
339
246
|
if ([
|
|
340
247
|
"Bar",
|
|
341
248
|
"Box"
|
|
@@ -343,17 +250,17 @@ var defaultChartFeatures = [
|
|
|
343
250
|
discreteBufferFn(viz.schema.discrete === "x" ? x : y, data, viz.schema.discrete);
|
|
344
251
|
}
|
|
345
252
|
if (viz._buffer[key]) {
|
|
346
|
-
|
|
253
|
+
const res = viz._buffer[key].bind(viz)({
|
|
347
254
|
data: values,
|
|
348
|
-
x
|
|
349
|
-
y
|
|
255
|
+
x,
|
|
256
|
+
y,
|
|
350
257
|
yScale: yConfigScale,
|
|
351
258
|
xScale: xConfigScale,
|
|
352
259
|
config: viz.schema.shapeConfig[key]
|
|
353
260
|
});
|
|
354
261
|
x = res[0];
|
|
355
262
|
y = res[1];
|
|
356
|
-
|
|
263
|
+
const res2 = viz._buffer[key].bind(viz)({
|
|
357
264
|
data: values,
|
|
358
265
|
x: x2,
|
|
359
266
|
y: y2,
|
|
@@ -368,259 +275,18 @@ var defaultChartFeatures = [
|
|
|
368
275
|
}
|
|
369
276
|
});
|
|
370
277
|
}
|
|
278
|
+
// A small-multiples panel with shared scales draws with every panel's padding.
|
|
371
279
|
return {
|
|
372
|
-
plotScales:
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
280
|
+
plotScales: applyPaddedDomains(viz, {
|
|
281
|
+
...plotScales,
|
|
282
|
+
x,
|
|
283
|
+
y,
|
|
284
|
+
x2,
|
|
285
|
+
y2
|
|
377
286
|
})
|
|
378
287
|
};
|
|
379
288
|
};
|
|
380
|
-
|
|
381
|
-
`preparePlotAxisLayout` — final pre-paint stage. Reads the constructed
|
|
382
|
-
scales and computes the per-axis display config the four axis
|
|
383
|
-
`.measure()` + `.render()` calls in Plot._draw need:
|
|
384
|
-
- `defaultConfig`/`defaultX2Config`/`defaultY2Config`
|
|
385
|
-
- `showX`/`showY` (cutoff predicates)
|
|
386
|
-
- `yC` (base y-axis config, including no-x-axis layout adjustments)
|
|
387
|
-
- `barLabels` (used to suppress redundant ticks)
|
|
388
|
-
- `xTicks`/`yTicks`/`x2Ticks`/`y2Ticks` (null when ticks should display,
|
|
389
|
-
empty array when ticks are redundant with bar labels)
|
|
390
|
-
|
|
391
|
-
Pure compute. No DOM, no side effects on viz.
|
|
392
|
-
*/ export var preparePlotAxisLayout = function preparePlotAxisLayout(param) {
|
|
393
|
-
var viz = param.viz, plotAxisData = param.plotAxisData, plotScales = param.plotScales, x2Exists = param.x2Exists, y2Exists = param.y2Exists, x2Data = param.x2Data, y2Data = param.y2Data, yData = param.yData;
|
|
394
|
-
var axisData = plotAxisData || [];
|
|
395
|
-
var x = plotScales.x, y = plotScales.y, x2 = plotScales.x2, y2 = plotScales.y2, xScale = plotScales.xScale, yScale = plotScales.yScale, x2Scale = plotScales.x2Scale, y2Scale = plotScales.y2Scale;
|
|
396
|
-
var xDomain = x.domain();
|
|
397
|
-
var x2Domain = x2.domain();
|
|
398
|
-
var yDomain = y.domain();
|
|
399
|
-
var y2Domain = y2.domain();
|
|
400
|
-
var defaultConfig = {
|
|
401
|
-
barConfig: {
|
|
402
|
-
"stroke-width": 0
|
|
403
|
-
},
|
|
404
|
-
gridSize: 0,
|
|
405
|
-
labels: [],
|
|
406
|
-
title: false,
|
|
407
|
-
tickSize: 0
|
|
408
|
-
};
|
|
409
|
-
var defaultX2Config = x2Exists ? {
|
|
410
|
-
data: x2Data
|
|
411
|
-
} : defaultConfig;
|
|
412
|
-
var defaultY2Config = y2Exists ? {
|
|
413
|
-
data: y2Data
|
|
414
|
-
} : defaultConfig;
|
|
415
|
-
var showX = viz.schema.discrete === "x" ? viz.schema.width > viz._discreteCutoff && viz.schema.width > viz.schema.xCutoff : viz.schema.width > viz.schema.xCutoff;
|
|
416
|
-
var showY = viz.schema.discrete === "y" ? viz.schema.height > viz._discreteCutoff && viz.schema.height > viz.schema.yCutoff : viz.schema.height > viz.schema.yCutoff;
|
|
417
|
-
var yC = {
|
|
418
|
-
data: yData,
|
|
419
|
-
locale: viz.schema.locale,
|
|
420
|
-
rounding: viz.schema.yDomain || isSpanAxis(viz, "y") ? "none" : "outside",
|
|
421
|
-
scalePadding: y.padding ? y.padding() : 0
|
|
422
|
-
};
|
|
423
|
-
if (!showX && showY) {
|
|
424
|
-
yC.barConfig = {
|
|
425
|
-
stroke: "transparent"
|
|
426
|
-
};
|
|
427
|
-
yC.tickSize = 0;
|
|
428
|
-
yC.shapeConfig = {
|
|
429
|
-
labelBounds: function labelBounds(d, i) {
|
|
430
|
-
var _d_labelBounds = d.labelBounds, w = _d_labelBounds.width, yy = _d_labelBounds.y;
|
|
431
|
-
var h = viz.schema.height / 2;
|
|
432
|
-
var xx = i ? -h : 0;
|
|
433
|
-
return {
|
|
434
|
-
x: xx,
|
|
435
|
-
y: yy,
|
|
436
|
-
width: w,
|
|
437
|
-
height: h
|
|
438
|
-
};
|
|
439
|
-
},
|
|
440
|
-
labelConfig: {
|
|
441
|
-
padding: 0,
|
|
442
|
-
rotate: 0
|
|
443
|
-
},
|
|
444
|
-
labelRotation: false
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
// Bar labels — used to suppress redundant axis ticks.
|
|
448
|
-
var barConfig = shapeConfigFor(viz, "Bar");
|
|
449
|
-
var barLabelFunction = barConfig.label !== undefined ? typeof barConfig.label === "function" ? barConfig.label : function() {
|
|
450
|
-
return barConfig.label;
|
|
451
|
-
} : viz._drawLabel;
|
|
452
|
-
var barLabels = axisData.map(function(d) {
|
|
453
|
-
return barLabelFunction(d.data, d.i);
|
|
454
|
-
}).filter(function(d) {
|
|
455
|
-
return typeof d === "number" || d;
|
|
456
|
-
}).map(String);
|
|
457
|
-
var tickFor = function tickFor(axis, axisScale) {
|
|
458
|
-
if (isSpanAxis(viz, axis)) return spanEdges(viz, axisData);
|
|
459
|
-
var ticks = unique(axisData.map(function(d) {
|
|
460
|
-
return d[axis];
|
|
461
|
-
}));
|
|
462
|
-
return axisScale === "Point" && ticks.every(function(t) {
|
|
463
|
-
return barLabels.includes("".concat(t));
|
|
464
|
-
}) ? [] : null;
|
|
465
|
-
};
|
|
466
|
-
return {
|
|
467
|
-
plotDefaultConfig: defaultConfig,
|
|
468
|
-
plotDefaultX2Config: defaultX2Config,
|
|
469
|
-
plotDefaultY2Config: defaultY2Config,
|
|
470
|
-
plotShowX: showX,
|
|
471
|
-
plotShowY: showY,
|
|
472
|
-
plotYC: yC,
|
|
473
|
-
plotBarLabels: barLabels,
|
|
474
|
-
plotXTicks: tickFor("x", xScale),
|
|
475
|
-
plotX2Ticks: tickFor("x2", x2Scale),
|
|
476
|
-
plotYTicks: tickFor("y", yScale),
|
|
477
|
-
plotY2Ticks: tickFor("y2", y2Scale),
|
|
478
|
-
plotXDomain: xDomain,
|
|
479
|
-
plotX2Domain: x2Domain,
|
|
480
|
-
plotYDomain: yDomain,
|
|
481
|
-
plotY2Domain: y2Domain
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
|
-
/**
|
|
485
|
-
`computePlotScales` — fourth stage of Plot's pipeline. Takes the per-axis
|
|
486
|
-
values + the chart's raw `domains` object (computed by the inline
|
|
487
|
-
stacking/non-stacking branch) and produces the four configured d3 scale
|
|
488
|
-
instances (`x`/`x2`/`y`/`y2`), the resolved scale-type strings
|
|
489
|
-
(`xConfigScale` etc., returned in `plotConfigScales`), and the final
|
|
490
|
-
`domains` after log/baseline adjustments.
|
|
491
|
-
|
|
492
|
-
The "initial domains" computation (stacked vs non-stacked branch that
|
|
493
|
-
fills `domains.x`, `domains.y`, etc. from data) is inline in
|
|
494
|
-
`Plot._draw` — extracting that requires untangling array sorts that
|
|
495
|
-
mutate `axisData` in place, which is the natural next step.
|
|
496
|
-
*/ export var computePlotScales = function computePlotScales(param) {
|
|
497
|
-
var viz = param.viz, plotFormattedData = param.plotFormattedData, plotAxisData = param.plotAxisData, plotInitialDomains = param.plotInitialDomains;
|
|
498
|
-
var domainScaleSetup = function domainScaleSetup(axis) {
|
|
499
|
-
var scale = viz["_".concat(axis, "Time")] ? "Time" : viz.schema.discrete === axis && !isSpanAxis(viz, axis) || viz.schema["".concat(axis, "Sort")] ? "Point" : "Linear";
|
|
500
|
-
var domain = viz.schema["".concat(axis, "Domain")] ? viz.schema["".concat(axis, "Domain")].slice() : domains[axis], domain2 = viz.schema["".concat(axis, "2Domain")] ? viz.schema["".concat(axis, "2Domain")].slice() : domains["".concat(axis, "2")];
|
|
501
|
-
if (scale !== "Point") {
|
|
502
|
-
if (domain && domain[0] === void 0) domain[0] = domains[axis][0];
|
|
503
|
-
if (domain && domain[1] === void 0) domain[1] = domains[axis][1];
|
|
504
|
-
if (domain2 && domain2[0] === void 0) domain2[0] = domains["".concat(axis, "2")][0];
|
|
505
|
-
if (domain2 && domain2[1] === void 0) domain2[1] = domains["".concat(axis, "2")][1];
|
|
506
|
-
}
|
|
507
|
-
return [
|
|
508
|
-
domain,
|
|
509
|
-
scale,
|
|
510
|
-
domain2,
|
|
511
|
-
scale
|
|
512
|
-
];
|
|
513
|
-
};
|
|
514
|
-
var data = plotFormattedData || [];
|
|
515
|
-
var axisData = plotAxisData || [];
|
|
516
|
-
var domains = plotInitialDomains;
|
|
517
|
-
var width = viz.schema.width - viz._margin.left - viz._margin.right;
|
|
518
|
-
var height = viz.schema.height - viz._margin.top - viz._margin.bottom;
|
|
519
|
-
var opp = viz.schema.discrete ? viz.schema.discrete === "x" ? "y" : "x" : undefined;
|
|
520
|
-
var opp2 = viz.schema.discrete ? viz.schema.discrete === "x" ? "y2" : "x2" : undefined;
|
|
521
|
-
var opps = [
|
|
522
|
-
opp,
|
|
523
|
-
opp2
|
|
524
|
-
].filter(function(d) {
|
|
525
|
-
return d;
|
|
526
|
-
});
|
|
527
|
-
var _domainScaleSetup = _sliced_to_array(domainScaleSetup("x"), 4), xAutoDomain = _domainScaleSetup[0], xScale = _domainScaleSetup[1], x2AutoDomain = _domainScaleSetup[2], x2Scale = _domainScaleSetup[3];
|
|
528
|
-
var _domainScaleSetup1 = _sliced_to_array(domainScaleSetup("y"), 4), yAutoDomain = _domainScaleSetup1[0], yScale = _domainScaleSetup1[1], y2AutoDomain = _domainScaleSetup1[2], y2Scale = _domainScaleSetup1[3];
|
|
529
|
-
var autoScale = function autoScale(axis, fallback) {
|
|
530
|
-
var userScale = viz["_".concat(axis, "Config")].scale;
|
|
531
|
-
if (userScale === "auto") {
|
|
532
|
-
if (viz.schema.discrete === axis) return fallback;
|
|
533
|
-
var values = axisData.map(function(d) {
|
|
534
|
-
return d[axis];
|
|
535
|
-
});
|
|
536
|
-
return deviation(values) / mean(values) > 3 ? "log" : "linear";
|
|
537
|
-
}
|
|
538
|
-
return userScale || fallback;
|
|
539
|
-
};
|
|
540
|
-
var yConfigScale = autoScale("y", yScale).toLowerCase();
|
|
541
|
-
var y2ConfigScale = autoScale("y2", y2Scale).toLowerCase();
|
|
542
|
-
var xConfigScale = autoScale("x", xScale).toLowerCase();
|
|
543
|
-
var x2ConfigScale = autoScale("x2", x2Scale).toLowerCase();
|
|
544
|
-
// `.slice()` the fallback so domains.x2 isn't ALIASED to domains.x
|
|
545
|
-
// (and same for y2 ↔ y). Without the slice, later in this function
|
|
546
|
-
// the baseline-extension loop does `domains[o][0] = b` — when `o`
|
|
547
|
-
// is 'y2' aliased to y, that mutation hits domains.y too, silently
|
|
548
|
-
// clobbering the y-axis bottom. Sibling of the d.reverse() fix.
|
|
549
|
-
domains = {
|
|
550
|
-
x: xAutoDomain,
|
|
551
|
-
x2: x2AutoDomain || xAutoDomain.slice(),
|
|
552
|
-
y: yAutoDomain,
|
|
553
|
-
y2: y2AutoDomain || yAutoDomain.slice()
|
|
554
|
-
};
|
|
555
|
-
Object.keys(domains).forEach(function(axis) {
|
|
556
|
-
if (viz["_".concat(axis, "ConfigScale")] === "log" && domains[axis].includes(0)) {
|
|
557
|
-
if (min(domains[axis]) < 0) domains[axis][1] = max(data.map(function(d) {
|
|
558
|
-
return d[axis];
|
|
559
|
-
}).filter(function(d) {
|
|
560
|
-
return ![
|
|
561
|
-
NaN,
|
|
562
|
-
undefined,
|
|
563
|
-
false
|
|
564
|
-
].includes(d);
|
|
565
|
-
}));
|
|
566
|
-
else domains[axis][0] = min(axisData.map(function(d) {
|
|
567
|
-
return d[axis];
|
|
568
|
-
}).filter(function(d) {
|
|
569
|
-
return ![
|
|
570
|
-
NaN,
|
|
571
|
-
undefined,
|
|
572
|
-
false
|
|
573
|
-
].includes(d);
|
|
574
|
-
}));
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
opps.forEach(function(o) {
|
|
578
|
-
if (viz["_".concat(o, "Config")].domain) {
|
|
579
|
-
// `.slice()` first so we never mutate the user's config array in
|
|
580
|
-
// place — on the next render the (already-reversed) array would
|
|
581
|
-
// reverse back, alternating chart correctness across renders.
|
|
582
|
-
var d = viz["_".concat(o, "Config")].domain.slice();
|
|
583
|
-
if (viz.schema.discrete === "x") d.reverse();
|
|
584
|
-
domains[o] = d;
|
|
585
|
-
} else if (o && viz.schema.baseline !== void 0) {
|
|
586
|
-
var b = viz.schema.baseline;
|
|
587
|
-
if (domains[o] && domains[o][0] > b) domains[o][0] = b;
|
|
588
|
-
else if (domains[o] && domains[o][1] < b) domains[o][1] = b;
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
var x = scaleConstructors["scale".concat(xScale)]().domain(domains.x).range(range(0, width + 1, width / (domains.x.length - 1)));
|
|
592
|
-
var x2 = scaleConstructors["scale".concat(x2Scale)]().domain(domains.x2).range(range(0, width + 1, width / (domains.x2.length - 1)));
|
|
593
|
-
// `.slice().reverse()` so the domain object isn't mutated under us if
|
|
594
|
-
// it came from user config (covered by the slice above) OR from
|
|
595
|
-
// domains.y being aliased into the user config via the slice above.
|
|
596
|
-
var y = scaleConstructors["scale".concat(yScale)]().domain(domains.y.slice().reverse()).range(range(0, height + 1, height / (domains.y.length - 1)));
|
|
597
|
-
var y2 = scaleConstructors["scale".concat(y2Scale)]().domain(domains.y2.slice().reverse()).range(range(0, height + 1, height / (domains.y2.length - 1)));
|
|
598
|
-
return {
|
|
599
|
-
plotDomains: domains,
|
|
600
|
-
plotScales: {
|
|
601
|
-
x: x,
|
|
602
|
-
y: y,
|
|
603
|
-
x2: x2,
|
|
604
|
-
y2: y2,
|
|
605
|
-
xScale: xScale,
|
|
606
|
-
yScale: yScale,
|
|
607
|
-
x2Scale: x2Scale,
|
|
608
|
-
y2Scale: y2Scale
|
|
609
|
-
},
|
|
610
|
-
plotConfigScales: {
|
|
611
|
-
xConfigScale: xConfigScale,
|
|
612
|
-
yConfigScale: yConfigScale,
|
|
613
|
-
x2ConfigScale: x2ConfigScale,
|
|
614
|
-
y2ConfigScale: y2ConfigScale
|
|
615
|
-
},
|
|
616
|
-
plotOpps: {
|
|
617
|
-
opp: opp,
|
|
618
|
-
opp2: opp2,
|
|
619
|
-
opps: opps
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
};
|
|
623
|
-
export var plotDef = {
|
|
289
|
+
export const plotDef = {
|
|
624
290
|
name: "Plot",
|
|
625
291
|
defaults: {
|
|
626
292
|
annotations: [],
|
|
@@ -633,9 +299,6 @@ export var plotDef = {
|
|
|
633
299
|
tooltipShared: true,
|
|
634
300
|
trendLine: false
|
|
635
301
|
},
|
|
636
|
-
features: defaultChartFeatures,
|
|
637
302
|
// Plot._paint populates `viz._chartScene` from `plotPaint`; no emit step.
|
|
638
303
|
paintDriven: true
|
|
639
304
|
};
|
|
640
|
-
|
|
641
|
-
//# sourceMappingURL=pipeline.js.map
|