@d3plus/core 4.12.0 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +2 -2
- package/es/internal.js +155 -21
- package/es/src/charts/Alluvial/emit.js +3 -2
- package/es/src/charts/ArcDiagram/applyLayout.js +17 -10
- package/es/src/charts/ArcDiagram/arcGeometry.js +21 -8
- package/es/src/charts/ArcDiagram/arcLoops.js +5 -2
- package/es/src/charts/ArcDiagram/arcNodeBox.js +89 -0
- package/es/src/charts/ArcDiagram/emit.js +56 -27
- package/es/src/charts/ArcDiagram/events.js +10 -6
- package/es/src/charts/ArcDiagram/index.js +1 -1
- package/es/src/charts/BarChart/index.js +11 -0
- package/es/src/charts/BoxWhisker/extras.js +95 -0
- package/es/src/charts/BoxWhisker/index.js +77 -6
- package/es/src/charts/BoxWhisker/outliers.js +3 -2
- package/es/src/charts/BoxWhisker/summary.js +14 -3
- package/es/src/charts/BoxWhisker/tooltip.js +114 -29
- package/es/src/charts/BubbleChart/emit.js +9 -5
- package/es/src/charts/BubbleMatrix/colorDefaults.js +58 -0
- package/es/src/charts/BubbleMatrix/index.js +52 -0
- package/es/src/charts/Bullet/emit.js +3 -2
- package/es/src/charts/BumpChart/areaBump.js +175 -0
- package/es/src/charts/BumpChart/index.js +84 -18
- package/es/src/charts/Calendar/applyLayout.js +1 -1
- package/es/src/charts/Calendar/calendarDates.js +21 -7
- package/es/src/charts/Calendar/emit.js +3 -2
- package/es/src/charts/Calendar/index.js +14 -1
- package/es/src/charts/Candlestick/index.js +2 -1
- package/es/src/charts/Candlestick/periods.js +52 -29
- package/es/src/charts/Candlestick/tooltip.js +5 -7
- package/es/src/charts/Chord/emit.js +3 -2
- package/es/src/charts/ConnectedScatter/index.js +39 -0
- package/es/src/charts/CyclePlot/cycleFacet.js +162 -0
- package/es/src/charts/CyclePlot/cycleMeans.js +54 -0
- package/es/src/charts/CyclePlot/cyclePeriods.js +99 -0
- package/es/src/charts/CyclePlot/cycleTooltip.js +67 -0
- package/es/src/charts/CyclePlot/index.js +197 -0
- package/es/src/charts/DensityPlot/densityCurves.js +139 -0
- package/es/src/charts/DensityPlot/densityPoint.js +10 -0
- package/es/src/charts/DensityPlot/index.js +235 -0
- package/es/src/charts/DensityPlot/rug.js +144 -0
- package/es/src/charts/DotPlot/dotLayout.js +165 -0
- package/es/src/charts/DotPlot/facetSize.js +40 -0
- package/es/src/charts/DotPlot/index.js +173 -0
- package/es/src/charts/DotPlot/placements.js +121 -0
- package/es/src/charts/DotPlot/tooltip.js +68 -0
- package/es/src/charts/Dumbbell/arrowGrays.js +46 -0
- package/es/src/charts/Dumbbell/categoryChange.js +124 -0
- package/es/src/charts/Dumbbell/changeEmit.js +291 -0
- package/es/src/charts/Dumbbell/changes.js +87 -0
- package/es/src/charts/Dumbbell/connectors.js +46 -0
- package/es/src/charts/Dumbbell/emit.js +51 -50
- package/es/src/charts/Dumbbell/gapSort.js +2 -1
- package/es/src/charts/Dumbbell/index.js +121 -5
- package/es/src/charts/Funnel/emit.js +3 -2
- package/es/src/charts/Gantt/applyLayout.js +31 -9
- package/es/src/charts/Gantt/criticalPath.js +202 -0
- package/es/src/charts/Gantt/emit.js +49 -15
- package/es/src/charts/Gantt/ganttCalendar.js +54 -0
- package/es/src/charts/Gantt/ganttCritical.js +106 -0
- package/es/src/charts/Gantt/ganttDecor.js +183 -60
- package/es/src/charts/Gantt/ganttSlack.js +14 -0
- package/es/src/charts/Gantt/ganttTooltip.js +91 -36
- package/es/src/charts/Gantt/index.js +59 -10
- package/es/src/charts/Gauge/emit.js +3 -2
- package/es/src/charts/Geomap/applyLayout.js +177 -19
- package/es/src/charts/Geomap/cartogram.js +50 -0
- package/es/src/charts/Geomap/cartogramContiguous.js +196 -0
- package/es/src/charts/Geomap/cartogramFields.js +63 -0
- package/es/src/charts/Geomap/cartogramLabels.js +109 -0
- package/es/src/charts/Geomap/cartogramLayout.js +186 -0
- package/es/src/charts/Geomap/cartogramLegend.js +73 -0
- package/es/src/charts/Geomap/cartogramRelax.js +251 -0
- package/es/src/charts/Geomap/densityEmit.js +93 -0
- package/es/src/charts/Geomap/densityFields.js +69 -0
- package/es/src/charts/Geomap/densityLayout.js +90 -0
- package/es/src/charts/Geomap/densityTooltip.js +98 -0
- package/es/src/charts/Geomap/dotDensity.js +157 -0
- package/es/src/charts/Geomap/dotDensityLayout.js +116 -0
- package/es/src/charts/Geomap/dotRenderer.js +49 -0
- package/es/src/charts/Geomap/drillDown.js +216 -0
- package/es/src/charts/Geomap/drillEmit.js +64 -0
- package/es/src/charts/Geomap/drillEvents.js +108 -0
- package/es/src/charts/Geomap/emit.js +64 -42
- package/es/src/charts/Geomap/flowEmit.js +27 -11
- package/es/src/charts/Geomap/flowEvents.js +3 -1
- package/es/src/charts/Geomap/flowFields.js +2 -2
- package/es/src/charts/Geomap/flowLinks.js +18 -10
- package/es/src/charts/Geomap/geoHexbin.js +144 -0
- package/es/src/charts/Geomap/geoHexbinZoom.js +110 -0
- package/es/src/charts/Geomap/index.js +71 -116
- package/es/src/charts/Geomap/pointCluster.js +246 -0
- package/es/src/charts/Geomap/pointClusterEmit.js +385 -0
- package/es/src/charts/Geomap/pointClusterLayout.js +170 -0
- package/es/src/charts/Geomap/pointClusterLinks.js +95 -0
- package/es/src/charts/Geomap/pointClusterZoom.js +253 -0
- package/es/src/charts/Geomap/pointLabels.js +12 -4
- package/es/src/charts/Geomap/pointRows.js +25 -0
- package/es/src/charts/Geomap/tileGrid.js +468 -0
- package/es/src/charts/Geomap/tileState.js +41 -0
- package/es/src/charts/Geomap/topojsonFluent.js +96 -0
- package/es/src/charts/Geomap/topojsonLevels.js +16 -0
- package/es/src/charts/Hexbin/contourLabels.js +25 -17
- package/es/src/charts/Hexbin/index.js +2 -1
- package/es/src/charts/Histogram/binData.js +5 -1
- package/es/src/charts/Histogram/index.js +4 -26
- package/es/src/charts/HorizonChart/emit.js +147 -0
- package/es/src/charts/HorizonChart/horizonBands.js +117 -0
- package/es/src/charts/HorizonChart/horizonColors.js +30 -0
- package/es/src/charts/HorizonChart/hover.js +147 -0
- package/es/src/charts/HorizonChart/index.js +220 -0
- package/es/src/charts/HorizonChart/measure.js +91 -0
- package/es/src/charts/HorizonChart/rowFilter.js +250 -0
- package/es/src/charts/HorizonChart/state.js +64 -0
- package/es/src/charts/Icicle/emit.js +3 -2
- package/es/src/charts/KPI/applyLayout.js +119 -0
- package/es/src/charts/KPI/delta.js +74 -0
- package/es/src/charts/KPI/emit.js +303 -0
- package/es/src/charts/KPI/index.js +192 -0
- package/es/src/charts/KPI/series.js +67 -0
- package/es/src/charts/KPI/tileLayout.js +134 -0
- package/es/src/charts/Lollipop/emit.js +2 -1
- package/es/src/charts/Marimekko/index.js +2 -1
- package/es/src/charts/Matrix/applyLayout.js +10 -4
- package/es/src/charts/Matrix/bubbles.js +133 -0
- package/es/src/charts/Matrix/emit.js +68 -25
- package/es/src/charts/Matrix/index.js +45 -4
- package/es/src/charts/Network/applyLayout.js +173 -82
- package/es/src/charts/Network/bundle.js +26 -6
- package/es/src/charts/Network/circleLayout.js +281 -0
- package/es/src/charts/Network/containNodes.js +72 -0
- package/es/src/charts/Network/emit.js +78 -18
- package/es/src/charts/Network/forceLayout.js +111 -0
- package/es/src/charts/Network/graph.js +45 -6
- package/es/src/charts/Network/index.js +111 -2
- package/es/src/charts/Network/liveForce.js +312 -0
- package/es/src/charts/Network/livePositions.js +180 -0
- package/es/src/charts/Network/networkDrag.js +156 -0
- package/es/src/charts/Pack/emit.js +3 -2
- package/es/src/charts/Pack/index.js +0 -14
- package/es/src/charts/ParallelCoordinates/emit.js +3 -2
- package/es/src/charts/Pareto/color.js +46 -0
- package/es/src/charts/Pareto/hover.js +54 -0
- package/es/src/charts/Pareto/index.js +170 -0
- package/es/src/charts/Pareto/labels.js +91 -0
- package/es/src/charts/Pareto/order.js +61 -0
- package/es/src/charts/Pareto/paretoSteps.js +84 -0
- package/es/src/charts/Pareto/state.js +158 -0
- package/es/src/charts/Parliament/index.js +68 -0
- package/es/src/charts/Pie/emit.js +3 -2
- package/es/src/charts/Plot/areaEnter.js +5 -3
- package/es/src/charts/Plot/areaLabelsAlong.js +10 -2
- package/es/src/charts/Plot/aspectRatio.js +92 -0
- package/es/src/charts/Plot/axisHover.js +4 -2
- package/es/src/charts/Plot/axisHoverAnchors.js +2 -1
- package/es/src/charts/Plot/axisHoverScene.js +138 -5
- package/es/src/charts/Plot/barConfidence.js +7 -6
- package/es/src/charts/Plot/barHitArea.js +121 -7
- package/es/src/charts/Plot/barLabelConfidence.js +50 -0
- package/es/src/charts/Plot/barLabelFit.js +2 -1
- package/es/src/charts/Plot/barWidth.js +10 -5
- package/es/src/charts/Plot/baselineBreak.js +15 -6
- package/es/src/charts/Plot/baselineDomain.js +13 -4
- package/es/src/charts/Plot/circleLabels.js +26 -16
- package/es/src/charts/Plot/confidenceAxes.js +100 -0
- package/es/src/charts/Plot/confidenceConfig.js +7 -2
- package/es/src/charts/Plot/confidenceTooltip.js +47 -4
- package/es/src/charts/Plot/connectGapsScene.js +2 -1
- package/es/src/charts/Plot/discreteDomain.js +27 -5
- package/es/src/charts/Plot/discreteSpan.js +10 -1
- package/es/src/charts/Plot/domainClip.js +74 -44
- package/es/src/charts/Plot/downsample.js +26 -0
- package/es/src/charts/Plot/draw.js +15 -2
- package/es/src/charts/Plot/fillBetween.js +2 -1
- package/es/src/charts/Plot/forecast.js +8 -4
- package/es/src/charts/Plot/forecastScene.js +6 -5
- package/es/src/charts/Plot/index.js +49 -18
- package/es/src/charts/Plot/inferDiscrete.js +72 -0
- package/es/src/charts/Plot/jitter.js +50 -0
- package/es/src/charts/Plot/labelPlacement.js +4 -3
- package/es/src/charts/Plot/lineBands.js +6 -1
- package/es/src/charts/Plot/lineLabelEmit.js +4 -3
- package/es/src/charts/Plot/lineLabelSides.js +8 -0
- package/es/src/charts/Plot/lineLabelsAlong.js +45 -31
- package/es/src/charts/Plot/marginalHover.js +141 -0
- package/es/src/charts/Plot/marginalLayout.js +102 -0
- package/es/src/charts/Plot/marginalPaint.js +105 -0
- package/es/src/charts/Plot/marginalScene.js +272 -0
- package/es/src/charts/Plot/marginalSeries.js +73 -0
- package/es/src/charts/Plot/marginalStats.js +219 -0
- package/es/src/charts/Plot/openDomainEnds.js +60 -0
- package/es/src/charts/Plot/orderPath.js +137 -0
- package/es/src/charts/Plot/orderPathScene.js +253 -0
- package/es/src/charts/Plot/outlierDetect.js +179 -0
- package/es/src/charts/Plot/outlierLabels.js +327 -0
- package/es/src/charts/Plot/outlierLines.js +93 -0
- package/es/src/charts/Plot/outlierScene.js +308 -0
- package/es/src/charts/Plot/outlierTooltip.js +69 -0
- package/es/src/charts/Plot/periodLabels.js +27 -0
- package/es/src/charts/Plot/pipeline.js +62 -24
- package/es/src/charts/Plot/pipelineAxisLayout.js +9 -7
- package/es/src/charts/Plot/pipelineDomains.js +64 -27
- package/es/src/charts/Plot/pipelineScales.js +37 -28
- package/es/src/charts/Plot/plotBreaks.js +38 -18
- package/es/src/charts/Plot/plotFacet.js +3 -1
- package/es/src/charts/Plot/plotInit.js +59 -3
- package/es/src/charts/Plot/plotLevels.js +183 -0
- package/es/src/charts/Plot/plotRangeBreaks.js +46 -9
- package/es/src/charts/Plot/plotShapes.js +60 -0
- package/es/src/charts/Plot/pointConfidence.js +186 -0
- package/es/src/charts/Plot/pointKey.js +10 -0
- package/es/src/charts/Plot/referenceDomains.js +11 -6
- package/es/src/charts/Plot/shapeAccessors.js +52 -0
- package/es/src/charts/Plot/shapeDefaults.js +32 -17
- package/es/src/charts/Plot/sharedHover.js +40 -12
- package/es/src/charts/Plot/sharedHoverScene.js +49 -13
- package/es/src/charts/Plot/sharedTooltip.js +55 -22
- package/es/src/charts/Plot/stackEnter.js +7 -3
- package/es/src/charts/Plot/stackLegendOrder.js +5 -2
- package/es/src/charts/Plot/stackNeutral.js +154 -0
- package/es/src/charts/Plot/stackShareTooltip.js +2 -1
- package/es/src/charts/Plot/stackThreshold.js +2 -1
- package/es/src/charts/Plot/swarm.js +8 -5
- package/es/src/charts/Plot/timeNestKeys.js +37 -0
- package/es/src/charts/Plot/trendLabels.js +45 -18
- package/es/src/charts/Plot/trendLines.js +78 -34
- package/es/src/charts/Plot/trendMovingAverage.js +135 -0
- package/es/src/charts/Plot/trendProjection.js +18 -6
- package/es/src/charts/Plot/trendScene.js +4 -1
- package/es/src/charts/Plot/trendTooltip.js +75 -20
- package/es/src/charts/PolarArea/emit.js +3 -2
- package/es/src/charts/Priestley/applyLayout.js +9 -5
- package/es/src/charts/Priestley/emit.js +3 -2
- package/es/src/charts/Priestley/timeAxis.js +13 -5
- package/es/src/charts/Radar/emit.js +3 -2
- package/es/src/charts/RadialArea/index.js +51 -0
- package/es/src/charts/RadialBar/emit.js +3 -2
- package/es/src/charts/RadialLine/angles.js +117 -0
- package/es/src/charts/RadialLine/applyLayout.js +204 -0
- package/es/src/charts/RadialLine/emit.js +66 -0
- package/es/src/charts/RadialLine/index.js +228 -0
- package/es/src/charts/RadialLine/paths.js +55 -0
- package/es/src/charts/RadialLine/points.js +80 -0
- package/es/src/charts/RadialLine/series.js +84 -0
- package/es/src/charts/RadialLine/seriesLabelNodes.js +116 -0
- package/es/src/charts/RadialLine/seriesLabels.js +91 -0
- package/es/src/charts/RadialLine/spokes.js +32 -0
- package/es/src/charts/RadialMatrix/emit.js +3 -2
- package/es/src/charts/RadialTree/index.js +33 -0
- package/es/src/charts/Rings/applyLayout.js +22 -6
- package/es/src/charts/Rings/emit.js +43 -23
- package/es/src/charts/Rings/index.js +1 -1
- package/es/src/charts/Rings/ringsCurves.js +10 -8
- package/es/src/charts/Rings/ringsLoops.js +4 -2
- package/es/src/charts/Rings/ringsSizing.js +21 -13
- package/es/src/charts/Sankey/applyLayout.js +4 -0
- package/es/src/charts/Sankey/circularLayout.js +14 -6
- package/es/src/charts/Sankey/emit.js +3 -2
- package/es/src/charts/Sankey/index.js +43 -0
- package/es/src/charts/Sankey/sankeyDrag.js +225 -0
- package/es/src/charts/Sankey/sankeyLayout.js +12 -0
- package/es/src/charts/Scatter/index.js +3 -2
- package/es/src/charts/ScatterMatrix/binEmit.js +59 -0
- package/es/src/charts/ScatterMatrix/index.js +253 -0
- package/es/src/charts/ScatterMatrix/matrixData.js +161 -0
- package/es/src/charts/ScatterMatrix/matrixFacet.js +76 -0
- package/es/src/charts/ScatterMatrix/matrixHover.js +36 -0
- package/es/src/charts/ScatterMatrix/matrixTooltip.js +45 -0
- package/es/src/charts/StripPlot/index.js +53 -0
- package/es/src/charts/Sunburst/emit.js +3 -2
- package/es/src/charts/TileGridMap/index.js +29 -0
- package/es/src/charts/Tree/applyLayout.js +91 -18
- package/es/src/charts/Tree/emit.js +56 -3
- package/es/src/charts/Tree/index.js +24 -3
- package/es/src/charts/Tree/nodeHeight.js +58 -0
- package/es/src/charts/Tree/radialLabels.js +61 -0
- package/es/src/charts/Tree/radialLayout.js +210 -0
- package/es/src/charts/Treemap/emit.js +3 -2
- package/es/src/charts/Venn/applyLayout.js +176 -0
- package/es/src/charts/Venn/circles.js +192 -0
- package/es/src/charts/Venn/ellipseFrame.js +57 -0
- package/es/src/charts/Venn/emit.js +142 -0
- package/es/src/charts/Venn/index.js +178 -0
- package/es/src/charts/Venn/nelderMead.js +59 -0
- package/es/src/charts/Venn/tooltip.js +22 -0
- package/es/src/charts/Venn/vennData.js +99 -0
- package/es/src/charts/Venn/vennEllipses.js +291 -0
- package/es/src/charts/Venn/vennFit.js +169 -0
- package/es/src/charts/Venn/vennLayout.js +252 -0
- package/es/src/charts/Venn/vennRegions.js +133 -0
- package/es/src/charts/Violin/emit.js +2 -1
- package/es/src/charts/Violin/index.js +2 -1
- package/es/src/charts/Waffle/applyLayout.js +45 -22
- package/es/src/charts/Waffle/arcEmit.js +153 -0
- package/es/src/charts/Waffle/arcLayout.js +122 -0
- package/es/src/charts/Waffle/arcStage.js +79 -0
- package/es/src/charts/Waffle/emit.js +9 -4
- package/es/src/charts/Waffle/index.js +88 -4
- package/es/src/charts/Waffle/tooltip.js +7 -2
- package/es/src/charts/Waterfall/connectors.js +5 -3
- package/es/src/charts/Waterfall/state.js +2 -1
- package/es/src/charts/WordCloud/applyLayout.js +157 -0
- package/es/src/charts/WordCloud/cloudLayout.js +128 -0
- package/es/src/charts/WordCloud/emit.js +96 -0
- package/es/src/charts/WordCloud/fontScale.js +34 -0
- package/es/src/charts/WordCloud/glyphMask.js +298 -0
- package/es/src/charts/WordCloud/index.js +174 -0
- package/es/src/charts/WordCloud/occupancy.js +99 -0
- package/es/src/charts/WordCloud/rotation.js +44 -0
- package/es/src/charts/WordCloud/size.js +15 -0
- package/es/src/charts/WordCloud/spiral.js +72 -0
- package/es/src/charts/definition/applyDefinition.js +6 -1
- package/es/src/charts/definition/declaresField.js +14 -0
- package/es/src/charts/definition/makeChart.js +10 -2
- package/es/src/charts/drawSteps/bottomRightControls.js +1 -1
- package/es/src/charts/drawSteps/bottomRightControlsMarkup.js +1 -1
- package/es/src/charts/drawSteps/gestureHover.js +10 -6
- package/es/src/charts/drawSteps/leavesSurface.js +12 -0
- package/es/src/charts/drawSteps/minimap.js +1 -1
- package/es/src/charts/drawSteps/selectActions.js +105 -0
- package/es/src/charts/drawSteps/selectGesture.js +318 -0
- package/es/src/charts/drawSteps/selectRegion.js +222 -0
- package/es/src/charts/drawSteps/selectState.js +118 -0
- package/es/src/charts/drawSteps/topLeftControls.js +4 -1
- package/es/src/charts/drawSteps/zoomControls.js +59 -19
- package/es/src/charts/drawSteps/zoomControlsMarkup.js +212 -39
- package/es/src/charts/drawSteps/zoomControlsMenu.js +140 -0
- package/es/src/charts/drawSteps/zoomDrag.js +3 -1
- package/es/src/charts/events/mouseleave.js +6 -3
- package/es/src/charts/events/mousemove.legend.js +10 -5
- package/es/src/charts/events/mousemove.shape.js +15 -6
- package/es/src/charts/facet/drawFacets.js +61 -22
- package/es/src/charts/facet/facetConfig.js +3 -1
- package/es/src/charts/facet/facetData.js +10 -2
- package/es/src/charts/facet/facetGrid.js +5 -1
- package/es/src/charts/facet/facetGutter.js +36 -7
- package/es/src/charts/facet/facetLayout.js +136 -0
- package/es/src/charts/facet/facetLayouts.js +574 -0
- package/es/src/charts/facet/facetScene.js +10 -3
- package/es/src/charts/features/annotationFrame.js +8 -3
- package/es/src/charts/features/axes.js +4 -2
- package/es/src/charts/features/axesFinal.js +92 -8
- package/es/src/charts/features/axesMeasure.js +7 -4
- package/es/src/charts/features/bareRegion.js +24 -0
- package/es/src/charts/features/boxGrid.js +39 -0
- package/es/src/charts/features/centerLabel.js +36 -17
- package/es/src/charts/features/circleLabelPlacement.js +288 -83
- package/es/src/charts/features/circleLabels.js +66 -14
- package/es/src/charts/features/colorScaleHover.js +7 -2
- package/es/src/charts/features/colorScaleTooltip.js +6 -21
- package/es/src/charts/features/colorScaleTop.js +12 -2
- package/es/src/charts/features/colorScaleValue.js +10 -1
- package/es/src/charts/features/curvedArrows.js +46 -28
- package/es/src/charts/features/edgeArrows.js +48 -18
- package/es/src/charts/features/emitHelpers.js +7 -2
- package/es/src/charts/features/features.js +25 -5
- package/es/src/charts/features/featuresColorScale.js +7 -4
- package/es/src/charts/features/featuresLegend.js +20 -0
- package/es/src/charts/features/hoverTicks.js +12 -7
- package/es/src/charts/features/keyHold.js +115 -0
- package/es/src/charts/features/keyTooltip.js +91 -0
- package/es/src/charts/features/labelLayering.js +149 -0
- package/es/src/charts/features/labelSlots.js +112 -0
- package/es/src/charts/features/linkInteraction.js +4 -1
- package/es/src/charts/features/linkLabelPath.js +2 -39
- package/es/src/charts/features/nodeDrag.js +175 -0
- package/es/src/charts/features/nodeKeys.js +117 -0
- package/es/src/charts/features/nodeOutline.js +41 -0
- package/es/src/charts/features/pathLabelBends.js +191 -0
- package/es/src/charts/features/plotAnnotations.js +8 -5
- package/es/src/charts/features/plotPaint.js +45 -13
- package/es/src/charts/features/rectNodeSize.js +41 -0
- package/es/src/charts/features/ringLabels.js +3 -1
- package/es/src/charts/features/selfLoops.js +33 -23
- package/es/src/charts/features/shapeEmit.js +104 -32
- package/es/src/charts/features/sharedFields.js +10 -5
- package/es/src/charts/features/spokeLabels.js +178 -0
- package/es/src/charts/features/swatchPaint.js +68 -0
- package/es/src/charts/features/thresholdMembers.js +8 -12
- package/es/src/charts/features/tooltipRows.js +76 -0
- package/es/src/charts/features/tooltipSwatch.js +81 -24
- package/es/src/charts/features/xAxisConfig.js +2 -1
- package/es/src/charts/helpers/densityChart.js +2 -7
- package/es/src/charts/helpers/valueTitle.js +13 -1
- package/es/src/charts/index.js +17 -0
- package/es/src/charts/partition/interaction.js +2 -2
- package/es/src/charts/pipeline/insetPlacement.js +13 -6
- package/es/src/charts/pipeline/preDrawData.js +80 -11
- package/es/src/charts/pipeline/runVizPipeline.js +5 -0
- package/es/src/charts/pipeline/stages.js +3 -2
- package/es/src/charts/pipeline/vizPreDraw.js +4 -0
- package/es/src/charts/plotBuffers/Circle.js +3 -2
- package/es/src/charts/plotBuffers/Line.js +6 -5
- package/es/src/charts/plotBuffers/Rect.js +3 -2
- package/es/src/charts/plotBuffers/Tick.js +12 -0
- package/es/src/charts/plotBuffers/defaultBuffers.js +3 -1
- package/es/src/charts/plotBuffers/rectLikeBuffer.js +4 -3
- package/es/src/charts/viz/Viz.js +32 -18
- package/es/src/charts/viz/VizBase.js +39 -38
- package/es/src/charts/viz/appendRows.js +90 -0
- package/es/src/charts/viz/dataChanged.js +19 -0
- package/es/src/charts/viz/discrete.js +9 -0
- package/es/src/charts/viz/focusTargets.js +25 -5
- package/es/src/charts/viz/groupByLevels.js +48 -0
- package/es/src/charts/viz/groupRow.js +27 -0
- package/es/src/charts/viz/hoverBand.js +40 -0
- package/es/src/charts/viz/interactionOpacity.js +134 -29
- package/es/src/charts/viz/keyboardNav.js +39 -9
- package/es/src/charts/viz/liftRaised.js +84 -0
- package/es/src/charts/viz/nearestHover.js +9 -2
- package/es/src/charts/viz/setCursor.js +12 -0
- package/es/src/charts/viz/simpleHover.js +3 -4
- package/es/src/charts/viz/userClick.js +11 -0
- package/es/src/charts/viz/vizDefaults.js +10 -0
- package/es/src/charts/viz/vizFields.js +7 -0
- package/es/src/charts/viz/vizTypes.js +1 -1
- package/es/src/components/Axis/Axis.js +85 -12
- package/es/src/components/Axis/AxisBottom.js +1 -0
- package/es/src/components/Axis/AxisLeft.js +1 -0
- package/es/src/components/Axis/AxisRight.js +1 -0
- package/es/src/components/Axis/AxisTop.js +1 -0
- package/es/src/components/Axis/axisDefaults.js +7 -0
- package/es/src/components/Axis/axisEndLabels.js +4 -1
- package/es/src/components/Axis/axisLabelSize.js +40 -16
- package/es/src/components/Axis/axisLabelThinning.js +69 -6
- package/es/src/components/Axis/axisLayout.js +5 -0
- package/es/src/components/Axis/axisLayoutLabels.js +11 -5
- package/es/src/components/Axis/axisLayoutScale.js +71 -25
- package/es/src/components/Axis/axisLevels.js +271 -0
- package/es/src/components/Axis/axisLimit.js +6 -0
- package/es/src/components/Axis/axisMinorTicks.js +280 -0
- package/es/src/components/Axis/axisPeriods.js +144 -0
- package/es/src/components/Axis/axisRangeBreaks.js +19 -10
- package/es/src/components/Axis/axisRender.js +71 -29
- package/es/src/components/Axis/axisRounding.js +24 -2
- package/es/src/components/Axis/axisScaleType.js +55 -0
- package/es/src/components/Axis/axisScene.js +90 -5
- package/es/src/components/Axis/axisTickLookups.js +30 -0
- package/es/src/components/Axis/axisTooltipTargets.js +23 -0
- package/es/src/components/Axis/labelSizeSession.js +23 -0
- package/es/src/components/Axis/rangeBreaks.js +10 -4
- package/es/src/components/Axis/timeValues.js +116 -19
- package/es/src/components/ColorScale/ColorScale.js +1 -0
- package/es/src/components/ColorScale/colorScaleScale.js +139 -41
- package/es/src/components/Legend/Legend.js +1 -0
- package/es/src/components/SizeLegend/SizeLegend.js +20 -1
- package/es/src/components/TextBox.js +1 -0
- package/es/src/components/Timeline/Timeline.js +11 -3
- package/es/src/components/Timeline/timelineRender.js +23 -13
- package/es/src/components/Tooltip.js +8 -1
- package/es/src/components/tooltipDom.js +73 -14
- package/es/src/fluent.js +77 -10
- package/es/src/shapes/Area.js +32 -1
- package/es/src/shapes/Bar.js +22 -1
- package/es/src/shapes/Box.js +72 -13
- package/es/src/shapes/Circle.js +1 -0
- package/es/src/shapes/Image.js +8 -1
- package/es/src/shapes/Line.js +45 -1
- package/es/src/shapes/Path.js +1 -0
- package/es/src/shapes/Rect.js +1 -0
- package/es/src/shapes/Shape.js +29 -8
- package/es/src/shapes/Tick.js +54 -0
- package/es/src/shapes/Whisker.js +1 -0
- package/es/src/shapes/boxExtraShapes.js +72 -0
- package/es/src/shapes/boxExtras.js +212 -0
- package/es/src/shapes/boxStyle.js +38 -5
- package/es/src/shapes/buildLabelData.js +2 -0
- package/es/src/shapes/downsample.js +150 -0
- package/es/src/shapes/hitAreaNode.js +6 -2
- package/es/src/shapes/index.js +1 -0
- package/es/src/shapes/pathSeries.js +51 -0
- package/es/src/utils/BaseClass.js +59 -57
- package/es/src/utils/jitter.js +33 -0
- package/es/src/utils/resetSetters.js +66 -0
- package/package.json +10 -10
- package/types/index.d.ts +5 -4
- package/types/internal.d.ts +253 -27
- package/types/src/charts/ArcDiagram/arcGeometry.d.ts +7 -3
- package/types/src/charts/ArcDiagram/arcLoops.d.ts +3 -1
- package/types/src/charts/ArcDiagram/arcNodeBox.d.ts +60 -0
- package/types/src/charts/ArcDiagram/emit.d.ts +5 -4
- package/types/src/charts/BoxWhisker/extras.d.ts +41 -0
- package/types/src/charts/BoxWhisker/summary.d.ts +1 -1
- package/types/src/charts/BoxWhisker/tooltip.d.ts +33 -4
- package/types/src/charts/BubbleChart/emit.d.ts +3 -3
- package/types/src/charts/BubbleMatrix/colorDefaults.d.ts +19 -0
- package/types/src/charts/BubbleMatrix/index.d.ts +18 -0
- package/types/src/charts/BumpChart/areaBump.d.ts +86 -0
- package/types/src/charts/BumpChart/index.d.ts +19 -1
- package/types/src/charts/Calendar/calendarDates.d.ts +8 -1
- package/types/src/charts/Candlestick/periods.d.ts +19 -8
- package/types/src/charts/ConnectedScatter/index.d.ts +17 -0
- package/types/src/charts/CyclePlot/cycleFacet.d.ts +61 -0
- package/types/src/charts/CyclePlot/cycleMeans.d.ts +32 -0
- package/types/src/charts/CyclePlot/cyclePeriods.d.ts +37 -0
- package/types/src/charts/CyclePlot/cycleTooltip.d.ts +47 -0
- package/types/src/charts/CyclePlot/index.d.ts +75 -0
- package/types/src/charts/DensityPlot/densityCurves.d.ts +84 -0
- package/types/src/charts/DensityPlot/densityPoint.d.ts +16 -0
- package/types/src/charts/DensityPlot/index.d.ts +33 -0
- package/types/src/charts/DensityPlot/rug.d.ts +57 -0
- package/types/src/charts/DotPlot/dotLayout.d.ts +95 -0
- package/types/src/charts/DotPlot/facetSize.d.ts +33 -0
- package/types/src/charts/DotPlot/index.d.ts +22 -0
- package/types/src/charts/DotPlot/placements.d.ts +28 -0
- package/types/src/charts/DotPlot/tooltip.d.ts +27 -0
- package/types/src/charts/Dumbbell/arrowGrays.d.ts +33 -0
- package/types/src/charts/Dumbbell/categoryChange.d.ts +66 -0
- package/types/src/charts/Dumbbell/changeEmit.d.ts +71 -0
- package/types/src/charts/Dumbbell/changes.d.ts +64 -0
- package/types/src/charts/Dumbbell/connectors.d.ts +43 -0
- package/types/src/charts/Dumbbell/emit.d.ts +17 -19
- package/types/src/charts/Dumbbell/index.d.ts +6 -2
- package/types/src/charts/Gantt/applyLayout.d.ts +14 -1
- package/types/src/charts/Gantt/criticalPath.d.ts +100 -0
- package/types/src/charts/Gantt/emit.d.ts +17 -1
- package/types/src/charts/Gantt/ganttCalendar.d.ts +37 -0
- package/types/src/charts/Gantt/ganttCritical.d.ts +53 -0
- package/types/src/charts/Gantt/ganttDecor.d.ts +32 -2
- package/types/src/charts/Gantt/ganttRows.d.ts +2 -0
- package/types/src/charts/Gantt/ganttSlack.d.ts +21 -0
- package/types/src/charts/Gantt/ganttTooltip.d.ts +35 -15
- package/types/src/charts/Gantt/index.d.ts +12 -6
- package/types/src/charts/Geomap/applyLayout.d.ts +19 -0
- package/types/src/charts/Geomap/cartogram.d.ts +58 -0
- package/types/src/charts/Geomap/cartogramContiguous.d.ts +59 -0
- package/types/src/charts/Geomap/cartogramFields.d.ts +16 -0
- package/types/src/charts/Geomap/cartogramLabels.d.ts +48 -0
- package/types/src/charts/Geomap/cartogramLayout.d.ts +71 -0
- package/types/src/charts/Geomap/cartogramLegend.d.ts +36 -0
- package/types/src/charts/Geomap/cartogramRelax.d.ts +29 -0
- package/types/src/charts/Geomap/densityEmit.d.ts +29 -0
- package/types/src/charts/Geomap/densityFields.d.ts +27 -0
- package/types/src/charts/Geomap/densityLayout.d.ts +49 -0
- package/types/src/charts/Geomap/densityTooltip.d.ts +48 -0
- package/types/src/charts/Geomap/dotDensity.d.ts +80 -0
- package/types/src/charts/Geomap/dotDensityLayout.d.ts +97 -0
- package/types/src/charts/Geomap/dotRenderer.d.ts +27 -0
- package/types/src/charts/Geomap/drillDown.d.ts +128 -0
- package/types/src/charts/Geomap/drillEmit.d.ts +37 -0
- package/types/src/charts/Geomap/drillEvents.d.ts +33 -0
- package/types/src/charts/Geomap/emit.d.ts +7 -0
- package/types/src/charts/Geomap/flowEmit.d.ts +5 -4
- package/types/src/charts/Geomap/flowLinks.d.ts +12 -1
- package/types/src/charts/Geomap/geoHexbin.d.ts +91 -0
- package/types/src/charts/Geomap/geoHexbinZoom.d.ts +76 -0
- package/types/src/charts/Geomap/index.d.ts +7 -0
- package/types/src/charts/Geomap/pointCluster.d.ts +108 -0
- package/types/src/charts/Geomap/pointClusterEmit.d.ts +106 -0
- package/types/src/charts/Geomap/pointClusterLayout.d.ts +123 -0
- package/types/src/charts/Geomap/pointClusterLinks.d.ts +21 -0
- package/types/src/charts/Geomap/pointClusterZoom.d.ts +89 -0
- package/types/src/charts/Geomap/pointLabels.d.ts +21 -3
- package/types/src/charts/Geomap/pointRows.d.ts +24 -0
- package/types/src/charts/Geomap/tileGrid.d.ts +98 -0
- package/types/src/charts/Geomap/tileState.d.ts +18 -0
- package/types/src/charts/Geomap/topojsonFluent.d.ts +9 -0
- package/types/src/charts/Geomap/topojsonLevels.d.ts +14 -0
- package/types/src/charts/Hexbin/contourLabels.d.ts +6 -5
- package/types/src/charts/Hexbin/settings.d.ts +7 -1
- package/types/src/charts/Histogram/binData.d.ts +6 -0
- package/types/src/charts/HorizonChart/emit.d.ts +20 -0
- package/types/src/charts/HorizonChart/horizonBands.d.ts +42 -0
- package/types/src/charts/HorizonChart/horizonColors.d.ts +25 -0
- package/types/src/charts/HorizonChart/hover.d.ts +52 -0
- package/types/src/charts/HorizonChart/index.d.ts +32 -0
- package/types/src/charts/HorizonChart/measure.d.ts +24 -0
- package/types/src/charts/HorizonChart/rowFilter.d.ts +88 -0
- package/types/src/charts/HorizonChart/state.d.ts +71 -0
- package/types/src/charts/KPI/applyLayout.d.ts +64 -0
- package/types/src/charts/KPI/delta.d.ts +62 -0
- package/types/src/charts/KPI/emit.d.ts +55 -0
- package/types/src/charts/KPI/index.d.ts +34 -0
- package/types/src/charts/KPI/series.d.ts +45 -0
- package/types/src/charts/KPI/tileLayout.d.ts +90 -0
- package/types/src/charts/Matrix/applyLayout.d.ts +2 -1
- package/types/src/charts/Matrix/bubbles.d.ts +87 -0
- package/types/src/charts/Matrix/emit.d.ts +3 -2
- package/types/src/charts/Matrix/index.d.ts +2 -1
- package/types/src/charts/Network/applyLayout.d.ts +24 -0
- package/types/src/charts/Network/bundle.d.ts +23 -16
- package/types/src/charts/Network/circleLayout.d.ts +149 -0
- package/types/src/charts/Network/containNodes.d.ts +35 -0
- package/types/src/charts/Network/emit.d.ts +20 -0
- package/types/src/charts/Network/forceLayout.d.ts +49 -0
- package/types/src/charts/Network/graph.d.ts +18 -2
- package/types/src/charts/Network/liveForce.d.ts +133 -0
- package/types/src/charts/Network/livePositions.d.ts +90 -0
- package/types/src/charts/Network/networkDrag.d.ts +55 -0
- package/types/src/charts/Pareto/color.d.ts +21 -0
- package/types/src/charts/Pareto/hover.d.ts +38 -0
- package/types/src/charts/Pareto/index.d.ts +22 -0
- package/types/src/charts/Pareto/labels.d.ts +40 -0
- package/types/src/charts/Pareto/order.d.ts +30 -0
- package/types/src/charts/Pareto/paretoSteps.d.ts +65 -0
- package/types/src/charts/Pareto/state.d.ts +93 -0
- package/types/src/charts/Parliament/index.d.ts +18 -0
- package/types/src/charts/Plot/areaLabelsAlong.d.ts +7 -0
- package/types/src/charts/Plot/aspectRatio.d.ts +68 -0
- package/types/src/charts/Plot/axisHover.d.ts +2 -0
- package/types/src/charts/Plot/axisHoverScene.d.ts +44 -1
- package/types/src/charts/Plot/barConfidence.d.ts +14 -1
- package/types/src/charts/Plot/barHitArea.d.ts +34 -7
- package/types/src/charts/Plot/barLabelConfidence.d.ts +25 -0
- package/types/src/charts/Plot/baselineBreak.d.ts +2 -1
- package/types/src/charts/Plot/baselineDomain.d.ts +5 -0
- package/types/src/charts/Plot/circleLabels.d.ts +8 -7
- package/types/src/charts/Plot/confidenceAxes.d.ts +63 -0
- package/types/src/charts/Plot/confidenceTooltip.d.ts +22 -0
- package/types/src/charts/Plot/discreteDomain.d.ts +13 -2
- package/types/src/charts/Plot/discreteSpan.d.ts +5 -0
- package/types/src/charts/Plot/domainClip.d.ts +15 -5
- package/types/src/charts/Plot/downsample.d.ts +16 -0
- package/types/src/charts/Plot/index.d.ts +17 -8
- package/types/src/charts/Plot/inferDiscrete.d.ts +31 -0
- package/types/src/charts/Plot/jitter.d.ts +45 -0
- package/types/src/charts/Plot/lineLabelSides.d.ts +19 -0
- package/types/src/charts/Plot/lineLabelsAlong.d.ts +19 -6
- package/types/src/charts/Plot/marginalHover.d.ts +26 -0
- package/types/src/charts/Plot/marginalLayout.d.ts +95 -0
- package/types/src/charts/Plot/marginalPaint.d.ts +54 -0
- package/types/src/charts/Plot/marginalScene.d.ts +67 -0
- package/types/src/charts/Plot/marginalSeries.d.ts +38 -0
- package/types/src/charts/Plot/marginalStats.d.ts +115 -0
- package/types/src/charts/Plot/openDomainEnds.d.ts +25 -0
- package/types/src/charts/Plot/orderPath.d.ts +100 -0
- package/types/src/charts/Plot/orderPathScene.d.ts +49 -0
- package/types/src/charts/Plot/outlierDetect.d.ts +87 -0
- package/types/src/charts/Plot/outlierLabels.d.ts +103 -0
- package/types/src/charts/Plot/outlierLines.d.ts +30 -0
- package/types/src/charts/Plot/outlierScene.d.ts +103 -0
- package/types/src/charts/Plot/outlierTooltip.d.ts +44 -0
- package/types/src/charts/Plot/periodLabels.d.ts +14 -0
- package/types/src/charts/Plot/pipeline.d.ts +2 -1
- package/types/src/charts/Plot/plotBreaks.d.ts +21 -6
- package/types/src/charts/Plot/plotInit.d.ts +7 -25
- package/types/src/charts/Plot/plotLevels.d.ts +120 -0
- package/types/src/charts/Plot/plotRangeBreaks.d.ts +28 -2
- package/types/src/charts/Plot/plotShapes.d.ts +42 -0
- package/types/src/charts/Plot/pointConfidence.d.ts +73 -0
- package/types/src/charts/Plot/pointKey.d.ts +9 -0
- package/types/src/charts/Plot/referenceDomains.d.ts +2 -1
- package/types/src/charts/Plot/shapeAccessors.d.ts +24 -0
- package/types/src/charts/Plot/sharedHover.d.ts +5 -0
- package/types/src/charts/Plot/sharedTooltip.d.ts +24 -6
- package/types/src/charts/Plot/stackEnter.d.ts +1 -1
- package/types/src/charts/Plot/stackLegendOrder.d.ts +4 -1
- package/types/src/charts/Plot/stackNeutral.d.ts +85 -0
- package/types/src/charts/Plot/swarm.d.ts +8 -4
- package/types/src/charts/Plot/timeNestKeys.d.ts +20 -0
- package/types/src/charts/Plot/trendLabels.d.ts +15 -6
- package/types/src/charts/Plot/trendLines.d.ts +40 -8
- package/types/src/charts/Plot/trendMovingAverage.d.ts +78 -0
- package/types/src/charts/Plot/trendProjection.d.ts +4 -2
- package/types/src/charts/Plot/trendTooltip.d.ts +24 -2
- package/types/src/charts/Priestley/timeAxis.d.ts +6 -3
- package/types/src/charts/RadialArea/index.d.ts +17 -0
- package/types/src/charts/RadialLine/angles.d.ts +67 -0
- package/types/src/charts/RadialLine/applyLayout.d.ts +70 -0
- package/types/src/charts/RadialLine/emit.d.ts +13 -0
- package/types/src/charts/RadialLine/index.d.ts +28 -0
- package/types/src/charts/RadialLine/paths.d.ts +37 -0
- package/types/src/charts/RadialLine/points.d.ts +43 -0
- package/types/src/charts/RadialLine/series.d.ts +63 -0
- package/types/src/charts/RadialLine/seriesLabelNodes.d.ts +26 -0
- package/types/src/charts/RadialLine/seriesLabels.d.ts +80 -0
- package/types/src/charts/RadialLine/spokes.d.ts +15 -0
- package/types/src/charts/RadialTree/index.d.ts +16 -0
- package/types/src/charts/Rings/emit.d.ts +6 -5
- package/types/src/charts/Rings/ringsCurves.d.ts +10 -14
- package/types/src/charts/Rings/ringsGraph.d.ts +3 -0
- package/types/src/charts/Rings/ringsSizing.d.ts +5 -2
- package/types/src/charts/Sankey/circularLayout.d.ts +3 -0
- package/types/src/charts/Sankey/sankeyDrag.d.ts +112 -0
- package/types/src/charts/Sankey/sankeyLayout.d.ts +8 -0
- package/types/src/charts/Scatter/index.d.ts +3 -2
- package/types/src/charts/ScatterMatrix/binEmit.d.ts +22 -0
- package/types/src/charts/ScatterMatrix/index.d.ts +80 -0
- package/types/src/charts/ScatterMatrix/matrixData.d.ts +93 -0
- package/types/src/charts/ScatterMatrix/matrixFacet.d.ts +32 -0
- package/types/src/charts/ScatterMatrix/matrixHover.d.ts +21 -0
- package/types/src/charts/ScatterMatrix/matrixTooltip.d.ts +32 -0
- package/types/src/charts/StripPlot/index.d.ts +16 -0
- package/types/src/charts/TileGridMap/index.d.ts +14 -0
- package/types/src/charts/Tree/index.d.ts +2 -2
- package/types/src/charts/Tree/nodeHeight.d.ts +41 -0
- package/types/src/charts/Tree/radialLabels.d.ts +24 -0
- package/types/src/charts/Tree/radialLayout.d.ts +129 -0
- package/types/src/charts/Venn/applyLayout.d.ts +91 -0
- package/types/src/charts/Venn/circles.d.ts +87 -0
- package/types/src/charts/Venn/ellipseFrame.d.ts +37 -0
- package/types/src/charts/Venn/emit.d.ts +36 -0
- package/types/src/charts/Venn/index.d.ts +30 -0
- package/types/src/charts/Venn/nelderMead.d.ts +28 -0
- package/types/src/charts/Venn/tooltip.d.ts +8 -0
- package/types/src/charts/Venn/vennData.d.ts +56 -0
- package/types/src/charts/Venn/vennEllipses.d.ts +93 -0
- package/types/src/charts/Venn/vennFit.d.ts +39 -0
- package/types/src/charts/Venn/vennLayout.d.ts +52 -0
- package/types/src/charts/Venn/vennRegions.d.ts +58 -0
- package/types/src/charts/Waffle/applyLayout.d.ts +4 -1
- package/types/src/charts/Waffle/arcEmit.d.ts +45 -0
- package/types/src/charts/Waffle/arcLayout.d.ts +82 -0
- package/types/src/charts/Waffle/arcStage.d.ts +60 -0
- package/types/src/charts/Waffle/emit.d.ts +2 -1
- package/types/src/charts/Waffle/index.d.ts +8 -2
- package/types/src/charts/Waffle/tooltip.d.ts +7 -2
- package/types/src/charts/Waterfall/connectors.d.ts +3 -2
- package/types/src/charts/WordCloud/applyLayout.d.ts +51 -0
- package/types/src/charts/WordCloud/cloudLayout.d.ts +95 -0
- package/types/src/charts/WordCloud/emit.d.ts +27 -0
- package/types/src/charts/WordCloud/fontScale.d.ts +20 -0
- package/types/src/charts/WordCloud/glyphMask.d.ts +95 -0
- package/types/src/charts/WordCloud/index.d.ts +31 -0
- package/types/src/charts/WordCloud/occupancy.d.ts +59 -0
- package/types/src/charts/WordCloud/rotation.d.ts +31 -0
- package/types/src/charts/WordCloud/size.d.ts +16 -0
- package/types/src/charts/WordCloud/spiral.d.ts +47 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +13 -0
- package/types/src/charts/definition/declaresField.d.ts +9 -0
- package/types/src/charts/definition/makeChart.d.ts +2 -2
- package/types/src/charts/drawSteps/gestureHover.d.ts +2 -2
- package/types/src/charts/drawSteps/leavesSurface.d.ts +11 -0
- package/types/src/charts/drawSteps/selectActions.d.ts +58 -0
- package/types/src/charts/drawSteps/selectGesture.d.ts +60 -0
- package/types/src/charts/drawSteps/selectRegion.d.ts +86 -0
- package/types/src/charts/drawSteps/selectState.d.ts +51 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +17 -7
- package/types/src/charts/drawSteps/zoomControlsMarkup.d.ts +94 -21
- package/types/src/charts/drawSteps/zoomControlsMenu.d.ts +30 -0
- package/types/src/charts/drawSteps/zoomDrag.d.ts +2 -0
- package/types/src/charts/facet/drawFacets.d.ts +6 -3
- package/types/src/charts/facet/facetConfig.d.ts +35 -1
- package/types/src/charts/facet/facetData.d.ts +8 -2
- package/types/src/charts/facet/facetGrid.d.ts +12 -0
- package/types/src/charts/facet/facetGutter.d.ts +19 -5
- package/types/src/charts/facet/facetLayout.d.ts +79 -0
- package/types/src/charts/facet/facetLayouts.d.ts +21 -0
- package/types/src/charts/facet/facetScene.d.ts +4 -1
- package/types/src/charts/features/annotationFrame.d.ts +2 -0
- package/types/src/charts/features/axesFinal.d.ts +5 -2
- package/types/src/charts/features/bareRegion.d.ts +18 -0
- package/types/src/charts/features/boxGrid.d.ts +28 -0
- package/types/src/charts/features/centerLabel.d.ts +16 -2
- package/types/src/charts/features/circleLabelPlacement.d.ts +81 -11
- package/types/src/charts/features/circleLabels.d.ts +33 -3
- package/types/src/charts/features/colorScaleHover.d.ts +3 -2
- package/types/src/charts/features/colorScaleTooltip.d.ts +4 -9
- package/types/src/charts/features/colorScaleValue.d.ts +6 -0
- package/types/src/charts/features/curvedArrows.d.ts +28 -12
- package/types/src/charts/features/edgeArrows.d.ts +40 -30
- package/types/src/charts/features/emitHelpers.d.ts +6 -1
- package/types/src/charts/features/featuresColorScale.d.ts +6 -0
- package/types/src/charts/features/hoverTicks.d.ts +5 -2
- package/types/src/charts/features/keyHold.d.ts +41 -0
- package/types/src/charts/features/keyTooltip.d.ts +44 -0
- package/types/src/charts/features/labelLayering.d.ts +38 -0
- package/types/src/charts/features/labelSlots.d.ts +53 -0
- package/types/src/charts/features/linkLabelPath.d.ts +0 -7
- package/types/src/charts/features/nodeDrag.d.ts +51 -0
- package/types/src/charts/features/nodeKeys.d.ts +53 -0
- package/types/src/charts/features/nodeOutline.d.ts +34 -0
- package/types/src/charts/features/pathLabelBends.d.ts +78 -0
- package/types/src/charts/features/plotAnnotations.d.ts +2 -1
- package/types/src/charts/features/plotPaint.d.ts +5 -0
- package/types/src/charts/features/rectNodeSize.d.ts +42 -0
- package/types/src/charts/features/ringLabels.d.ts +3 -1
- package/types/src/charts/features/selfLoops.d.ts +10 -9
- package/types/src/charts/features/shapeEmit.d.ts +2 -0
- package/types/src/charts/features/sharedFields.d.ts +8 -4
- package/types/src/charts/features/spokeLabels.d.ts +123 -0
- package/types/src/charts/features/swatchPaint.d.ts +58 -0
- package/types/src/charts/features/thresholdMembers.d.ts +6 -6
- package/types/src/charts/features/tooltipRows.d.ts +50 -0
- package/types/src/charts/features/tooltipSwatch.d.ts +25 -11
- package/types/src/charts/helpers/valueTitle.d.ts +7 -0
- package/types/src/charts/index.d.ts +17 -0
- package/types/src/charts/pipeline/preDrawData.d.ts +26 -0
- package/types/src/charts/plotBuffers/Circle.d.ts +2 -1
- package/types/src/charts/plotBuffers/Rect.d.ts +2 -1
- package/types/src/charts/plotBuffers/Tick.d.ts +9 -0
- package/types/src/charts/plotBuffers/defaultBuffers.d.ts +2 -0
- package/types/src/charts/viz/VizBase.d.ts +32 -1
- package/types/src/charts/viz/appendRows.d.ts +49 -0
- package/types/src/charts/viz/dataChanged.d.ts +11 -0
- package/types/src/charts/viz/discrete.d.ts +19 -0
- package/types/src/charts/viz/focusTargets.d.ts +15 -1
- package/types/src/charts/viz/groupByLevels.d.ts +36 -0
- package/types/src/charts/viz/groupRow.d.ts +6 -0
- package/types/src/charts/viz/hoverBand.d.ts +28 -0
- package/types/src/charts/viz/interactionOpacity.d.ts +23 -2
- package/types/src/charts/viz/keyboardNav.d.ts +13 -0
- package/types/src/charts/viz/liftRaised.d.ts +23 -0
- package/types/src/charts/viz/setCursor.d.ts +12 -0
- package/types/src/charts/viz/simpleHover.d.ts +3 -3
- package/types/src/charts/viz/userClick.d.ts +8 -0
- package/types/src/charts/viz/vizFields.d.ts +7 -0
- package/types/src/charts/viz/vizTypes.d.ts +116 -2
- package/types/src/components/Axis/Axis.d.ts +35 -0
- package/types/src/components/Axis/axisDefaults.d.ts +2 -0
- package/types/src/components/Axis/axisLabelSize.d.ts +3 -3
- package/types/src/components/Axis/axisLabelThinning.d.ts +19 -1
- package/types/src/components/Axis/axisLayoutScale.d.ts +14 -2
- package/types/src/components/Axis/axisLevels.d.ts +137 -0
- package/types/src/components/Axis/axisMinorTicks.d.ts +83 -0
- package/types/src/components/Axis/axisPeriods.d.ts +45 -0
- package/types/src/components/Axis/axisRangeBreaks.d.ts +6 -2
- package/types/src/components/Axis/axisRounding.d.ts +15 -1
- package/types/src/components/Axis/axisScaleType.d.ts +32 -0
- package/types/src/components/Axis/axisScene.d.ts +15 -7
- package/types/src/components/Axis/axisTickLookups.d.ts +26 -0
- package/types/src/components/Axis/axisTooltipTargets.d.ts +16 -4
- package/types/src/components/Axis/labelSizeSession.d.ts +16 -0
- package/types/src/components/Axis/rangeBreaks.d.ts +6 -2
- package/types/src/components/Axis/timeValues.d.ts +48 -2
- package/types/src/components/ColorScale/colorScaleScale.d.ts +45 -0
- package/types/src/components/Tooltip.d.ts +11 -2
- package/types/src/components/tooltipDom.d.ts +24 -0
- package/types/src/fluent.d.ts +30 -1
- package/types/src/shapes/Bar.d.ts +7 -0
- package/types/src/shapes/Box.d.ts +15 -0
- package/types/src/shapes/Shape.d.ts +11 -0
- package/types/src/shapes/Tick.d.ts +20 -0
- package/types/src/shapes/boxExtraShapes.d.ts +40 -0
- package/types/src/shapes/boxExtras.d.ts +85 -0
- package/types/src/shapes/boxStyle.d.ts +25 -4
- package/types/src/shapes/downsample.d.ts +68 -0
- package/types/src/shapes/hitAreaNode.d.ts +2 -1
- package/types/src/shapes/index.d.ts +1 -0
- package/types/src/shapes/pathSeries.d.ts +35 -0
- package/types/src/shapes/shapeConfig.d.ts +70 -2
- package/types/src/utils/BaseClass.d.ts +18 -4
- package/types/src/utils/D3plusConfig.d.ts +991 -85
- package/types/src/utils/index.d.ts +1 -1
- package/types/src/utils/jitter.d.ts +23 -0
- package/types/src/utils/resetSetters.d.ts +23 -0
- package/umd/d3plus-core.full.js +98950 -68731
- package/umd/d3plus-core.full.min.js +2 -2
- package/umd/d3plus-core.js +77484 -48545
- package/umd/d3plus-core.min.js +2 -2
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Network's remembered layout and live force simulation.
|
|
3
|
+
|
|
4
|
+
A Network remembers where it drew each node. When the nodes or links
|
|
5
|
+
change (a new timeline period, say), the nodes it drew before keep their
|
|
6
|
+
places, new ones enter beside a linked neighbor (see `seedPositions`), and
|
|
7
|
+
a force simulation settles the change. Nodes dropped by a drag stay
|
|
8
|
+
pinned where they were dropped.
|
|
9
|
+
|
|
10
|
+
At or under `forceLive` nodes the simulation keeps running after the
|
|
11
|
+
chart paints, one tick per animation frame, re-laying out and repainting
|
|
12
|
+
the chart until it cools, so the layout visibly settles and reacts to a
|
|
13
|
+
dragged node. Larger networks (or reduced motion) settle a change at
|
|
14
|
+
once, before they paint.
|
|
15
|
+
|
|
16
|
+
@module
|
|
17
|
+
*/
|
|
18
|
+
import type { Simulation, SimulationNodeDatum } from "d3-force";
|
|
19
|
+
import type { LabelSlot } from "../features/labelSlots.js";
|
|
20
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
21
|
+
import type { GraphLink, GraphNode } from "./graph.js";
|
|
22
|
+
import type { Bounds, Position } from "./livePositions.js";
|
|
23
|
+
/** The node count `forceLive` defaults to. */
|
|
24
|
+
export declare const FORCE_LIVE_DEFAULT = 200;
|
|
25
|
+
/** A simulated node: its id and the half-size it keeps clear. */
|
|
26
|
+
export interface LiveNode extends SimulationNodeDatum {
|
|
27
|
+
id: string;
|
|
28
|
+
/** Half its width. */
|
|
29
|
+
rx: number;
|
|
30
|
+
/** Half its height. */
|
|
31
|
+
ry: number;
|
|
32
|
+
}
|
|
33
|
+
/** A simulated link, by node ids. */
|
|
34
|
+
export interface LiveLink {
|
|
35
|
+
source: string | LiveNode;
|
|
36
|
+
target: string | LiveNode;
|
|
37
|
+
}
|
|
38
|
+
/** The layout a Network keeps across draws, on `viz.ctx.networkLive`. */
|
|
39
|
+
export interface NetworkLive {
|
|
40
|
+
/** Where each node was drawn last, in the chart's pixel space. */
|
|
41
|
+
positions: Map<string, Position>;
|
|
42
|
+
/** Nodes a drag dropped, held where they were dropped. */
|
|
43
|
+
pinned: Map<string, Position>;
|
|
44
|
+
/** The chart area the positions are in. */
|
|
45
|
+
bounds?: Bounds;
|
|
46
|
+
/** The graph (see `graphKey`) the positions were laid out for. */
|
|
47
|
+
key?: string;
|
|
48
|
+
/** Each node's precomputed position on the last full draw. */
|
|
49
|
+
laid?: Map<string, Position>;
|
|
50
|
+
/** Whether the positions differ from the precomputed layout. */
|
|
51
|
+
custom?: boolean;
|
|
52
|
+
/** The running simulation, in live mode. */
|
|
53
|
+
sim?: Simulation<LiveNode, undefined>;
|
|
54
|
+
/** The pending animation frame of the live loop. */
|
|
55
|
+
frame?: number;
|
|
56
|
+
/** Set while a frame of the live loop re-lays the chart out. */
|
|
57
|
+
frameDraw?: boolean;
|
|
58
|
+
/** The node being dragged. */
|
|
59
|
+
dragging?: string;
|
|
60
|
+
/** A click on a pinned node, waiting to see if it is a double-click. */
|
|
61
|
+
clickTimer?: ReturnType<typeof setTimeout>;
|
|
62
|
+
/** Re-runs the chart's layout and emit (set by the chart's `setup`). */
|
|
63
|
+
relayout?: () => void;
|
|
64
|
+
/** The slot each node's label took beside it on the last draw, by node id. */
|
|
65
|
+
labelSlots?: Map<string, LabelSlot>;
|
|
66
|
+
}
|
|
67
|
+
/** The chart's remembered layout, created on first use. */
|
|
68
|
+
export declare function networkLive(viz: VizInstance): NetworkLive;
|
|
69
|
+
/**
|
|
70
|
+
Whether a network of `count` nodes runs its simulation live: at most
|
|
71
|
+
`forceLive` nodes (`true` for any number, `false` for never), in a
|
|
72
|
+
browser, with motion allowed.
|
|
73
|
+
@param viz The chart.
|
|
74
|
+
@param count The number of nodes.
|
|
75
|
+
*/
|
|
76
|
+
export declare function liveForceOn(viz: VizInstance, count: number): boolean;
|
|
77
|
+
/**
|
|
78
|
+
A force simulation over `nodes` in the chart's pixel space, stopped (it
|
|
79
|
+
is ticked by hand): links pull to `spacing` apart (or just clear of both
|
|
80
|
+
nodes), nodes push each other off and don't overlap, and a weak pull
|
|
81
|
+
toward the middle keeps unlinked groups in view.
|
|
82
|
+
@param nodes The nodes, at their starting positions.
|
|
83
|
+
@param links The links, by node ids.
|
|
84
|
+
@param bounds The chart area.
|
|
85
|
+
@param spacing The distance linked nodes settle at.
|
|
86
|
+
*/
|
|
87
|
+
export declare function networkSimulation(nodes: LiveNode[], links: LiveLink[], bounds: Bounds, spacing: number): Simulation<LiveNode, undefined>;
|
|
88
|
+
/**
|
|
89
|
+
Keeps every free node inside the chart area, `pad` pixels clear of its
|
|
90
|
+
edges (a node too big to fit sits in the middle). Fixed nodes stay put.
|
|
91
|
+
@param nodes The simulated nodes.
|
|
92
|
+
@param bounds The chart area.
|
|
93
|
+
@param pad The room kept at each edge.
|
|
94
|
+
*/
|
|
95
|
+
export declare function containLive(nodes: readonly LiveNode[], bounds: Bounds, pad?: number): void;
|
|
96
|
+
/**
|
|
97
|
+
Places this draw's nodes (see the module notes), writing each node's
|
|
98
|
+
`x`/`y` (and `fx`/`fy`). The nodes arrive at their precomputed layout's
|
|
99
|
+
positions, fitted to the chart area. Returns whether any node ended up
|
|
100
|
+
elsewhere, so the caller leaves the positions as they are rather than
|
|
101
|
+
refitting them. Small multiples lay each panel out afresh instead.
|
|
102
|
+
@param viz The chart.
|
|
103
|
+
@param nodes The nodes, at their precomputed positions.
|
|
104
|
+
@param links The links.
|
|
105
|
+
@param bounds The chart area.
|
|
106
|
+
@param dataCoords The `x`/`y` the data gives each node that has one.
|
|
107
|
+
*/
|
|
108
|
+
export declare function placeNetworkNodes(viz: VizInstance, nodes: GraphNode[], links: GraphLink[], bounds: Bounds, dataCoords: Map<string, [number, number]>): boolean;
|
|
109
|
+
/**
|
|
110
|
+
Remembers where each node was drawn, and — while the layout is the
|
|
111
|
+
precomputed one — where each node's laid-out place is.
|
|
112
|
+
*/
|
|
113
|
+
export declare function rememberPositions(viz: VizInstance, nodes: GraphNode[]): void;
|
|
114
|
+
/** Asks for the next frame of the live loop. */
|
|
115
|
+
export declare function scheduleFrame(viz: VizInstance): void;
|
|
116
|
+
/**
|
|
117
|
+
Asks for the chart to be re-laid out at the remembered positions on the
|
|
118
|
+
next frame: the next tick of the live loop, or a plain repaint.
|
|
119
|
+
*/
|
|
120
|
+
export declare function scheduleRedraw(viz: VizInstance): void;
|
|
121
|
+
/** Cancels the live loop's pending frame. */
|
|
122
|
+
export declare function stopLiveLoop(viz: VizInstance): void;
|
|
123
|
+
/** Stops the live simulation and its loop (chart teardown). */
|
|
124
|
+
export declare function stopLive(viz: VizInstance): void;
|
|
125
|
+
/** Re-lays the chart out at the remembered positions and repaints it at once. */
|
|
126
|
+
export declare function redrawPositions(viz: VizInstance): void;
|
|
127
|
+
/** Heats the live simulation for a drag, or cools it again after. */
|
|
128
|
+
export declare function dragHeat(viz: VizInstance, dragging: boolean): void;
|
|
129
|
+
/**
|
|
130
|
+
Re-heats the live simulation (after a node is let go), or — without
|
|
131
|
+
one — repaints the chart at the remembered positions.
|
|
132
|
+
*/
|
|
133
|
+
export declare function reheat(viz: VizInstance): void;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Where a Network's nodes start on each draw when the chart remembers its
|
|
3
|
+
layout (see `liveForce.ts`): the nodes it drew last time keep their
|
|
4
|
+
places, and a node that wasn't there enters beside a linked neighbor.
|
|
5
|
+
|
|
6
|
+
@module
|
|
7
|
+
*/
|
|
8
|
+
/** A point in the chart's pixel space. */
|
|
9
|
+
export interface Position {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}
|
|
13
|
+
/** The chart area a set of positions was laid out in. */
|
|
14
|
+
export interface Bounds {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
18
|
+
/** A node as these helpers read it: its id, radius, and laid-out position. */
|
|
19
|
+
export interface PlacedNode {
|
|
20
|
+
id: string;
|
|
21
|
+
r: number;
|
|
22
|
+
x?: number;
|
|
23
|
+
y?: number;
|
|
24
|
+
}
|
|
25
|
+
/** A link between two nodes, by their ids. */
|
|
26
|
+
export interface EdgeEnds {
|
|
27
|
+
source?: {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
target?: {
|
|
31
|
+
id: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
Moves positions laid out in `from` into `to`: scaled evenly (so the
|
|
36
|
+
layout keeps its shape) by the smaller of the two size ratios, about the
|
|
37
|
+
centers of the two areas.
|
|
38
|
+
@param positions The positions, by node id.
|
|
39
|
+
@param from The area they were laid out in.
|
|
40
|
+
@param to The area to move them into.
|
|
41
|
+
*/
|
|
42
|
+
export declare function rescalePositions(positions: ReadonlyMap<string, Position>, from: Bounds, to: Bounds): Map<string, Position>;
|
|
43
|
+
/**
|
|
44
|
+
The node ids linked to each node (a link from a node to itself adds
|
|
45
|
+
none).
|
|
46
|
+
@param links The links.
|
|
47
|
+
*/
|
|
48
|
+
export declare function neighborIds(links: readonly EdgeEnds[]): Map<string, string[]>;
|
|
49
|
+
/**
|
|
50
|
+
Where each node starts this draw. A node in `previous` keeps its
|
|
51
|
+
position. A new node enters beside a placed neighbor (one that kept its
|
|
52
|
+
position, or a new one already placed), just clear of it, each further
|
|
53
|
+
node around the same neighbor turned by the golden angle; a new node with
|
|
54
|
+
no placed neighbor starts at its own laid-out `x`/`y`. Without any node
|
|
55
|
+
in `previous`, every node starts at its laid-out position.
|
|
56
|
+
@param nodes The nodes, at their laid-out (precomputed) positions.
|
|
57
|
+
@param links The links between them.
|
|
58
|
+
@param previous Each node's position on the last draw, by id.
|
|
59
|
+
@returns The positions by id, and the ids of the nodes that entered beside a neighbor.
|
|
60
|
+
*/
|
|
61
|
+
export declare function seedPositions(nodes: readonly PlacedNode[], links: readonly EdgeEnds[], previous: ReadonlyMap<string, Position>): {
|
|
62
|
+
positions: Map<string, Position>;
|
|
63
|
+
entered: string[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
The ids and links a layout depends on, as one string: two draws with the
|
|
67
|
+
same key lay out the same graph.
|
|
68
|
+
@param nodes The nodes.
|
|
69
|
+
@param links The links.
|
|
70
|
+
*/
|
|
71
|
+
export declare function graphKey(nodes: readonly {
|
|
72
|
+
id: string;
|
|
73
|
+
}[], links: readonly EdgeEnds[]): string;
|
|
74
|
+
/**
|
|
75
|
+
Positions for the nodes given an `x`/`y` in the data when only some of
|
|
76
|
+
them have one: their coordinates fitted into the chart area (the same
|
|
77
|
+
scale on both axes, centered), kept `pad` pixels from its edges. A lone
|
|
78
|
+
one sits in the middle.
|
|
79
|
+
@param coords Each such node's data coordinates, by id.
|
|
80
|
+
@param bounds The chart area.
|
|
81
|
+
@param pad The room kept at each edge.
|
|
82
|
+
*/
|
|
83
|
+
export declare function fitDataPositions(coords: ReadonlyMap<string, [number, number]>, bounds: Bounds, pad: number): Map<string, Position>;
|
|
84
|
+
/**
|
|
85
|
+
The typical distance between linked nodes: the median length of the
|
|
86
|
+
links, or (without any) four times the median radius.
|
|
87
|
+
@param nodes The nodes, positioned.
|
|
88
|
+
@param links The links.
|
|
89
|
+
*/
|
|
90
|
+
export declare function linkSpacing(nodes: readonly PlacedNode[], links: readonly EdgeEnds[]): number;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Dragging Network nodes (see `features/nodeDrag.ts`): the node follows the
|
|
3
|
+
pointer, its links with it, and stays pinned where it is dropped. A live
|
|
4
|
+
simulation reacts while it moves; without one only the node moves.
|
|
5
|
+
Double-clicking a pinned node lets it go again. From the keyboard (see
|
|
6
|
+
`features/nodeKeys.ts`), Shift and the arrow keys nudge the focused node
|
|
7
|
+
and Shift+Backspace lets it go.
|
|
8
|
+
|
|
9
|
+
@module
|
|
10
|
+
*/
|
|
11
|
+
import type { SceneNode } from "@d3plus/render";
|
|
12
|
+
import type { NodeDrag, Point } from "../features/nodeDrag.js";
|
|
13
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
14
|
+
import type { Bounds, Position } from "./livePositions.js";
|
|
15
|
+
/** How long a click on a pinned node waits to see if it is a double-click. */
|
|
16
|
+
export declare const DOUBLE_CLICK_WAIT = 300;
|
|
17
|
+
/**
|
|
18
|
+
The id of the node a Network scene node draws (its shape, or its label
|
|
19
|
+
beside or inside it), or null for anything else.
|
|
20
|
+
@param node The scene node.
|
|
21
|
+
@param ids The ids of the chart's nodes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function networkNodeId(node: Pick<SceneNode, "key">, ids: {
|
|
24
|
+
has(id: string): boolean;
|
|
25
|
+
}): string | null;
|
|
26
|
+
/**
|
|
27
|
+
Keeps a dragged point inside the chart area.
|
|
28
|
+
@param point The point.
|
|
29
|
+
@param bounds The chart area.
|
|
30
|
+
*/
|
|
31
|
+
export declare function clampToBounds([x, y]: Point, bounds?: Bounds): Position;
|
|
32
|
+
/** How a Network drags its nodes. */
|
|
33
|
+
export declare function networkNodeDrag(viz: VizInstance): NodeDrag;
|
|
34
|
+
/**
|
|
35
|
+
Moves a node `by` pixels (kept inside the chart) and pins it there; a
|
|
36
|
+
live simulation reacts. Returns whether it moved.
|
|
37
|
+
@param viz The chart.
|
|
38
|
+
@param id The node.
|
|
39
|
+
@param by How far to move it, `[dx, dy]`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function nudgeNetworkNode(viz: VizInstance, id: string, [dx, dy]: [number, number]): boolean;
|
|
42
|
+
/**
|
|
43
|
+
Lets a pinned node go: a live simulation moves it again, or without one
|
|
44
|
+
it goes back to its laid-out place. Returns whether it was pinned.
|
|
45
|
+
@param viz The chart.
|
|
46
|
+
@param id The node.
|
|
47
|
+
*/
|
|
48
|
+
export declare function unpinNetworkNode(viz: VizInstance, id: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
Holds a click on a pinned node until a double-click (which lets the node
|
|
51
|
+
go) has had time to follow, so the double-click doesn't also focus the
|
|
52
|
+
node. Clicks on other nodes and on links act at once.
|
|
53
|
+
@param viz The chart, with its `click.shape` handler installed.
|
|
54
|
+
*/
|
|
55
|
+
export declare function deferPinnedClicks(viz: VizInstance): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DataPoint } from "@d3plus/data";
|
|
2
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
3
|
+
import { type RowAccessor } from "./paretoSteps.js";
|
|
4
|
+
/** The color every bar shares: the first color of the chart's categorical palette. */
|
|
5
|
+
export declare function barColor(viz: VizInstance): string;
|
|
6
|
+
/**
|
|
7
|
+
Whether no category of `rows` draws more than one bar (within its
|
|
8
|
+
small-multiples panel).
|
|
9
|
+
@param rows The bar rows.
|
|
10
|
+
@param category Reads a row's category.
|
|
11
|
+
@param panel Reads a row's small-multiples panel, if any.
|
|
12
|
+
*/
|
|
13
|
+
export declare function oneBarPerCategory(rows: DataPoint[], category: RowAccessor, panel?: RowAccessor): boolean;
|
|
14
|
+
/** Whether the bars being drawn share one color: one bar per category, and no user `color`. */
|
|
15
|
+
export declare function sharesOneColor(viz: VizInstance): boolean;
|
|
16
|
+
/**
|
|
17
|
+
The chart's default `color`: the shared bar color while the bars share
|
|
18
|
+
one, else the first `groupBy` level, as every chart colors by default.
|
|
19
|
+
@param viz The chart.
|
|
20
|
+
*/
|
|
21
|
+
export declare function paretoColor(viz: VizInstance): (d: DataPoint, i: number) => unknown;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pareto's hover: the cumulative line stays bright while a bar (or legend
|
|
3
|
+
entry) is hovered, so the running share through the hovered category
|
|
4
|
+
still reads, and of its points only the hovered categories' stay bright,
|
|
5
|
+
picking them out along the line. The other bars dim as usual.
|
|
6
|
+
|
|
7
|
+
@module
|
|
8
|
+
*/
|
|
9
|
+
import type { DataPoint } from "@d3plus/data";
|
|
10
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
11
|
+
type Predicate = (d: DataPoint, i: number) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
A hover predicate that also matches every point of the cumulative line.
|
|
14
|
+
`false` and `undefined` (clearing the hover) pass through.
|
|
15
|
+
@param fn The hover predicate.
|
|
16
|
+
*/
|
|
17
|
+
export declare function withLine<T>(fn: T): T | Predicate;
|
|
18
|
+
/**
|
|
19
|
+
Whether a row is the cumulative line's path rather than one of its points:
|
|
20
|
+
Plot merges the line's rows into the path's, so its step lists every
|
|
21
|
+
category.
|
|
22
|
+
@param d The row.
|
|
23
|
+
*/
|
|
24
|
+
export declare const isLinePath: (d: DataPoint) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
The keys of the categories whose bars a hover predicate matches.
|
|
27
|
+
@param viz The chart.
|
|
28
|
+
@param fn The hover predicate.
|
|
29
|
+
*/
|
|
30
|
+
export declare function hoveredCategories(viz: VizInstance, fn: Predicate): Set<string>;
|
|
31
|
+
/**
|
|
32
|
+
Routes the chart's `hover` through `withLine`, so whatever a hover
|
|
33
|
+
highlights, the cumulative line stays bright with it; when it highlights
|
|
34
|
+
bars, only the line's points over those bars stay bright.
|
|
35
|
+
@param viz The chart.
|
|
36
|
+
*/
|
|
37
|
+
export declare function keepLineBright(viz: VizInstance): void;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pareto — a BarChart whose bars are sorted largest first, with a line of
|
|
3
|
+
the running (cumulative) share of the total on a secondary 0–100% axis
|
|
4
|
+
and a dashed reference line at 80%.
|
|
5
|
+
*/
|
|
6
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
7
|
+
export declare const paretoDef: ChartDefinition;
|
|
8
|
+
/**
|
|
9
|
+
Creates a Pareto chart: one bar per category (`x`, or `y` with
|
|
10
|
+
`discrete("y")` for horizontal bars), sorted from the largest total to
|
|
11
|
+
the smallest, and a line of the running share of the total through each
|
|
12
|
+
category, on a 0–100% axis to the right of the bars (above horizontal
|
|
13
|
+
ones). A dashed reference line marks 80% (see `paretoThreshold`).
|
|
14
|
+
Every bar takes the first color of the chart's palette, unless `groupBy`
|
|
15
|
+
splits a category into series (colored by series) or `color` is set;
|
|
16
|
+
hovering a bar keeps the line, and its point over that bar, bright.
|
|
17
|
+
`threshold` folds the smallest categories into one bar, drawn last.
|
|
18
|
+
Tooltips show each bar's value, its share of the total, and the
|
|
19
|
+
cumulative share through its category.
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: new () => any;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pareto's text: the tooltip rows (a bar's value, its share of the total,
|
|
3
|
+
and the running share through its category), the secondary axis's
|
|
4
|
+
percentage ticks and title, and the reference line at the
|
|
5
|
+
`paretoThreshold` share.
|
|
6
|
+
|
|
7
|
+
@module
|
|
8
|
+
*/
|
|
9
|
+
import type { DataPoint } from "@d3plus/data";
|
|
10
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
11
|
+
/** Formats a value as the value axis does: its `tickFormat`, else abbreviated. */
|
|
12
|
+
export declare function valueFormat(viz: VizInstance): (n: number) => string;
|
|
13
|
+
/** The value's name in tooltips: the value axis's data key, else "Value". */
|
|
14
|
+
export declare function valueName(viz: VizInstance): string;
|
|
15
|
+
/**
|
|
16
|
+
Tooltip rows for a bar or a point of the cumulative line: the value (the
|
|
17
|
+
bar's own, or its category's total on the line), its share of every
|
|
18
|
+
category's total, and the running share through its category.
|
|
19
|
+
@param viz The chart.
|
|
20
|
+
@param d The hovered row.
|
|
21
|
+
@param i Its index.
|
|
22
|
+
*/
|
|
23
|
+
export declare function tooltipRows(viz: VizInstance, d: DataPoint, i: number): string[][];
|
|
24
|
+
/** The tooltip title: a bar's label, or the category of a point on the line. */
|
|
25
|
+
export declare function tooltipTitle(viz: VizInstance, d: DataPoint, i: number): string;
|
|
26
|
+
/**
|
|
27
|
+
The reference line at the `paretoThreshold` share, across the secondary
|
|
28
|
+
axis and styled by `paretoThresholdConfig`: dashed, and labeled with the
|
|
29
|
+
share (such as "80%") at the end of the line over the smallest bars.
|
|
30
|
+
None when `paretoThreshold` isn't a number, or nothing is drawn.
|
|
31
|
+
@param viz The chart.
|
|
32
|
+
*/
|
|
33
|
+
export declare function thresholdLines(viz: VizInstance): Record<string, unknown>[];
|
|
34
|
+
/**
|
|
35
|
+
Titles the secondary axis the line is drawn on after the line, unless
|
|
36
|
+
the user has titled it, and takes the title back from the other one
|
|
37
|
+
when the bars turn.
|
|
38
|
+
@param viz The chart.
|
|
39
|
+
*/
|
|
40
|
+
export declare function titleShareAxis(viz: VizInstance): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pareto's order: the category axis's sort, largest first, and the
|
|
3
|
+
`threshold` bucket that folds the smallest categories into one bar.
|
|
4
|
+
|
|
5
|
+
@module
|
|
6
|
+
*/
|
|
7
|
+
import type { DataPoint } from "@d3plus/data";
|
|
8
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
9
|
+
import { type ParetoState } from "./state.js";
|
|
10
|
+
/**
|
|
11
|
+
Installs the Pareto order as the category axis's sort (`xSort` or
|
|
12
|
+
`ySort`), or removes the one it installed earlier. A sort the user set
|
|
13
|
+
on that axis wins, and the line accumulates in its order instead.
|
|
14
|
+
*/
|
|
15
|
+
export declare function syncSort(viz: VizInstance, state: ParetoState): void;
|
|
16
|
+
/**
|
|
17
|
+
Records the order small-multiples panels share when they share scales
|
|
18
|
+
(every panel's categories, largest total first), given every panel's
|
|
19
|
+
rows; clears it otherwise. Each panel's bars and line then follow it, so
|
|
20
|
+
a category sits in the same place in every panel.
|
|
21
|
+
@param viz The Pareto.
|
|
22
|
+
@param state Its state.
|
|
23
|
+
@param rows Every panel's rows, or undefined when not drawing panels.
|
|
24
|
+
*/
|
|
25
|
+
export declare function syncPooledOrder(viz: VizInstance, state: ParetoState, rows: DataPoint[] | undefined): void;
|
|
26
|
+
/**
|
|
27
|
+
`threshold` folds the categories whose totals fall under it into one
|
|
28
|
+
bucket bar, which sorts last.
|
|
29
|
+
*/
|
|
30
|
+
export declare function paretoThreshold(viz: VizInstance, data: DataPoint[], all?: DataPoint[]): DataPoint[];
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pareto's math: each category's total, its share of the grand total, and
|
|
3
|
+
the running (cumulative) share once the categories are sorted largest
|
|
4
|
+
first, with a `threshold` bucket ("Other") always last.
|
|
5
|
+
|
|
6
|
+
@module
|
|
7
|
+
*/
|
|
8
|
+
import type { DataPoint } from "@d3plus/data";
|
|
9
|
+
/** A row accessor, as d3plus passes them. */
|
|
10
|
+
export type RowAccessor = (d: DataPoint, i: number) => unknown;
|
|
11
|
+
/** One category of a Pareto chart, in drawing order. */
|
|
12
|
+
export interface ParetoStep {
|
|
13
|
+
/** The category (its discrete-axis value). */
|
|
14
|
+
category: unknown;
|
|
15
|
+
/** The category's comparison key (see `categoryKey`). */
|
|
16
|
+
key: string;
|
|
17
|
+
/** Its position along the category axis, largest first. */
|
|
18
|
+
index: number;
|
|
19
|
+
/** The category's total: the sum of its rows' values. */
|
|
20
|
+
value: number;
|
|
21
|
+
/** Its share of every category's total (0–1). */
|
|
22
|
+
share: number;
|
|
23
|
+
/** The running total through this category. */
|
|
24
|
+
cumulative: number;
|
|
25
|
+
/** The running total's share of every category's total (0–1). */
|
|
26
|
+
cumulativeShare: number;
|
|
27
|
+
/** Whether the category is a `threshold` bucket, which sorts last. */
|
|
28
|
+
other: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** The accessors `paretoSteps` reads. */
|
|
31
|
+
export interface ParetoAccessors {
|
|
32
|
+
/** The discrete-axis value of each row. */
|
|
33
|
+
category: RowAccessor;
|
|
34
|
+
/** The numeric value of each row. */
|
|
35
|
+
value: RowAccessor;
|
|
36
|
+
/** Marks a `threshold` bucket's rows, which sort after every category. */
|
|
37
|
+
other?: (d: DataPoint) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
Orders the categories in place of largest-first, compared by each
|
|
40
|
+
category's first row (a user's `xSort`/`ySort`).
|
|
41
|
+
*/
|
|
42
|
+
order?: (a: DataPoint, b: DataPoint) => number;
|
|
43
|
+
}
|
|
44
|
+
/** A category's comparison key: dates by their time, everything else as text. */
|
|
45
|
+
export declare const categoryKey: (c: unknown) => string;
|
|
46
|
+
/**
|
|
47
|
+
The categories of `rows` in Pareto order: largest total first, any
|
|
48
|
+
`threshold` bucket last, and ties in the order they first appear (or in
|
|
49
|
+
the given `order`). Each
|
|
50
|
+
step carries its total, its share of the grand total, and the running
|
|
51
|
+
share through it, which ends at 1 (100%). With no positive grand total,
|
|
52
|
+
every share is 0.
|
|
53
|
+
@param rows The drawn rows.
|
|
54
|
+
@param accessors How to read each row's category and value.
|
|
55
|
+
*/
|
|
56
|
+
export declare function paretoSteps(rows: DataPoint[], accessors: ParetoAccessors): ParetoStep[];
|
|
57
|
+
/**
|
|
58
|
+
A category-axis comparator (as Plot's `xSort`/`ySort` take) placing rows
|
|
59
|
+
in Pareto order. Rows of categories missing from `steps` sort last.
|
|
60
|
+
@param steps The steps to order by, read when comparing.
|
|
61
|
+
@param category Reads a row's category.
|
|
62
|
+
@param reverse Runs the order backward: a vertical category axis lists its
|
|
63
|
+
first category at the bottom, so its largest category sorts last.
|
|
64
|
+
*/
|
|
65
|
+
export declare function paretoComparator(steps: () => ParetoStep[], category: (d: DataPoint) => unknown, reverse?: boolean): (a: DataPoint, b: DataPoint) => number;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Pareto's per-instance state and the plumbing that lets one cumulative
|
|
3
|
+
line ride along with the bars: the line's rows are added to each draw's
|
|
4
|
+
rows, and the chart's accessors (axes, `groupBy`, labels) read them as
|
|
5
|
+
one series on the secondary value axis.
|
|
6
|
+
|
|
7
|
+
@module
|
|
8
|
+
*/
|
|
9
|
+
import type { DataPoint } from "@d3plus/data";
|
|
10
|
+
import type { VizInstance } from "../viz/vizTypes.js";
|
|
11
|
+
import { type ParetoStep, type RowAccessor } from "./paretoSteps.js";
|
|
12
|
+
/** The key a cumulative-line row keeps its step under. */
|
|
13
|
+
export declare const LINE_KEY = "__d3plusParetoLine";
|
|
14
|
+
type Axis = "x" | "y" | "x2" | "y2";
|
|
15
|
+
/** Per-instance state kept on `viz.ctx.pareto`. */
|
|
16
|
+
export interface ParetoState {
|
|
17
|
+
/** The user's axis accessors, behind the ones the chart reads. */
|
|
18
|
+
accessors: Record<Axis, RowAccessor>;
|
|
19
|
+
/** Each row array's steps, computed once. */
|
|
20
|
+
steps: WeakMap<DataPoint[], ParetoStep[]>;
|
|
21
|
+
/** The default `color` the chart installed, so a user's is told apart. */
|
|
22
|
+
color?: RowAccessor;
|
|
23
|
+
/** Whether each row array's bars share one color, computed once. */
|
|
24
|
+
oneColor: WeakMap<DataPoint[], boolean>;
|
|
25
|
+
/**
|
|
26
|
+
The order every small-multiples panel shares when panels share
|
|
27
|
+
scales: the categories of every panel's rows, largest total first.
|
|
28
|
+
*/
|
|
29
|
+
pooled?: ParetoStep[];
|
|
30
|
+
/** The category comparator the chart installed, and on which axis. */
|
|
31
|
+
sort?: {
|
|
32
|
+
axis: "x" | "y";
|
|
33
|
+
compare: (a: DataPoint, b: DataPoint) => number;
|
|
34
|
+
};
|
|
35
|
+
/** The secondary axis title last set automatically. */
|
|
36
|
+
title?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const paretoState: (viz: VizInstance) => ParetoState;
|
|
39
|
+
/** The axis holding categories: "x" for upright bars, "y" for horizontal ones. */
|
|
40
|
+
export declare const categoryAxis: (viz: VizInstance) => "x" | "y";
|
|
41
|
+
/** The axis holding the bars' values. */
|
|
42
|
+
export declare const valueAxis: (viz: VizInstance) => "x" | "y";
|
|
43
|
+
/** The secondary axis the cumulative line is drawn on: "y2" (right) or "x2" (top). */
|
|
44
|
+
export declare const shareAxis: (viz: VizInstance) => "x2" | "y2";
|
|
45
|
+
/** Unwraps Plot's shape, label, and legend wrappers down to the source row. */
|
|
46
|
+
export declare function sourceRow(d: DataPoint | undefined): DataPoint | undefined;
|
|
47
|
+
/** The step a cumulative-line row draws; undefined for any other row. */
|
|
48
|
+
export declare function lineStep(d: DataPoint | undefined): ParetoStep | undefined;
|
|
49
|
+
/** Whether a row (or a wrapper around one) is a point of the cumulative line. */
|
|
50
|
+
export declare const isLineRow: (d: DataPoint | undefined) => boolean;
|
|
51
|
+
/** A cumulative-line row for a step. */
|
|
52
|
+
export declare const lineRow: (step: ParetoStep) => DataPoint;
|
|
53
|
+
/** A 0–1 share as a percentage, such as "42%". */
|
|
54
|
+
export declare function percentFormat(viz: VizInstance): (share: number) => string;
|
|
55
|
+
/** The cumulative line's name, translated. */
|
|
56
|
+
export declare const lineLabel: (viz: VizInstance) => string;
|
|
57
|
+
/**
|
|
58
|
+
A row's category: the user's category accessor, except a `threshold`
|
|
59
|
+
bucket, which is its own category named by its label.
|
|
60
|
+
*/
|
|
61
|
+
export declare function categoryOf(viz: VizInstance, d: DataPoint, i: number): unknown;
|
|
62
|
+
/** A bar row's value: the user's accessor on the value axis. */
|
|
63
|
+
export declare function valueOf(viz: VizInstance, d: DataPoint, i: number): unknown;
|
|
64
|
+
/**
|
|
65
|
+
Routes reads of `viz._x`, `_y`, `_x2`, and `_y2` through the chart: a
|
|
66
|
+
cumulative-line row reports its category and its running share (on the
|
|
67
|
+
secondary value axis), and a `threshold` bucket its own category. Writes
|
|
68
|
+
(`x()`, `y2()`, …) keep replacing the user's accessor.
|
|
69
|
+
*/
|
|
70
|
+
export declare function interceptAxes(viz: VizInstance): void;
|
|
71
|
+
/**
|
|
72
|
+
Wraps each `groupBy` accessor so a cumulative-line row reads as one
|
|
73
|
+
series, named after the line, at every level.
|
|
74
|
+
*/
|
|
75
|
+
export declare function wrapGroupBy(viz: VizInstance): void;
|
|
76
|
+
/** Names a cumulative-line row after the line in every label `_drawLabel` builds. */
|
|
77
|
+
export declare function wrapDrawLabel(viz: VizInstance): void;
|
|
78
|
+
/** The rows that draw bars: every row but the cumulative line's. */
|
|
79
|
+
export declare const barRows: (rows: DataPoint[] | undefined) => DataPoint[];
|
|
80
|
+
/**
|
|
81
|
+
The steps for the bars among `rows`, computed once per array: in the
|
|
82
|
+
category axis's own order when the user sorts it, in the order the
|
|
83
|
+
small-multiples panels share when they share scales, else largest first.
|
|
84
|
+
*/
|
|
85
|
+
export declare function stepsFor(viz: VizInstance, rows: DataPoint[] | undefined): ParetoStep[];
|
|
86
|
+
/**
|
|
87
|
+
The rows a draw paints: the bars among `rows`, then one cumulative-line
|
|
88
|
+
row per category, in Pareto order.
|
|
89
|
+
*/
|
|
90
|
+
export declare function withLineRows(viz: VizInstance, rows: DataPoint[] | undefined): DataPoint[];
|
|
91
|
+
/** The step a bar or line point belongs to, in the rows being drawn. */
|
|
92
|
+
export declare function stepOf(viz: VizInstance, d: DataPoint | undefined, i?: number): ParetoStep | undefined;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Parliament — Waffle on an arc: one dot per seat on concentric half rings,
|
|
3
|
+
filled party by party from left to right in data order, with the house's
|
|
4
|
+
total in the middle and a line where a majority is reached.
|
|
5
|
+
*/
|
|
6
|
+
import type { ChartDefinition } from "../definition/ChartDefinition.js";
|
|
7
|
+
export declare const parliamentDef: ChartDefinition;
|
|
8
|
+
/**
|
|
9
|
+
Draws a parliament (arc-dot) chart: one dot per seat on concentric half
|
|
10
|
+
rings, colored by party (`groupBy`), each row's `sum` its seats. The
|
|
11
|
+
parties fill the arc from left to right in data order, each seat placed
|
|
12
|
+
by its angle so every party takes a wedge. The total sits in the middle
|
|
13
|
+
(`centerLabel`) and a dashed line marks a majority (`majority`). It is a
|
|
14
|
+
Waffle with `layout: "arc"`, so `rings`, `innerRadius`, `startAngle`,
|
|
15
|
+
`endAngle`, `icon` and `cellPadding` apply too.
|
|
16
|
+
*/
|
|
17
|
+
declare const _default: new () => any;
|
|
18
|
+
export default _default;
|
|
@@ -7,6 +7,13 @@ import type { VizInstance } from "../viz/vizTypes.js";
|
|
|
7
7
|
export declare const AREA_LABEL_PADDING = 4;
|
|
8
8
|
/** The along label's weight when the Area's labelConfig sets none: the box labels' regular weight. */
|
|
9
9
|
export declare const AREA_LABEL_FONT_WEIGHT = 400;
|
|
10
|
+
/**
|
|
11
|
+
How far around each point a band's centerline is averaged for its label,
|
|
12
|
+
in ems (see `smoothPolyline`): more than a line's label, since the
|
|
13
|
+
text must still clear the band's edges wherever the smoothed path
|
|
14
|
+
strays from the centerline.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AREA_LABEL_SMOOTHING = 3;
|
|
10
17
|
/** The largest along label when the Area's labelConfig sets no `fontSize` or `fontMax`. */
|
|
11
18
|
export declare const AREA_LABEL_FONT_MAX = 16;
|
|
12
19
|
/** The smallest along label, whatever lower `fontMin` the Area's labelConfig sets. */
|