@d3plus/core 3.1.5 → 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 +17 -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 -19470
- package/umd/d3plus-core.full.js.map +1 -1
- package/umd/d3plus-core.full.min.js +5315 -2939
- package/umd/d3plus-core.js +17379 -10575
- package/umd/d3plus-core.js.map +1 -1
- package/umd/d3plus-core.min.js +3470 -1873
- 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 -1454
- 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
|
@@ -215,9 +215,104 @@ function _ts_generator(thisArg, body) {
|
|
|
215
215
|
import { select } from "d3-selection";
|
|
216
216
|
import { computePosition, arrow as arrowMiddleware, offset, flip, shift } from "@floating-ui/dom";
|
|
217
217
|
import { colorContrast, colorDefaults } from "@d3plus/color";
|
|
218
|
-
import { elem, stylize } from "@d3plus/dom";
|
|
218
|
+
import { assign, elem, stylize } from "@d3plus/dom";
|
|
219
219
|
import { fontFamily, fontFamilyStringify } from "@d3plus/text";
|
|
220
220
|
import { accessor, BaseClass, constant } from "../utils/index.js";
|
|
221
|
+
import { installFluent } from "../fluent.js";
|
|
222
|
+
/** Tooltip's fluent accessor schema. Config storage lives on `this.schema.<key>`. */ var tooltipSchema = [
|
|
223
|
+
{
|
|
224
|
+
key: "arrow",
|
|
225
|
+
coerce: "const",
|
|
226
|
+
default: accessor("arrow", "")
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
key: "background",
|
|
230
|
+
coerce: "const",
|
|
231
|
+
default: constant(colorDefaults.light)
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
key: "body",
|
|
235
|
+
coerce: "const",
|
|
236
|
+
default: accessor("body", "")
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
key: "border",
|
|
240
|
+
coerce: "const",
|
|
241
|
+
default: constant("1px solid rgba(0, 0, 0, 0.25)")
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
key: "borderRadius",
|
|
245
|
+
coerce: "const",
|
|
246
|
+
default: constant("4px")
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
key: "className",
|
|
250
|
+
coerce: "identity",
|
|
251
|
+
default: "d3plus-tooltip"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
key: "footer",
|
|
255
|
+
coerce: "const",
|
|
256
|
+
default: accessor("footer", "")
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
key: "height",
|
|
260
|
+
coerce: "const",
|
|
261
|
+
default: constant("auto")
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
key: "id",
|
|
265
|
+
coerce: "const",
|
|
266
|
+
default: function _default(d, i) {
|
|
267
|
+
return "".concat(i);
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
key: "offset",
|
|
272
|
+
coerce: "const",
|
|
273
|
+
default: constant(5)
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
key: "padding",
|
|
277
|
+
coerce: "const",
|
|
278
|
+
default: constant("10px")
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
key: "pointerEvents",
|
|
282
|
+
coerce: "const",
|
|
283
|
+
default: constant("auto")
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
key: "tbody",
|
|
287
|
+
coerce: "identity",
|
|
288
|
+
default: []
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
key: "thead",
|
|
292
|
+
coerce: "identity",
|
|
293
|
+
default: []
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
key: "title",
|
|
297
|
+
coerce: "const",
|
|
298
|
+
default: accessor("title", "")
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
key: "maxWidth",
|
|
302
|
+
coerce: "const",
|
|
303
|
+
default: constant("300px")
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
key: "minWidth",
|
|
307
|
+
coerce: "const",
|
|
308
|
+
default: constant("200px")
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
key: "width",
|
|
312
|
+
coerce: "const",
|
|
313
|
+
default: constant("auto")
|
|
314
|
+
}
|
|
315
|
+
];
|
|
221
316
|
/**
|
|
222
317
|
* Creates a virtual reference element for Floating UI.
|
|
223
318
|
* @param {Number[]} position
|
|
@@ -254,6 +349,11 @@ import { accessor, BaseClass, constant } from "../utils/index.js";
|
|
|
254
349
|
return [
|
|
255
350
|
4,
|
|
256
351
|
computePosition(reference, tooltip, {
|
|
352
|
+
// `fixed` positions the tooltip against the viewport, so it can overflow
|
|
353
|
+
// its chart's bounds and `flip`/`shift` keep it inside the viewport
|
|
354
|
+
// (not the chart container). Pairs with the body-level portal in
|
|
355
|
+
// `resolvePortal` and `position: fixed` below.
|
|
356
|
+
strategy: "fixed",
|
|
257
357
|
placement: "top",
|
|
258
358
|
middleware: [
|
|
259
359
|
offset(offsetVal + arrowDistance),
|
|
@@ -275,7 +375,7 @@ import { accessor, BaseClass, constant } from "../utils/index.js";
|
|
|
275
375
|
case 1:
|
|
276
376
|
_ref = _state.sent(), x = _ref.x, y = _ref.y, placement = _ref.placement, middlewareData = _ref.middlewareData;
|
|
277
377
|
Object.assign(tooltip.style, {
|
|
278
|
-
position: "
|
|
378
|
+
position: "fixed",
|
|
279
379
|
left: "".concat(x, "px"),
|
|
280
380
|
top: "".concat(y, "px"),
|
|
281
381
|
visibility: "visible"
|
|
@@ -299,15 +399,150 @@ import { accessor, BaseClass, constant } from "../utils/index.js";
|
|
|
299
399
|
});
|
|
300
400
|
})();
|
|
301
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
Resolves the portal selection the tooltips mount into: a per-instance
|
|
404
|
+
`.d3plus-tooltip-portal` appended to `<body>`, or the global portal div.
|
|
405
|
+
*/ function resolvePortal(that) {
|
|
406
|
+
var _that__portalEl;
|
|
407
|
+
// Default behavior — append to body via the global #d3plus-portal —
|
|
408
|
+
// preserved when parent() isn't set.
|
|
409
|
+
if (!that._parentEl) return elem("div#d3plus-portal");
|
|
410
|
+
// Per-instance portal: each Tooltip owns its own `.d3plus-tooltip-portal`.
|
|
411
|
+
// It's mounted on `<body>` (not inside `_parentEl`) so the tooltip lives at
|
|
412
|
+
// the viewport level — free to overflow its chart's bounds and immune to
|
|
413
|
+
// styling/clipping from the chart's container (e.g. a docs page reset).
|
|
414
|
+
// `_parentEl` (set via parent()) still scopes ownership so multiple charts
|
|
415
|
+
// on a page each get their own portal rather than fighting over one.
|
|
416
|
+
var host = (_that__portalEl = that._portalEl) !== null && _that__portalEl !== void 0 ? _that__portalEl : null;
|
|
417
|
+
if (!host || !host.isConnected) {
|
|
418
|
+
host = document.createElement("div");
|
|
419
|
+
host.setAttribute("class", "d3plus-tooltip-portal");
|
|
420
|
+
host.style.position = "fixed";
|
|
421
|
+
host.style.top = "0";
|
|
422
|
+
host.style.left = "0";
|
|
423
|
+
host.style.width = "0";
|
|
424
|
+
host.style.height = "0";
|
|
425
|
+
host.style.pointerEvents = "none";
|
|
426
|
+
document.body.appendChild(host);
|
|
427
|
+
that._portalEl = host;
|
|
428
|
+
}
|
|
429
|
+
return select(host);
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
Creates DIV elements with a unique class and styles.
|
|
433
|
+
@private
|
|
434
|
+
*/ function divElement(that, enter, update, cat) {
|
|
435
|
+
enter.append("div").attr("class", "d3plus-tooltip-".concat(cat)).attr("id", function(d, i) {
|
|
436
|
+
return "d3plus-tooltip-".concat(cat, "-").concat(d ? that.schema.id(d, i) : "");
|
|
437
|
+
});
|
|
438
|
+
var div = update.select(".d3plus-tooltip-".concat(cat)).html(function(d, i) {
|
|
439
|
+
return that.schema[cat](d, i);
|
|
440
|
+
}).style("display", function(d, i) {
|
|
441
|
+
var val = that.schema[cat](d, i);
|
|
442
|
+
var visible = val !== false && val !== undefined && val !== null;
|
|
443
|
+
return visible ? "block" : "none";
|
|
444
|
+
});
|
|
445
|
+
stylize(div, that.schema["".concat(cat, "Style")]);
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
Sets styles for both enter and update.
|
|
449
|
+
@private
|
|
450
|
+
*/ function boxStyles(that, box) {
|
|
451
|
+
box.style("background", that.schema.background).style("border-radius", that.schema.borderRadius).style("pointer-events", that.schema.pointerEvents).style("padding", that.schema.padding).style("max-width", that.schema.maxWidth).style("min-width", that.schema.minWidth).style("width", that.schema.width).style("height", that.schema.height).style("border", that.schema.border);
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
Builds the tooltip table (thead + tbody) from the configured columns/rows.
|
|
455
|
+
@private
|
|
456
|
+
*/ function buildTable(that, enter, update, cellContent) {
|
|
457
|
+
var tableEnter = enter.append("table").attr("class", "d3plus-tooltip-table");
|
|
458
|
+
var table = update.select(".d3plus-tooltip-table");
|
|
459
|
+
stylize(table, that.schema.tableStyle);
|
|
460
|
+
tableEnter.append("thead").attr("class", "d3plus-tooltip-thead");
|
|
461
|
+
var tableHead = update.select(".d3plus-tooltip-thead");
|
|
462
|
+
stylize(tableHead, that.schema.theadStyle);
|
|
463
|
+
var theadTr = tableHead.selectAll("tr").data([
|
|
464
|
+
0
|
|
465
|
+
]);
|
|
466
|
+
var theadTrEnter = theadTr.enter().append("tr");
|
|
467
|
+
theadTr.exit().remove();
|
|
468
|
+
var theadTrUpdate = theadTr.merge(theadTrEnter);
|
|
469
|
+
stylize(theadTrUpdate, that.schema.trStyle);
|
|
470
|
+
var th = theadTrUpdate.selectAll("th").data(that.schema.thead);
|
|
471
|
+
th.enter().append("th").merge(th).html(cellContent);
|
|
472
|
+
th.exit().remove();
|
|
473
|
+
tableEnter.append("tbody").attr("class", "d3plus-tooltip-tbody");
|
|
474
|
+
var tableBody = update.select(".d3plus-tooltip-tbody");
|
|
475
|
+
stylize(tableBody, that.schema.tbodyStyle);
|
|
476
|
+
var tr = tableBody.selectAll("tr").data(that.schema.tbody);
|
|
477
|
+
var trEnter = tr.enter().append("tr");
|
|
478
|
+
tr.exit().remove();
|
|
479
|
+
var trUpdate = tr.merge(trEnter);
|
|
480
|
+
stylize(trUpdate, that.schema.trStyle);
|
|
481
|
+
var td = trUpdate.selectAll("td").data(function(d) {
|
|
482
|
+
return d;
|
|
483
|
+
});
|
|
484
|
+
td.enter().append("td").merge(td).html(cellContent);
|
|
485
|
+
stylize(td, that.schema.tdStyle);
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
Binds enter/update/exit: assigns ids, positions each tooltip via Floating
|
|
489
|
+
UI, refreshes positions on update, and cleans up refs on exit.
|
|
490
|
+
@private
|
|
491
|
+
*/ function bindTooltips(that, enter, update, tooltips) {
|
|
492
|
+
enter.attr("id", function(d, i) {
|
|
493
|
+
return "d3plus-tooltip-".concat(d ? that.schema.id(d, i) : "");
|
|
494
|
+
}).style("visibility", "hidden").call(function(box) {
|
|
495
|
+
return boxStyles(that, box);
|
|
496
|
+
}).each(function(d, i) {
|
|
497
|
+
var id = that.schema.id(d, i);
|
|
498
|
+
var tooltip = document.getElementById("d3plus-tooltip-".concat(id));
|
|
499
|
+
var arrowEl = document.getElementById("d3plus-tooltip-arrow-".concat(id));
|
|
500
|
+
var arrowHeight = arrowEl.offsetHeight;
|
|
501
|
+
var arrowDistance = arrowEl.getBoundingClientRect().height / 2;
|
|
502
|
+
arrowEl.style.bottom = "-".concat(arrowHeight / 2, "px");
|
|
503
|
+
var position = that.schema.position(d, i);
|
|
504
|
+
var reference = Array.isArray(position) ? generateReference(position) : position;
|
|
505
|
+
that._tooltipRefs[id] = {
|
|
506
|
+
reference: reference,
|
|
507
|
+
arrowEl: arrowEl,
|
|
508
|
+
tooltip: tooltip,
|
|
509
|
+
arrowHeight: arrowHeight,
|
|
510
|
+
arrowDistance: arrowDistance
|
|
511
|
+
};
|
|
512
|
+
positionTooltip(reference, tooltip, arrowEl, that.schema.offset(d, i), arrowDistance, arrowHeight);
|
|
513
|
+
});
|
|
514
|
+
update.each(function(d, i) {
|
|
515
|
+
var id = that.schema.id(d, i);
|
|
516
|
+
var position = that.schema.position(d, i);
|
|
517
|
+
var ref = that._tooltipRefs[id];
|
|
518
|
+
if (ref) {
|
|
519
|
+
ref.reference = Array.isArray(position) ? generateReference(position) : position;
|
|
520
|
+
positionTooltip(ref.reference, ref.tooltip, ref.arrowEl, that.schema.offset(d, i), ref.arrowDistance, ref.arrowHeight);
|
|
521
|
+
}
|
|
522
|
+
}).call(function(box) {
|
|
523
|
+
return boxStyles(that, box);
|
|
524
|
+
});
|
|
525
|
+
tooltips.exit().each(function(d, i) {
|
|
526
|
+
var id = that.schema.id(d, i);
|
|
527
|
+
delete that._tooltipRefs[id];
|
|
528
|
+
}).remove();
|
|
529
|
+
}
|
|
302
530
|
var Tooltip = /*#__PURE__*/ function(BaseClass) {
|
|
303
531
|
"use strict";
|
|
304
532
|
_inherits(Tooltip, BaseClass);
|
|
305
533
|
function Tooltip() {
|
|
306
534
|
_class_call_check(this, Tooltip);
|
|
307
535
|
var _this;
|
|
308
|
-
_this = _call_super(this, Tooltip), _define_property(_this, "
|
|
309
|
-
|
|
310
|
-
|
|
536
|
+
_this = _call_super(this, Tooltip), _define_property(_this, "_data", void 0), /** v4: optional per-chart parent element (default: global #d3plus-portal). */ _define_property(_this, "_parentEl", void 0), /**
|
|
537
|
+
* v4: this Tooltip's own portal div (a `.d3plus-tooltip-portal` appended to
|
|
538
|
+
* `<body>`). Tracked per-instance so that charts each own a distinct portal
|
|
539
|
+
* — and so `parent()` switches only remove THIS instance's portal, not a
|
|
540
|
+
* sibling Tooltip's.
|
|
541
|
+
*/ _define_property(_this, "_portalEl", void 0), _define_property(_this, "_tooltipRefs", void 0);
|
|
542
|
+
installFluent(_this, tooltipSchema);
|
|
543
|
+
_this._data = [];
|
|
544
|
+
_this._tooltipRefs = {};
|
|
545
|
+
_this.schema.arrowStyle = {
|
|
311
546
|
content: "",
|
|
312
547
|
background: "inherit",
|
|
313
548
|
border: "inherit",
|
|
@@ -317,77 +552,56 @@ var Tooltip = /*#__PURE__*/ function(BaseClass) {
|
|
|
317
552
|
transform: "rotate(45deg)",
|
|
318
553
|
width: "10px"
|
|
319
554
|
};
|
|
320
|
-
_this.
|
|
321
|
-
_this._body = accessor("body", "");
|
|
322
|
-
_this._bodyStyle = {
|
|
555
|
+
_this.schema.bodyStyle = {
|
|
323
556
|
"font-size": "12px",
|
|
324
557
|
"font-weight": "400",
|
|
325
558
|
"z-index": "1"
|
|
326
559
|
};
|
|
327
|
-
_this.
|
|
328
|
-
_this._borderRadius = constant("4px");
|
|
329
|
-
_this._className = "d3plus-tooltip";
|
|
330
|
-
_this._data = [];
|
|
331
|
-
_this._footer = accessor("footer", "");
|
|
332
|
-
_this._footerStyle = {
|
|
560
|
+
_this.schema.footerStyle = {
|
|
333
561
|
"font-size": "9px",
|
|
334
562
|
"font-weight": "400",
|
|
335
563
|
"margin-top": "5px",
|
|
336
564
|
"z-index": "1"
|
|
337
565
|
};
|
|
338
|
-
_this.
|
|
339
|
-
_this._id = function(d, i) {
|
|
340
|
-
return "".concat(i);
|
|
341
|
-
};
|
|
342
|
-
_this._offset = constant(5);
|
|
343
|
-
_this._padding = constant("10px");
|
|
344
|
-
_this._pointerEvents = constant("auto");
|
|
345
|
-
_this._tooltipRefs = {};
|
|
346
|
-
_this._position = function(d) {
|
|
566
|
+
_this.schema.position = function(d) {
|
|
347
567
|
return [
|
|
348
568
|
d.x,
|
|
349
569
|
d.y
|
|
350
570
|
];
|
|
351
571
|
};
|
|
352
|
-
_this.
|
|
572
|
+
_this.schema.tableStyle = {
|
|
353
573
|
"border-collapse": "collapse",
|
|
354
574
|
"border-spacing": "0",
|
|
355
575
|
width: "100%"
|
|
356
576
|
};
|
|
357
|
-
_this.
|
|
358
|
-
_this._tbodyStyle = {
|
|
577
|
+
_this.schema.tbodyStyle = {
|
|
359
578
|
"font-size": "12px",
|
|
360
579
|
"text-align": "center"
|
|
361
580
|
};
|
|
362
|
-
_this.
|
|
363
|
-
_this._theadStyle = {
|
|
581
|
+
_this.schema.theadStyle = {
|
|
364
582
|
"font-size": "12px",
|
|
365
583
|
"font-weight": "600",
|
|
366
584
|
"text-align": "center"
|
|
367
585
|
};
|
|
368
|
-
_this.
|
|
369
|
-
_this._titleStyle = {
|
|
586
|
+
_this.schema.titleStyle = {
|
|
370
587
|
"font-size": "14px",
|
|
371
588
|
"font-weight": "600",
|
|
372
589
|
"margin-bottom": "5px",
|
|
373
590
|
"text-align": "center"
|
|
374
591
|
};
|
|
375
|
-
_this.
|
|
592
|
+
_this.schema.tooltipStyle = {
|
|
376
593
|
"box-shadow": "0 1px 5px rgba(0, 0, 0, 0.25)",
|
|
377
594
|
color: function color(d, i) {
|
|
378
|
-
return colorContrast(_this.
|
|
595
|
+
return colorContrast(_this.schema.background(d, i));
|
|
379
596
|
},
|
|
380
597
|
"font-family": fontFamilyStringify(fontFamily)
|
|
381
598
|
};
|
|
382
|
-
_this.
|
|
599
|
+
_this.schema.trStyle = {
|
|
383
600
|
"border-top": function(d, i) {
|
|
384
601
|
return i ? "1px solid rgba(0, 0, 0, 0.1)" : "none";
|
|
385
602
|
}
|
|
386
603
|
};
|
|
387
|
-
_this.
|
|
388
|
-
_this._maxWidth = constant("200px");
|
|
389
|
-
_this._minWidth = constant("100px");
|
|
390
|
-
_this._width = constant("auto");
|
|
604
|
+
_this.schema.tdStyle = {};
|
|
391
605
|
return _this;
|
|
392
606
|
}
|
|
393
607
|
_create_class(Tooltip, [
|
|
@@ -397,161 +611,58 @@ var Tooltip = /*#__PURE__*/ function(BaseClass) {
|
|
|
397
611
|
@private
|
|
398
612
|
*/ key: "render",
|
|
399
613
|
value: function render(callback) {
|
|
400
|
-
var _this = this;
|
|
401
614
|
var that = this;
|
|
402
|
-
var portal =
|
|
403
|
-
var tooltips = portal.selectAll(".".concat(this.
|
|
404
|
-
.
|
|
405
|
-
var enter = tooltips.enter().append("div").attr("class", this._className);
|
|
615
|
+
var portal = resolvePortal(this);
|
|
616
|
+
var tooltips = portal.selectAll(".".concat(this.schema.className)).data(this._data, this.schema.id);
|
|
617
|
+
var enter = tooltips.enter().append("div").attr("class", this.schema.className);
|
|
406
618
|
var update = tooltips.merge(enter);
|
|
407
|
-
stylize(update, this.
|
|
408
|
-
/**
|
|
409
|
-
Creates DIV elements with a unique class and styles.
|
|
410
|
-
@private
|
|
411
|
-
*/ function divElement(cat) {
|
|
412
|
-
enter.append("div").attr("class", "d3plus-tooltip-".concat(cat)).attr("id", function(d, i) {
|
|
413
|
-
return "d3plus-tooltip-".concat(cat, "-").concat(d ? that._id(d, i) : "");
|
|
414
|
-
});
|
|
415
|
-
var div = update.select(".d3plus-tooltip-".concat(cat)).html(function(d, i) {
|
|
416
|
-
return that["_".concat(cat)](d, i);
|
|
417
|
-
}).style("display", function(d, i) {
|
|
418
|
-
var val = that["_".concat(cat)](d, i);
|
|
419
|
-
var visible = val !== false && val !== undefined && val !== null;
|
|
420
|
-
return visible ? "block" : "none";
|
|
421
|
-
});
|
|
422
|
-
stylize(div, that["_".concat(cat, "Style")]);
|
|
423
|
-
}
|
|
619
|
+
stylize(update, this.schema.tooltipStyle);
|
|
424
620
|
/**
|
|
425
621
|
Fetches table contents given functions or values.
|
|
426
622
|
@private
|
|
427
623
|
*/ function cellContent(d) {
|
|
428
624
|
if (typeof d === "function") {
|
|
429
625
|
var datum = select(this.parentNode.parentNode).datum();
|
|
430
|
-
return d(datum, that._data.indexOf(datum));
|
|
626
|
+
return d(datum, that._data.indexOf(datum), datum);
|
|
431
627
|
} else return d;
|
|
432
628
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
divElement("title");
|
|
440
|
-
divElement("body");
|
|
441
|
-
var tableEnter = enter.append("table").attr("class", "d3plus-tooltip-table");
|
|
442
|
-
var table = update.select(".d3plus-tooltip-table");
|
|
443
|
-
stylize(table, this._tableStyle);
|
|
444
|
-
tableEnter.append("thead").attr("class", "d3plus-tooltip-thead");
|
|
445
|
-
var tableHead = update.select(".d3plus-tooltip-thead");
|
|
446
|
-
stylize(tableHead, this._theadStyle);
|
|
447
|
-
var theadTr = tableHead.selectAll("tr").data([
|
|
448
|
-
0
|
|
449
|
-
]);
|
|
450
|
-
var theadTrEnter = theadTr.enter().append("tr");
|
|
451
|
-
theadTr.exit().remove();
|
|
452
|
-
var theadTrUpdate = theadTr.merge(theadTrEnter);
|
|
453
|
-
stylize(theadTrUpdate, this._trStyle);
|
|
454
|
-
var th = theadTrUpdate.selectAll("th").data(this._thead);
|
|
455
|
-
th.enter().append("th").merge(th).html(cellContent);
|
|
456
|
-
th.exit().remove();
|
|
457
|
-
tableEnter.append("tbody").attr("class", "d3plus-tooltip-tbody");
|
|
458
|
-
var tableBody = update.select(".d3plus-tooltip-tbody");
|
|
459
|
-
stylize(tableBody, this._tbodyStyle);
|
|
460
|
-
var tr = tableBody.selectAll("tr").data(this._tbody);
|
|
461
|
-
var trEnter = tr.enter().append("tr");
|
|
462
|
-
tr.exit().remove();
|
|
463
|
-
var trUpdate = tr.merge(trEnter);
|
|
464
|
-
stylize(trUpdate, this._trStyle);
|
|
465
|
-
var td = trUpdate.selectAll("td").data(function(d) {
|
|
466
|
-
return d;
|
|
467
|
-
});
|
|
468
|
-
td.enter().append("td").merge(td).html(cellContent);
|
|
469
|
-
stylize(td, this._tdStyle);
|
|
470
|
-
divElement("footer");
|
|
471
|
-
divElement("arrow");
|
|
472
|
-
enter.attr("id", function(d, i) {
|
|
473
|
-
return "d3plus-tooltip-".concat(d ? _this._id(d, i) : "");
|
|
474
|
-
}).style("visibility", "hidden").call(boxStyles).each(function(d, i) {
|
|
475
|
-
var id = that._id(d, i);
|
|
476
|
-
var tooltip = document.getElementById("d3plus-tooltip-".concat(id));
|
|
477
|
-
var arrowEl = document.getElementById("d3plus-tooltip-arrow-".concat(id));
|
|
478
|
-
var arrowHeight = arrowEl.offsetHeight;
|
|
479
|
-
var arrowDistance = arrowEl.getBoundingClientRect().height / 2;
|
|
480
|
-
arrowEl.style.bottom = "-".concat(arrowHeight / 2, "px");
|
|
481
|
-
var position = that._position(d, i);
|
|
482
|
-
var reference = Array.isArray(position) ? generateReference(position) : position;
|
|
483
|
-
_this._tooltipRefs[id] = {
|
|
484
|
-
reference: reference,
|
|
485
|
-
arrowEl: arrowEl,
|
|
486
|
-
tooltip: tooltip,
|
|
487
|
-
arrowHeight: arrowHeight,
|
|
488
|
-
arrowDistance: arrowDistance
|
|
489
|
-
};
|
|
490
|
-
positionTooltip(reference, tooltip, arrowEl, that._offset(d, i), arrowDistance, arrowHeight);
|
|
491
|
-
});
|
|
492
|
-
update.each(function(d, i) {
|
|
493
|
-
var id = that._id(d, i);
|
|
494
|
-
var position = that._position(d, i);
|
|
495
|
-
var ref = _this._tooltipRefs[id];
|
|
496
|
-
if (ref) {
|
|
497
|
-
ref.reference = Array.isArray(position) ? generateReference(position) : position;
|
|
498
|
-
positionTooltip(ref.reference, ref.tooltip, ref.arrowEl, that._offset(d, i), ref.arrowDistance, ref.arrowHeight);
|
|
499
|
-
}
|
|
500
|
-
}).call(boxStyles);
|
|
501
|
-
tooltips.exit().each(function(d, i) {
|
|
502
|
-
var id = that._id(d, i);
|
|
503
|
-
delete _this._tooltipRefs[id];
|
|
504
|
-
}).remove();
|
|
629
|
+
divElement(this, enter, update, "title");
|
|
630
|
+
divElement(this, enter, update, "body");
|
|
631
|
+
buildTable(this, enter, update, cellContent);
|
|
632
|
+
divElement(this, enter, update, "footer");
|
|
633
|
+
divElement(this, enter, update, "arrow");
|
|
634
|
+
bindTooltips(this, enter, update, tooltips);
|
|
505
635
|
if (callback) setTimeout(callback, 100);
|
|
506
636
|
return this;
|
|
507
637
|
}
|
|
508
638
|
},
|
|
509
|
-
{
|
|
510
|
-
key: "arrow",
|
|
511
|
-
value: function arrow(_) {
|
|
512
|
-
return arguments.length ? (this._arrow = typeof _ === "function" ? _ : constant(_), this) : this._arrow;
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
639
|
{
|
|
516
640
|
key: "arrowStyle",
|
|
517
641
|
value: function arrowStyle(_) {
|
|
518
|
-
return arguments.length ? (this.
|
|
519
|
-
}
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
key: "background",
|
|
523
|
-
value: function background(_) {
|
|
524
|
-
return arguments.length ? (this._background = typeof _ === "function" ? _ : constant(_), this) : this._background;
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
key: "body",
|
|
529
|
-
value: function body(_) {
|
|
530
|
-
return arguments.length ? (this._body = typeof _ === "function" ? _ : constant(_), this) : this._body;
|
|
642
|
+
return arguments.length ? (this.schema.arrowStyle = assign(this.schema.arrowStyle, _), this) : this.schema.arrowStyle;
|
|
531
643
|
}
|
|
532
644
|
},
|
|
533
645
|
{
|
|
534
646
|
key: "bodyStyle",
|
|
535
647
|
value: function bodyStyle(_) {
|
|
536
|
-
return arguments.length ? (this.
|
|
537
|
-
}
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
key: "border",
|
|
541
|
-
value: function border(_) {
|
|
542
|
-
return arguments.length ? (this._border = typeof _ === "function" ? _ : constant(_), this) : this._border;
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
{
|
|
546
|
-
key: "borderRadius",
|
|
547
|
-
value: function borderRadius(_) {
|
|
548
|
-
return arguments.length ? (this._borderRadius = typeof _ === "function" ? _ : constant(_), this) : this._borderRadius;
|
|
648
|
+
return arguments.length ? (this.schema.bodyStyle = assign(this.schema.bodyStyle, _), this) : this.schema.bodyStyle;
|
|
549
649
|
}
|
|
550
650
|
},
|
|
551
651
|
{
|
|
552
|
-
key: "
|
|
553
|
-
value: function
|
|
554
|
-
|
|
652
|
+
key: "parent",
|
|
653
|
+
value: function parent(_) {
|
|
654
|
+
if (!arguments.length) return this._parentEl;
|
|
655
|
+
var prev = this._parentEl;
|
|
656
|
+
var next = _ || undefined;
|
|
657
|
+
if (prev && prev !== next && this._portalEl) {
|
|
658
|
+
// Switching parents: tear down this Tooltip's own (body-level) portal
|
|
659
|
+
// so it doesn't sit orphaned. A re-render against the new parent
|
|
660
|
+
// creates a fresh one. Other Tooltip instances own their own portals.
|
|
661
|
+
this._portalEl.remove();
|
|
662
|
+
this._portalEl = undefined;
|
|
663
|
+
}
|
|
664
|
+
this._parentEl = next;
|
|
665
|
+
return this;
|
|
555
666
|
}
|
|
556
667
|
},
|
|
557
668
|
{
|
|
@@ -560,133 +671,61 @@ var Tooltip = /*#__PURE__*/ function(BaseClass) {
|
|
|
560
671
|
return arguments.length ? (this._data = _, this) : this._data;
|
|
561
672
|
}
|
|
562
673
|
},
|
|
563
|
-
{
|
|
564
|
-
key: "footer",
|
|
565
|
-
value: function footer(_) {
|
|
566
|
-
return arguments.length ? (this._footer = typeof _ === "function" ? _ : constant(_), this) : this._footer;
|
|
567
|
-
}
|
|
568
|
-
},
|
|
569
674
|
{
|
|
570
675
|
key: "footerStyle",
|
|
571
676
|
value: function footerStyle(_) {
|
|
572
|
-
return arguments.length ? (this.
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
key: "height",
|
|
577
|
-
value: function height(_) {
|
|
578
|
-
return arguments.length ? (this._height = typeof _ === "function" ? _ : constant(_), this) : this._height;
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
key: "id",
|
|
583
|
-
value: function id(_) {
|
|
584
|
-
return arguments.length ? (this._id = typeof _ === "function" ? _ : constant(_), this) : this._id;
|
|
585
|
-
}
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
key: "offset",
|
|
589
|
-
value: function offset(_) {
|
|
590
|
-
return arguments.length ? (this._offset = typeof _ === "function" ? _ : constant(_), this) : this._offset;
|
|
591
|
-
}
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
key: "padding",
|
|
595
|
-
value: function padding(_) {
|
|
596
|
-
return arguments.length ? (this._padding = typeof _ === "function" ? _ : constant(_), this) : this._padding;
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
key: "pointerEvents",
|
|
601
|
-
value: function pointerEvents(_) {
|
|
602
|
-
return arguments.length ? (this._pointerEvents = typeof _ === "function" ? _ : constant(_), this) : this._pointerEvents;
|
|
677
|
+
return arguments.length ? (this.schema.footerStyle = assign(this.schema.footerStyle, _), this) : this.schema.footerStyle;
|
|
603
678
|
}
|
|
604
679
|
},
|
|
605
680
|
{
|
|
606
681
|
key: "position",
|
|
607
682
|
value: function position(_) {
|
|
608
|
-
return arguments.length ? (this.
|
|
683
|
+
return arguments.length ? (this.schema.position = typeof _ === "string" ? constant(select(_).node() || [
|
|
609
684
|
0,
|
|
610
685
|
0
|
|
611
|
-
]) : typeof _ === "function" ? _ : constant(_), this) : this.
|
|
686
|
+
]) : typeof _ === "function" ? _ : constant(_), this) : this.schema.position;
|
|
612
687
|
}
|
|
613
688
|
},
|
|
614
689
|
{
|
|
615
690
|
key: "tableStyle",
|
|
616
691
|
value: function tableStyle(_) {
|
|
617
|
-
return arguments.length ? (this.
|
|
618
|
-
}
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
key: "tbody",
|
|
622
|
-
value: function tbody(_) {
|
|
623
|
-
return arguments.length ? (this._tbody = _, this) : this._tbody;
|
|
692
|
+
return arguments.length ? (this.schema.tableStyle = assign(this.schema.tableStyle, _), this) : this.schema.tableStyle;
|
|
624
693
|
}
|
|
625
694
|
},
|
|
626
695
|
{
|
|
627
696
|
key: "tbodyStyle",
|
|
628
697
|
value: function tbodyStyle(_) {
|
|
629
|
-
return arguments.length ? (this.
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
key: "thead",
|
|
634
|
-
value: function thead(_) {
|
|
635
|
-
return arguments.length ? (this._thead = _, this) : this._thead;
|
|
698
|
+
return arguments.length ? (this.schema.tbodyStyle = assign(this.schema.tbodyStyle, _), this) : this.schema.tbodyStyle;
|
|
636
699
|
}
|
|
637
700
|
},
|
|
638
701
|
{
|
|
639
702
|
key: "theadStyle",
|
|
640
703
|
value: function theadStyle(_) {
|
|
641
|
-
return arguments.length ? (this.
|
|
642
|
-
}
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
key: "title",
|
|
646
|
-
value: function title(_) {
|
|
647
|
-
return arguments.length ? (this._title = typeof _ === "function" ? _ : constant(_), this) : this._title;
|
|
704
|
+
return arguments.length ? (this.schema.theadStyle = assign(this.schema.theadStyle, _), this) : this.schema.theadStyle;
|
|
648
705
|
}
|
|
649
706
|
},
|
|
650
707
|
{
|
|
651
708
|
key: "titleStyle",
|
|
652
709
|
value: function titleStyle(_) {
|
|
653
|
-
return arguments.length ? (this.
|
|
710
|
+
return arguments.length ? (this.schema.titleStyle = assign(this.schema.titleStyle, _), this) : this.schema.titleStyle;
|
|
654
711
|
}
|
|
655
712
|
},
|
|
656
713
|
{
|
|
657
714
|
key: "tooltipStyle",
|
|
658
715
|
value: function tooltipStyle(_) {
|
|
659
|
-
return arguments.length ? (this.
|
|
716
|
+
return arguments.length ? (this.schema.tooltipStyle = assign(this.schema.tooltipStyle, _), this) : this.schema.tooltipStyle;
|
|
660
717
|
}
|
|
661
718
|
},
|
|
662
719
|
{
|
|
663
720
|
key: "trStyle",
|
|
664
721
|
value: function trStyle(_) {
|
|
665
|
-
return arguments.length ? (this.
|
|
722
|
+
return arguments.length ? (this.schema.trStyle = assign(this.schema.trStyle, _), this) : this.schema.trStyle;
|
|
666
723
|
}
|
|
667
724
|
},
|
|
668
725
|
{
|
|
669
726
|
key: "tdStyle",
|
|
670
727
|
value: function tdStyle(_) {
|
|
671
|
-
return arguments.length ? (this.
|
|
672
|
-
}
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
key: "maxWidth",
|
|
676
|
-
value: function maxWidth(_) {
|
|
677
|
-
return arguments.length ? (this._maxWidth = typeof _ === "function" ? _ : constant(_), this) : this._maxWidth;
|
|
678
|
-
}
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
key: "minWidth",
|
|
682
|
-
value: function minWidth(_) {
|
|
683
|
-
return arguments.length ? (this._minWidth = typeof _ === "function" ? _ : constant(_), this) : this._minWidth;
|
|
684
|
-
}
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
key: "width",
|
|
688
|
-
value: function width(_) {
|
|
689
|
-
return arguments.length ? (this._width = typeof _ === "function" ? _ : constant(_), this) : this._width;
|
|
728
|
+
return arguments.length ? (this.schema.tdStyle = assign(this.schema.tdStyle, _), this) : this.schema.tdStyle;
|
|
690
729
|
}
|
|
691
730
|
}
|
|
692
731
|
]);
|