@d3plus/core 3.1.6 → 4.0.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 +9922 -78537
- package/es/index.js +8 -0
- package/es/index.js.map +1 -1
- package/es/internal.js +54 -0
- package/es/internal.js.map +1 -0
- package/es/src/charts/AreaPlot/index.js +36 -0
- package/es/src/charts/AreaPlot/index.js.map +1 -0
- package/es/src/charts/BarChart/index.js +48 -0
- package/es/src/charts/BarChart/index.js.map +1 -0
- package/es/src/charts/BoxWhisker/index.js +52 -0
- package/es/src/charts/BoxWhisker/index.js.map +1 -0
- package/es/src/charts/BumpChart/index.js +81 -0
- package/es/src/charts/BumpChart/index.js.map +1 -0
- package/es/src/charts/Donut/index.js +42 -0
- package/es/src/charts/Donut/index.js.map +1 -0
- package/es/src/charts/Geomap/applyLayout.js +208 -0
- package/es/src/charts/Geomap/applyLayout.js.map +1 -0
- package/es/src/charts/Geomap/emit.js +169 -0
- package/es/src/charts/Geomap/emit.js.map +1 -0
- package/es/src/charts/Geomap/index.js +521 -0
- package/es/src/charts/Geomap/index.js.map +1 -0
- package/es/src/charts/LinePlot/index.js +32 -0
- package/es/src/charts/LinePlot/index.js.map +1 -0
- package/es/src/charts/Matrix/applyLayout.js +92 -0
- package/es/src/charts/Matrix/applyLayout.js.map +1 -0
- package/es/src/charts/Matrix/emit.js +44 -0
- package/es/src/charts/Matrix/emit.js.map +1 -0
- package/es/src/charts/Matrix/index.js +154 -0
- package/es/src/charts/Matrix/index.js.map +1 -0
- package/es/src/charts/Network/applyLayout.js +322 -0
- package/es/src/charts/Network/applyLayout.js.map +1 -0
- package/es/src/charts/Network/emit.js +273 -0
- package/es/src/charts/Network/emit.js.map +1 -0
- package/es/src/charts/Network/index.js +422 -0
- package/es/src/charts/Network/index.js.map +1 -0
- package/es/src/charts/Pack/applyLayout.js +46 -0
- package/es/src/charts/Pack/applyLayout.js.map +1 -0
- package/es/src/charts/Pack/emit.js +116 -0
- package/es/src/charts/Pack/emit.js.map +1 -0
- package/es/src/charts/Pack/index.js +194 -0
- package/es/src/charts/Pack/index.js.map +1 -0
- package/es/src/charts/Pack/recursionCircles.js +18 -0
- package/es/src/charts/Pack/recursionCircles.js.map +1 -0
- package/es/src/charts/Pie/applyLayout.js +44 -0
- package/es/src/charts/Pie/applyLayout.js.map +1 -0
- package/es/src/charts/Pie/emit.js +111 -0
- package/es/src/charts/Pie/emit.js.map +1 -0
- package/es/src/charts/Pie/index.js +134 -0
- package/es/src/charts/Pie/index.js.map +1 -0
- package/es/src/charts/Plot/draw.js +424 -0
- package/es/src/charts/Plot/draw.js.map +1 -0
- package/es/src/charts/Plot/index.js +827 -0
- package/es/src/charts/Plot/index.js.map +1 -0
- package/es/src/charts/Plot/labelPlacement.js +36 -0
- package/es/src/charts/Plot/labelPlacement.js.map +1 -0
- package/es/src/charts/Plot/pipeline.js +594 -0
- package/es/src/charts/Plot/pipeline.js.map +1 -0
- package/es/src/charts/Plot/pipelineDomains.js +254 -0
- package/es/src/charts/Plot/pipelineDomains.js.map +1 -0
- package/es/src/charts/Plot/pipelineLineLabels.js +210 -0
- package/es/src/charts/Plot/pipelineLineLabels.js.map +1 -0
- package/es/src/charts/Plot/shapeDefaults.js +189 -0
- package/es/src/charts/Plot/shapeDefaults.js.map +1 -0
- package/es/src/charts/Plot/stackHelpers.js +52 -0
- package/es/src/charts/Plot/stackHelpers.js.map +1 -0
- package/es/src/charts/Priestley/applyLayout.js +121 -0
- package/es/src/charts/Priestley/applyLayout.js.map +1 -0
- package/es/src/charts/Priestley/emit.js +129 -0
- package/es/src/charts/Priestley/emit.js.map +1 -0
- package/es/src/charts/Priestley/index.js +97 -0
- package/es/src/charts/Priestley/index.js.map +1 -0
- package/es/src/charts/Radar/applyLayout.js +326 -0
- package/es/src/charts/Radar/applyLayout.js.map +1 -0
- package/es/src/charts/Radar/emit.js +28 -0
- package/es/src/charts/Radar/emit.js.map +1 -0
- package/es/src/charts/Radar/index.js +98 -0
- package/es/src/charts/Radar/index.js.map +1 -0
- package/es/src/charts/RadialMatrix/applyLayout.js +132 -0
- package/es/src/charts/RadialMatrix/applyLayout.js.map +1 -0
- package/es/src/charts/RadialMatrix/emit.js +33 -0
- package/es/src/charts/RadialMatrix/emit.js.map +1 -0
- package/es/src/charts/RadialMatrix/index.js +144 -0
- package/es/src/charts/RadialMatrix/index.js.map +1 -0
- package/es/src/charts/Rings/applyLayout.js +508 -0
- package/es/src/charts/Rings/applyLayout.js.map +1 -0
- package/es/src/charts/Rings/emit.js +222 -0
- package/es/src/charts/Rings/emit.js.map +1 -0
- package/es/src/charts/Rings/index.js +245 -0
- package/es/src/charts/Rings/index.js.map +1 -0
- package/es/src/charts/Sankey/applyLayout.js +107 -0
- package/es/src/charts/Sankey/applyLayout.js.map +1 -0
- package/es/src/charts/Sankey/emit.js +134 -0
- package/es/src/charts/Sankey/emit.js.map +1 -0
- package/es/src/charts/Sankey/index.js +219 -0
- package/es/src/charts/Sankey/index.js.map +1 -0
- package/es/src/charts/StackedArea/index.js +27 -0
- package/es/src/charts/StackedArea/index.js.map +1 -0
- package/es/src/charts/Tree/applyLayout.js +233 -0
- package/es/src/charts/Tree/applyLayout.js.map +1 -0
- package/es/src/charts/Tree/emit.js +257 -0
- package/es/src/charts/Tree/emit.js.map +1 -0
- package/es/src/charts/Tree/index.js +105 -0
- package/es/src/charts/Tree/index.js.map +1 -0
- package/es/src/charts/Treemap/applyLayout.js +85 -0
- package/es/src/charts/Treemap/applyLayout.js.map +1 -0
- package/es/src/charts/Treemap/emit.js +141 -0
- package/es/src/charts/Treemap/emit.js.map +1 -0
- package/es/src/charts/Treemap/index.js +177 -0
- package/es/src/charts/Treemap/index.js.map +1 -0
- package/es/src/charts/Treemap/thresholdFunction.js +112 -0
- package/es/src/charts/Treemap/thresholdFunction.js.map +1 -0
- package/es/src/charts/definition/ChartDefinition.js +12 -0
- package/es/src/charts/definition/ChartDefinition.js.map +1 -0
- package/es/src/charts/definition/applyDefinition.js +107 -0
- package/es/src/charts/definition/applyDefinition.js.map +1 -0
- package/es/src/charts/definition/makeChart.js +153 -0
- package/es/src/charts/definition/makeChart.js.map +1 -0
- package/es/src/charts/drawSteps/zoomControls.js +231 -96
- package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
- package/es/src/charts/events/click.legend.js +2 -2
- package/es/src/charts/events/click.legend.js.map +1 -1
- package/es/src/charts/events/click.shape.js +5 -5
- package/es/src/charts/events/click.shape.js.map +1 -1
- package/es/src/charts/events/mouseenter.js +20 -1
- package/es/src/charts/events/mouseenter.js.map +1 -1
- package/es/src/charts/events/mouseleave.js +19 -4
- package/es/src/charts/events/mouseleave.js.map +1 -1
- package/es/src/charts/events/mousemove.legend.js +10 -10
- package/es/src/charts/events/mousemove.legend.js.map +1 -1
- package/es/src/charts/events/mousemove.shape.js +14 -8
- package/es/src/charts/events/mousemove.shape.js.map +1 -1
- package/es/src/charts/events/touchstart.body.js.map +1 -1
- package/es/src/charts/features/axes.js +432 -0
- package/es/src/charts/features/axes.js.map +1 -0
- package/es/src/charts/features/chartGeometry.js +66 -0
- package/es/src/charts/features/chartGeometry.js.map +1 -0
- package/es/src/charts/features/colorScaleBucket.js +92 -0
- package/es/src/charts/features/colorScaleBucket.js.map +1 -0
- package/es/src/charts/features/emitHelpers.js +217 -0
- package/es/src/charts/features/emitHelpers.js.map +1 -0
- package/es/src/charts/features/ensureZoomDom.js +71 -0
- package/es/src/charts/features/ensureZoomDom.js.map +1 -0
- package/es/src/charts/features/features.js +650 -0
- package/es/src/charts/features/features.js.map +1 -0
- package/es/src/charts/features/featuresLegend.js +180 -0
- package/es/src/charts/features/featuresLegend.js.map +1 -0
- package/es/src/charts/features/legendLabel.js +12 -0
- package/es/src/charts/features/legendLabel.js.map +1 -0
- package/es/src/charts/features/lineLabels.js +154 -0
- package/es/src/charts/features/lineLabels.js.map +1 -0
- package/es/src/charts/features/plotPaint.js +512 -0
- package/es/src/charts/features/plotPaint.js.map +1 -0
- package/es/src/charts/features/shapeEmit.js +273 -0
- package/es/src/charts/features/shapeEmit.js.map +1 -0
- package/es/src/charts/helpers/matrixData.js +3 -3
- package/es/src/charts/helpers/matrixData.js.map +1 -1
- package/es/src/charts/index.js +21 -21
- package/es/src/charts/index.js.map +1 -1
- package/es/src/charts/pipeline/resolveSpec.js +44 -0
- package/es/src/charts/pipeline/resolveSpec.js.map +1 -0
- package/es/src/charts/pipeline/runChartDraw.js +109 -0
- package/es/src/charts/pipeline/runChartDraw.js.map +1 -0
- package/es/src/charts/pipeline/runVizPipeline.js +84 -0
- package/es/src/charts/pipeline/runVizPipeline.js.map +1 -0
- package/es/src/charts/pipeline/stages.js +103 -0
- package/es/src/charts/pipeline/stages.js.map +1 -0
- package/es/src/charts/pipeline/vizContext.js +29 -0
- package/es/src/charts/pipeline/vizContext.js.map +1 -0
- package/es/src/charts/pipeline/vizDraw.js +37 -0
- package/es/src/charts/pipeline/vizDraw.js.map +1 -0
- package/es/src/charts/pipeline/vizDrawPure.js +174 -0
- package/es/src/charts/pipeline/vizDrawPure.js.map +1 -0
- package/es/src/charts/pipeline/vizPreDraw.js +145 -0
- package/es/src/charts/pipeline/vizPreDraw.js.map +1 -0
- package/es/src/charts/pipeline/vizPreDrawPure.js +279 -0
- package/es/src/charts/pipeline/vizPreDrawPure.js.map +1 -0
- package/es/src/charts/plotBuffers/Bar.js +4 -4
- package/es/src/charts/plotBuffers/Bar.js.map +1 -1
- package/es/src/charts/plotBuffers/Box.js +4 -4
- package/es/src/charts/plotBuffers/Box.js.map +1 -1
- package/es/src/charts/plotBuffers/Circle.js +2 -2
- package/es/src/charts/plotBuffers/Circle.js.map +1 -1
- package/es/src/charts/plotBuffers/Line.js +5 -5
- package/es/src/charts/plotBuffers/Line.js.map +1 -1
- package/es/src/charts/plotBuffers/Rect.js +2 -2
- package/es/src/charts/plotBuffers/Rect.js.map +1 -1
- package/es/src/charts/plotBuffers/discreteBuffer.js +1 -2
- package/es/src/charts/plotBuffers/discreteBuffer.js.map +1 -1
- package/es/src/charts/plotBuffers/numericBuffer.js +1 -2
- package/es/src/charts/plotBuffers/numericBuffer.js.map +1 -1
- package/es/src/charts/viz/Viz.js +985 -0
- package/es/src/charts/viz/Viz.js.map +1 -0
- package/es/src/charts/viz/VizBase.js +447 -0
- package/es/src/charts/viz/VizBase.js.map +1 -0
- package/es/src/charts/viz/VizBaseConfig.js +504 -0
- package/es/src/charts/viz/VizBaseConfig.js.map +1 -0
- package/es/src/charts/viz/interactionOpacity.js +247 -0
- package/es/src/charts/viz/interactionOpacity.js.map +1 -0
- package/es/src/charts/viz/ordinalColor.js +71 -0
- package/es/src/charts/viz/ordinalColor.js.map +1 -0
- package/es/src/charts/viz/trailCatchup.js +127 -0
- package/es/src/charts/viz/trailCatchup.js.map +1 -0
- package/es/src/charts/viz/vizDefaults.js +602 -0
- package/es/src/charts/viz/vizDefaults.js.map +1 -0
- package/es/src/charts/viz/vizRender.js +251 -0
- package/es/src/charts/viz/vizRender.js.map +1 -0
- package/es/src/charts/viz/vizTypes.js +28 -0
- package/es/src/charts/viz/vizTypes.js.map +1 -0
- package/es/src/components/Axis/Axis.js +691 -0
- package/es/src/components/Axis/Axis.js.map +1 -0
- package/es/src/components/Axis/AxisBottom.js.map +1 -0
- package/es/src/components/Axis/AxisLeft.js.map +1 -0
- package/es/src/components/Axis/AxisRight.js.map +1 -0
- package/es/src/components/Axis/AxisTop.js.map +1 -0
- package/es/src/components/Axis/axisLayout.js +208 -0
- package/es/src/components/Axis/axisLayout.js.map +1 -0
- package/es/src/components/Axis/axisLayoutLabels.js +177 -0
- package/es/src/components/Axis/axisLayoutLabels.js.map +1 -0
- package/es/src/components/Axis/axisLayoutScale.js +374 -0
- package/es/src/components/Axis/axisLayoutScale.js.map +1 -0
- package/es/src/components/Axis/axisRender.js +535 -0
- package/es/src/components/Axis/axisRender.js.map +1 -0
- package/es/src/components/ColorScale/ColorScale.js +506 -0
- package/es/src/components/ColorScale/ColorScale.js.map +1 -0
- package/es/src/components/ColorScale/colorScaleRender.js +277 -0
- package/es/src/components/ColorScale/colorScaleRender.js.map +1 -0
- package/es/src/components/ColorScale/colorScaleScale.js +274 -0
- package/es/src/components/ColorScale/colorScaleScale.js.map +1 -0
- package/es/src/components/Legend/Legend.js +445 -0
- package/es/src/components/Legend/Legend.js.map +1 -0
- package/es/src/components/Legend/legendConfig.js +87 -0
- package/es/src/components/Legend/legendConfig.js.map +1 -0
- package/es/src/components/Legend/legendRender.js +245 -0
- package/es/src/components/Legend/legendRender.js.map +1 -0
- package/es/src/components/Message.js.map +1 -1
- package/es/src/components/TextBox.js +639 -453
- package/es/src/components/TextBox.js.map +1 -1
- package/es/src/components/Timeline/Timeline.js +674 -0
- package/es/src/components/Timeline/Timeline.js.map +1 -0
- package/es/src/components/Timeline/timelineConfig.js +115 -0
- package/es/src/components/Timeline/timelineConfig.js.map +1 -0
- package/es/src/components/Timeline/timelineRender.js +267 -0
- package/es/src/components/Timeline/timelineRender.js.map +1 -0
- package/es/src/components/Tooltip.js +288 -249
- package/es/src/components/Tooltip.js.map +1 -1
- package/es/src/components/index.js +8 -8
- package/es/src/components/index.js.map +1 -1
- package/es/src/fluent.js +265 -0
- package/es/src/fluent.js.map +1 -0
- package/es/src/shapes/Area.js +96 -114
- package/es/src/shapes/Area.js.map +1 -1
- package/es/src/shapes/Bar.js +71 -86
- package/es/src/shapes/Bar.js.map +1 -1
- package/es/src/shapes/Box.js +295 -190
- package/es/src/shapes/Box.js.map +1 -1
- package/es/src/shapes/Circle.js +72 -31
- package/es/src/shapes/Circle.js.map +1 -1
- package/es/src/shapes/Image.js +164 -85
- package/es/src/shapes/Image.js.map +1 -1
- package/es/src/shapes/Line.js +51 -94
- package/es/src/shapes/Line.js.map +1 -1
- package/es/src/shapes/Path.js +33 -41
- package/es/src/shapes/Path.js.map +1 -1
- package/es/src/shapes/Rect.js +86 -37
- package/es/src/shapes/Rect.js.map +1 -1
- package/es/src/shapes/Shape.js +655 -678
- package/es/src/shapes/Shape.js.map +1 -1
- package/es/src/shapes/Whisker.js +156 -61
- package/es/src/shapes/Whisker.js.map +1 -1
- package/es/src/shapes/buildLabelData.js +70 -0
- package/es/src/shapes/buildLabelData.js.map +1 -0
- package/es/src/shapes/emitLabels.js +84 -0
- package/es/src/shapes/emitLabels.js.map +1 -0
- package/es/src/shapes/hitAreaNode.js +37 -0
- package/es/src/shapes/hitAreaNode.js.map +1 -0
- package/es/src/shapes/sceneSort.js +57 -0
- package/es/src/shapes/sceneSort.js.map +1 -0
- package/es/src/shapes/shapeConfig.js +31 -0
- package/es/src/shapes/shapeConfig.js.map +1 -0
- package/es/src/utils/BaseClass.js +35 -19
- package/es/src/utils/BaseClass.js.map +1 -1
- package/es/src/utils/D3Scale.js +16 -0
- package/es/src/utils/D3Scale.js.map +1 -0
- package/es/src/utils/D3plusConfig.js.map +1 -1
- package/es/src/utils/configPrep.js +8 -3
- package/es/src/utils/configPrep.js.map +1 -1
- package/es/src/utils/getProp.js +1 -1
- package/es/src/utils/getProp.js.map +1 -1
- package/es/src/utils/index.js +1 -0
- package/es/src/utils/index.js.map +1 -1
- package/es/src/utils/paintComponentScene.js +59 -0
- package/es/src/utils/paintComponentScene.js.map +1 -0
- package/es/umd-entry.js +16 -0
- package/es/umd-entry.js.map +1 -0
- package/package.json +14 -9
- package/types/index.d.ts +3 -1
- package/types/internal.d.ts +54 -0
- package/types/src/charts/AreaPlot/index.d.ts +10 -0
- package/types/src/charts/BarChart/index.d.ts +10 -0
- package/types/src/charts/BoxWhisker/index.d.ts +11 -0
- package/types/src/charts/BumpChart/index.d.ts +11 -0
- package/types/src/charts/ChartDefinition.d.ts +75 -0
- package/types/src/charts/Donut/index.d.ts +13 -0
- package/types/src/charts/Geomap/applyLayout.d.ts +7 -0
- package/types/src/charts/Geomap/emit.d.ts +7 -0
- package/types/src/charts/Geomap/index.d.ts +14 -0
- package/types/src/charts/Geomap.d.ts +6 -0
- package/types/src/charts/LinePlot/index.d.ts +10 -0
- package/types/src/charts/Matrix/applyLayout.d.ts +9 -0
- package/types/src/charts/Matrix/emit.d.ts +6 -0
- package/types/src/charts/Matrix/index.d.ts +14 -0
- package/types/src/charts/Matrix.d.ts +0 -26
- package/types/src/charts/Network/applyLayout.d.ts +10 -0
- package/types/src/charts/Network/emit.d.ts +6 -0
- package/types/src/charts/Network/index.d.ts +7 -0
- package/types/src/charts/Network.d.ts +0 -24
- package/types/src/charts/Pack/applyLayout.d.ts +16 -0
- package/types/src/charts/Pack/emit.d.ts +6 -0
- package/types/src/charts/Pack/index.d.ts +15 -0
- package/types/src/charts/Pack/recursionCircles.d.ts +7 -0
- package/types/src/charts/Pack.d.ts +0 -13
- package/types/src/charts/Pie/applyLayout.d.ts +8 -0
- package/types/src/charts/Pie/emit.d.ts +5 -0
- package/types/src/charts/Pie/index.d.ts +14 -0
- package/types/src/charts/Pie.d.ts +0 -27
- package/types/src/charts/Plot/draw.d.ts +2 -0
- package/types/src/charts/Plot/index.d.ts +167 -0
- package/types/src/charts/Plot/labelPlacement.d.ts +15 -0
- package/types/src/charts/Plot/pipeline.d.ts +70 -0
- package/types/src/charts/Plot/pipelineDomains.d.ts +2 -0
- package/types/src/charts/Plot/pipelineLineLabels.d.ts +2 -0
- package/types/src/charts/Plot/shapeDefaults.d.ts +64 -0
- package/types/src/charts/Plot/stackHelpers.d.ts +24 -0
- package/types/src/charts/Plot.d.ts +23 -72
- package/types/src/charts/Priestley/applyLayout.d.ts +21 -0
- package/types/src/charts/Priestley/emit.d.ts +6 -0
- package/types/src/charts/Priestley/index.d.ts +14 -0
- package/types/src/charts/Radar/applyLayout.d.ts +10 -0
- package/types/src/charts/Radar/emit.d.ts +7 -0
- package/types/src/charts/Radar/index.d.ts +14 -0
- package/types/src/charts/RadialMatrix/applyLayout.d.ts +11 -0
- package/types/src/charts/RadialMatrix/emit.d.ts +6 -0
- package/types/src/charts/RadialMatrix/index.d.ts +14 -0
- package/types/src/charts/RadialMatrix.d.ts +0 -15
- package/types/src/charts/Rings/applyLayout.d.ts +2 -0
- package/types/src/charts/Rings/emit.d.ts +7 -0
- package/types/src/charts/Rings/index.d.ts +15 -0
- package/types/src/charts/Rings.d.ts +0 -13
- package/types/src/charts/Sankey/applyLayout.d.ts +7 -0
- package/types/src/charts/Sankey/emit.d.ts +6 -0
- package/types/src/charts/Sankey/index.d.ts +7 -0
- package/types/src/charts/Sankey.d.ts +0 -4
- package/types/src/charts/StackedArea/index.d.ts +10 -0
- package/types/src/charts/Tree/applyLayout.d.ts +2 -0
- package/types/src/charts/Tree/emit.d.ts +7 -0
- package/types/src/charts/Tree/index.d.ts +14 -0
- package/types/src/charts/Tree.d.ts +0 -16
- package/types/src/charts/Treemap/applyLayout.d.ts +16 -0
- package/types/src/charts/Treemap/emit.d.ts +6 -0
- package/types/src/charts/Treemap/index.d.ts +18 -0
- package/types/src/charts/Treemap/thresholdFunction.d.ts +25 -0
- package/types/src/charts/Treemap.d.ts +4 -13
- package/types/src/charts/Viz.d.ts +49 -361
- package/types/src/charts/VizBase.d.ts +158 -0
- package/types/src/charts/VizBaseConfig.d.ts +148 -0
- package/types/src/charts/applyDefinition.d.ts +13 -0
- package/types/src/charts/axes.d.ts +134 -0
- package/types/src/charts/chartGeometry.d.ts +58 -0
- package/types/src/charts/definition/ChartDefinition.d.ts +84 -0
- package/types/src/charts/definition/applyDefinition.d.ts +13 -0
- package/types/src/charts/definition/makeChart.d.ts +22 -0
- package/types/src/charts/drawSteps/zoomControls.d.ts +25 -5
- package/types/src/charts/emitHelpers.d.ts +122 -0
- package/types/src/charts/ensureZoomDom.d.ts +39 -0
- package/types/src/charts/events/click.legend.d.ts +1 -1
- package/types/src/charts/events/click.shape.d.ts +1 -1
- package/types/src/charts/events/mouseenter.d.ts +1 -1
- package/types/src/charts/events/mouseleave.d.ts +1 -1
- package/types/src/charts/events/mousemove.legend.d.ts +1 -1
- package/types/src/charts/events/mousemove.shape.d.ts +1 -1
- package/types/src/charts/events/touchstart.body.d.ts +1 -1
- package/types/src/charts/factories.d.ts +73 -0
- package/types/src/charts/features/axes.d.ts +134 -0
- package/types/src/charts/features/chartGeometry.d.ts +58 -0
- package/types/src/charts/features/colorScaleBucket.d.ts +43 -0
- package/types/src/charts/features/colorScaleBucketShare.d.ts +16 -0
- package/types/src/charts/features/emitHelpers.d.ts +123 -0
- package/types/src/charts/features/ensureZoomDom.d.ts +39 -0
- package/types/src/charts/features/features.d.ts +152 -0
- package/types/src/charts/features/featuresLegend.d.ts +12 -0
- package/types/src/charts/features/legendLabel.d.ts +11 -0
- package/types/src/charts/features/lineLabels.d.ts +40 -0
- package/types/src/charts/features/plotPaint.d.ts +233 -0
- package/types/src/charts/features/shapeEmit.d.ts +61 -0
- package/types/src/charts/features.d.ts +152 -0
- package/types/src/charts/featuresLegend.d.ts +12 -0
- package/types/src/charts/helpers/matrixData.d.ts +1 -1
- package/types/src/charts/index.d.ts +21 -21
- package/types/src/charts/legendLabel.d.ts +11 -0
- package/types/src/charts/lineLabels.d.ts +40 -0
- package/types/src/charts/makeChart.d.ts +22 -0
- package/types/src/charts/pipeline/resolveSpec.d.ts +51 -0
- package/types/src/charts/pipeline/runChartDraw.d.ts +38 -0
- package/types/src/charts/pipeline/runVizPipeline.d.ts +31 -0
- package/types/src/charts/pipeline/stages.d.ts +160 -0
- package/types/src/charts/pipeline/vizContext.d.ts +45 -0
- package/types/src/charts/pipeline/vizDraw.d.ts +25 -0
- package/types/src/charts/pipeline/vizDrawPure.d.ts +46 -0
- package/types/src/charts/pipeline/vizPreDraw.d.ts +22 -0
- package/types/src/charts/pipeline/vizPreDrawPure.d.ts +68 -0
- package/types/src/charts/plotBuffers/Bar.d.ts +6 -5
- package/types/src/charts/plotBuffers/Box.d.ts +6 -5
- package/types/src/charts/plotBuffers/Circle.d.ts +6 -5
- package/types/src/charts/plotBuffers/Line.d.ts +6 -5
- package/types/src/charts/plotBuffers/Rect.d.ts +6 -5
- package/types/src/charts/plotBuffers/discreteBuffer.d.ts +2 -1
- package/types/src/charts/plotBuffers/numericBuffer.d.ts +2 -1
- package/types/src/charts/plotPaint.d.ts +233 -0
- package/types/src/charts/resolveSpec.d.ts +50 -0
- package/types/src/charts/runChartDraw.d.ts +38 -0
- package/types/src/charts/runVizPipeline.d.ts +31 -0
- package/types/src/charts/shapeEmit.d.ts +61 -0
- package/types/src/charts/stages.d.ts +117 -0
- package/types/src/charts/viz/Viz.d.ts +111 -0
- package/types/src/charts/viz/VizBase.d.ts +160 -0
- package/types/src/charts/viz/VizBaseConfig.d.ts +156 -0
- package/types/src/charts/viz/interactionOpacity.d.ts +23 -0
- package/types/src/charts/viz/ordinalColor.d.ts +14 -0
- package/types/src/charts/viz/trailCatchup.d.ts +14 -0
- package/types/src/charts/viz/vizDefaults.d.ts +8 -0
- package/types/src/charts/viz/vizRender.d.ts +8 -0
- package/types/src/charts/viz/vizTypes.d.ts +250 -0
- package/types/src/charts/vizContext.d.ts +46 -0
- package/types/src/charts/vizDefaults.d.ts +8 -0
- package/types/src/charts/vizDraw.d.ts +25 -0
- package/types/src/charts/vizDrawPure.d.ts +17 -0
- package/types/src/charts/vizPreDraw.d.ts +22 -0
- package/types/src/charts/vizPreDrawPure.d.ts +40 -0
- package/types/src/charts/vizRender.d.ts +8 -0
- package/types/src/charts/vizTypes.d.ts +202 -0
- package/types/src/components/Axis/Axis.d.ts +182 -0
- package/types/src/components/Axis/AxisBottom.d.ts +11 -0
- package/types/src/components/Axis/AxisLeft.d.ts +11 -0
- package/types/src/components/Axis/AxisRight.d.ts +11 -0
- package/types/src/components/Axis/AxisTop.d.ts +11 -0
- package/types/src/components/Axis/axisLayout.d.ts +29 -0
- package/types/src/components/Axis/axisLayoutLabels.d.ts +70 -0
- package/types/src/components/Axis/axisLayoutScale.d.ts +14 -0
- package/types/src/components/Axis/axisRender.d.ts +68 -0
- package/types/src/components/Axis.d.ts +68 -194
- package/types/src/components/ColorScale/ColorScale.d.ts +100 -0
- package/types/src/components/ColorScale/colorScaleRender.d.ts +15 -0
- package/types/src/components/ColorScale/colorScaleScale.d.ts +19 -0
- package/types/src/components/ColorScale.d.ts +1 -129
- package/types/src/components/Legend/Legend.d.ts +95 -0
- package/types/src/components/Legend/legendConfig.d.ts +7 -0
- package/types/src/components/Legend/legendRender.d.ts +16 -0
- package/types/src/components/Legend.d.ts +9 -73
- package/types/src/components/TextBox.d.ts +25 -218
- package/types/src/components/Timeline/Timeline.d.ts +118 -0
- package/types/src/components/Timeline/timelineConfig.d.ts +6 -0
- package/types/src/components/Timeline/timelineRender.d.ts +24 -0
- package/types/src/components/Timeline.d.ts +7 -81
- package/types/src/components/Tooltip.d.ts +20 -200
- package/types/src/components/axisLayout.d.ts +27 -0
- package/types/src/components/axisLayoutLabels.d.ts +42 -0
- package/types/src/components/axisLayoutScale.d.ts +12 -0
- package/types/src/components/axisRender.d.ts +65 -0
- package/types/src/components/colorScaleRender.d.ts +15 -0
- package/types/src/components/colorScaleScale.d.ts +19 -0
- package/types/src/components/index.d.ts +8 -8
- package/types/src/components/legendConfig.d.ts +7 -0
- package/types/src/components/legendRender.d.ts +16 -0
- package/types/src/components/timelineConfig.d.ts +6 -0
- package/types/src/components/timelineRender.d.ts +14 -0
- package/types/src/fluent.d.ts +94 -0
- package/types/src/shapes/Area.d.ts +15 -27
- package/types/src/shapes/Bar.d.ts +13 -33
- package/types/src/shapes/Box.d.ts +17 -56
- package/types/src/shapes/Circle.d.ts +11 -17
- package/types/src/shapes/Image.d.ts +18 -84
- package/types/src/shapes/Line.d.ts +12 -22
- package/types/src/shapes/Path.d.ts +12 -19
- package/types/src/shapes/Rect.d.ts +11 -27
- package/types/src/shapes/Shape.d.ts +46 -257
- package/types/src/shapes/Whisker.d.ts +15 -42
- package/types/src/shapes/buildLabelData.d.ts +50 -0
- package/types/src/shapes/emitLabels.d.ts +16 -0
- package/types/src/shapes/hitAreaNode.d.ts +19 -0
- package/types/src/shapes/sceneSort.d.ts +20 -0
- package/types/src/shapes/shapeConfig.d.ts +226 -0
- package/types/src/utils/BaseClass.d.ts +13 -7
- package/types/src/utils/D3Scale.d.ts +48 -0
- package/types/src/utils/D3plusConfig.d.ts +230 -3
- package/types/src/utils/configPrep.d.ts +7 -4
- package/types/src/utils/getProp.d.ts +3 -1
- package/types/src/utils/index.d.ts +3 -1
- package/types/src/utils/paintComponentScene.d.ts +28 -0
- package/types/umd-entry.d.ts +15 -0
- package/umd/d3plus-core.full.js +31148 -19484
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +5309 -2944
- package/umd/d3plus-core.js +17379 -10578
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +3470 -1876
- package/es/src/charts/AreaPlot.js +0 -85
- package/es/src/charts/AreaPlot.js.map +0 -1
- package/es/src/charts/BarChart.js +0 -92
- package/es/src/charts/BarChart.js.map +0 -1
- package/es/src/charts/BoxWhisker.js +0 -92
- package/es/src/charts/BoxWhisker.js.map +0 -1
- package/es/src/charts/BumpChart.js +0 -147
- package/es/src/charts/BumpChart.js.map +0 -1
- package/es/src/charts/Donut.js +0 -84
- package/es/src/charts/Donut.js.map +0 -1
- package/es/src/charts/Geomap.js +0 -766
- package/es/src/charts/Geomap.js.map +0 -1
- package/es/src/charts/LinePlot.js +0 -83
- package/es/src/charts/LinePlot.js.map +0 -1
- package/es/src/charts/Matrix.js +0 -341
- package/es/src/charts/Matrix.js.map +0 -1
- package/es/src/charts/Network.js +0 -796
- package/es/src/charts/Network.js.map +0 -1
- package/es/src/charts/Pack.js +0 -308
- package/es/src/charts/Pack.js.map +0 -1
- package/es/src/charts/Pie.js +0 -232
- package/es/src/charts/Pie.js.map +0 -1
- package/es/src/charts/Plot.js +0 -2114
- package/es/src/charts/Plot.js.map +0 -1
- package/es/src/charts/Priestley.js +0 -296
- package/es/src/charts/Priestley.js.map +0 -1
- package/es/src/charts/Radar.js +0 -420
- package/es/src/charts/Radar.js.map +0 -1
- package/es/src/charts/RadialMatrix.js +0 -383
- package/es/src/charts/RadialMatrix.js.map +0 -1
- package/es/src/charts/Rings.js +0 -788
- package/es/src/charts/Rings.js.map +0 -1
- package/es/src/charts/Sankey.js +0 -461
- package/es/src/charts/Sankey.js.map +0 -1
- package/es/src/charts/StackedArea.js +0 -80
- package/es/src/charts/StackedArea.js.map +0 -1
- package/es/src/charts/Tree.js +0 -347
- package/es/src/charts/Tree.js.map +0 -1
- package/es/src/charts/Treemap.js +0 -454
- package/es/src/charts/Treemap.js.map +0 -1
- package/es/src/charts/Viz.js +0 -1832
- package/es/src/charts/Viz.js.map +0 -1
- package/es/src/charts/drawSteps/drawAttribution.js +0 -16
- package/es/src/charts/drawSteps/drawAttribution.js.map +0 -1
- package/es/src/charts/drawSteps/drawBack.js +0 -24
- package/es/src/charts/drawSteps/drawBack.js.map +0 -1
- package/es/src/charts/drawSteps/drawColorScale.js +0 -75
- package/es/src/charts/drawSteps/drawColorScale.js.map +0 -1
- package/es/src/charts/drawSteps/drawLegend.js +0 -122
- package/es/src/charts/drawSteps/drawLegend.js.map +0 -1
- package/es/src/charts/drawSteps/drawSubtitle.js +0 -31
- package/es/src/charts/drawSteps/drawSubtitle.js.map +0 -1
- package/es/src/charts/drawSteps/drawTimeline.js +0 -85
- package/es/src/charts/drawSteps/drawTimeline.js.map +0 -1
- package/es/src/charts/drawSteps/drawTitle.js +0 -31
- package/es/src/charts/drawSteps/drawTitle.js.map +0 -1
- package/es/src/charts/drawSteps/drawTotal.js +0 -32
- package/es/src/charts/drawSteps/drawTotal.js.map +0 -1
- package/es/src/components/Axis.js +0 -1457
- package/es/src/components/Axis.js.map +0 -1
- package/es/src/components/AxisBottom.js.map +0 -1
- package/es/src/components/AxisLeft.js.map +0 -1
- package/es/src/components/AxisRight.js.map +0 -1
- package/es/src/components/AxisTop.js.map +0 -1
- package/es/src/components/ColorScale.js +0 -843
- package/es/src/components/ColorScale.js.map +0 -1
- package/es/src/components/Legend.js +0 -622
- package/es/src/components/Legend.js.map +0 -1
- package/es/src/components/Timeline.js +0 -695
- package/es/src/components/Timeline.js.map +0 -1
- /package/es/src/components/{AxisBottom.js → Axis/AxisBottom.js} +0 -0
- /package/es/src/components/{AxisLeft.js → Axis/AxisLeft.js} +0 -0
- /package/es/src/components/{AxisRight.js → Axis/AxisRight.js} +0 -0
- /package/es/src/components/{AxisTop.js → Axis/AxisTop.js} +0 -0
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
function _assert_this_initialized(self) {
|
|
2
|
-
if (self === void 0) {
|
|
3
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
-
}
|
|
5
|
-
return self;
|
|
6
|
-
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
|
-
function _class_call_check(instance, Constructor) {
|
|
12
|
-
if (!(instance instanceof Constructor)) {
|
|
13
|
-
throw new TypeError("Cannot call a class as a function");
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function _get_prototype_of(o) {
|
|
17
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
-
};
|
|
20
|
-
return _get_prototype_of(o);
|
|
21
|
-
}
|
|
22
|
-
function _inherits(subClass, superClass) {
|
|
23
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
-
}
|
|
26
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
-
constructor: {
|
|
28
|
-
value: subClass,
|
|
29
|
-
writable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
-
}
|
|
35
|
-
function _possible_constructor_return(self, call) {
|
|
36
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
-
return call;
|
|
38
|
-
}
|
|
39
|
-
return _assert_this_initialized(self);
|
|
40
|
-
}
|
|
41
|
-
function _set_prototype_of(o, p) {
|
|
42
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
-
o.__proto__ = p;
|
|
44
|
-
return o;
|
|
45
|
-
};
|
|
46
|
-
return _set_prototype_of(o, p);
|
|
47
|
-
}
|
|
48
|
-
function _type_of(obj) {
|
|
49
|
-
"@swc/helpers - typeof";
|
|
50
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
-
}
|
|
52
|
-
function _is_native_reflect_construct() {
|
|
53
|
-
try {
|
|
54
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
-
} catch (_) {}
|
|
56
|
-
return (_is_native_reflect_construct = function() {
|
|
57
|
-
return !!result;
|
|
58
|
-
})();
|
|
59
|
-
}
|
|
60
|
-
import { constant } from "../utils/index.js";
|
|
61
|
-
import { default as Plot } from "./Plot.js";
|
|
62
|
-
var AreaPlot = /*#__PURE__*/ function(Plot) {
|
|
63
|
-
"use strict";
|
|
64
|
-
_inherits(AreaPlot, Plot);
|
|
65
|
-
function AreaPlot() {
|
|
66
|
-
_class_call_check(this, AreaPlot);
|
|
67
|
-
var _this;
|
|
68
|
-
_this = _call_super(this, AreaPlot);
|
|
69
|
-
_this._baseline = 0;
|
|
70
|
-
_this._discrete = "x";
|
|
71
|
-
_this._shape = constant("Area");
|
|
72
|
-
return _this;
|
|
73
|
-
}
|
|
74
|
-
return AreaPlot;
|
|
75
|
-
}(Plot);
|
|
76
|
-
/**
|
|
77
|
-
Creates an area plot based on an array of data.
|
|
78
|
-
@example <caption>the equivalent of calling:</caption>
|
|
79
|
-
new d3plus.Plot()
|
|
80
|
-
.baseline(0)
|
|
81
|
-
.discrete("x")
|
|
82
|
-
.shape("Area")
|
|
83
|
-
*/ export { AreaPlot as default };
|
|
84
|
-
|
|
85
|
-
//# sourceMappingURL=AreaPlot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/charts/AreaPlot.ts"],"sourcesContent":["import {constant} from \"../utils/index.js\";\n\nimport {default as Plot} from \"./Plot.js\";\n\n/**\n Creates an area plot based on an array of data.\n @example <caption>the equivalent of calling:</caption>\nnew d3plus.Plot()\n .baseline(0)\n .discrete(\"x\")\n .shape(\"Area\")\n*/\nexport default class AreaPlot extends Plot {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.\n @private\n */\n constructor() {\n super();\n this._baseline = 0;\n this._discrete = \"x\";\n this._shape = constant(\"Area\");\n }\n}\n"],"names":["constant","default","Plot","AreaPlot","_baseline","_discrete","_shape"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,QAAQ,QAAO,oBAAoB;AAE3C,SAAQC,WAAWC,IAAI,QAAO,YAAY;AAU3B,IAAA,AAAMC,yBAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,SAAS,GAAG;QACjB,MAAKC,SAAS,GAAG;QACjB,MAAKC,MAAM,GAAGN,SAAS;;;WATNG;EAAiBD;AARtC;;;;;;;AAOA,GACA,SAAqBC,sBAWpB"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
function _assert_this_initialized(self) {
|
|
2
|
-
if (self === void 0) {
|
|
3
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
-
}
|
|
5
|
-
return self;
|
|
6
|
-
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
|
-
function _class_call_check(instance, Constructor) {
|
|
12
|
-
if (!(instance instanceof Constructor)) {
|
|
13
|
-
throw new TypeError("Cannot call a class as a function");
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function _get_prototype_of(o) {
|
|
17
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
-
};
|
|
20
|
-
return _get_prototype_of(o);
|
|
21
|
-
}
|
|
22
|
-
function _inherits(subClass, superClass) {
|
|
23
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
-
}
|
|
26
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
-
constructor: {
|
|
28
|
-
value: subClass,
|
|
29
|
-
writable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
-
}
|
|
35
|
-
function _possible_constructor_return(self, call) {
|
|
36
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
-
return call;
|
|
38
|
-
}
|
|
39
|
-
return _assert_this_initialized(self);
|
|
40
|
-
}
|
|
41
|
-
function _set_prototype_of(o, p) {
|
|
42
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
-
o.__proto__ = p;
|
|
44
|
-
return o;
|
|
45
|
-
};
|
|
46
|
-
return _set_prototype_of(o, p);
|
|
47
|
-
}
|
|
48
|
-
function _type_of(obj) {
|
|
49
|
-
"@swc/helpers - typeof";
|
|
50
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
-
}
|
|
52
|
-
function _is_native_reflect_construct() {
|
|
53
|
-
try {
|
|
54
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
-
} catch (_) {}
|
|
56
|
-
return (_is_native_reflect_construct = function() {
|
|
57
|
-
return !!result;
|
|
58
|
-
})();
|
|
59
|
-
}
|
|
60
|
-
import { constant } from "../utils/index.js";
|
|
61
|
-
import { default as Plot } from "./Plot.js";
|
|
62
|
-
var BarChart = /*#__PURE__*/ function(Plot) {
|
|
63
|
-
"use strict";
|
|
64
|
-
_inherits(BarChart, Plot);
|
|
65
|
-
function BarChart() {
|
|
66
|
-
_class_call_check(this, BarChart);
|
|
67
|
-
var _this;
|
|
68
|
-
_this = _call_super(this, BarChart);
|
|
69
|
-
_this._baseline = 0;
|
|
70
|
-
_this._discrete = "x";
|
|
71
|
-
var defaultLegend = _this._legend;
|
|
72
|
-
_this._legend = function(config, arr) {
|
|
73
|
-
var legendIds = arr.map(_this._groupBy[_this._legendDepth].bind(_this)).sort().join();
|
|
74
|
-
var barIds = _this._filteredData.map(_this._groupBy[_this._legendDepth].bind(_this)).sort().join();
|
|
75
|
-
if (legendIds === barIds) return false;
|
|
76
|
-
return defaultLegend.bind(_this)(config, arr);
|
|
77
|
-
};
|
|
78
|
-
_this._shape = constant("Bar");
|
|
79
|
-
return _this;
|
|
80
|
-
}
|
|
81
|
-
return BarChart;
|
|
82
|
-
}(Plot);
|
|
83
|
-
/**
|
|
84
|
-
Creates a bar chart based on an array of data.
|
|
85
|
-
@example <caption>the equivalent of calling:</caption>
|
|
86
|
-
new d3plus.Plot()
|
|
87
|
-
.baseline(0)
|
|
88
|
-
.discrete("x")
|
|
89
|
-
.shape("Bar")
|
|
90
|
-
*/ export { BarChart as default };
|
|
91
|
-
|
|
92
|
-
//# sourceMappingURL=BarChart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/charts/BarChart.ts"],"sourcesContent":["import type {DataPoint} from \"@d3plus/data\";\nimport {constant} from \"../utils/index.js\";\nimport {default as Plot} from \"./Plot.js\";\n\n/**\n Creates a bar chart based on an array of data.\n @example <caption>the equivalent of calling:</caption>\nnew d3plus.Plot()\n .baseline(0)\n .discrete(\"x\")\n .shape(\"Bar\")\n*/\nexport default class BarChart extends Plot {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.\n @private\n */\n constructor() {\n super();\n this._baseline = 0;\n this._discrete = \"x\";\n const defaultLegend = this._legend;\n this._legend = (config: Record<string, unknown>, arr: DataPoint[]) => {\n const legendIds = arr\n .map(this._groupBy[this._legendDepth].bind(this))\n .sort()\n .join();\n const barIds = this._filteredData\n .map(this._groupBy[this._legendDepth].bind(this))\n .sort()\n .join();\n if (legendIds === barIds) return false;\n return defaultLegend.bind(this)(config, arr);\n };\n this._shape = constant(\"Bar\");\n }\n}\n"],"names":["constant","default","Plot","BarChart","_baseline","_discrete","defaultLegend","_legend","config","arr","legendIds","map","_groupBy","_legendDepth","bind","sort","join","barIds","_filteredData","_shape"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAQA,QAAQ,QAAO,oBAAoB;AAC3C,SAAQC,WAAWC,IAAI,QAAO,YAAY;AAU3B,IAAA,AAAMC,yBAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,SAAS,GAAG;QACjB,MAAKC,SAAS,GAAG;QACjB,IAAMC,gBAAgB,MAAKC,OAAO;QAClC,MAAKA,OAAO,GAAG,SAACC,QAAiCC;YAC/C,IAAMC,YAAYD,IACfE,GAAG,CAAC,MAAKC,QAAQ,CAAC,MAAKC,YAAY,CAAC,CAACC,IAAI,SACzCC,IAAI,GACJC,IAAI;YACP,IAAMC,SAAS,MAAKC,aAAa,CAC9BP,GAAG,CAAC,MAAKC,QAAQ,CAAC,MAAKC,YAAY,CAAC,CAACC,IAAI,SACzCC,IAAI,GACJC,IAAI;YACP,IAAIN,cAAcO,QAAQ,OAAO;YACjC,OAAOX,cAAcQ,IAAI,QAAON,QAAQC;QAC1C;QACA,MAAKU,MAAM,GAAGnB,SAAS;;;WAtBNG;EAAiBD;AARtC;;;;;;;AAOA,GACA,SAAqBC,sBAwBpB"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
function _assert_this_initialized(self) {
|
|
2
|
-
if (self === void 0) {
|
|
3
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
-
}
|
|
5
|
-
return self;
|
|
6
|
-
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
|
-
function _class_call_check(instance, Constructor) {
|
|
12
|
-
if (!(instance instanceof Constructor)) {
|
|
13
|
-
throw new TypeError("Cannot call a class as a function");
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function _get_prototype_of(o) {
|
|
17
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
-
};
|
|
20
|
-
return _get_prototype_of(o);
|
|
21
|
-
}
|
|
22
|
-
function _inherits(subClass, superClass) {
|
|
23
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
-
}
|
|
26
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
-
constructor: {
|
|
28
|
-
value: subClass,
|
|
29
|
-
writable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
-
}
|
|
35
|
-
function _possible_constructor_return(self, call) {
|
|
36
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
-
return call;
|
|
38
|
-
}
|
|
39
|
-
return _assert_this_initialized(self);
|
|
40
|
-
}
|
|
41
|
-
function _set_prototype_of(o, p) {
|
|
42
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
-
o.__proto__ = p;
|
|
44
|
-
return o;
|
|
45
|
-
};
|
|
46
|
-
return _set_prototype_of(o, p);
|
|
47
|
-
}
|
|
48
|
-
function _type_of(obj) {
|
|
49
|
-
"@swc/helpers - typeof";
|
|
50
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
-
}
|
|
52
|
-
function _is_native_reflect_construct() {
|
|
53
|
-
try {
|
|
54
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
-
} catch (_) {}
|
|
56
|
-
return (_is_native_reflect_construct = function() {
|
|
57
|
-
return !!result;
|
|
58
|
-
})();
|
|
59
|
-
}
|
|
60
|
-
import { assign } from "@d3plus/dom";
|
|
61
|
-
import { constant } from "../utils/index.js";
|
|
62
|
-
import { default as Plot } from "./Plot.js";
|
|
63
|
-
var BoxWhisker = /*#__PURE__*/ function(Plot) {
|
|
64
|
-
"use strict";
|
|
65
|
-
_inherits(BoxWhisker, Plot);
|
|
66
|
-
function BoxWhisker() {
|
|
67
|
-
_class_call_check(this, BoxWhisker);
|
|
68
|
-
var _this;
|
|
69
|
-
_this = _call_super(this, BoxWhisker);
|
|
70
|
-
_this._discrete = "x";
|
|
71
|
-
_this._shape = constant("Box");
|
|
72
|
-
_this._tooltipConfig = assign(_this._tooltipConfig, {
|
|
73
|
-
title: function title(d, i) {
|
|
74
|
-
if (!d) return "";
|
|
75
|
-
while(d.__d3plus__ && d.data){
|
|
76
|
-
d = d.data;
|
|
77
|
-
i = d.i;
|
|
78
|
-
}
|
|
79
|
-
if (_this._label) return _this._label(d, i);
|
|
80
|
-
var l = _this._ids(d, i).slice(0, _this._drawDepth);
|
|
81
|
-
return l[l.length - 1];
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
return _this;
|
|
85
|
-
}
|
|
86
|
-
return BoxWhisker;
|
|
87
|
-
}(Plot);
|
|
88
|
-
/**
|
|
89
|
-
Creates a simple box and whisker based on an array of data.
|
|
90
|
-
*/ export { BoxWhisker as default };
|
|
91
|
-
|
|
92
|
-
//# sourceMappingURL=BoxWhisker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/charts/BoxWhisker.ts"],"sourcesContent":["import {assign} from \"@d3plus/dom\";\nimport type {DataPoint} from \"@d3plus/data\";\nimport {constant} from \"../utils/index.js\";\n\nimport {default as Plot} from \"./Plot.js\";\n\n/**\n Creates a simple box and whisker based on an array of data.\n*/\nexport default class BoxWhisker extends Plot {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.\n @private\n */\n constructor() {\n super();\n this._discrete = \"x\";\n this._shape = constant(\"Box\");\n\n this._tooltipConfig = assign(this._tooltipConfig, {\n title: (\n d: DataPoint & {__d3plus__?: boolean; data?: DataPoint; i?: number},\n i: number,\n ) => {\n if (!d) return \"\";\n while (d.__d3plus__ && d.data) {\n d = d.data as DataPoint & {\n __d3plus__?: boolean;\n data?: DataPoint;\n i?: number;\n };\n i = d.i as number;\n }\n if (this._label) return this._label(d, i);\n const l = this._ids(d, i).slice(0, this._drawDepth);\n return l[l.length - 1];\n },\n });\n }\n}\n"],"names":["assign","constant","default","Plot","BoxWhisker","_discrete","_shape","_tooltipConfig","title","d","i","__d3plus__","data","_label","l","_ids","slice","_drawDepth","length"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,MAAM,QAAO,cAAc;AAEnC,SAAQC,QAAQ,QAAO,oBAAoB;AAE3C,SAAQC,WAAWC,IAAI,QAAO,YAAY;AAK3B,IAAA,AAAMC,2BAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,SAAS,GAAG;QACjB,MAAKC,MAAM,GAAGL,SAAS;QAEvB,MAAKM,cAAc,GAAGP,OAAO,MAAKO,cAAc,EAAE;YAChDC,OAAO,SAAPA,MACEC,GACAC;gBAEA,IAAI,CAACD,GAAG,OAAO;gBACf,MAAOA,EAAEE,UAAU,IAAIF,EAAEG,IAAI,CAAE;oBAC7BH,IAAIA,EAAEG,IAAI;oBAKVF,IAAID,EAAEC,CAAC;gBACT;gBACA,IAAI,MAAKG,MAAM,EAAE,OAAO,MAAKA,MAAM,CAACJ,GAAGC;gBACvC,IAAMI,IAAI,MAAKC,IAAI,CAACN,GAAGC,GAAGM,KAAK,CAAC,GAAG,MAAKC,UAAU;gBAClD,OAAOH,CAAC,CAACA,EAAEI,MAAM,GAAG,EAAE;YACxB;QACF;;;WA5BiBd;EAAmBD;AAHxC;;AAEA,GACA,SAAqBC,wBA8BpB"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
function _assert_this_initialized(self) {
|
|
2
|
-
if (self === void 0) {
|
|
3
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
-
}
|
|
5
|
-
return self;
|
|
6
|
-
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
|
-
function _class_call_check(instance, Constructor) {
|
|
12
|
-
if (!(instance instanceof Constructor)) {
|
|
13
|
-
throw new TypeError("Cannot call a class as a function");
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function _get_prototype_of(o) {
|
|
17
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
-
};
|
|
20
|
-
return _get_prototype_of(o);
|
|
21
|
-
}
|
|
22
|
-
function _inherits(subClass, superClass) {
|
|
23
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
-
}
|
|
26
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
-
constructor: {
|
|
28
|
-
value: subClass,
|
|
29
|
-
writable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
-
}
|
|
35
|
-
function _instanceof(left, right) {
|
|
36
|
-
"@swc/helpers - instanceof";
|
|
37
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
38
|
-
return !!right[Symbol.hasInstance](left);
|
|
39
|
-
} else {
|
|
40
|
-
return left instanceof right;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function _possible_constructor_return(self, call) {
|
|
44
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
45
|
-
return call;
|
|
46
|
-
}
|
|
47
|
-
return _assert_this_initialized(self);
|
|
48
|
-
}
|
|
49
|
-
function _set_prototype_of(o, p) {
|
|
50
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
51
|
-
o.__proto__ = p;
|
|
52
|
-
return o;
|
|
53
|
-
};
|
|
54
|
-
return _set_prototype_of(o, p);
|
|
55
|
-
}
|
|
56
|
-
function _type_of(obj) {
|
|
57
|
-
"@swc/helpers - typeof";
|
|
58
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
59
|
-
}
|
|
60
|
-
function _is_native_reflect_construct() {
|
|
61
|
-
try {
|
|
62
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
63
|
-
} catch (_) {}
|
|
64
|
-
return (_is_native_reflect_construct = function() {
|
|
65
|
-
return !!result;
|
|
66
|
-
})();
|
|
67
|
-
}
|
|
68
|
-
import { constant } from "../utils/index.js";
|
|
69
|
-
import { default as Plot } from "./Plot.js";
|
|
70
|
-
var BumpChart = /*#__PURE__*/ function(Plot) {
|
|
71
|
-
"use strict";
|
|
72
|
-
_inherits(BumpChart, Plot);
|
|
73
|
-
function BumpChart() {
|
|
74
|
-
_class_call_check(this, BumpChart);
|
|
75
|
-
var _this;
|
|
76
|
-
_this = _call_super(this, BumpChart);
|
|
77
|
-
_this._discrete = "x";
|
|
78
|
-
_this._shape = constant("Line");
|
|
79
|
-
_this.y2(function(d) {
|
|
80
|
-
return _this._y(d);
|
|
81
|
-
});
|
|
82
|
-
_this.yConfig({
|
|
83
|
-
tickFormat: function tickFormat(val) {
|
|
84
|
-
var data = _this._formattedData;
|
|
85
|
-
var xMin = _instanceof(data[0].x, Date) ? data[0].x.getTime() : data[0].x;
|
|
86
|
-
var startData = data.filter(function(d) {
|
|
87
|
-
return (_instanceof(d.x, Date) ? d.x.getTime() : d.x) === xMin;
|
|
88
|
-
});
|
|
89
|
-
var d = startData.find(function(d) {
|
|
90
|
-
return d.y === val;
|
|
91
|
-
});
|
|
92
|
-
return d ? _this._drawLabel(d, d.i) : "";
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
_this.y2Config({
|
|
96
|
-
tickFormat: function tickFormat(val) {
|
|
97
|
-
var data = _this._formattedData;
|
|
98
|
-
var xMax = _instanceof(data[data.length - 1].x, Date) ? data[data.length - 1].x.getTime() : data[data.length - 1].x;
|
|
99
|
-
var endData = data.filter(function(d) {
|
|
100
|
-
return (_instanceof(d.x, Date) ? d.x.getTime() : d.x) === xMax;
|
|
101
|
-
});
|
|
102
|
-
var d = endData.find(function(d) {
|
|
103
|
-
return d.y === val;
|
|
104
|
-
});
|
|
105
|
-
return d ? _this._drawLabel(d, d.i) : "";
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
_this.ySort(function(a, b) {
|
|
109
|
-
return _this._y(b) - _this._y(a);
|
|
110
|
-
});
|
|
111
|
-
_this.y2Sort(function(a, b) {
|
|
112
|
-
return _this._y(b) - _this._y(a);
|
|
113
|
-
});
|
|
114
|
-
return _this;
|
|
115
|
-
}
|
|
116
|
-
return BumpChart;
|
|
117
|
-
}(Plot);
|
|
118
|
-
/**
|
|
119
|
-
Creates a bump chart based on an array of data.
|
|
120
|
-
@example <caption>the equivalent of calling:</caption>
|
|
121
|
-
new d3plus.Plot()
|
|
122
|
-
.discrete("x")
|
|
123
|
-
.shape("Line")
|
|
124
|
-
.y2(d => this._y(d))
|
|
125
|
-
.yConfig({
|
|
126
|
-
tickFormat: val => {
|
|
127
|
-
const data = this._formattedData;
|
|
128
|
-
const xDomain = this._xDomain;
|
|
129
|
-
const startData = data.filter(d => d.x === xDomain[0]);
|
|
130
|
-
const d = startData.find(d => d.y === val);
|
|
131
|
-
return this._drawLabel(d, d.i);
|
|
132
|
-
}
|
|
133
|
-
})
|
|
134
|
-
.y2Config({
|
|
135
|
-
tickFormat: val => {
|
|
136
|
-
const data = this._formattedData;
|
|
137
|
-
const xDomain = this._xDomain;
|
|
138
|
-
const endData = data.filter(d => d.x === xDomain[xDomain.length - 1]);
|
|
139
|
-
const d = endData.find(d => d.y === val);
|
|
140
|
-
return this._drawLabel(d, d.i);
|
|
141
|
-
}
|
|
142
|
-
})
|
|
143
|
-
.ySort((a, b) => b.y - a.y)
|
|
144
|
-
.y2Sort((a, b) => b.y - a.y)
|
|
145
|
-
*/ export { BumpChart as default };
|
|
146
|
-
|
|
147
|
-
//# sourceMappingURL=BumpChart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/charts/BumpChart.ts"],"sourcesContent":["import {constant} from \"../utils/index.js\";\n\nimport {default as Plot} from \"./Plot.js\";\n\n/**\n Creates a bump chart based on an array of data.\n @example <caption>the equivalent of calling:</caption>\nnew d3plus.Plot()\n .discrete(\"x\")\n .shape(\"Line\")\n .y2(d => this._y(d))\n .yConfig({\n tickFormat: val => {\n const data = this._formattedData;\n const xDomain = this._xDomain;\n const startData = data.filter(d => d.x === xDomain[0]);\n const d = startData.find(d => d.y === val);\n return this._drawLabel(d, d.i);\n }\n })\n .y2Config({\n tickFormat: val => {\n const data = this._formattedData;\n const xDomain = this._xDomain;\n const endData = data.filter(d => d.x === xDomain[xDomain.length - 1]);\n const d = endData.find(d => d.y === val);\n return this._drawLabel(d, d.i);\n }\n })\n .ySort((a, b) => b.y - a.y)\n .y2Sort((a, b) => b.y - a.y)\n*/\nexport default class BumpChart extends Plot {\n /**\n Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.\n @private\n */\n constructor() {\n super();\n this._discrete = \"x\";\n this._shape = constant(\"Line\");\n this.y2((d: Record<string, unknown>) => this._y(d));\n\n this.yConfig({\n tickFormat: (val: number) => {\n const data = this._formattedData;\n const xMin =\n data[0].x instanceof Date ? data[0].x.getTime() : data[0].x;\n const startData = data.filter(\n (d: Record<string, unknown>) =>\n (d.x instanceof Date ? (d.x as Date).getTime() : d.x) === xMin,\n );\n const d = startData.find((d: Record<string, unknown>) => d.y === val);\n return d ? this._drawLabel(d, d.i) : \"\";\n },\n });\n this.y2Config({\n tickFormat: (val: number) => {\n const data = this._formattedData;\n const xMax =\n data[data.length - 1].x instanceof Date\n ? data[data.length - 1].x.getTime()\n : data[data.length - 1].x;\n const endData = data.filter(\n (d: Record<string, unknown>) =>\n (d.x instanceof Date ? (d.x as Date).getTime() : d.x) === xMax,\n );\n const d = endData.find((d: Record<string, unknown>) => d.y === val);\n return d ? this._drawLabel(d, d.i) : \"\";\n },\n });\n this.ySort(\n (a: Record<string, unknown>, b: Record<string, unknown>) =>\n this._y(b) - this._y(a),\n );\n this.y2Sort(\n (a: Record<string, unknown>, b: Record<string, unknown>) =>\n this._y(b) - this._y(a),\n );\n }\n}\n"],"names":["constant","default","Plot","BumpChart","_discrete","_shape","y2","d","_y","yConfig","tickFormat","val","data","_formattedData","xMin","x","Date","getTime","startData","filter","find","y","_drawLabel","i","y2Config","xMax","length","endData","ySort","a","b","y2Sort"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,QAAQ,QAAO,oBAAoB;AAE3C,SAAQC,WAAWC,IAAI,QAAO,YAAY;AA8B3B,IAAA,AAAMC,0BAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAOjB,MAAKC,SAAS,GAAG;QACjB,MAAKC,MAAM,GAAGL,SAAS;QACvB,MAAKM,EAAE,CAAC,SAACC;mBAA+B,MAAKC,EAAE,CAACD;;QAEhD,MAAKE,OAAO,CAAC;YACXC,YAAY,SAAZA,WAAaC;gBACX,IAAMC,OAAO,MAAKC,cAAc;gBAChC,IAAMC,OACJF,AAAS,YAATA,IAAI,CAAC,EAAE,CAACG,CAAC,EAAYC,QAAOJ,IAAI,CAAC,EAAE,CAACG,CAAC,CAACE,OAAO,KAAKL,IAAI,CAAC,EAAE,CAACG,CAAC;gBAC7D,IAAMG,YAAYN,KAAKO,MAAM,CAC3B,SAACZ;2BACC,AAACA,CAAAA,AAAG,YAAHA,EAAEQ,CAAC,EAAYC,QAAO,AAACT,EAAEQ,CAAC,CAAUE,OAAO,KAAKV,EAAEQ,CAAC,AAADA,MAAOD;;gBAE9D,IAAMP,IAAIW,UAAUE,IAAI,CAAC,SAACb;2BAA+BA,EAAEc,CAAC,KAAKV;;gBACjE,OAAOJ,IAAI,MAAKe,UAAU,CAACf,GAAGA,EAAEgB,CAAC,IAAI;YACvC;QACF;QACA,MAAKC,QAAQ,CAAC;YACZd,YAAY,SAAZA,WAAaC;gBACX,IAAMC,OAAO,MAAKC,cAAc;gBAChC,IAAMY,OACJb,AAAuB,YAAvBA,IAAI,CAACA,KAAKc,MAAM,GAAG,EAAE,CAACX,CAAC,EAAYC,QAC/BJ,IAAI,CAACA,KAAKc,MAAM,GAAG,EAAE,CAACX,CAAC,CAACE,OAAO,KAC/BL,IAAI,CAACA,KAAKc,MAAM,GAAG,EAAE,CAACX,CAAC;gBAC7B,IAAMY,UAAUf,KAAKO,MAAM,CACzB,SAACZ;2BACC,AAACA,CAAAA,AAAG,YAAHA,EAAEQ,CAAC,EAAYC,QAAO,AAACT,EAAEQ,CAAC,CAAUE,OAAO,KAAKV,EAAEQ,CAAC,AAADA,MAAOU;;gBAE9D,IAAMlB,IAAIoB,QAAQP,IAAI,CAAC,SAACb;2BAA+BA,EAAEc,CAAC,KAAKV;;gBAC/D,OAAOJ,IAAI,MAAKe,UAAU,CAACf,GAAGA,EAAEgB,CAAC,IAAI;YACvC;QACF;QACA,MAAKK,KAAK,CACR,SAACC,GAA4BC;mBAC3B,MAAKtB,EAAE,CAACsB,KAAK,MAAKtB,EAAE,CAACqB;;QAEzB,MAAKE,MAAM,CACT,SAACF,GAA4BC;mBAC3B,MAAKtB,EAAE,CAACsB,KAAK,MAAKtB,EAAE,CAACqB;;;;WA7CR1B;EAAkBD;AA5BvC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,GACA,SAAqBC,uBAgDpB"}
|
package/es/src/charts/Donut.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
function _assert_this_initialized(self) {
|
|
2
|
-
if (self === void 0) {
|
|
3
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
-
}
|
|
5
|
-
return self;
|
|
6
|
-
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
|
-
function _class_call_check(instance, Constructor) {
|
|
12
|
-
if (!(instance instanceof Constructor)) {
|
|
13
|
-
throw new TypeError("Cannot call a class as a function");
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function _get_prototype_of(o) {
|
|
17
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
-
};
|
|
20
|
-
return _get_prototype_of(o);
|
|
21
|
-
}
|
|
22
|
-
function _inherits(subClass, superClass) {
|
|
23
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
-
}
|
|
26
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
-
constructor: {
|
|
28
|
-
value: subClass,
|
|
29
|
-
writable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
-
}
|
|
35
|
-
function _possible_constructor_return(self, call) {
|
|
36
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
-
return call;
|
|
38
|
-
}
|
|
39
|
-
return _assert_this_initialized(self);
|
|
40
|
-
}
|
|
41
|
-
function _set_prototype_of(o, p) {
|
|
42
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
-
o.__proto__ = p;
|
|
44
|
-
return o;
|
|
45
|
-
};
|
|
46
|
-
return _set_prototype_of(o, p);
|
|
47
|
-
}
|
|
48
|
-
function _type_of(obj) {
|
|
49
|
-
"@swc/helpers - typeof";
|
|
50
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
-
}
|
|
52
|
-
function _is_native_reflect_construct() {
|
|
53
|
-
try {
|
|
54
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
-
} catch (_) {}
|
|
56
|
-
return (_is_native_reflect_construct = function() {
|
|
57
|
-
return !!result;
|
|
58
|
-
})();
|
|
59
|
-
}
|
|
60
|
-
import { min } from "d3-array";
|
|
61
|
-
import { default as Pie } from "./Pie.js";
|
|
62
|
-
var Donut = /*#__PURE__*/ function(Pie) {
|
|
63
|
-
"use strict";
|
|
64
|
-
_inherits(Donut, Pie);
|
|
65
|
-
function Donut() {
|
|
66
|
-
_class_call_check(this, Donut);
|
|
67
|
-
var _this;
|
|
68
|
-
_this = _call_super(this, Donut);
|
|
69
|
-
_this._innerRadius = function() {
|
|
70
|
-
return min([
|
|
71
|
-
_this._width - _this._margin.left - _this._margin.right,
|
|
72
|
-
_this._height - _this._margin.top - _this._margin.bottom
|
|
73
|
-
]) / 4;
|
|
74
|
-
};
|
|
75
|
-
_this._padPixel = 2;
|
|
76
|
-
return _this;
|
|
77
|
-
}
|
|
78
|
-
return Donut;
|
|
79
|
-
}(Pie);
|
|
80
|
-
/**
|
|
81
|
-
Extends the Pie visualization to create a donut chart.
|
|
82
|
-
*/ export { Donut as default };
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=Donut.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/charts/Donut.ts"],"sourcesContent":["import {min} from \"d3-array\";\nimport {default as Pie} from \"./Pie.js\";\n\n/**\n Extends the Pie visualization to create a donut chart.\n*/\nexport default class Donut extends Pie {\n /**\n Invoked when creating a new class instance, and sets any default parameters.\n @private\n */\n constructor() {\n super();\n\n this._innerRadius = () =>\n min([\n this._width - this._margin.left - this._margin.right,\n this._height - this._margin.top - this._margin.bottom,\n ])! / 4;\n this._padPixel = 2;\n }\n}\n"],"names":["min","default","Pie","Donut","_innerRadius","_width","_margin","left","right","_height","top","bottom","_padPixel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAQA,GAAG,QAAO,WAAW;AAC7B,SAAQC,WAAWC,GAAG,QAAO,WAAW;AAKzB,IAAA,AAAMC,sBAAN;;cAAMA;aAAAA;gCAAAA;;gBAMjB,kBANiBA;QAQjB,MAAKC,YAAY,GAAG;mBAClBJ,IAAI;gBACF,MAAKK,MAAM,GAAG,MAAKC,OAAO,CAACC,IAAI,GAAG,MAAKD,OAAO,CAACE,KAAK;gBACpD,MAAKC,OAAO,GAAG,MAAKH,OAAO,CAACI,GAAG,GAAG,MAAKJ,OAAO,CAACK,MAAM;aACtD,IAAK;;QACR,MAAKC,SAAS,GAAG;;;WAbAT;EAAcD;AAHnC;;AAEA,GACA,SAAqBC,mBAepB"}
|