@visactor/vchart 1.2.3 → 1.3.0-beta.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/build/es5/index.js +3 -3
- package/build/index.js +67887 -64461
- package/build/index.min.js +15 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/spec.d.ts +1 -1
- package/cjs/animation/spec.js.map +1 -1
- package/cjs/animation/utils.js +2 -2
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/chart/area/area.js +2 -3
- package/cjs/chart/area/area.js.map +1 -1
- package/cjs/chart/bar/bar-3d.js +2 -2
- package/cjs/chart/bar/bar-3d.js.map +1 -1
- package/cjs/chart/bar/bar.js +2 -2
- package/cjs/chart/bar/bar.js.map +1 -1
- package/cjs/chart/base-chart.d.ts +5 -2
- package/cjs/chart/base-chart.js +48 -42
- package/cjs/chart/base-chart.js.map +1 -1
- package/cjs/chart/box-plot/box-plot.js +2 -2
- package/cjs/chart/box-plot/box-plot.js.map +1 -1
- package/cjs/chart/cartesian/cartesian.js +3 -2
- package/cjs/chart/cartesian/cartesian.js.map +1 -1
- package/cjs/chart/circle-packing/circle-packing.js +2 -2
- package/cjs/chart/circle-packing/circle-packing.js.map +1 -1
- package/cjs/chart/funnel/funnel-3d.js +2 -2
- package/cjs/chart/funnel/funnel-3d.js.map +1 -1
- package/cjs/chart/funnel/funnel.js +2 -2
- package/cjs/chart/funnel/funnel.js.map +1 -1
- package/cjs/chart/gauge/gauge.js +2 -2
- package/cjs/chart/gauge/gauge.js.map +1 -1
- package/cjs/chart/heatmap/heatmap.js +2 -2
- package/cjs/chart/heatmap/heatmap.js.map +1 -1
- package/cjs/chart/histogram/histogram-3d.js +2 -2
- package/cjs/chart/histogram/histogram-3d.js.map +1 -1
- package/cjs/chart/histogram/histogram.js +2 -2
- package/cjs/chart/histogram/histogram.js.map +1 -1
- package/cjs/chart/index.d.ts +2 -2
- package/cjs/chart/index.js +3 -3
- package/cjs/chart/index.js.map +1 -1
- package/cjs/chart/interface/chart.d.ts +4 -2
- package/cjs/chart/interface/chart.js.map +1 -1
- package/cjs/chart/line/line.js +2 -3
- package/cjs/chart/line/line.js.map +1 -1
- package/cjs/chart/map/map.js +2 -2
- package/cjs/chart/map/map.js.map +1 -1
- package/cjs/chart/pie/pie-3d.js +2 -2
- package/cjs/chart/pie/pie-3d.js.map +1 -1
- package/cjs/chart/pie/pie.js +2 -2
- package/cjs/chart/pie/pie.js.map +1 -1
- package/cjs/chart/polar/progress-like.js +2 -2
- package/cjs/chart/polar/progress-like.js.map +1 -1
- package/cjs/chart/polar/rose-like.js +1 -1
- package/cjs/chart/polar/rose-like.js.map +1 -1
- package/cjs/chart/progress/circular/circular.js +2 -2
- package/cjs/chart/progress/circular/circular.js.map +1 -1
- package/cjs/chart/progress/linear/linear.js +4 -4
- package/cjs/chart/progress/linear/linear.js.map +1 -1
- package/cjs/chart/radar/radar.js +4 -5
- package/cjs/chart/radar/radar.js.map +1 -1
- package/cjs/chart/range-area/range-area.js +2 -2
- package/cjs/chart/range-area/range-area.js.map +1 -1
- package/cjs/chart/range-column/range-column-3d.js +2 -2
- package/cjs/chart/range-column/range-column-3d.js.map +1 -1
- package/cjs/chart/range-column/range-column.js +2 -2
- package/cjs/chart/range-column/range-column.js.map +1 -1
- package/cjs/chart/rose/rose.js +3 -3
- package/cjs/chart/rose/rose.js.map +1 -1
- package/cjs/chart/sankey/sankey.js +2 -2
- package/cjs/chart/sankey/sankey.js.map +1 -1
- package/cjs/chart/scatter/scatter.js +2 -2
- package/cjs/chart/scatter/scatter.js.map +1 -1
- package/cjs/chart/sequence/sequence.js +2 -2
- package/cjs/chart/sequence/sequence.js.map +1 -1
- package/cjs/chart/stack.d.ts +1 -0
- package/cjs/chart/stack.js +14 -0
- package/cjs/chart/stack.js.map +1 -1
- package/cjs/chart/sunburst/sunburst.js +2 -2
- package/cjs/chart/sunburst/sunburst.js.map +1 -1
- package/cjs/chart/treemap/treemap.d.ts +1 -1
- package/cjs/chart/treemap/treemap.js +6 -6
- package/cjs/chart/treemap/treemap.js.map +1 -1
- package/cjs/chart/util.d.ts +8 -0
- package/cjs/chart/util.js +33 -4
- package/cjs/chart/util.js.map +1 -1
- package/cjs/chart/waterfall/waterfall.js +2 -2
- package/cjs/chart/waterfall/waterfall.js.map +1 -1
- package/cjs/chart/word-cloud/word-cloud-3d.js +2 -2
- package/cjs/chart/word-cloud/word-cloud-3d.js.map +1 -1
- package/cjs/chart/word-cloud/word-cloud.js +2 -2
- package/cjs/chart/word-cloud/word-cloud.js.map +1 -1
- package/cjs/compile/compiler.d.ts +5 -1
- package/cjs/compile/compiler.js +8 -3
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compilable-item.d.ts +1 -0
- package/cjs/compile/interface/compilable-item.js.map +1 -1
- package/cjs/compile/mark/compilable-mark.js +9 -10
- package/cjs/compile/mark/compilable-mark.js.map +1 -1
- package/cjs/compile/mark/interface.d.ts +2 -1
- package/cjs/compile/mark/interface.js.map +1 -1
- package/cjs/compile/mark/util.d.ts +2 -1
- package/cjs/compile/mark/util.js +21 -5
- package/cjs/compile/mark/util.js.map +1 -1
- package/cjs/component/axis/base-axis.d.ts +17 -27
- package/cjs/component/axis/base-axis.js +18 -28
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +3 -3
- package/cjs/component/axis/cartesian/axis.js +35 -26
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/cartesian/band-axis.d.ts +3 -3
- package/cjs/component/axis/cartesian/band-axis.js +1 -0
- package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/index.d.ts +1 -0
- package/cjs/component/axis/cartesian/index.js +2 -1
- package/cjs/component/axis/cartesian/index.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/common.d.ts +6 -1
- package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/spec.d.ts +4 -1
- package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
- package/cjs/component/axis/cartesian/linear-axis.d.ts +3 -3
- package/cjs/component/axis/cartesian/linear-axis.js +4 -3
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/log-axis.d.ts +3 -2
- package/cjs/component/axis/cartesian/log-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/symlog-axis.d.ts +16 -0
- package/cjs/component/axis/cartesian/symlog-axis.js +23 -0
- package/cjs/component/axis/cartesian/symlog-axis.js.map +1 -0
- package/cjs/component/axis/cartesian/time-axis.d.ts +3 -2
- package/cjs/component/axis/cartesian/time-axis.js +2 -2
- package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
- package/cjs/component/axis/interface.d.ts +11 -8
- package/cjs/component/axis/interface.js.map +1 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js +3 -3
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/axis/polar/axis.d.ts +4 -3
- package/cjs/component/axis/polar/axis.js +17 -14
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/band-axis.d.ts +4 -2
- package/cjs/component/axis/polar/band-axis.js.map +1 -1
- package/cjs/component/axis/polar/interface/common.d.ts +1 -1
- package/cjs/component/axis/polar/interface/common.js.map +1 -1
- package/cjs/component/axis/polar/interface/spec.d.ts +7 -2
- package/cjs/component/axis/polar/interface/spec.js.map +1 -1
- package/cjs/component/axis/polar/linear-axis.d.ts +2 -3
- package/cjs/component/axis/polar/linear-axis.js.map +1 -1
- package/cjs/component/axis/util.d.ts +28 -0
- package/cjs/component/axis/util.js +71 -0
- package/cjs/component/axis/util.js.map +1 -0
- package/cjs/component/base/base-component.d.ts +15 -4
- package/cjs/component/base/base-component.js +20 -8
- package/cjs/component/base/base-component.js.map +1 -1
- package/cjs/component/base/interface.d.ts +8 -0
- package/cjs/component/base/interface.js +6 -0
- package/cjs/component/base/interface.js.map +1 -0
- package/cjs/component/base/util.d.ts +2 -1
- package/cjs/component/base/util.js +21 -16
- package/cjs/component/base/util.js.map +1 -1
- package/cjs/component/brush/brush.d.ts +14 -4
- package/cjs/component/brush/brush.js +75 -64
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/brush/interface.d.ts +1 -0
- package/cjs/component/brush/interface.js.map +1 -1
- package/cjs/component/crosshair/base.d.ts +5 -4
- package/cjs/component/crosshair/base.js +2 -2
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/cartesian.d.ts +3 -3
- package/cjs/component/crosshair/cartesian.js +10 -10
- package/cjs/component/crosshair/cartesian.js.map +1 -1
- package/cjs/component/crosshair/interface/spec.d.ts +8 -8
- package/cjs/component/crosshair/interface/spec.js.map +1 -1
- package/cjs/component/crosshair/interface/theme.d.ts +3 -1
- package/cjs/component/crosshair/interface/theme.js.map +1 -1
- package/cjs/component/crosshair/polar.d.ts +3 -3
- package/cjs/component/crosshair/polar.js +9 -9
- package/cjs/component/crosshair/polar.js.map +1 -1
- package/cjs/component/crosshair/util.d.ts +5 -0
- package/cjs/component/crosshair/util.js +41 -4
- package/cjs/component/crosshair/util.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.d.ts +3 -2
- package/cjs/component/custom-mark/custom-mark.js +3 -3
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.d.ts +5 -5
- package/cjs/component/data-zoom/data-filter-base-component.js +2 -9
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
- package/cjs/component/data-zoom/data-zoom/data-zoom.js +7 -7
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/interface.d.ts +3 -1
- package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/interface.d.ts +3 -3
- package/cjs/component/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.d.ts +10 -4
- package/cjs/component/geo/geo-coordinate.js +65 -15
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/geo/projection.d.ts +1 -0
- package/cjs/component/geo/projection.js +4 -0
- package/cjs/component/geo/projection.js.map +1 -1
- package/cjs/component/index.d.ts +3 -2
- package/cjs/component/index.js +15 -1
- package/cjs/component/index.js.map +1 -1
- package/cjs/component/indicator/indicator.d.ts +3 -2
- package/cjs/component/indicator/indicator.js +11 -8
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/indicator/interface.d.ts +5 -4
- package/cjs/component/indicator/interface.js.map +1 -1
- package/cjs/component/interface/theme.d.ts +4 -2
- package/cjs/component/interface/theme.js.map +1 -1
- package/cjs/component/interface/type.d.ts +2 -0
- package/cjs/component/interface/type.js +13 -12
- package/cjs/component/interface/type.js.map +1 -1
- package/cjs/component/label/base-label.d.ts +39 -0
- package/cjs/component/label/base-label.js +39 -0
- package/cjs/component/label/base-label.js.map +1 -0
- package/cjs/component/label/interface.d.ts +12 -1
- package/cjs/component/label/interface.js.map +1 -1
- package/cjs/component/label/label.d.ts +7 -29
- package/cjs/component/label/label.js +32 -44
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/label/pie.d.ts +5 -0
- package/cjs/component/label/pie.js +21 -0
- package/cjs/component/label/pie.js.map +1 -0
- package/cjs/component/label/totalLabel.d.ts +27 -0
- package/cjs/component/label/totalLabel.js +107 -0
- package/cjs/component/label/totalLabel.js.map +1 -0
- package/cjs/component/label/util.d.ts +3 -1
- package/cjs/component/label/util.js +5 -5
- package/cjs/component/label/util.js.map +1 -1
- package/cjs/component/legend/base-legend.d.ts +3 -2
- package/cjs/component/legend/base-legend.js +4 -4
- package/cjs/component/legend/base-legend.js.map +1 -1
- package/cjs/component/legend/continuous/legend.d.ts +3 -4
- package/cjs/component/legend/continuous/legend.js.map +1 -1
- package/cjs/component/legend/continuous/util.js +4 -4
- package/cjs/component/legend/continuous/util.js.map +1 -1
- package/cjs/component/legend/discrete/interface.d.ts +3 -1
- package/cjs/component/legend/discrete/interface.js.map +1 -1
- package/cjs/component/legend/discrete/legend.d.ts +1 -2
- package/cjs/component/legend/discrete/legend.js +2 -2
- package/cjs/component/legend/discrete/legend.js.map +1 -1
- package/cjs/component/legend/discrete/util.js +2 -2
- package/cjs/component/legend/discrete/util.js.map +1 -1
- package/cjs/component/legend/interface.d.ts +2 -6
- package/cjs/component/legend/interface.js.map +1 -1
- package/cjs/component/legend/util.js +2 -2
- package/cjs/component/legend/util.js.map +1 -1
- package/cjs/component/map-label/component.d.ts +1 -2
- package/cjs/component/map-label/component.js.map +1 -1
- package/cjs/component/marker/base-marker.d.ts +8 -2
- package/cjs/component/marker/base-marker.js +14 -0
- package/cjs/component/marker/base-marker.js.map +1 -1
- package/cjs/component/marker/interface.d.ts +3 -2
- package/cjs/component/marker/interface.js.map +1 -1
- package/cjs/component/marker/mark-area/mark-area.d.ts +1 -2
- package/cjs/component/marker/mark-area/mark-area.js +17 -6
- package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
- package/cjs/component/marker/mark-line/mark-line.d.ts +1 -2
- package/cjs/component/marker/mark-line/mark-line.js +17 -6
- package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
- package/cjs/component/marker/mark-point/mark-point.d.ts +1 -2
- package/cjs/component/marker/mark-point/mark-point.js +18 -7
- package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
- package/cjs/component/player/player.d.ts +1 -2
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/poptip/interface.d.ts +15 -0
- package/cjs/component/poptip/interface.js +6 -0
- package/cjs/component/poptip/interface.js.map +1 -0
- package/cjs/component/title/interface/spec.d.ts +2 -2
- package/cjs/component/title/interface/spec.js.map +1 -1
- package/cjs/component/title/title.d.ts +2 -2
- package/cjs/component/title/title.js +2 -1
- package/cjs/component/title/title.js.map +1 -1
- package/cjs/component/tooltip/handler/base.js +3 -3
- package/cjs/component/tooltip/handler/base.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/interface.d.ts +9 -12
- package/cjs/component/tooltip/handler/dom/interface.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/content-column-model.d.ts +4 -6
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js +19 -17
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/content-model.js +2 -2
- package/cjs/component/tooltip/handler/dom/model/content-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/title-model.js +5 -5
- package/cjs/component/tooltip/handler/dom/model/title-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/tooltip-model.js +2 -2
- package/cjs/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/util.js +20 -13
- package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.js +26 -25
- package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/compose.d.ts +2 -2
- package/cjs/component/tooltip/handler/utils/compose.js +13 -10
- package/cjs/component/tooltip/handler/utils/compose.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/get-spec.js +3 -3
- package/cjs/component/tooltip/handler/utils/get-spec.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/style.d.ts +1 -1
- package/cjs/component/tooltip/handler/utils/style.js +15 -10
- package/cjs/component/tooltip/handler/utils/style.js.map +1 -1
- package/cjs/component/tooltip/interface/theme.d.ts +6 -4
- package/cjs/component/tooltip/interface/theme.js.map +1 -1
- package/cjs/component/tooltip/processor/base.js +1 -1
- package/cjs/component/tooltip/processor/base.js.map +1 -1
- package/cjs/component/tooltip/tooltip.d.ts +4 -3
- package/cjs/component/tooltip/tooltip.js +14 -7
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/constant/index.d.ts +3 -0
- package/cjs/constant/index.js +4 -3
- package/cjs/constant/index.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.d.ts +3 -0
- package/cjs/core/interface.js.map +1 -1
- package/cjs/core/vchart.d.ts +6 -1
- package/cjs/core/vchart.js +75 -27
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/initialize.js +9 -7
- package/cjs/data/initialize.js.map +1 -1
- package/cjs/data/transforms/data-key.d.ts +2 -2
- package/cjs/data/transforms/data-key.js.map +1 -1
- package/cjs/data/transforms/dimension-statistics.d.ts +11 -5
- package/cjs/data/transforms/dimension-statistics.js +34 -22
- package/cjs/data/transforms/dimension-statistics.js.map +1 -1
- package/cjs/data/transforms/invalid-travel.js +1 -2
- package/cjs/data/transforms/invalid-travel.js.map +1 -1
- package/cjs/data/transforms/legend-data/discrete/discrete.js +4 -2
- package/cjs/data/transforms/legend-data/discrete/discrete.js.map +1 -1
- package/cjs/data/transforms/tick-data/continuous.js +6 -3
- package/cjs/data/transforms/tick-data/continuous.js.map +1 -1
- package/cjs/data/transforms/tick-data/discrete/polar-angle.js +2 -2
- package/cjs/data/transforms/tick-data/discrete/polar-angle.js.map +1 -1
- package/cjs/data/transforms/tick-data/interface.d.ts +3 -0
- package/cjs/data/transforms/tick-data/interface.js.map +1 -1
- package/cjs/data/transforms/tick-data/util.js +5 -5
- package/cjs/data/transforms/tick-data/util.js.map +1 -1
- package/cjs/event/event-dispatcher.js +4 -2
- package/cjs/event/event-dispatcher.js.map +1 -1
- package/cjs/event/events/dimension/dimension-click.d.ts +1 -3
- package/cjs/event/events/dimension/dimension-click.js +9 -10
- package/cjs/event/events/dimension/dimension-click.js.map +1 -1
- package/cjs/event/events/dimension/dimension-hover.d.ts +2 -3
- package/cjs/event/events/dimension/dimension-hover.js +26 -17
- package/cjs/event/events/dimension/dimension-hover.js.map +1 -1
- package/cjs/event/events/dimension/util/cartesian.js +2 -2
- package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
- package/cjs/event/events/dimension/util/polar.js +1 -1
- package/cjs/event/events/dimension/util/polar.js.map +1 -1
- package/cjs/event/interface.d.ts +3 -3
- package/cjs/event/interface.js.map +1 -1
- package/cjs/interaction/trigger.js +6 -2
- package/cjs/interaction/trigger.js.map +1 -1
- package/cjs/layout/label/arc-label.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +1 -0
- package/cjs/mark/base/base-mark.js +21 -4
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/mark-set/index.d.ts +1 -0
- package/cjs/mark/mark-set/index.js.map +1 -1
- package/cjs/mark/symbol.js +1 -1
- package/cjs/mark/symbol.js.map +1 -1
- package/cjs/model/base-model.d.ts +6 -4
- package/cjs/model/base-model.js +16 -17
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/model/interface.d.ts +8 -2
- package/cjs/model/interface.js.map +1 -1
- package/cjs/model/layout-item.d.ts +7 -7
- package/cjs/model/layout-item.js.map +1 -1
- package/cjs/model/tooltip-helper.d.ts +0 -2
- package/cjs/model/tooltip-helper.js +0 -3
- package/cjs/model/tooltip-helper.js.map +1 -1
- package/cjs/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
- package/cjs/plugin/components/index.d.ts +0 -2
- package/cjs/plugin/components/index.js +1 -2
- package/cjs/plugin/components/index.js.map +1 -1
- package/cjs/region/region.d.ts +3 -3
- package/cjs/region/region.js.map +1 -1
- package/cjs/series/area/area.d.ts +9 -4
- package/cjs/series/area/area.js +44 -21
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/area/constant.d.ts +2 -0
- package/cjs/series/area/constant.js +15 -0
- package/cjs/series/area/constant.js.map +1 -0
- package/cjs/series/area/interface.d.ts +2 -0
- package/cjs/series/area/interface.js.map +1 -1
- package/cjs/series/area/tooltip-helpter.d.ts +5 -0
- package/cjs/series/area/tooltip-helpter.js +24 -0
- package/cjs/series/area/tooltip-helpter.js.map +1 -0
- package/cjs/series/bar/bar-3d.d.ts +3 -1
- package/cjs/series/bar/bar-3d.js +2 -7
- package/cjs/series/bar/bar-3d.js.map +1 -1
- package/cjs/series/bar/bar.d.ts +1 -0
- package/cjs/series/bar/bar.js +11 -16
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/bar/constant.d.ts +3 -0
- package/cjs/series/bar/constant.js +20 -0
- package/cjs/series/bar/constant.js.map +1 -0
- package/cjs/series/bar/interface.d.ts +3 -2
- package/cjs/series/bar/interface.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +8 -6
- package/cjs/series/base/base-series.js +87 -40
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/base/constant.d.ts +2 -0
- package/cjs/series/base/constant.js +15 -0
- package/cjs/series/base/constant.js.map +1 -0
- package/cjs/series/base/tooltip-helper.d.ts +0 -1
- package/cjs/series/base/tooltip-helper.js +4 -5
- package/cjs/series/base/tooltip-helper.js.map +1 -1
- package/cjs/series/box-plot/box-plot.d.ts +1 -2
- package/cjs/series/box-plot/box-plot.js +6 -15
- package/cjs/series/box-plot/box-plot.js.map +1 -1
- package/cjs/series/box-plot/constant.d.ts +2 -0
- package/cjs/series/box-plot/constant.js +19 -0
- package/cjs/series/box-plot/constant.js.map +1 -0
- package/cjs/series/cartesian/cartesian.d.ts +12 -3
- package/cjs/series/cartesian/cartesian.js +41 -19
- package/cjs/series/cartesian/cartesian.js.map +1 -1
- package/cjs/series/cartesian/interface.d.ts +3 -2
- package/cjs/series/cartesian/interface.js.map +1 -1
- package/cjs/series/circle-packing/circle-packing.d.ts +1 -2
- package/cjs/series/circle-packing/circle-packing.js +6 -11
- package/cjs/series/circle-packing/circle-packing.js.map +1 -1
- package/cjs/series/circle-packing/constant.d.ts +2 -0
- package/cjs/series/circle-packing/constant.js +15 -0
- package/cjs/series/circle-packing/constant.js.map +1 -0
- package/cjs/series/dot/constant.d.ts +2 -0
- package/cjs/series/dot/constant.js +39 -0
- package/cjs/series/dot/constant.js.map +1 -0
- package/cjs/series/dot/dot.d.ts +2 -1
- package/cjs/series/dot/dot.js +6 -32
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/funnel/constant.d.ts +3 -0
- package/cjs/series/funnel/constant.js +52 -0
- package/cjs/series/funnel/constant.js.map +1 -0
- package/cjs/series/funnel/funnel-3d.d.ts +3 -2
- package/cjs/series/funnel/funnel-3d.js +2 -23
- package/cjs/series/funnel/funnel-3d.js.map +1 -1
- package/cjs/series/funnel/funnel.d.ts +2 -1
- package/cjs/series/funnel/funnel.js +15 -26
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/gauge/constant.d.ts +3 -0
- package/cjs/series/gauge/constant.js +32 -0
- package/cjs/series/gauge/constant.js.map +1 -0
- package/cjs/series/gauge/gauge-pointer.d.ts +2 -2
- package/cjs/series/gauge/gauge-pointer.js +5 -15
- package/cjs/series/gauge/gauge-pointer.js.map +1 -1
- package/cjs/series/gauge/gauge.d.ts +2 -1
- package/cjs/series/gauge/gauge.js +8 -14
- package/cjs/series/gauge/gauge.js.map +1 -1
- package/cjs/series/geo/geo.d.ts +2 -0
- package/cjs/series/geo/geo.js +5 -1
- package/cjs/series/geo/geo.js.map +1 -1
- package/cjs/series/heatmap/constant.d.ts +2 -0
- package/cjs/series/heatmap/constant.js +19 -0
- package/cjs/series/heatmap/constant.js.map +1 -0
- package/cjs/series/heatmap/heatmap.d.ts +2 -1
- package/cjs/series/heatmap/heatmap.js +6 -15
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/series/index.d.ts +2 -2
- package/cjs/series/index.js +3 -3
- package/cjs/series/index.js.map +1 -1
- package/cjs/series/interface/common.d.ts +1 -0
- package/cjs/series/interface/common.js.map +1 -1
- package/cjs/series/interface/series.d.ts +3 -2
- package/cjs/series/interface/series.js.map +1 -1
- package/cjs/series/interface/theme.d.ts +3 -2
- package/cjs/series/interface/theme.js +34 -1
- package/cjs/series/interface/theme.js.map +1 -1
- package/cjs/series/line/constant.d.ts +2 -0
- package/cjs/series/line/constant.js +10 -0
- package/cjs/series/line/constant.js.map +1 -0
- package/cjs/series/line/interface.d.ts +2 -2
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/line/line.d.ts +5 -4
- package/cjs/series/line/line.js +6 -4
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/link/constant.d.ts +2 -0
- package/cjs/series/link/constant.js +23 -0
- package/cjs/series/link/constant.js.map +1 -0
- package/cjs/series/link/link.d.ts +1 -1
- package/cjs/series/link/link.js +3 -16
- package/cjs/series/link/link.js.map +1 -1
- package/cjs/series/map/constant.d.ts +2 -0
- package/cjs/series/map/constant.js +15 -0
- package/cjs/series/map/constant.js.map +1 -0
- package/cjs/series/map/geo-source.js +2 -2
- package/cjs/series/map/geo-source.js.map +1 -1
- package/cjs/series/map/interface.d.ts +1 -0
- package/cjs/series/map/interface.js.map +1 -1
- package/cjs/series/map/map.d.ts +2 -3
- package/cjs/series/map/map.js +10 -15
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/mixin/line-mixin.d.ts +6 -3
- package/cjs/series/mixin/line-mixin.js +42 -26
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/pie/constant.d.ts +3 -0
- package/cjs/series/pie/constant.js +28 -0
- package/cjs/series/pie/constant.js.map +1 -0
- package/cjs/series/pie/interface.d.ts +4 -7
- package/cjs/series/pie/interface.js.map +1 -1
- package/cjs/series/pie/pie-3d.d.ts +1 -1
- package/cjs/series/pie/pie-3d.js +2 -11
- package/cjs/series/pie/pie-3d.js.map +1 -1
- package/cjs/series/pie/pie.d.ts +3 -1
- package/cjs/series/pie/pie.js +21 -67
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/polar/interface.d.ts +1 -0
- package/cjs/series/polar/interface.js.map +1 -1
- package/cjs/series/polar/polar.d.ts +5 -0
- package/cjs/series/polar/polar.js +17 -4
- package/cjs/series/polar/polar.js.map +1 -1
- package/cjs/series/progress/circular/circular.d.ts +1 -1
- package/cjs/series/progress/circular/circular.js +6 -15
- package/cjs/series/progress/circular/circular.js.map +1 -1
- package/cjs/series/progress/circular/constant.d.ts +2 -0
- package/cjs/series/progress/circular/constant.js +19 -0
- package/cjs/series/progress/circular/constant.js.map +1 -0
- package/cjs/series/progress/linear/constant.d.ts +2 -0
- package/cjs/series/progress/linear/constant.js +23 -0
- package/cjs/series/progress/linear/constant.js.map +1 -0
- package/cjs/series/progress/linear/linear.d.ts +1 -1
- package/cjs/series/progress/linear/linear.js +2 -15
- package/cjs/series/progress/linear/linear.js.map +1 -1
- package/cjs/series/radar/constant.d.ts +2 -0
- package/cjs/series/radar/constant.js +15 -0
- package/cjs/series/radar/constant.js.map +1 -0
- package/cjs/series/radar/radar.d.ts +4 -2
- package/cjs/series/radar/radar.js +8 -10
- package/cjs/series/radar/radar.js.map +1 -1
- package/cjs/series/range-area/constant.d.ts +2 -0
- package/cjs/series/range-area/constant.js +10 -0
- package/cjs/series/range-area/constant.js.map +1 -0
- package/cjs/series/range-area/range-area.d.ts +4 -1
- package/cjs/series/range-area/range-area.js +9 -3
- package/cjs/series/range-area/range-area.js.map +1 -1
- package/cjs/series/range-column/constant.d.ts +3 -0
- package/cjs/series/range-column/constant.js +28 -0
- package/cjs/series/range-column/constant.js.map +1 -0
- package/cjs/series/range-column/range-column-3d.d.ts +5 -1
- package/cjs/series/range-column/range-column-3d.js +3 -2
- package/cjs/series/range-column/range-column-3d.js.map +1 -1
- package/cjs/series/range-column/range-column.d.ts +2 -2
- package/cjs/series/range-column/range-column.js +4 -13
- package/cjs/series/range-column/range-column.js.map +1 -1
- package/cjs/series/rose/constant.d.ts +2 -0
- package/cjs/series/rose/constant.js +15 -0
- package/cjs/series/rose/constant.js.map +1 -0
- package/cjs/series/rose/interface.d.ts +3 -0
- package/cjs/series/rose/interface.js.map +1 -1
- package/cjs/series/rose/rose.d.ts +3 -3
- package/cjs/series/rose/rose.js +24 -45
- package/cjs/series/rose/rose.js.map +1 -1
- package/cjs/series/sankey/constant.d.ts +2 -0
- package/cjs/series/sankey/constant.js +19 -0
- package/cjs/series/sankey/constant.js.map +1 -0
- package/cjs/series/sankey/interface.d.ts +3 -2
- package/cjs/series/sankey/interface.js.map +1 -1
- package/cjs/series/sankey/sankey.d.ts +6 -2
- package/cjs/series/sankey/sankey.js +247 -102
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/scatter/constant.d.ts +2 -0
- package/cjs/series/scatter/constant.js +15 -0
- package/cjs/series/scatter/constant.js.map +1 -0
- package/cjs/series/scatter/interface.d.ts +3 -2
- package/cjs/series/scatter/interface.js.map +1 -1
- package/cjs/series/scatter/scatter.d.ts +4 -4
- package/cjs/series/scatter/scatter.js +27 -23
- package/cjs/series/scatter/scatter.js.map +1 -1
- package/cjs/series/sunburst/constant.d.ts +2 -0
- package/cjs/series/sunburst/constant.js +15 -0
- package/cjs/series/sunburst/constant.js.map +1 -0
- package/cjs/series/sunburst/sunburst.js +2 -7
- package/cjs/series/sunburst/sunburst.js.map +1 -1
- package/cjs/series/treemap/constant.d.ts +2 -0
- package/cjs/series/treemap/constant.js +23 -0
- package/cjs/series/treemap/constant.js.map +1 -0
- package/cjs/series/treemap/treemap.d.ts +1 -1
- package/cjs/series/treemap/treemap.js +10 -22
- package/cjs/series/treemap/treemap.js.map +1 -1
- package/cjs/series/util/utils.d.ts +4 -1
- package/cjs/series/util/utils.js +8 -6
- package/cjs/series/util/utils.js.map +1 -1
- package/cjs/series/waterfall/constant.d.ts +2 -0
- package/cjs/series/waterfall/constant.js +19 -0
- package/cjs/series/waterfall/constant.js.map +1 -0
- package/cjs/series/waterfall/waterfall.d.ts +2 -2
- package/cjs/series/waterfall/waterfall.js +2 -11
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/cjs/series/word-cloud/base.d.ts +1 -0
- package/cjs/series/word-cloud/base.js +3 -12
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/series/word-cloud/constant.d.ts +2 -0
- package/cjs/series/word-cloud/constant.js +19 -0
- package/cjs/series/word-cloud/constant.js.map +1 -0
- package/cjs/series/word-cloud/word-cloud-3d.d.ts +1 -1
- package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/cjs/series/word-cloud/word-cloud.d.ts +1 -1
- package/cjs/series/word-cloud/word-cloud.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
- package/cjs/theme/builtin/common/component/axis/band-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js +24 -0
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/common-axis.js +98 -0
- package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/polar-axis.js +25 -0
- package/cjs/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/brush.js.map +1 -0
- package/cjs/theme/builtin/common/component/crosshair.js +108 -0
- package/cjs/theme/builtin/common/component/crosshair.js.map +1 -0
- package/cjs/theme/builtin/common/component/data-zoom.js +172 -0
- package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -0
- package/cjs/theme/builtin/common/component/index.js +34 -0
- package/cjs/theme/builtin/common/component/index.js.map +1 -0
- package/cjs/theme/builtin/common/component/indicator.js +43 -0
- package/cjs/theme/builtin/common/component/indicator.js.map +1 -0
- package/cjs/theme/builtin/common/component/legend/color-legend.js +55 -0
- package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -0
- package/cjs/theme/builtin/common/component/legend/continuous.js +74 -0
- package/cjs/theme/builtin/common/component/legend/continuous.js.map +1 -0
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js +85 -0
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
- package/cjs/theme/builtin/common/component/legend/size-legend.js +84 -0
- package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -0
- package/cjs/theme/builtin/common/component/map-label.js +57 -0
- package/cjs/theme/builtin/common/component/map-label.js.map +1 -0
- package/cjs/theme/builtin/common/component/mark-area.js +45 -0
- package/cjs/theme/builtin/common/component/mark-area.js.map +1 -0
- package/cjs/theme/builtin/common/component/mark-line.js +67 -0
- package/cjs/theme/builtin/common/component/mark-line.js.map +1 -0
- package/cjs/theme/builtin/common/component/mark-point.js.map +1 -0
- package/cjs/theme/builtin/common/component/player.js +93 -0
- package/cjs/theme/builtin/common/component/player.js.map +1 -0
- package/cjs/theme/builtin/common/component/poptip.d.ts +2 -0
- package/cjs/theme/builtin/common/component/poptip.js +52 -0
- package/cjs/theme/builtin/common/component/poptip.js.map +1 -0
- package/cjs/theme/builtin/common/component/title.js +33 -0
- package/cjs/theme/builtin/common/component/title.js.map +1 -0
- package/cjs/theme/builtin/common/component/tooltip.js +87 -0
- package/cjs/theme/builtin/common/component/tooltip.js.map +1 -0
- package/cjs/theme/builtin/common/component/total-label.d.ts +2 -0
- package/cjs/theme/builtin/common/component/total-label.js +27 -0
- package/cjs/theme/builtin/common/component/total-label.js.map +1 -0
- package/cjs/theme/builtin/common/constants.js +23 -0
- package/cjs/theme/builtin/common/constants.js.map +1 -0
- package/cjs/theme/builtin/common/mark.js +85 -0
- package/cjs/theme/builtin/common/mark.js.map +1 -0
- package/cjs/theme/builtin/common/series/area.js +21 -0
- package/cjs/theme/builtin/common/series/area.js.map +1 -0
- package/cjs/theme/builtin/common/series/bar.js +16 -0
- package/cjs/theme/builtin/common/series/bar.js.map +1 -0
- package/cjs/theme/builtin/common/series/bar3d.js +19 -0
- package/cjs/theme/builtin/common/series/bar3d.js.map +1 -0
- package/cjs/theme/builtin/common/series/box-plot.js.map +1 -0
- package/cjs/theme/builtin/common/series/circle-packing.js +34 -0
- package/cjs/theme/builtin/common/series/circle-packing.js.map +1 -0
- package/cjs/theme/builtin/common/series/circular-progress.js.map +1 -0
- package/cjs/theme/builtin/common/series/dot.js +40 -0
- package/cjs/theme/builtin/common/series/dot.js.map +1 -0
- package/cjs/theme/builtin/common/series/funnel.js +48 -0
- package/cjs/theme/builtin/common/series/funnel.js.map +1 -0
- package/cjs/theme/builtin/common/series/funnel3d.js +48 -0
- package/cjs/theme/builtin/common/series/funnel3d.js.map +1 -0
- package/cjs/theme/builtin/common/series/gauge-pointer.js.map +1 -0
- package/cjs/theme/builtin/common/series/gauge.js.map +1 -0
- package/cjs/theme/builtin/common/series/heatmap.js.map +1 -0
- package/cjs/theme/builtin/common/series/index.js.map +1 -0
- package/cjs/theme/builtin/common/series/line.js +21 -0
- package/cjs/theme/builtin/common/series/line.js.map +1 -0
- package/cjs/theme/builtin/common/series/linear-progress.js.map +1 -0
- package/cjs/theme/builtin/common/series/link.js.map +1 -0
- package/cjs/theme/builtin/common/series/map.js +34 -0
- package/cjs/theme/builtin/common/series/map.js.map +1 -0
- package/cjs/theme/builtin/common/series/pie.js +21 -0
- package/cjs/theme/builtin/common/series/pie.js.map +1 -0
- package/cjs/theme/builtin/common/series/pie3d.js +18 -0
- package/cjs/theme/builtin/common/series/pie3d.js.map +1 -0
- package/cjs/theme/builtin/common/series/radar.js +20 -0
- package/cjs/theme/builtin/common/series/radar.js.map +1 -0
- package/cjs/theme/builtin/common/series/rangeColumn.js +28 -0
- package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -0
- package/cjs/theme/builtin/common/series/rose.js +18 -0
- package/cjs/theme/builtin/common/series/rose.js.map +1 -0
- package/cjs/theme/builtin/common/series/sankey.js +13 -0
- package/cjs/theme/builtin/common/series/sankey.js.map +1 -0
- package/cjs/theme/builtin/common/series/scatter.js +24 -0
- package/cjs/theme/builtin/common/series/scatter.js.map +1 -0
- package/cjs/theme/builtin/common/series/sunburst.js +44 -0
- package/cjs/theme/builtin/common/series/sunburst.js.map +1 -0
- package/cjs/theme/builtin/common/series/treemap.js +42 -0
- package/cjs/theme/builtin/common/series/treemap.js.map +1 -0
- package/cjs/theme/builtin/common/series/waterfall.js +38 -0
- package/cjs/theme/builtin/common/series/waterfall.js.map +1 -0
- package/cjs/theme/builtin/common/series/word-cloud.js.map +1 -0
- package/cjs/theme/builtin/common/series/word-cloud3d.js.map +1 -0
- package/cjs/theme/builtin/dark/color-scheme.js +35 -0
- package/cjs/theme/builtin/dark/color-scheme.js.map +1 -0
- package/cjs/theme/builtin/dark/index.d.ts +2 -0
- package/cjs/theme/builtin/dark/index.js +13 -0
- package/cjs/theme/builtin/dark/index.js.map +1 -0
- package/cjs/theme/builtin/index.d.ts +4 -0
- package/cjs/theme/builtin/index.js +26 -0
- package/cjs/theme/builtin/index.js.map +1 -0
- package/cjs/theme/builtin/light/color-scheme.js +35 -0
- package/cjs/theme/builtin/light/color-scheme.js.map +1 -0
- package/cjs/theme/builtin/light/index.js +24 -0
- package/cjs/theme/builtin/light/index.js.map +1 -0
- package/cjs/theme/color-scheme/builtin/default.d.ts +2 -0
- package/cjs/theme/color-scheme/builtin/default.js +11 -0
- package/cjs/theme/color-scheme/builtin/default.js.map +1 -0
- package/cjs/theme/color-scheme/builtin/interface.d.ts +22 -0
- package/cjs/theme/color-scheme/builtin/interface.js +6 -0
- package/cjs/theme/color-scheme/builtin/interface.js.map +1 -0
- package/cjs/theme/color-scheme/interface.d.ts +3 -2
- package/cjs/theme/color-scheme/interface.js.map +1 -1
- package/cjs/theme/color-scheme/util.d.ts +2 -1
- package/cjs/theme/color-scheme/util.js +17 -4
- package/cjs/theme/color-scheme/util.js.map +1 -1
- package/cjs/theme/index.d.ts +1 -1
- package/cjs/theme/index.js +1 -1
- package/cjs/theme/index.js.map +1 -1
- package/cjs/theme/interface.d.ts +18 -7
- package/cjs/theme/interface.js.map +1 -1
- package/cjs/theme/theme-manager.js +7 -7
- package/cjs/theme/theme-manager.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +16 -4
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/tooltip/label.d.ts +10 -0
- package/cjs/typings/tooltip/label.js +6 -0
- package/cjs/typings/tooltip/label.js.map +1 -0
- package/cjs/typings/tooltip/line.d.ts +3 -2
- package/cjs/typings/tooltip/line.js.map +1 -1
- package/cjs/typings/tooltip/shape.d.ts +2 -0
- package/cjs/typings/tooltip/shape.js.map +1 -1
- package/cjs/typings/visual.d.ts +11 -21
- package/cjs/typings/visual.js.map +1 -1
- package/cjs/util/data.d.ts +0 -8
- package/cjs/util/data.js +2 -9
- package/cjs/util/data.js.map +1 -1
- package/cjs/util/object.d.ts +2 -4
- package/cjs/util/object.js +2 -18
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/scale.d.ts +2 -6
- package/cjs/util/scale.js +1 -6
- package/cjs/util/scale.js.map +1 -1
- package/cjs/util/space.d.ts +4 -9
- package/cjs/util/space.js +21 -30
- package/cjs/util/space.js.map +1 -1
- package/cjs/util/spec/background.d.ts +4 -0
- package/cjs/util/spec/background.js +27 -0
- package/cjs/util/spec/background.js.map +1 -0
- package/cjs/util/spec/clone-deep.d.ts +1 -0
- package/cjs/util/spec/clone-deep.js +27 -0
- package/cjs/util/spec/clone-deep.js.map +1 -0
- package/cjs/util/spec/common.d.ts +3 -0
- package/cjs/util/spec/common.js +23 -0
- package/cjs/util/spec/common.js.map +1 -0
- package/cjs/util/spec/index.d.ts +7 -0
- package/cjs/util/spec/index.js +24 -0
- package/cjs/util/spec/index.js.map +1 -0
- package/cjs/util/spec/merge-spec.d.ts +1 -0
- package/cjs/util/spec/merge-spec.js +58 -0
- package/cjs/util/spec/merge-spec.js.map +1 -0
- package/cjs/util/spec/merge-theme.d.ts +3 -0
- package/cjs/util/spec/merge-theme.js +37 -0
- package/cjs/util/spec/merge-theme.js.map +1 -0
- package/cjs/util/spec/preprocess.d.ts +3 -0
- package/cjs/util/spec/preprocess.js +24 -0
- package/cjs/util/spec/preprocess.js.map +1 -0
- package/cjs/util/spec/transform.d.ts +3 -0
- package/cjs/util/spec/transform.js +28 -0
- package/cjs/util/spec/transform.js.map +1 -0
- package/cjs/util/text.d.ts +1 -6
- package/cjs/util/text.js +4 -22
- package/cjs/util/text.js.map +1 -1
- package/cjs/vchart-all.js +2 -2
- package/cjs/vchart-all.js.map +1 -1
- package/cjs/vchart-simple.js +3 -4
- package/cjs/vchart-simple.js.map +1 -1
- package/esm/animation/spec.d.ts +1 -1
- package/esm/animation/spec.js.map +1 -1
- package/esm/animation/utils.js +3 -3
- package/esm/animation/utils.js.map +1 -1
- package/esm/chart/area/area.js +3 -4
- package/esm/chart/area/area.js.map +1 -1
- package/esm/chart/bar/bar-3d.js +2 -2
- package/esm/chart/bar/bar-3d.js.map +1 -1
- package/esm/chart/bar/bar.js +2 -2
- package/esm/chart/bar/bar.js.map +1 -1
- package/esm/chart/base-chart.d.ts +5 -2
- package/esm/chart/base-chart.js +51 -43
- package/esm/chart/base-chart.js.map +1 -1
- package/esm/chart/box-plot/box-plot.js +1 -1
- package/esm/chart/box-plot/box-plot.js.map +1 -1
- package/esm/chart/cartesian/cartesian.js +3 -2
- package/esm/chart/cartesian/cartesian.js.map +1 -1
- package/esm/chart/circle-packing/circle-packing.js +1 -1
- package/esm/chart/circle-packing/circle-packing.js.map +1 -1
- package/esm/chart/funnel/funnel-3d.js +1 -1
- package/esm/chart/funnel/funnel-3d.js.map +1 -1
- package/esm/chart/funnel/funnel.js +1 -1
- package/esm/chart/funnel/funnel.js.map +1 -1
- package/esm/chart/gauge/gauge.js +2 -2
- package/esm/chart/gauge/gauge.js.map +1 -1
- package/esm/chart/heatmap/heatmap.js +1 -1
- package/esm/chart/heatmap/heatmap.js.map +1 -1
- package/esm/chart/histogram/histogram-3d.js +2 -2
- package/esm/chart/histogram/histogram-3d.js.map +1 -1
- package/esm/chart/histogram/histogram.js +2 -2
- package/esm/chart/histogram/histogram.js.map +1 -1
- package/esm/chart/index.d.ts +2 -2
- package/esm/chart/index.js +2 -2
- package/esm/chart/index.js.map +1 -1
- package/esm/chart/interface/chart.d.ts +4 -2
- package/esm/chart/interface/chart.js.map +1 -1
- package/esm/chart/line/line.js +1 -2
- package/esm/chart/line/line.js.map +1 -1
- package/esm/chart/map/map.js +2 -2
- package/esm/chart/map/map.js.map +1 -1
- package/esm/chart/pie/pie-3d.js +2 -2
- package/esm/chart/pie/pie-3d.js.map +1 -1
- package/esm/chart/pie/pie.js +2 -2
- package/esm/chart/pie/pie.js.map +1 -1
- package/esm/chart/polar/progress-like.js +1 -1
- package/esm/chart/polar/progress-like.js.map +1 -1
- package/esm/chart/polar/rose-like.js +1 -1
- package/esm/chart/polar/rose-like.js.map +1 -1
- package/esm/chart/progress/circular/circular.js +1 -1
- package/esm/chart/progress/circular/circular.js.map +1 -1
- package/esm/chart/progress/linear/linear.js +2 -2
- package/esm/chart/progress/linear/linear.js.map +1 -1
- package/esm/chart/radar/radar.js +5 -6
- package/esm/chart/radar/radar.js.map +1 -1
- package/esm/chart/range-area/range-area.js +1 -1
- package/esm/chart/range-area/range-area.js.map +1 -1
- package/esm/chart/range-column/range-column-3d.js +1 -1
- package/esm/chart/range-column/range-column-3d.js.map +1 -1
- package/esm/chart/range-column/range-column.js +1 -1
- package/esm/chart/range-column/range-column.js.map +1 -1
- package/esm/chart/rose/rose.js +4 -4
- package/esm/chart/rose/rose.js.map +1 -1
- package/esm/chart/sankey/sankey.js +1 -1
- package/esm/chart/sankey/sankey.js.map +1 -1
- package/esm/chart/scatter/scatter.js +2 -2
- package/esm/chart/scatter/scatter.js.map +1 -1
- package/esm/chart/sequence/sequence.js +4 -2
- package/esm/chart/sequence/sequence.js.map +1 -1
- package/esm/chart/stack.d.ts +1 -0
- package/esm/chart/stack.js +16 -2
- package/esm/chart/stack.js.map +1 -1
- package/esm/chart/sunburst/sunburst.js +1 -1
- package/esm/chart/sunburst/sunburst.js.map +1 -1
- package/esm/chart/treemap/treemap.d.ts +1 -1
- package/esm/chart/treemap/treemap.js +4 -4
- package/esm/chart/treemap/treemap.js.map +1 -1
- package/esm/chart/util.d.ts +8 -0
- package/esm/chart/util.js +34 -2
- package/esm/chart/util.js.map +1 -1
- package/esm/chart/waterfall/waterfall.js +1 -1
- package/esm/chart/waterfall/waterfall.js.map +1 -1
- package/esm/chart/word-cloud/word-cloud-3d.js +1 -1
- package/esm/chart/word-cloud/word-cloud-3d.js.map +1 -1
- package/esm/chart/word-cloud/word-cloud.js +1 -1
- package/esm/chart/word-cloud/word-cloud.js.map +1 -1
- package/esm/compile/compiler.d.ts +5 -1
- package/esm/compile/compiler.js +9 -4
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compilable-item.d.ts +1 -0
- package/esm/compile/interface/compilable-item.js.map +1 -1
- package/esm/compile/mark/compilable-mark.js +9 -11
- package/esm/compile/mark/compilable-mark.js.map +1 -1
- package/esm/compile/mark/interface.d.ts +2 -1
- package/esm/compile/mark/interface.js.map +1 -1
- package/esm/compile/mark/util.d.ts +2 -1
- package/esm/compile/mark/util.js +19 -3
- package/esm/compile/mark/util.js.map +1 -1
- package/esm/component/axis/base-axis.d.ts +17 -27
- package/esm/component/axis/base-axis.js +19 -29
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +3 -3
- package/esm/component/axis/cartesian/axis.js +31 -22
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/cartesian/band-axis.d.ts +3 -3
- package/esm/component/axis/cartesian/band-axis.js +1 -0
- package/esm/component/axis/cartesian/band-axis.js.map +1 -1
- package/esm/component/axis/cartesian/index.d.ts +1 -0
- package/esm/component/axis/cartesian/index.js +2 -0
- package/esm/component/axis/cartesian/index.js.map +1 -1
- package/esm/component/axis/cartesian/interface/common.d.ts +6 -1
- package/esm/component/axis/cartesian/interface/common.js.map +1 -1
- package/esm/component/axis/cartesian/interface/spec.d.ts +4 -1
- package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
- package/esm/component/axis/cartesian/linear-axis.d.ts +3 -3
- package/esm/component/axis/cartesian/linear-axis.js +3 -4
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/axis/cartesian/log-axis.d.ts +3 -2
- package/esm/component/axis/cartesian/log-axis.js.map +1 -1
- package/esm/component/axis/cartesian/symlog-axis.d.ts +16 -0
- package/esm/component/axis/cartesian/symlog-axis.js +24 -0
- package/esm/component/axis/cartesian/symlog-axis.js.map +1 -0
- package/esm/component/axis/cartesian/time-axis.d.ts +3 -2
- package/esm/component/axis/cartesian/time-axis.js +3 -3
- package/esm/component/axis/cartesian/time-axis.js.map +1 -1
- package/esm/component/axis/interface.d.ts +11 -8
- package/esm/component/axis/interface.js.map +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/axis/polar/axis.d.ts +4 -3
- package/esm/component/axis/polar/axis.js +16 -13
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/band-axis.d.ts +4 -2
- package/esm/component/axis/polar/band-axis.js.map +1 -1
- package/esm/component/axis/polar/interface/common.d.ts +1 -1
- package/esm/component/axis/polar/interface/common.js.map +1 -1
- package/esm/component/axis/polar/interface/spec.d.ts +7 -2
- package/esm/component/axis/polar/interface/spec.js.map +1 -1
- package/esm/component/axis/polar/linear-axis.d.ts +2 -3
- package/esm/component/axis/polar/linear-axis.js.map +1 -1
- package/esm/component/axis/util.d.ts +28 -0
- package/esm/component/axis/util.js +63 -0
- package/esm/component/axis/util.js.map +1 -0
- package/esm/component/base/base-component.d.ts +15 -4
- package/esm/component/base/base-component.js +19 -5
- package/esm/component/base/base-component.js.map +1 -1
- package/esm/component/base/interface.d.ts +8 -0
- package/esm/component/base/interface.js +2 -0
- package/esm/component/base/interface.js.map +1 -0
- package/esm/component/base/util.d.ts +2 -1
- package/esm/component/base/util.js +14 -7
- package/esm/component/base/util.js.map +1 -1
- package/esm/component/brush/brush.d.ts +14 -4
- package/esm/component/brush/brush.js +75 -63
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/brush/interface.d.ts +1 -0
- package/esm/component/brush/interface.js.map +1 -1
- package/esm/component/crosshair/base.d.ts +5 -4
- package/esm/component/crosshair/base.js +2 -2
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/cartesian.d.ts +3 -3
- package/esm/component/crosshair/cartesian.js +8 -8
- package/esm/component/crosshair/cartesian.js.map +1 -1
- package/esm/component/crosshair/interface/spec.d.ts +8 -8
- package/esm/component/crosshair/interface/spec.js.map +1 -1
- package/esm/component/crosshair/interface/theme.d.ts +3 -1
- package/esm/component/crosshair/interface/theme.js.map +1 -1
- package/esm/component/crosshair/polar.d.ts +3 -3
- package/esm/component/crosshair/polar.js +8 -8
- package/esm/component/crosshair/polar.js.map +1 -1
- package/esm/component/crosshair/util.d.ts +5 -0
- package/esm/component/crosshair/util.js +34 -0
- package/esm/component/crosshair/util.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.d.ts +3 -2
- package/esm/component/custom-mark/custom-mark.js +4 -4
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.d.ts +5 -5
- package/esm/component/data-zoom/data-filter-base-component.js +2 -9
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
- package/esm/component/data-zoom/data-zoom/data-zoom.js +9 -7
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/interface.d.ts +3 -1
- package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/interface.d.ts +3 -3
- package/esm/component/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
- package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/esm/component/geo/geo-coordinate.d.ts +10 -4
- package/esm/component/geo/geo-coordinate.js +68 -16
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/geo/projection.d.ts +1 -0
- package/esm/component/geo/projection.js +4 -0
- package/esm/component/geo/projection.js.map +1 -1
- package/esm/component/index.d.ts +3 -2
- package/esm/component/index.js +4 -2
- package/esm/component/index.js.map +1 -1
- package/esm/component/indicator/indicator.d.ts +3 -2
- package/esm/component/indicator/indicator.js +9 -8
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/indicator/interface.d.ts +5 -4
- package/esm/component/indicator/interface.js.map +1 -1
- package/esm/component/interface/theme.d.ts +4 -2
- package/esm/component/interface/theme.js.map +1 -1
- package/esm/component/interface/type.d.ts +2 -0
- package/esm/component/interface/type.js +13 -12
- package/esm/component/interface/type.js.map +1 -1
- package/esm/component/label/base-label.d.ts +39 -0
- package/esm/component/label/base-label.js +37 -0
- package/esm/component/label/base-label.js.map +1 -0
- package/esm/component/label/interface.d.ts +12 -1
- package/esm/component/label/interface.js.map +1 -1
- package/esm/component/label/label.d.ts +7 -29
- package/esm/component/label/label.js +36 -47
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/label/pie.d.ts +5 -0
- package/esm/component/label/pie.js +13 -0
- package/esm/component/label/pie.js.map +1 -0
- package/esm/component/label/totalLabel.d.ts +27 -0
- package/esm/component/label/totalLabel.js +110 -0
- package/esm/component/label/totalLabel.js.map +1 -0
- package/esm/component/label/util.d.ts +3 -1
- package/esm/component/label/util.js +6 -4
- package/esm/component/label/util.js.map +1 -1
- package/esm/component/legend/base-legend.d.ts +3 -2
- package/esm/component/legend/base-legend.js +5 -5
- package/esm/component/legend/base-legend.js.map +1 -1
- package/esm/component/legend/continuous/legend.d.ts +3 -4
- package/esm/component/legend/continuous/legend.js.map +1 -1
- package/esm/component/legend/continuous/util.js +5 -3
- package/esm/component/legend/continuous/util.js.map +1 -1
- package/esm/component/legend/discrete/interface.d.ts +3 -1
- package/esm/component/legend/discrete/interface.js.map +1 -1
- package/esm/component/legend/discrete/legend.d.ts +1 -2
- package/esm/component/legend/discrete/legend.js +2 -2
- package/esm/component/legend/discrete/legend.js.map +1 -1
- package/esm/component/legend/discrete/util.js +4 -4
- package/esm/component/legend/discrete/util.js.map +1 -1
- package/esm/component/legend/interface.d.ts +2 -6
- package/esm/component/legend/interface.js.map +1 -1
- package/esm/component/legend/util.js +4 -2
- package/esm/component/legend/util.js.map +1 -1
- package/esm/component/map-label/component.d.ts +1 -2
- package/esm/component/map-label/component.js.map +1 -1
- package/esm/component/marker/base-marker.d.ts +8 -2
- package/esm/component/marker/base-marker.js +14 -0
- package/esm/component/marker/base-marker.js.map +1 -1
- package/esm/component/marker/interface.d.ts +3 -2
- package/esm/component/marker/interface.js.map +1 -1
- package/esm/component/marker/mark-area/mark-area.d.ts +1 -2
- package/esm/component/marker/mark-area/mark-area.js +17 -6
- package/esm/component/marker/mark-area/mark-area.js.map +1 -1
- package/esm/component/marker/mark-line/mark-line.d.ts +1 -2
- package/esm/component/marker/mark-line/mark-line.js +17 -6
- package/esm/component/marker/mark-line/mark-line.js.map +1 -1
- package/esm/component/marker/mark-point/mark-point.d.ts +1 -2
- package/esm/component/marker/mark-point/mark-point.js +18 -7
- package/esm/component/marker/mark-point/mark-point.js.map +1 -1
- package/esm/component/player/player.d.ts +1 -2
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/poptip/interface.d.ts +15 -0
- package/esm/component/poptip/interface.js +2 -0
- package/esm/component/poptip/interface.js.map +1 -0
- package/esm/component/title/interface/spec.d.ts +2 -2
- package/esm/component/title/interface/spec.js.map +1 -1
- package/esm/component/title/title.d.ts +2 -2
- package/esm/component/title/title.js +2 -1
- package/esm/component/title/title.js.map +1 -1
- package/esm/component/tooltip/handler/base.js +3 -3
- package/esm/component/tooltip/handler/base.js.map +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/esm/component/tooltip/handler/dom/interface.d.ts +9 -12
- package/esm/component/tooltip/handler/dom/interface.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/content-column-model.d.ts +4 -6
- package/esm/component/tooltip/handler/dom/model/content-column-model.js +20 -16
- package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/content-model.js +2 -2
- package/esm/component/tooltip/handler/dom/model/content-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/title-model.js +6 -6
- package/esm/component/tooltip/handler/dom/model/title-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/tooltip-model.js +4 -2
- package/esm/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/util.js +21 -14
- package/esm/component/tooltip/handler/dom/util.js.map +1 -1
- package/esm/component/tooltip/handler/utils/attribute.js +25 -25
- package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/esm/component/tooltip/handler/utils/compose.d.ts +2 -2
- package/esm/component/tooltip/handler/utils/compose.js +11 -10
- package/esm/component/tooltip/handler/utils/compose.js.map +1 -1
- package/esm/component/tooltip/handler/utils/get-spec.js +5 -3
- package/esm/component/tooltip/handler/utils/get-spec.js.map +1 -1
- package/esm/component/tooltip/handler/utils/style.d.ts +1 -1
- package/esm/component/tooltip/handler/utils/style.js +17 -10
- package/esm/component/tooltip/handler/utils/style.js.map +1 -1
- package/esm/component/tooltip/interface/theme.d.ts +6 -4
- package/esm/component/tooltip/interface/theme.js.map +1 -1
- package/esm/component/tooltip/processor/base.js +1 -1
- package/esm/component/tooltip/processor/base.js.map +1 -1
- package/esm/component/tooltip/tooltip.d.ts +4 -3
- package/esm/component/tooltip/tooltip.js +15 -8
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/constant/index.d.ts +3 -0
- package/esm/constant/index.js +6 -0
- package/esm/constant/index.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.d.ts +3 -0
- package/esm/core/interface.js.map +1 -1
- package/esm/core/vchart.d.ts +6 -1
- package/esm/core/vchart.js +79 -28
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/initialize.js +10 -7
- package/esm/data/initialize.js.map +1 -1
- package/esm/data/transforms/data-key.d.ts +2 -2
- package/esm/data/transforms/data-key.js.map +1 -1
- package/esm/data/transforms/dimension-statistics.d.ts +11 -5
- package/esm/data/transforms/dimension-statistics.js +33 -22
- package/esm/data/transforms/dimension-statistics.js.map +1 -1
- package/esm/data/transforms/invalid-travel.js +1 -2
- package/esm/data/transforms/invalid-travel.js.map +1 -1
- package/esm/data/transforms/legend-data/discrete/discrete.js +4 -3
- package/esm/data/transforms/legend-data/discrete/discrete.js.map +1 -1
- package/esm/data/transforms/tick-data/continuous.js +6 -3
- package/esm/data/transforms/tick-data/continuous.js.map +1 -1
- package/esm/data/transforms/tick-data/discrete/polar-angle.js +1 -1
- package/esm/data/transforms/tick-data/discrete/polar-angle.js.map +1 -1
- package/esm/data/transforms/tick-data/interface.d.ts +3 -0
- package/esm/data/transforms/tick-data/interface.js.map +1 -1
- package/esm/data/transforms/tick-data/util.js +1 -1
- package/esm/data/transforms/tick-data/util.js.map +1 -1
- package/esm/event/event-dispatcher.js +3 -2
- package/esm/event/event-dispatcher.js.map +1 -1
- package/esm/event/events/dimension/dimension-click.d.ts +1 -3
- package/esm/event/events/dimension/dimension-click.js +9 -10
- package/esm/event/events/dimension/dimension-click.js.map +1 -1
- package/esm/event/events/dimension/dimension-hover.d.ts +2 -3
- package/esm/event/events/dimension/dimension-hover.js +25 -16
- package/esm/event/events/dimension/dimension-hover.js.map +1 -1
- package/esm/event/events/dimension/util/cartesian.js +2 -2
- package/esm/event/events/dimension/util/cartesian.js.map +1 -1
- package/esm/event/events/dimension/util/polar.js +1 -1
- package/esm/event/events/dimension/util/polar.js.map +1 -1
- package/esm/event/interface.d.ts +3 -3
- package/esm/event/interface.js.map +1 -1
- package/esm/interaction/trigger.js +7 -3
- package/esm/interaction/trigger.js.map +1 -1
- package/esm/layout/label/arc-label.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +1 -0
- package/esm/mark/base/base-mark.js +22 -5
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/mark-set/index.d.ts +1 -0
- package/esm/mark/mark-set/index.js.map +1 -1
- package/esm/mark/symbol.js +1 -1
- package/esm/mark/symbol.js.map +1 -1
- package/esm/model/base-model.d.ts +6 -4
- package/esm/model/base-model.js +17 -17
- package/esm/model/base-model.js.map +1 -1
- package/esm/model/interface.d.ts +8 -2
- package/esm/model/interface.js.map +1 -1
- package/esm/model/layout-item.d.ts +7 -7
- package/esm/model/layout-item.js.map +1 -1
- package/esm/model/tooltip-helper.d.ts +0 -2
- package/esm/model/tooltip-helper.js +0 -3
- package/esm/model/tooltip-helper.js.map +1 -1
- package/esm/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
- package/esm/plugin/components/index.d.ts +0 -2
- package/esm/plugin/components/index.js +0 -3
- package/esm/plugin/components/index.js.map +1 -1
- package/esm/region/region.d.ts +3 -3
- package/esm/region/region.js.map +1 -1
- package/esm/series/area/area.d.ts +9 -4
- package/esm/series/area/area.js +46 -21
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/area/constant.d.ts +2 -0
- package/esm/series/area/constant.js +15 -0
- package/esm/series/area/constant.js.map +1 -0
- package/esm/series/area/interface.d.ts +2 -0
- package/esm/series/area/interface.js.map +1 -1
- package/esm/series/area/tooltip-helpter.d.ts +5 -0
- package/esm/series/area/tooltip-helpter.js +18 -0
- package/esm/series/area/tooltip-helpter.js.map +1 -0
- package/esm/series/bar/bar-3d.d.ts +3 -1
- package/esm/series/bar/bar-3d.js +3 -8
- package/esm/series/bar/bar-3d.js.map +1 -1
- package/esm/series/bar/bar.d.ts +1 -0
- package/esm/series/bar/bar.js +6 -13
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/bar/constant.d.ts +3 -0
- package/esm/series/bar/constant.js +20 -0
- package/esm/series/bar/constant.js.map +1 -0
- package/esm/series/bar/interface.d.ts +3 -2
- package/esm/series/bar/interface.js.map +1 -1
- package/esm/series/base/base-series.d.ts +8 -6
- package/esm/series/base/base-series.js +87 -42
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/base/constant.d.ts +2 -0
- package/esm/series/base/constant.js +11 -0
- package/esm/series/base/constant.js.map +1 -0
- package/esm/series/base/tooltip-helper.d.ts +0 -1
- package/esm/series/base/tooltip-helper.js +4 -5
- package/esm/series/base/tooltip-helper.js.map +1 -1
- package/esm/series/box-plot/box-plot.d.ts +1 -2
- package/esm/series/box-plot/box-plot.js +4 -15
- package/esm/series/box-plot/box-plot.js.map +1 -1
- package/esm/series/box-plot/constant.d.ts +2 -0
- package/esm/series/box-plot/constant.js +17 -0
- package/esm/series/box-plot/constant.js.map +1 -0
- package/esm/series/cartesian/cartesian.d.ts +12 -3
- package/esm/series/cartesian/cartesian.js +39 -18
- package/esm/series/cartesian/cartesian.js.map +1 -1
- package/esm/series/cartesian/interface.d.ts +3 -2
- package/esm/series/cartesian/interface.js.map +1 -1
- package/esm/series/circle-packing/circle-packing.d.ts +1 -2
- package/esm/series/circle-packing/circle-packing.js +4 -10
- package/esm/series/circle-packing/circle-packing.js.map +1 -1
- package/esm/series/circle-packing/constant.d.ts +2 -0
- package/esm/series/circle-packing/constant.js +13 -0
- package/esm/series/circle-packing/constant.js.map +1 -0
- package/esm/series/dot/constant.d.ts +2 -0
- package/esm/series/dot/constant.js +37 -0
- package/esm/series/dot/constant.js.map +1 -0
- package/esm/series/dot/dot.d.ts +2 -1
- package/esm/series/dot/dot.js +8 -36
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/funnel/constant.d.ts +3 -0
- package/esm/series/funnel/constant.js +52 -0
- package/esm/series/funnel/constant.js.map +1 -0
- package/esm/series/funnel/funnel-3d.d.ts +3 -2
- package/esm/series/funnel/funnel-3d.js +3 -24
- package/esm/series/funnel/funnel-3d.js.map +1 -1
- package/esm/series/funnel/funnel.d.ts +2 -1
- package/esm/series/funnel/funnel.js +15 -24
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/gauge/constant.d.ts +3 -0
- package/esm/series/gauge/constant.js +32 -0
- package/esm/series/gauge/constant.js.map +1 -0
- package/esm/series/gauge/gauge-pointer.d.ts +2 -2
- package/esm/series/gauge/gauge-pointer.js +6 -16
- package/esm/series/gauge/gauge-pointer.js.map +1 -1
- package/esm/series/gauge/gauge.d.ts +2 -1
- package/esm/series/gauge/gauge.js +6 -14
- package/esm/series/gauge/gauge.js.map +1 -1
- package/esm/series/geo/geo.d.ts +2 -0
- package/esm/series/geo/geo.js +4 -1
- package/esm/series/geo/geo.js.map +1 -1
- package/esm/series/heatmap/constant.d.ts +2 -0
- package/esm/series/heatmap/constant.js +17 -0
- package/esm/series/heatmap/constant.js.map +1 -0
- package/esm/series/heatmap/heatmap.d.ts +2 -1
- package/esm/series/heatmap/heatmap.js +5 -16
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/series/index.d.ts +2 -2
- package/esm/series/index.js +2 -2
- package/esm/series/index.js.map +1 -1
- package/esm/series/interface/common.d.ts +1 -0
- package/esm/series/interface/common.js.map +1 -1
- package/esm/series/interface/series.d.ts +3 -2
- package/esm/series/interface/series.js.map +1 -1
- package/esm/series/interface/theme.d.ts +3 -2
- package/esm/series/interface/theme.js +78 -1
- package/esm/series/interface/theme.js.map +1 -1
- package/esm/series/line/constant.d.ts +2 -0
- package/esm/series/line/constant.js +6 -0
- package/esm/series/line/constant.js.map +1 -0
- package/esm/series/line/interface.d.ts +2 -2
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/line/line.d.ts +5 -4
- package/esm/series/line/line.js +8 -6
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/link/constant.d.ts +2 -0
- package/esm/series/link/constant.js +21 -0
- package/esm/series/link/constant.js.map +1 -0
- package/esm/series/link/link.d.ts +1 -1
- package/esm/series/link/link.js +4 -21
- package/esm/series/link/link.js.map +1 -1
- package/esm/series/map/constant.d.ts +2 -0
- package/esm/series/map/constant.js +13 -0
- package/esm/series/map/constant.js.map +1 -0
- package/esm/series/map/geo-source.js +3 -1
- package/esm/series/map/geo-source.js.map +1 -1
- package/esm/series/map/interface.d.ts +1 -0
- package/esm/series/map/interface.js.map +1 -1
- package/esm/series/map/map.d.ts +2 -3
- package/esm/series/map/map.js +13 -16
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/mixin/line-mixin.d.ts +6 -3
- package/esm/series/mixin/line-mixin.js +43 -23
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/pie/constant.d.ts +3 -0
- package/esm/series/pie/constant.js +28 -0
- package/esm/series/pie/constant.js.map +1 -0
- package/esm/series/pie/interface.d.ts +4 -7
- package/esm/series/pie/interface.js.map +1 -1
- package/esm/series/pie/pie-3d.d.ts +1 -1
- package/esm/series/pie/pie-3d.js +3 -12
- package/esm/series/pie/pie-3d.js.map +1 -1
- package/esm/series/pie/pie.d.ts +3 -1
- package/esm/series/pie/pie.js +26 -67
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/polar/interface.d.ts +1 -0
- package/esm/series/polar/interface.js.map +1 -1
- package/esm/series/polar/polar.d.ts +5 -0
- package/esm/series/polar/polar.js +17 -3
- package/esm/series/polar/polar.js.map +1 -1
- package/esm/series/progress/circular/circular.d.ts +1 -1
- package/esm/series/progress/circular/circular.js +3 -14
- package/esm/series/progress/circular/circular.js.map +1 -1
- package/esm/series/progress/circular/constant.d.ts +2 -0
- package/esm/series/progress/circular/constant.js +17 -0
- package/esm/series/progress/circular/constant.js.map +1 -0
- package/esm/series/progress/linear/constant.d.ts +2 -0
- package/esm/series/progress/linear/constant.js +21 -0
- package/esm/series/progress/linear/constant.js.map +1 -0
- package/esm/series/progress/linear/linear.d.ts +1 -1
- package/esm/series/progress/linear/linear.js +3 -18
- package/esm/series/progress/linear/linear.js.map +1 -1
- package/esm/series/radar/constant.d.ts +2 -0
- package/esm/series/radar/constant.js +15 -0
- package/esm/series/radar/constant.js.map +1 -0
- package/esm/series/radar/radar.d.ts +4 -2
- package/esm/series/radar/radar.js +8 -12
- package/esm/series/radar/radar.js.map +1 -1
- package/esm/series/range-area/constant.d.ts +2 -0
- package/esm/series/range-area/constant.js +4 -0
- package/esm/series/range-area/constant.js.map +1 -0
- package/esm/series/range-area/range-area.d.ts +4 -1
- package/esm/series/range-area/range-area.js +10 -4
- package/esm/series/range-area/range-area.js.map +1 -1
- package/esm/series/range-column/constant.d.ts +3 -0
- package/esm/series/range-column/constant.js +28 -0
- package/esm/series/range-column/constant.js.map +1 -0
- package/esm/series/range-column/range-column-3d.d.ts +5 -1
- package/esm/series/range-column/range-column-3d.js +3 -1
- package/esm/series/range-column/range-column-3d.js.map +1 -1
- package/esm/series/range-column/range-column.d.ts +2 -2
- package/esm/series/range-column/range-column.js +6 -13
- package/esm/series/range-column/range-column.js.map +1 -1
- package/esm/series/rose/constant.d.ts +2 -0
- package/esm/series/rose/constant.js +13 -0
- package/esm/series/rose/constant.js.map +1 -0
- package/esm/series/rose/interface.d.ts +3 -0
- package/esm/series/rose/interface.js.map +1 -1
- package/esm/series/rose/rose.d.ts +3 -3
- package/esm/series/rose/rose.js +23 -47
- package/esm/series/rose/rose.js.map +1 -1
- package/esm/series/sankey/constant.d.ts +2 -0
- package/esm/series/sankey/constant.js +17 -0
- package/esm/series/sankey/constant.js.map +1 -0
- package/esm/series/sankey/interface.d.ts +3 -2
- package/esm/series/sankey/interface.js.map +1 -1
- package/esm/series/sankey/sankey.d.ts +6 -2
- package/esm/series/sankey/sankey.js +251 -107
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/scatter/constant.d.ts +2 -0
- package/esm/series/scatter/constant.js +13 -0
- package/esm/series/scatter/constant.js.map +1 -0
- package/esm/series/scatter/interface.d.ts +3 -2
- package/esm/series/scatter/interface.js.map +1 -1
- package/esm/series/scatter/scatter.d.ts +4 -4
- package/esm/series/scatter/scatter.js +27 -25
- package/esm/series/scatter/scatter.js.map +1 -1
- package/esm/series/sunburst/constant.d.ts +2 -0
- package/esm/series/sunburst/constant.js +13 -0
- package/esm/series/sunburst/constant.js.map +1 -0
- package/esm/series/sunburst/sunburst.js +5 -9
- package/esm/series/sunburst/sunburst.js.map +1 -1
- package/esm/series/treemap/constant.d.ts +2 -0
- package/esm/series/treemap/constant.js +21 -0
- package/esm/series/treemap/constant.js.map +1 -0
- package/esm/series/treemap/treemap.d.ts +1 -1
- package/esm/series/treemap/treemap.js +10 -22
- package/esm/series/treemap/treemap.js.map +1 -1
- package/esm/series/util/utils.d.ts +4 -1
- package/esm/series/util/utils.js +6 -4
- package/esm/series/util/utils.js.map +1 -1
- package/esm/series/waterfall/constant.d.ts +2 -0
- package/esm/series/waterfall/constant.js +17 -0
- package/esm/series/waterfall/constant.js.map +1 -0
- package/esm/series/waterfall/waterfall.d.ts +2 -2
- package/esm/series/waterfall/waterfall.js +3 -12
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/esm/series/word-cloud/base.d.ts +1 -0
- package/esm/series/word-cloud/base.js +3 -12
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/series/word-cloud/constant.d.ts +2 -0
- package/esm/series/word-cloud/constant.js +17 -0
- package/esm/series/word-cloud/constant.js.map +1 -0
- package/esm/series/word-cloud/word-cloud-3d.d.ts +1 -1
- package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/esm/series/word-cloud/word-cloud.d.ts +1 -1
- package/esm/series/word-cloud/word-cloud.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
- package/esm/theme/builtin/common/component/axis/band-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js +22 -0
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/common-axis.js +92 -0
- package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/polar-axis.js +23 -0
- package/esm/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/brush.js.map +1 -0
- package/esm/theme/builtin/common/component/crosshair.js +104 -0
- package/esm/theme/builtin/common/component/crosshair.js.map +1 -0
- package/esm/theme/builtin/common/component/data-zoom.js +166 -0
- package/esm/theme/builtin/common/component/data-zoom.js.map +1 -0
- package/esm/theme/builtin/common/component/index.js +68 -0
- package/esm/theme/builtin/common/component/index.js.map +1 -0
- package/esm/theme/builtin/common/component/indicator.js +37 -0
- package/esm/theme/builtin/common/component/indicator.js.map +1 -0
- package/esm/theme/builtin/common/component/legend/color-legend.js +51 -0
- package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -0
- package/esm/theme/builtin/common/component/legend/continuous.js +68 -0
- package/esm/theme/builtin/common/component/legend/continuous.js.map +1 -0
- package/esm/theme/builtin/common/component/legend/discrete-legend.js +79 -0
- package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
- package/esm/theme/builtin/common/component/legend/size-legend.js +80 -0
- package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -0
- package/esm/theme/builtin/common/component/map-label.js +51 -0
- package/esm/theme/builtin/common/component/map-label.js.map +1 -0
- package/esm/theme/builtin/common/component/mark-area.js +39 -0
- package/esm/theme/builtin/common/component/mark-area.js.map +1 -0
- package/esm/theme/builtin/common/component/mark-line.js +61 -0
- package/esm/theme/builtin/common/component/mark-line.js.map +1 -0
- package/esm/theme/builtin/common/component/mark-point.js.map +1 -0
- package/esm/theme/builtin/common/component/player.js +89 -0
- package/esm/theme/builtin/common/component/player.js.map +1 -0
- package/esm/theme/builtin/common/component/poptip.d.ts +2 -0
- package/esm/theme/builtin/common/component/poptip.js +46 -0
- package/esm/theme/builtin/common/component/poptip.js.map +1 -0
- package/esm/theme/builtin/common/component/title.js +27 -0
- package/esm/theme/builtin/common/component/title.js.map +1 -0
- package/esm/theme/builtin/common/component/tooltip.js +81 -0
- package/esm/theme/builtin/common/component/tooltip.js.map +1 -0
- package/esm/theme/builtin/common/component/total-label.d.ts +2 -0
- package/esm/theme/builtin/common/component/total-label.js +21 -0
- package/esm/theme/builtin/common/component/total-label.js.map +1 -0
- package/esm/theme/builtin/common/constants.js +19 -0
- package/esm/theme/builtin/common/constants.js.map +1 -0
- package/esm/theme/builtin/common/mark.js +81 -0
- package/esm/theme/builtin/common/mark.js.map +1 -0
- package/esm/theme/builtin/common/series/area.js +17 -0
- package/esm/theme/builtin/common/series/area.js.map +1 -0
- package/esm/theme/builtin/common/series/bar.js +12 -0
- package/esm/theme/builtin/common/series/bar.js.map +1 -0
- package/esm/theme/builtin/common/series/bar3d.js +15 -0
- package/esm/theme/builtin/common/series/bar3d.js.map +1 -0
- package/esm/theme/builtin/common/series/box-plot.js.map +1 -0
- package/esm/theme/builtin/common/series/circle-packing.js +28 -0
- package/esm/theme/builtin/common/series/circle-packing.js.map +1 -0
- package/esm/theme/builtin/common/series/circular-progress.js.map +1 -0
- package/esm/theme/builtin/common/series/dot.js +34 -0
- package/esm/theme/builtin/common/series/dot.js.map +1 -0
- package/esm/theme/builtin/common/series/funnel.js +42 -0
- package/esm/theme/builtin/common/series/funnel.js.map +1 -0
- package/esm/theme/builtin/common/series/funnel3d.js +42 -0
- package/esm/theme/builtin/common/series/funnel3d.js.map +1 -0
- package/esm/theme/builtin/common/series/gauge-pointer.js.map +1 -0
- package/esm/theme/builtin/common/series/gauge.js.map +1 -0
- package/esm/theme/builtin/common/series/heatmap.js.map +1 -0
- package/esm/theme/builtin/common/series/index.js.map +1 -0
- package/esm/theme/builtin/common/series/line.js +17 -0
- package/esm/theme/builtin/common/series/line.js.map +1 -0
- package/esm/theme/builtin/common/series/linear-progress.js.map +1 -0
- package/esm/theme/builtin/common/series/link.js.map +1 -0
- package/esm/theme/builtin/common/series/map.js +28 -0
- package/esm/theme/builtin/common/series/map.js.map +1 -0
- package/esm/theme/builtin/common/series/pie.js +17 -0
- package/esm/theme/builtin/common/series/pie.js.map +1 -0
- package/esm/theme/builtin/common/series/pie3d.js +14 -0
- package/esm/theme/builtin/common/series/pie3d.js.map +1 -0
- package/esm/theme/builtin/common/series/radar.js +16 -0
- package/esm/theme/builtin/common/series/radar.js.map +1 -0
- package/esm/theme/builtin/common/series/rangeColumn.js +22 -0
- package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -0
- package/esm/theme/builtin/common/series/rose.js +14 -0
- package/esm/theme/builtin/common/series/rose.js.map +1 -0
- package/esm/theme/builtin/common/series/sankey.js +9 -0
- package/esm/theme/builtin/common/series/sankey.js.map +1 -0
- package/esm/theme/builtin/common/series/scatter.js +20 -0
- package/esm/theme/builtin/common/series/scatter.js.map +1 -0
- package/esm/theme/builtin/common/series/sunburst.js +40 -0
- package/esm/theme/builtin/common/series/sunburst.js.map +1 -0
- package/esm/theme/builtin/common/series/treemap.js +36 -0
- package/esm/theme/builtin/common/series/treemap.js.map +1 -0
- package/esm/theme/builtin/common/series/waterfall.js +32 -0
- package/esm/theme/builtin/common/series/waterfall.js.map +1 -0
- package/esm/theme/builtin/common/series/word-cloud.js.map +1 -0
- package/esm/theme/builtin/common/series/word-cloud3d.js.map +1 -0
- package/esm/theme/builtin/dark/color-scheme.d.ts +2 -0
- package/esm/theme/builtin/dark/color-scheme.js +29 -0
- package/esm/theme/builtin/dark/color-scheme.js.map +1 -0
- package/esm/theme/builtin/dark/index.d.ts +2 -0
- package/esm/theme/builtin/dark/index.js +7 -0
- package/esm/theme/builtin/dark/index.js.map +1 -0
- package/esm/theme/builtin/index.d.ts +4 -0
- package/esm/theme/builtin/index.js +10 -0
- package/esm/theme/builtin/index.js.map +1 -0
- package/esm/theme/builtin/light/color-scheme.d.ts +2 -0
- package/esm/theme/builtin/light/color-scheme.js +29 -0
- package/esm/theme/builtin/light/color-scheme.js.map +1 -0
- package/esm/theme/builtin/light/index.js +26 -0
- package/esm/theme/builtin/light/index.js.map +1 -0
- package/esm/theme/color-scheme/builtin/default.d.ts +2 -0
- package/esm/theme/color-scheme/builtin/default.js +7 -0
- package/esm/theme/color-scheme/builtin/default.js.map +1 -0
- package/esm/theme/color-scheme/builtin/interface.d.ts +22 -0
- package/esm/theme/color-scheme/builtin/interface.js +2 -0
- package/esm/theme/color-scheme/builtin/interface.js.map +1 -0
- package/esm/theme/color-scheme/interface.d.ts +3 -2
- package/esm/theme/color-scheme/interface.js.map +1 -1
- package/esm/theme/color-scheme/util.d.ts +2 -1
- package/esm/theme/color-scheme/util.js +14 -3
- package/esm/theme/color-scheme/util.js.map +1 -1
- package/esm/theme/index.d.ts +1 -1
- package/esm/theme/index.js +1 -1
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/interface.d.ts +18 -7
- package/esm/theme/interface.js.map +1 -1
- package/esm/theme/theme-manager.js +6 -6
- package/esm/theme/theme-manager.js.map +1 -1
- package/esm/typings/spec/common.d.ts +16 -4
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/tooltip/label.d.ts +10 -0
- package/esm/typings/tooltip/label.js +2 -0
- package/esm/typings/tooltip/label.js.map +1 -0
- package/esm/typings/tooltip/line.d.ts +3 -2
- package/esm/typings/tooltip/line.js.map +1 -1
- package/esm/typings/tooltip/shape.d.ts +2 -0
- package/esm/typings/tooltip/shape.js.map +1 -1
- package/esm/typings/visual.d.ts +11 -21
- package/esm/typings/visual.js.map +1 -1
- package/esm/util/data.d.ts +0 -8
- package/esm/util/data.js +1 -7
- package/esm/util/data.js.map +1 -1
- package/esm/util/object.d.ts +2 -4
- package/esm/util/object.js +2 -13
- package/esm/util/object.js.map +1 -1
- package/esm/util/scale.d.ts +2 -6
- package/esm/util/scale.js +1 -5
- package/esm/util/scale.js.map +1 -1
- package/esm/util/space.d.ts +4 -9
- package/esm/util/space.js +13 -26
- package/esm/util/space.js.map +1 -1
- package/esm/util/spec/background.d.ts +4 -0
- package/esm/util/spec/background.js +21 -0
- package/esm/util/spec/background.js.map +1 -0
- package/esm/util/spec/clone-deep.d.ts +1 -0
- package/esm/util/spec/clone-deep.js +20 -0
- package/esm/util/spec/clone-deep.js.map +1 -0
- package/esm/util/spec/common.d.ts +3 -0
- package/esm/util/spec/common.js +15 -0
- package/esm/util/spec/common.js.map +1 -0
- package/esm/util/spec/index.d.ts +7 -0
- package/esm/util/spec/index.js +14 -0
- package/esm/util/spec/index.js.map +1 -0
- package/esm/util/spec/merge-spec.d.ts +1 -0
- package/esm/util/spec/merge-spec.js +48 -0
- package/esm/util/spec/merge-spec.js.map +1 -0
- package/esm/util/spec/merge-theme.d.ts +3 -0
- package/esm/util/spec/merge-theme.js +34 -0
- package/esm/util/spec/merge-theme.js.map +1 -0
- package/esm/util/spec/preprocess.d.ts +3 -0
- package/esm/util/spec/preprocess.js +20 -0
- package/esm/util/spec/preprocess.js.map +1 -0
- package/esm/util/spec/transform.d.ts +3 -0
- package/esm/util/spec/transform.js +20 -0
- package/esm/util/spec/transform.js.map +1 -0
- package/esm/util/text.d.ts +1 -6
- package/esm/util/text.js +5 -19
- package/esm/util/text.js.map +1 -1
- package/esm/vchart-all.js +4 -4
- package/esm/vchart-all.js.map +1 -1
- package/esm/vchart-simple.js +18 -2
- package/esm/vchart-simple.js.map +1 -1
- package/package.json +21 -14
- package/cjs/component/axis/utils.d.ts +0 -28
- package/cjs/component/axis/utils.js +0 -71
- package/cjs/component/axis/utils.js.map +0 -1
- package/cjs/plugin/components/axis-label-overlap-plugin.d.ts +0 -10
- package/cjs/plugin/components/axis-label-overlap-plugin.js +0 -75
- package/cjs/plugin/components/axis-label-overlap-plugin.js.map +0 -1
- package/cjs/theme/buildin-theme/config.d.ts +0 -2
- package/cjs/theme/buildin-theme/config.js +0 -8
- package/cjs/theme/buildin-theme/config.js.map +0 -1
- package/cjs/theme/buildin-theme/index.d.ts +0 -5
- package/cjs/theme/buildin-theme/index.js +0 -27
- package/cjs/theme/buildin-theme/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/color-scheme.js +0 -21
- package/cjs/theme/buildin-theme/light/color-scheme.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
- package/cjs/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/cartesian-axis.js +0 -24
- package/cjs/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/common-axis.js +0 -92
- package/cjs/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/log-axis.d.ts +0 -2
- package/cjs/theme/buildin-theme/light/component/axis/log-axis.js +0 -22
- package/cjs/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js +0 -25
- package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/brush.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/crosshair.js +0 -140
- package/cjs/theme/buildin-theme/light/component/crosshair.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/data-zoom.js +0 -105
- package/cjs/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/index.js +0 -33
- package/cjs/theme/buildin-theme/light/component/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/indicator.js +0 -31
- package/cjs/theme/buildin-theme/light/component/indicator.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/color-legend.js +0 -29
- package/cjs/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/continuous.js +0 -60
- package/cjs/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.js +0 -69
- package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/size-legend.js +0 -45
- package/cjs/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/map-label.js +0 -57
- package/cjs/theme/buildin-theme/light/component/map-label.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/mark-area.js +0 -34
- package/cjs/theme/buildin-theme/light/component/mark-area.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/mark-line.js +0 -56
- package/cjs/theme/buildin-theme/light/component/mark-line.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/mark-point.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/player.js +0 -64
- package/cjs/theme/buildin-theme/light/component/player.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/poptip.d.ts +0 -2
- package/cjs/theme/buildin-theme/light/component/poptip.js +0 -32
- package/cjs/theme/buildin-theme/light/component/poptip.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/title.js +0 -29
- package/cjs/theme/buildin-theme/light/component/title.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/tooltip.js +0 -65
- package/cjs/theme/buildin-theme/light/component/tooltip.js.map +0 -1
- package/cjs/theme/buildin-theme/light/constants.js +0 -16
- package/cjs/theme/buildin-theme/light/constants.js.map +0 -1
- package/cjs/theme/buildin-theme/light/index.js +0 -20
- package/cjs/theme/buildin-theme/light/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/mark.js +0 -72
- package/cjs/theme/buildin-theme/light/mark.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/area.js +0 -26
- package/cjs/theme/buildin-theme/light/series/area.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/bar.js +0 -21
- package/cjs/theme/buildin-theme/light/series/bar.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/bar3d.js +0 -24
- package/cjs/theme/buildin-theme/light/series/bar3d.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/box-plot.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/circle-packing.js +0 -22
- package/cjs/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/dot.js +0 -32
- package/cjs/theme/buildin-theme/light/series/dot.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/funnel.js +0 -45
- package/cjs/theme/buildin-theme/light/series/funnel.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/funnel3d.js +0 -45
- package/cjs/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/gauge.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/heatmap.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/line.js +0 -26
- package/cjs/theme/buildin-theme/light/series/line.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/link.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/map.js +0 -32
- package/cjs/theme/buildin-theme/light/series/map.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/pie.js +0 -26
- package/cjs/theme/buildin-theme/light/series/pie.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/pie3d.js +0 -25
- package/cjs/theme/buildin-theme/light/series/pie3d.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/radar.js +0 -25
- package/cjs/theme/buildin-theme/light/series/radar.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/rangeColumn.js +0 -26
- package/cjs/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/rose.js +0 -20
- package/cjs/theme/buildin-theme/light/series/rose.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/sankey.js +0 -14
- package/cjs/theme/buildin-theme/light/series/sankey.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/scatter.js +0 -29
- package/cjs/theme/buildin-theme/light/series/scatter.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/sunburst.js +0 -35
- package/cjs/theme/buildin-theme/light/series/sunburst.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/treemap.js +0 -38
- package/cjs/theme/buildin-theme/light/series/treemap.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/waterfall.js +0 -39
- package/cjs/theme/buildin-theme/light/series/waterfall.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
- package/cjs/util/spec.d.ts +0 -11
- package/cjs/util/spec.js +0 -80
- package/cjs/util/spec.js.map +0 -1
- package/esm/component/axis/utils.d.ts +0 -28
- package/esm/component/axis/utils.js +0 -61
- package/esm/component/axis/utils.js.map +0 -1
- package/esm/plugin/components/axis-label-overlap-plugin.d.ts +0 -10
- package/esm/plugin/components/axis-label-overlap-plugin.js +0 -72
- package/esm/plugin/components/axis-label-overlap-plugin.js.map +0 -1
- package/esm/theme/buildin-theme/config.d.ts +0 -2
- package/esm/theme/buildin-theme/config.js +0 -4
- package/esm/theme/buildin-theme/config.js.map +0 -1
- package/esm/theme/buildin-theme/index.d.ts +0 -5
- package/esm/theme/buildin-theme/index.js +0 -10
- package/esm/theme/buildin-theme/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/color-scheme.js +0 -17
- package/esm/theme/buildin-theme/light/color-scheme.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
- package/esm/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/cartesian-axis.js +0 -22
- package/esm/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/common-axis.js +0 -86
- package/esm/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/log-axis.d.ts +0 -2
- package/esm/theme/buildin-theme/light/component/axis/log-axis.js +0 -18
- package/esm/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/polar-axis.js +0 -23
- package/esm/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/brush.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/crosshair.js +0 -136
- package/esm/theme/buildin-theme/light/component/crosshair.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/data-zoom.js +0 -101
- package/esm/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/index.js +0 -65
- package/esm/theme/buildin-theme/light/component/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/indicator.js +0 -27
- package/esm/theme/buildin-theme/light/component/indicator.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/color-legend.js +0 -23
- package/esm/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/continuous.js +0 -54
- package/esm/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/discrete-legend.js +0 -63
- package/esm/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/size-legend.js +0 -39
- package/esm/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/map-label.js +0 -53
- package/esm/theme/buildin-theme/light/component/map-label.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/mark-area.js +0 -30
- package/esm/theme/buildin-theme/light/component/mark-area.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/mark-line.js +0 -52
- package/esm/theme/buildin-theme/light/component/mark-line.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/mark-point.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/player.js +0 -60
- package/esm/theme/buildin-theme/light/component/player.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/poptip.d.ts +0 -2
- package/esm/theme/buildin-theme/light/component/poptip.js +0 -28
- package/esm/theme/buildin-theme/light/component/poptip.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/title.js +0 -23
- package/esm/theme/buildin-theme/light/component/title.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/tooltip.js +0 -61
- package/esm/theme/buildin-theme/light/component/tooltip.js.map +0 -1
- package/esm/theme/buildin-theme/light/constants.js +0 -10
- package/esm/theme/buildin-theme/light/constants.js.map +0 -1
- package/esm/theme/buildin-theme/light/index.js +0 -22
- package/esm/theme/buildin-theme/light/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/mark.js +0 -68
- package/esm/theme/buildin-theme/light/mark.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/area.js +0 -20
- package/esm/theme/buildin-theme/light/series/area.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/bar.js +0 -15
- package/esm/theme/buildin-theme/light/series/bar.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/bar3d.js +0 -18
- package/esm/theme/buildin-theme/light/series/bar3d.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/box-plot.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/circle-packing.js +0 -18
- package/esm/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/dot.js +0 -28
- package/esm/theme/buildin-theme/light/series/dot.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/funnel.js +0 -41
- package/esm/theme/buildin-theme/light/series/funnel.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/funnel3d.js +0 -41
- package/esm/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/gauge.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/heatmap.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/line.js +0 -20
- package/esm/theme/buildin-theme/light/series/line.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/link.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/map.js +0 -26
- package/esm/theme/buildin-theme/light/series/map.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/pie.js +0 -20
- package/esm/theme/buildin-theme/light/series/pie.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/pie3d.js +0 -19
- package/esm/theme/buildin-theme/light/series/pie3d.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/radar.js +0 -19
- package/esm/theme/buildin-theme/light/series/radar.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/rangeColumn.js +0 -22
- package/esm/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/rose.js +0 -16
- package/esm/theme/buildin-theme/light/series/rose.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/sankey.js +0 -10
- package/esm/theme/buildin-theme/light/series/sankey.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/scatter.js +0 -23
- package/esm/theme/buildin-theme/light/series/scatter.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/sunburst.js +0 -29
- package/esm/theme/buildin-theme/light/series/sunburst.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/treemap.js +0 -34
- package/esm/theme/buildin-theme/light/series/treemap.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/waterfall.js +0 -35
- package/esm/theme/buildin-theme/light/series/waterfall.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
- package/esm/util/spec.d.ts +0 -11
- package/esm/util/spec.js +0 -72
- package/esm/util/spec.js.map +0 -1
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/dark}/color-scheme.d.ts +0 -0
- /package/{esm/theme/buildin-theme → cjs/theme/builtin}/light/color-scheme.d.ts +0 -0
- /package/cjs/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
- /package/esm/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { merge } from "@visactor/vutils";
|
|
2
|
-
|
|
3
1
|
import { defaultH2Style } from "./style-constants";
|
|
4
2
|
|
|
5
3
|
import { BaseTooltipModel } from "./base-tooltip-model";
|
|
@@ -8,6 +6,8 @@ import { ShapeModel } from "./shape-model";
|
|
|
8
6
|
|
|
9
7
|
import { TextModel } from "./text-model";
|
|
10
8
|
|
|
9
|
+
import { mergeSpec } from "../../../../../util";
|
|
10
|
+
|
|
11
11
|
export class TitleModel extends BaseTooltipModel {
|
|
12
12
|
init() {
|
|
13
13
|
const tooltipActual = this._option.getTooltipActual();
|
|
@@ -31,12 +31,12 @@ export class TitleModel extends BaseTooltipModel {
|
|
|
31
31
|
setStyle(style) {
|
|
32
32
|
var _a, _b, _c;
|
|
33
33
|
const tooltipStyle = this._option.getTooltipStyle(), tooltipActual = this._option.getTooltipActual(), {title: title} = tooltipActual;
|
|
34
|
-
super.setStyle(
|
|
35
|
-
paddingRight: null === (_b = tooltipStyle.shapeColumn.
|
|
34
|
+
super.setStyle(mergeSpec({}, defaultH2Style, tooltipStyle.title, style)), null === (_a = this.shape) || void 0 === _a || _a.setStyle({
|
|
35
|
+
paddingRight: null === (_b = tooltipStyle.shapeColumn.common) || void 0 === _b ? void 0 : _b.marginRight
|
|
36
36
|
}, {
|
|
37
37
|
hasShape: null == title ? void 0 : title.hasShape,
|
|
38
38
|
shapeType: null == title ? void 0 : title.shapeType,
|
|
39
|
-
size: null === (_c = tooltipStyle.shapeColumn.
|
|
39
|
+
size: null === (_c = tooltipStyle.shapeColumn.common) || void 0 === _c ? void 0 : _c.width,
|
|
40
40
|
color: null == title ? void 0 : title.shapeColor,
|
|
41
41
|
hollow: null == title ? void 0 : title.shapeHollow
|
|
42
42
|
});
|
|
@@ -47,7 +47,7 @@ export class TitleModel extends BaseTooltipModel {
|
|
|
47
47
|
this.init(), null === (_a = this.shape) || void 0 === _a || _a.setStyle(void 0, {
|
|
48
48
|
hasShape: null == title ? void 0 : title.hasShape,
|
|
49
49
|
shapeType: null == title ? void 0 : title.shapeType,
|
|
50
|
-
size: null === (_b = tooltipStyle.shapeColumn.
|
|
50
|
+
size: null === (_b = tooltipStyle.shapeColumn.common) || void 0 === _b ? void 0 : _b.width,
|
|
51
51
|
color: null == title ? void 0 : title.shapeColor,
|
|
52
52
|
hollow: null == title ? void 0 : title.shapeHollow
|
|
53
53
|
}), null === (_c = this.textSpan) || void 0 === _c || _c.setContent(null == title ? void 0 : title.value, null === (_e = null === (_d = tooltipAttributes.title) || void 0 === _d ? void 0 : _d.value) || void 0 === _e ? void 0 : _e.multiLine);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/component/tooltip/handler/dom/model/title-model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/component/tooltip/handler/dom/model/title-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,OAAO,UAAW,SAAQ,gBAAgB;IAI9C,IAAI;QACF,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAEtD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SACzC;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC;QAChC,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,MAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,CAAA,EAAE;YACvC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;gBACf,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;SACF;aAAM,IAAI,IAAI,CAAC,KAAK,EAAE;YACrB,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;QAED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E,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EAAE,MAAA,MAAA,iBAAiB,CAAC,KAAK,0CAAE,KAAK,0CAAE,SAAS,CAAC,CAAC;IACrF,CAAC;IAED,OAAO;QACL,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CACF","file":"title-model.js","sourcesContent":["import type { Maybe } from '@visactor/vutils';\nimport { defaultH2Style } from './style-constants';\nimport { BaseTooltipModel } from './base-tooltip-model';\nimport { ShapeModel } from './shape-model';\nimport { TextModel } from './text-model';\nimport { mergeSpec } from '../../../../../util';\n\nexport class TitleModel extends BaseTooltipModel {\n shape: Maybe<ShapeModel>;\n textSpan: Maybe<TextModel>;\n\n init(): void {\n const tooltipActual = this._option.getTooltipActual();\n\n if (!this.product) {\n this.product = this.createElement('h2');\n }\n\n const { title } = tooltipActual;\n if (title?.hasShape && title?.shapeType) {\n if (!this.shape) {\n this._initShape();\n }\n } else if (this.shape) {\n this._releaseShape();\n }\n\n if (!this.textSpan) {\n this._initTextSpan();\n }\n }\n\n private _initShape() {\n const shape = new ShapeModel(this.product!, this._option, 0);\n shape.init();\n this.shape = shape;\n this.children[shape.childIndex] = shape;\n }\n\n private _releaseShape() {\n if (!this.shape) {\n return;\n }\n this.shape.release();\n delete this.children[this.shape.childIndex];\n this.shape = null;\n }\n\n private _initTextSpan() {\n const textSpan = new TextModel(this.product!, this._option, 1);\n textSpan.init();\n this.textSpan = textSpan;\n this.children[textSpan.childIndex] = textSpan;\n }\n\n setStyle(style?: Partial<CSSStyleDeclaration>): void {\n const tooltipStyle = this._option.getTooltipStyle();\n const tooltipActual = this._option.getTooltipActual();\n\n const { title } = tooltipActual;\n super.setStyle(mergeSpec({}, defaultH2Style, tooltipStyle.title, style));\n\n this.shape?.setStyle(\n {\n paddingRight: tooltipStyle.shapeColumn.common?.marginRight\n },\n {\n hasShape: title?.hasShape,\n shapeType: title?.shapeType,\n size: tooltipStyle.shapeColumn.common?.width,\n color: title?.shapeColor,\n hollow: title?.shapeHollow\n }\n );\n }\n\n setContent(): void {\n const tooltipStyle = this._option.getTooltipStyle();\n const tooltipActual = this._option.getTooltipActual();\n const tooltipAttributes = this._option.getTooltipAttributes();\n\n const { title } = tooltipActual;\n this.init();\n this.shape?.setStyle(undefined, {\n hasShape: title?.hasShape,\n shapeType: title?.shapeType,\n size: tooltipStyle.shapeColumn.common?.width,\n color: title?.shapeColor,\n hollow: title?.shapeHollow\n });\n this.textSpan?.setContent(title?.value, tooltipAttributes.title?.value?.multiLine);\n }\n\n release(): void {\n super.release();\n this.shape = null;\n this.textSpan = null;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isValid
|
|
1
|
+
import { isValid } from "@visactor/vutils";
|
|
2
2
|
|
|
3
3
|
import { BaseTooltipModel } from "./base-tooltip-model";
|
|
4
4
|
|
|
@@ -8,6 +8,8 @@ import { TitleModel } from "./title-model";
|
|
|
8
8
|
|
|
9
9
|
import { defaultContainerStyle } from "./style-constants";
|
|
10
10
|
|
|
11
|
+
import { mergeSpec } from "../../../../../util";
|
|
12
|
+
|
|
11
13
|
export class TooltipModel extends BaseTooltipModel {
|
|
12
14
|
constructor(parent, option, classList, id) {
|
|
13
15
|
super(parent, option, 0), this.title = null, this.content = null, this._classList = classList,
|
|
@@ -64,7 +66,7 @@ export class TooltipModel extends BaseTooltipModel {
|
|
|
64
66
|
}
|
|
65
67
|
setStyle() {
|
|
66
68
|
const tooltipStyle = this._option.getTooltipStyle();
|
|
67
|
-
super.setStyle(
|
|
69
|
+
super.setStyle(mergeSpec({}, defaultContainerStyle, tooltipStyle.panel)), Object.values(this.children).forEach(((c, i) => {
|
|
68
70
|
c.setStyle(i > 0 ? {
|
|
69
71
|
marginTop: tooltipStyle.spaceRow
|
|
70
72
|
} : {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/component/tooltip/handler/dom/model/tooltip-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/component/tooltip/handler/dom/model/tooltip-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,OAAO,YAAa,SAAQ,gBAAgB;IAOhD,YAAY,MAAsC,EAAE,MAA2B,EAAE,SAAmB,EAAE,EAAU;QAC9G,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAP3B,UAAK,GAAsB,IAAI,CAAC;QAChC,YAAO,GAAwB,IAAI,CAAC;QAOlC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,CAAC;IAED,aAAa,CAAC,UAAmB;QAC/B,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,OAAO;SACR;QACD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACnC,IAAI,UAAU,EAAE;YACd,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SAC1B;aAAM;YACL,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SAC7B;IACH,CAAC;IAED,IAAI;;QACF,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,C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I,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;QAEpD,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,EAAE,qBAAqB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;QACzE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC5C,CAAC,CAAC,QAAQ,CACR,CAAC,GAAG,CAAC;gBACH,CAAC,CAAC;oBACE,SAAS,EAAE,YAAY,CAAC,QAAQ;iBACjC;gBACH,CAAC,CAAC;oBACE,SAAS,EAAE,KAAK;iBACjB,CACN,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,UAAU;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACvC,CAAC,CAAC,UAAU,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;CACF","file":"tooltip-model.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport { BaseTooltipModel } from './base-tooltip-model';\nimport { ContentModel } from './content-model';\nimport type { ITooltipModelOption } from './interface';\nimport { TitleModel } from './title-model';\nimport { defaultContainerStyle } from './style-constants';\nimport { mergeSpec } from '../../../../../util';\n\nexport class TooltipModel extends BaseTooltipModel {\n title: TitleModel | null = null;\n content: ContentModel | null = null;\n\n private _classList: string[];\n private _id: string;\n\n constructor(parent: BaseTooltipModel | HTMLElement, option: ITooltipModelOption, classList: string[], id: string) {\n super(parent, option, 0);\n this._classList = classList;\n this._id = id;\n }\n\n setVisibility(visibility: boolean) {\n super.setVisibility(visibility);\n if (!this.product) {\n return;\n }\n const { classList } = this.product;\n if (visibility) {\n classList.add('visible');\n } else {\n classList.remove('visible');\n }\n }\n\n init(): void {\n const tooltipActual = this._option.getTooltipActual();\n\n if (!this.product) {\n this._initPanel(this._classList, this._id);\n }\n\n const { title } = tooltipActual;\n if (title?.visible !== false && isValid(title?.value)) {\n if (!this.title) {\n this._initTitle();\n }\n } else if (this.title) {\n this._releaseTitle();\n }\n\n const renderContent = tooltipActual.content ?? [];\n if (renderContent.length > 0) {\n if (!this.content) {\n this._initContent();\n }\n } else if (this.content) {\n this._releaseContent();\n }\n }\n\n private _initPanel(classList?: string[], id?: string) {\n const panel = this.createElement(\n 'div',\n classList,\n {\n left: '0',\n top: '0',\n pointerEvents: 'none',\n padding: '12px',\n position: 'absolute',\n zIndex: '99999999999999',\n fontFamily: 'sans-serif',\n fontSize: '11px',\n borderRadius: '3px',\n borderStyle: 'solid',\n lineHeight: 'initial',\n background: '#fff',\n boxShadow: '2px 2px 4px rgba(0, 0, 0, 0.1)',\n maxWidth: '100wh',\n maxHeight: '100vh'\n },\n id\n );\n this.product = panel;\n }\n\n private _initTitle() {\n const title = new TitleModel(this.product!, this._option, 0);\n title.init();\n this.title = title;\n this.children[title.childIndex] = title;\n }\n\n private _releaseTitle() {\n if (!this.title) {\n return;\n }\n this.title.release();\n delete this.children[this.title.childIndex];\n this.title = null;\n }\n\n private _initContent() {\n const content = new ContentModel(this.product!, this._option, 1);\n content.init();\n this.content = content;\n this.children[content.childIndex] = content;\n }\n\n private _releaseContent() {\n if (!this.content) {\n return;\n }\n this.content.release();\n delete this.children[this.content.childIndex];\n this.content = null;\n }\n\n setStyle(): void {\n const tooltipStyle = this._option.getTooltipStyle();\n\n super.setStyle(mergeSpec({}, defaultContainerStyle, tooltipStyle.panel));\n Object.values(this.children).forEach((c, i) => {\n c.setStyle(\n i > 0\n ? {\n marginTop: tooltipStyle.spaceRow\n }\n : {\n marginTop: '0px'\n }\n );\n });\n }\n\n setContent() {\n Object.values(this.children).forEach(c => {\n c.setContent();\n });\n }\n\n release(): void {\n super.release();\n this.title = null;\n this.content = null;\n }\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isValid,
|
|
1
|
+
import { isValid, mergeSpec, isArray } from "../../../../util";
|
|
2
2
|
|
|
3
3
|
const DEFAULT_SHAPE_SPACING = 8, DEFAULT_KEY_SPACING = 26, DEFAULT_VALUE_SPACING = 0;
|
|
4
4
|
|
|
5
5
|
export const getPixelPropertyStr = (num, defaultStr) => isValid(num) ? isArray(num) ? num.map((n => `${n}px`)).join(" ") : `${num}px` : null != defaultStr ? defaultStr : "initial";
|
|
6
6
|
|
|
7
7
|
export function getDomStyles(style, attributeCache) {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
9
|
-
const {panel: {fill: fillColor, shadow: shadow, shadowBlur: shadowBlur, shadowColor: shadowColor, shadowOffsetX: shadowOffsetX, shadowOffsetY: shadowOffsetY, shadowSpread: shadowSpread, cornerRadius: cornerRadius, stroke: strokeColor, lineWidth: lineWidth = 0}, padding: padding, key: key, value: value, title: title, shape: shape, enterable: enterable, spaceRow: spaceRow, transitionDuration: transitionDuration} = style, backgroundColor = fillColor, styles = {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
9
|
+
const {panel: {fill: fillColor, shadow: shadow, shadowBlur: shadowBlur, shadowColor: shadowColor, shadowOffsetX: shadowOffsetX, shadowOffsetY: shadowOffsetY, shadowSpread: shadowSpread, cornerRadius: cornerRadius, stroke: strokeColor, lineWidth: lineWidth = 0}, padding: padding, key: key, value: value, title: title, shape: shape, enterable: enterable, spaceRow: spaceRow, transitionDuration: transitionDuration} = style, backgroundColor = fillColor, shapeStyle = getShapeStyle(shape), keyStyle = getLabelStyle(key), valueStyle = getLabelStyle(value), styles = {
|
|
10
10
|
panel: {
|
|
11
11
|
width: getPixelPropertyStr((null !== (_b = null === (_a = null == attributeCache ? void 0 : attributeCache.panel) || void 0 === _a ? void 0 : _a.width) && void 0 !== _b ? _b : 0) + 2 * lineWidth),
|
|
12
12
|
minHeight: getPixelPropertyStr((null !== (_d = null === (_c = null == attributeCache ? void 0 : attributeCache.panel) || void 0 === _c ? void 0 : _c.height) && void 0 !== _d ? _d : 0) + 2 * lineWidth),
|
|
@@ -24,31 +24,38 @@ export function getDomStyles(style, attributeCache) {
|
|
|
24
24
|
transitionProperty: transitionDuration ? "transform" : "initial",
|
|
25
25
|
transitionTimingFunction: transitionDuration ? "ease-out" : "initial"
|
|
26
26
|
},
|
|
27
|
-
title: getLabelStyle(title),
|
|
27
|
+
title: getLabelStyle(mergeSpec({}, title, null === (_e = null == attributeCache ? void 0 : attributeCache.title) || void 0 === _e ? void 0 : _e.value)),
|
|
28
28
|
content: {},
|
|
29
29
|
shapeColumn: {
|
|
30
|
-
|
|
30
|
+
common: shapeStyle,
|
|
31
|
+
items: [],
|
|
31
32
|
width: getPixelPropertyStr(shape.size),
|
|
32
|
-
marginRight: getPixelPropertyStr(null !== (
|
|
33
|
+
marginRight: getPixelPropertyStr(null !== (_f = shape.spacing) && void 0 !== _f ? _f : 8)
|
|
33
34
|
},
|
|
34
35
|
keyColumn: {
|
|
35
|
-
|
|
36
|
+
common: keyStyle,
|
|
37
|
+
items: null === (_g = null == attributeCache ? void 0 : attributeCache.content) || void 0 === _g ? void 0 : _g.map((({key: key}) => Object.assign(Object.assign(Object.assign({}, keyStyle), getLabelStyle(key)), (null == key ? void 0 : key.multiLine) ? {
|
|
38
|
+
width: getPixelPropertyStr(Math.ceil(key.width))
|
|
39
|
+
} : void 0))),
|
|
36
40
|
width: getPixelPropertyStr(null == attributeCache ? void 0 : attributeCache.keyWidth),
|
|
37
|
-
marginRight: getPixelPropertyStr(null !== (
|
|
41
|
+
marginRight: getPixelPropertyStr(null !== (_h = key.spacing) && void 0 !== _h ? _h : 26)
|
|
38
42
|
},
|
|
39
43
|
valueColumn: {
|
|
40
|
-
|
|
44
|
+
common: valueStyle,
|
|
45
|
+
items: null === (_j = null == attributeCache ? void 0 : attributeCache.content) || void 0 === _j ? void 0 : _j.map((({value: value}) => Object.assign(Object.assign(Object.assign({}, valueStyle), getLabelStyle(value)), (null == value ? void 0 : value.multiLine) ? {
|
|
46
|
+
width: getPixelPropertyStr(Math.ceil(value.width))
|
|
47
|
+
} : void 0))),
|
|
41
48
|
width: getPixelPropertyStr(null == attributeCache ? void 0 : attributeCache.valueWidth),
|
|
42
|
-
marginRight: getPixelPropertyStr(null !== (
|
|
49
|
+
marginRight: getPixelPropertyStr(null !== (_k = value.spacing) && void 0 !== _k ? _k : 0)
|
|
43
50
|
},
|
|
44
51
|
spaceRow: getPixelPropertyStr(spaceRow)
|
|
45
52
|
};
|
|
46
53
|
if (isValid(spaceRow)) {
|
|
47
54
|
const gapUnit = spaceRow / 2;
|
|
48
|
-
[ styles.shapeColumn.
|
|
55
|
+
[ styles.shapeColumn.common, styles.keyColumn.common, styles.valueColumn.common ].forEach((obj => {
|
|
49
56
|
obj.marginTop = getPixelPropertyStr(gapUnit), obj.marginBottom = obj.marginTop;
|
|
50
57
|
})), styles.content.marginTop = getPixelPropertyStr(-gapUnit), styles.content.marginBottom = styles.content.marginTop;
|
|
51
|
-
} else [ styles.content, styles.shapeColumn.
|
|
58
|
+
} else [ styles.content, styles.shapeColumn.common, styles.keyColumn.common, styles.valueColumn.common ].forEach((obj => {
|
|
52
59
|
obj.marginTop = "initial", obj.marginBottom = "initial";
|
|
53
60
|
}));
|
|
54
61
|
return styles;
|
|
@@ -56,7 +63,7 @@ export function getDomStyles(style, attributeCache) {
|
|
|
56
63
|
|
|
57
64
|
function getLabelStyle(labelStyle, defaultStyle) {
|
|
58
65
|
if (!labelStyle) return;
|
|
59
|
-
const {fontFamily: labelFont, fontSize: labelFontSize, fill: labelColor, textAlign: textAlign, lineHeight: lineHeight, fontWeight: fontWeight, multiLine: multiLine, wordBreak: wordBreak, maxWidth: maxWidth} =
|
|
66
|
+
const {fontFamily: labelFont, fontSize: labelFontSize, fill: labelColor, textAlign: textAlign, lineHeight: lineHeight, fontWeight: fontWeight, multiLine: multiLine, wordBreak: wordBreak, maxWidth: maxWidth} = mergeSpec({}, defaultStyle, labelStyle), styleObj = {};
|
|
60
67
|
return styleObj.fontFamily = labelFont, styleObj.fontSize = getPixelPropertyStr(labelFontSize),
|
|
61
68
|
styleObj.color = labelColor, styleObj.textAlign = textAlign, styleObj.lineHeight = getPixelPropertyStr(lineHeight),
|
|
62
69
|
styleObj.fontWeight = fontWeight, styleObj.whiteSpace = multiLine ? "initial" : "nowrap",
|
|
@@ -66,7 +73,7 @@ function getLabelStyle(labelStyle, defaultStyle) {
|
|
|
66
73
|
|
|
67
74
|
function getShapeStyle(shapeStyle, defaultStyle) {
|
|
68
75
|
if (!shapeStyle) return;
|
|
69
|
-
const {size: size} =
|
|
76
|
+
const {size: size} = mergeSpec({}, defaultStyle, shapeStyle), styleObj = {};
|
|
70
77
|
return styleObj.width = getPixelPropertyStr(size), styleObj;
|
|
71
78
|
}
|
|
72
79
|
//# sourceMappingURL=util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/component/tooltip/handler/dom/util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAM3D,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAuB,EAAE,UAAmB,EAAE,EAAE;IAClF,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;QAChB,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;YAChB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzC;QACD,OAAO,GAAG,GAAG,IAAI,C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AAsB,CAAC;IAC7D,MAAM,QAAQ,GAAgB,EAAE,CAAC;IAEjC,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,QAAQ,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACvD,QAAQ,CAAC,KAAK,GAAG,UAAoB,CAAC;IACtC,QAAQ,CAAC,SAAS,GAAG,SAAsB,CAAC;IAC5C,QAAQ,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACtD,QAAQ,CAAC,UAAU,GAAG,UAAwB,CAAC;IAC/C,QAAQ,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvD,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,aAAa,CACpB,UAAmC,EACnC,YAA8C;IAE9C,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,EAAE,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAgB,EAAE,CAAC;IAEjC,QAAQ,CAAC,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,QAAQ,CAAC;AAClB,CAAC","file":"util.js","sourcesContent":["import type { Maybe } from '@visactor/vutils';\nimport type { FontWeight, TextAlign } from '../../../../typings';\nimport { isValid, merge, isArray } from '../../../../util';\nimport type { ITooltipTheme } from '../../interface';\nimport type { ITooltipTextStyle, ITooltipStyle } from '../interface';\nimport type { ILabelStyle, IMargin, IShapeStyle, IDomTooltipStyle } from './interface';\nimport type { TooltipAttributes } from '@visactor/vrender-components';\n\nconst DEFAULT_SHAPE_SPACING = 8;\nconst DEFAULT_KEY_SPACING = 26;\nconst DEFAULT_VALUE_SPACING = 0;\n\nexport const getPixelPropertyStr = (num?: number | number[], defaultStr?: string) => {\n if (isValid(num)) {\n if (isArray(num)) {\n return num.map(n => `${n}px`).join(' ');\n }\n return `${num}px`;\n }\n return defaultStr ?? 'initial';\n};\n\nexport function getDomStyles(style: ITooltipStyle, attributeCache?: Maybe<TooltipAttributes>): IDomTooltipStyle {\n const {\n panel: {\n fill: fillColor,\n shadow,\n shadowBlur,\n shadowColor,\n shadowOffsetX,\n shadowOffsetY,\n shadowSpread,\n cornerRadius,\n stroke: strokeColor,\n lineWidth = 0\n },\n padding,\n key,\n value,\n title,\n shape,\n enterable,\n spaceRow,\n transitionDuration\n } = style;\n\n const backgroundColor = fillColor as string;\n\n const styles = {\n panel: {\n width: getPixelPropertyStr((attributeCache?.panel?.width ?? 0) + lineWidth * 2),\n minHeight: getPixelPropertyStr((attributeCache?.panel?.height ?? 0) + lineWidth * 2),\n paddingBottom: getPixelPropertyStr(padding.bottom),\n paddingLeft: getPixelPropertyStr(padding.left),\n paddingRight: getPixelPropertyStr(padding.right),\n paddingTop: getPixelPropertyStr(padding.top),\n borderColor: strokeColor,\n borderWidth: getPixelPropertyStr(lineWidth),\n borderRadius: getPixelPropertyStr(cornerRadius),\n backgroundColor: backgroundColor ? `${backgroundColor}` : 'transparent',\n boxShadow: shadow\n ? `${shadowOffsetX}px ${shadowOffsetY}px ${shadowBlur}px ${shadowSpread}px ${shadowColor}`\n : 'initial',\n pointerEvents: enterable ? 'auto' : 'none',\n transitionDuration: transitionDuration ? `${transitionDuration}ms` : 'initial',\n transitionProperty: transitionDuration ? 'transform' : 'initial',\n transitionTimingFunction: transitionDuration ? 'ease-out' : 'initial'\n },\n title: getLabelStyle(title),\n content: {},\n shapeColumn: {\n item: getShapeStyle(shape),\n width: getPixelPropertyStr(shape.size),\n marginRight: getPixelPropertyStr(shape.spacing ?? DEFAULT_SHAPE_SPACING)\n },\n keyColumn: {\n item: getLabelStyle(key),\n width: getPixelPropertyStr(attributeCache?.keyWidth),\n marginRight: getPixelPropertyStr(key.spacing ?? DEFAULT_KEY_SPACING)\n },\n valueColumn: {\n item: getLabelStyle(value),\n width: getPixelPropertyStr(attributeCache?.valueWidth),\n marginRight: getPixelPropertyStr(value.spacing ?? DEFAULT_VALUE_SPACING)\n },\n spaceRow: getPixelPropertyStr(spaceRow)\n } as IDomTooltipStyle;\n\n if (isValid(spaceRow)) {\n const gapUnit = spaceRow / 2;\n ([styles.shapeColumn.item, styles.keyColumn.item, styles.valueColumn.item] as IMargin[]).forEach(obj => {\n obj.marginTop = getPixelPropertyStr(gapUnit);\n obj.marginBottom = obj.marginTop;\n });\n styles.content.marginTop = getPixelPropertyStr(-gapUnit);\n styles.content.marginBottom = styles.content.marginTop;\n } else {\n ([styles.content, styles.shapeColumn.item, styles.keyColumn.item, styles.valueColumn.item] as IMargin[]).forEach(\n obj => {\n obj.marginTop = 'initial';\n obj.marginBottom = 'initial';\n }\n );\n }\n return styles;\n}\n\nfunction getLabelStyle(\n labelStyle?: ITooltipTextStyle,\n defaultStyle?: Partial<ITooltipTextStyle>\n): ILabelStyle | undefined {\n if (!labelStyle) {\n return undefined;\n }\n const {\n fontFamily: labelFont,\n fontSize: labelFontSize,\n fill: labelColor,\n textAlign,\n lineHeight,\n fontWeight,\n multiLine,\n wordBreak,\n maxWidth\n } = merge({}, defaultStyle, labelStyle) as ITooltipTextStyle;\n const styleObj: ILabelStyle = {};\n\n styleObj.fontFamily = labelFont;\n styleObj.fontSize = getPixelPropertyStr(labelFontSize);\n styleObj.color = labelColor as string;\n styleObj.textAlign = textAlign as TextAlign;\n styleObj.lineHeight = getPixelPropertyStr(lineHeight);\n styleObj.fontWeight = fontWeight as FontWeight;\n styleObj.whiteSpace = multiLine ? 'initial' : 'nowrap';\n styleObj.wordBreak = wordBreak;\n styleObj.maxWidth = getPixelPropertyStr(maxWidth);\n return styleObj;\n}\n\nfunction getShapeStyle(\n shapeStyle?: ITooltipTheme['shape'],\n defaultStyle?: Partial<ITooltipTheme['shape']>\n): IShapeStyle | undefined {\n if (!shapeStyle) {\n return undefined;\n }\n const { size } = merge({}, defaultStyle, shapeStyle);\n const styleObj: IShapeStyle = {};\n\n styleObj.width = getPixelPropertyStr(size);\n return styleObj;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/component/tooltip/handler/dom/util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAuB,EAAE,UAAmB,EAAE,EAAE;IAClF,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;QAChB,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;YAChB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzC;QACD,OAAO,GAAG,GAAG,IAAI,CAAC;KACnB;IACD,OAAO,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,SAAS,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,KAAoB,EAAE,cAAyC;;IAC1F,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,SAAS,EACf,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,MAAM,EAAE,WAAW,EACnB,SAAS,GAAG,CAAC,EACd,EACD,OAAO,EACP,GAAG,EACH,KAAK,EACL,KAAK,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,kBAAkB,EACnB,GAAG,KAAK,CAAC;IAEV,MAAM,eAAe,GAAG,SAAm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AAC;KAClB;IACD,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,EAAE,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAgB,EAAE,CAAC;IAEjC,QAAQ,CAAC,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,QAAQ,CAAC;AAClB,CAAC","file":"util.js","sourcesContent":["import type { Maybe } from '@visactor/vutils';\nimport type { FontWeight, TextAlign } from '../../../../typings';\nimport { isValid, mergeSpec, isArray } from '../../../../util';\nimport type { ITooltipTheme } from '../../interface';\nimport type { ITooltipTextStyle, ITooltipStyle } from '../interface';\nimport type { ILabelStyle, IMargin, IShapeStyle, IDomTooltipStyle } from './interface';\nimport type { TooltipAttributes } from '@visactor/vrender-components';\n\nconst DEFAULT_SHAPE_SPACING = 8;\nconst DEFAULT_KEY_SPACING = 26;\nconst DEFAULT_VALUE_SPACING = 0;\n\nexport const getPixelPropertyStr = (num?: number | number[], defaultStr?: string) => {\n if (isValid(num)) {\n if (isArray(num)) {\n return num.map(n => `${n}px`).join(' ');\n }\n return `${num}px`;\n }\n return defaultStr ?? 'initial';\n};\n\nexport function getDomStyles(style: ITooltipStyle, attributeCache?: Maybe<TooltipAttributes>): IDomTooltipStyle {\n const {\n panel: {\n fill: fillColor,\n shadow,\n shadowBlur,\n shadowColor,\n shadowOffsetX,\n shadowOffsetY,\n shadowSpread,\n cornerRadius,\n stroke: strokeColor,\n lineWidth = 0\n },\n padding,\n key,\n value,\n title,\n shape,\n enterable,\n spaceRow,\n transitionDuration\n } = style;\n\n const backgroundColor = fillColor as string;\n\n const shapeStyle = getShapeStyle(shape);\n const keyStyle = getLabelStyle(key);\n const valueStyle = getLabelStyle(value);\n\n const styles = {\n panel: {\n width: getPixelPropertyStr((attributeCache?.panel?.width ?? 0) + lineWidth * 2),\n minHeight: getPixelPropertyStr((attributeCache?.panel?.height ?? 0) + lineWidth * 2),\n paddingBottom: getPixelPropertyStr(padding.bottom),\n paddingLeft: getPixelPropertyStr(padding.left),\n paddingRight: getPixelPropertyStr(padding.right),\n paddingTop: getPixelPropertyStr(padding.top),\n borderColor: strokeColor,\n borderWidth: getPixelPropertyStr(lineWidth),\n borderRadius: getPixelPropertyStr(cornerRadius),\n backgroundColor: backgroundColor ? `${backgroundColor}` : 'transparent',\n boxShadow: shadow\n ? `${shadowOffsetX}px ${shadowOffsetY}px ${shadowBlur}px ${shadowSpread}px ${shadowColor}`\n : 'initial',\n pointerEvents: enterable ? 'auto' : 'none',\n transitionDuration: transitionDuration ? `${transitionDuration}ms` : 'initial',\n transitionProperty: transitionDuration ? 'transform' : 'initial',\n transitionTimingFunction: transitionDuration ? 'ease-out' : 'initial'\n },\n title: getLabelStyle(mergeSpec({}, title, attributeCache?.title?.value)),\n content: {},\n shapeColumn: {\n common: shapeStyle,\n items: [],\n width: getPixelPropertyStr(shape.size),\n marginRight: getPixelPropertyStr(shape.spacing ?? DEFAULT_SHAPE_SPACING)\n },\n keyColumn: {\n common: keyStyle,\n items: attributeCache?.content?.map(({ key }) => ({\n ...keyStyle,\n ...getLabelStyle(key as ITooltipTextStyle),\n ...(key?.multiLine ? { width: getPixelPropertyStr(Math.ceil(key.width)) } : undefined) // 对多行文本使用定宽\n })),\n width: getPixelPropertyStr(attributeCache?.keyWidth),\n marginRight: getPixelPropertyStr(key.spacing ?? DEFAULT_KEY_SPACING)\n },\n valueColumn: {\n common: valueStyle,\n items: attributeCache?.content?.map(({ value }) => ({\n ...valueStyle,\n ...getLabelStyle(value as ITooltipTextStyle),\n ...(value?.multiLine ? { width: getPixelPropertyStr(Math.ceil(value.width)) } : undefined) // 对多行文本使用定宽\n })),\n width: getPixelPropertyStr(attributeCache?.valueWidth),\n marginRight: getPixelPropertyStr(value.spacing ?? DEFAULT_VALUE_SPACING)\n },\n spaceRow: getPixelPropertyStr(spaceRow)\n } as IDomTooltipStyle;\n\n if (isValid(spaceRow)) {\n const gapUnit = spaceRow / 2;\n ([styles.shapeColumn.common, styles.keyColumn.common, styles.valueColumn.common] as IMargin[]).forEach(obj => {\n obj.marginTop = getPixelPropertyStr(gapUnit);\n obj.marginBottom = obj.marginTop;\n });\n styles.content.marginTop = getPixelPropertyStr(-gapUnit);\n styles.content.marginBottom = styles.content.marginTop;\n } else {\n (\n [styles.content, styles.shapeColumn.common, styles.keyColumn.common, styles.valueColumn.common] as IMargin[]\n ).forEach(obj => {\n obj.marginTop = 'initial';\n obj.marginBottom = 'initial';\n });\n }\n return styles;\n}\n\nfunction getLabelStyle(\n labelStyle?: ITooltipTextStyle,\n defaultStyle?: Partial<ITooltipTextStyle>\n): ILabelStyle | undefined {\n if (!labelStyle) {\n return undefined;\n }\n const {\n fontFamily: labelFont,\n fontSize: labelFontSize,\n fill: labelColor,\n textAlign,\n lineHeight,\n fontWeight,\n multiLine,\n wordBreak,\n maxWidth\n } = mergeSpec({}, defaultStyle, labelStyle) as ITooltipTextStyle;\n const styleObj: ILabelStyle = {};\n\n styleObj.fontFamily = labelFont;\n styleObj.fontSize = getPixelPropertyStr(labelFontSize);\n styleObj.color = labelColor as string;\n styleObj.textAlign = textAlign as TextAlign;\n styleObj.lineHeight = getPixelPropertyStr(lineHeight);\n styleObj.fontWeight = fontWeight as FontWeight;\n styleObj.whiteSpace = multiLine ? 'initial' : 'nowrap';\n styleObj.wordBreak = wordBreak;\n styleObj.maxWidth = getPixelPropertyStr(maxWidth);\n return styleObj;\n}\n\nfunction getShapeStyle(\n shapeStyle?: ITooltipTheme['shape'],\n defaultStyle?: Partial<ITooltipTheme['shape']>\n): IShapeStyle | undefined {\n if (!shapeStyle) {\n return undefined;\n }\n const { size } = mergeSpec({}, defaultStyle, shapeStyle);\n const styleObj: IShapeStyle = {};\n\n styleObj.width = getPixelPropertyStr(size);\n return styleObj;\n}\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { isValid } from "@visactor/vutils";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { initTextMeasure, mergeSpec } from "../../../../util";
|
|
4
4
|
|
|
5
|
-
import { builtinSymbolsMap } from "@visactor/vrender";
|
|
5
|
+
import { builtinSymbolsMap, getRichTextBounds } from "@visactor/vrender";
|
|
6
|
+
|
|
7
|
+
import { getTextAttributes } from "./style";
|
|
6
8
|
|
|
7
9
|
export const getTooltipAttributes = (actualTooltip, style) => {
|
|
8
10
|
const {spaceRow: spaceRow, padding: padding, title: titleStyle, shape: shapeStyle, key: keyStyle, value: valueStyle} = style, attribute = Object.assign(Object.assign({}, style), {
|
|
@@ -27,16 +29,15 @@ export const getTooltipAttributes = (actualTooltip, style) => {
|
|
|
27
29
|
}));
|
|
28
30
|
const {title: title = {}, content: content = []} = actualTooltip;
|
|
29
31
|
let maxWidth = 0, containerHeight = padding.top + padding.bottom, titleMaxHeight = 0;
|
|
30
|
-
const {visible: titleVisible = !0, value: titleValue = "", hasShape: titleHasShape, shapeType: titleShapeType = "", shapeHollow: titleShapeHollow, shapeColor: titleShapeColor} = title;
|
|
32
|
+
const {visible: titleVisible = !0, value: titleValue = "", valueStyle: titleValueStyle, hasShape: titleHasShape, shapeType: titleShapeType = "", shapeHollow: titleShapeHollow, shapeColor: titleShapeColor} = title;
|
|
31
33
|
if (attribute.title.visible = titleVisible, titleVisible) {
|
|
32
|
-
const {text: text, width: width, height: height} = measureTooltipText(titleValue,
|
|
33
|
-
if (attribute.title.value = {
|
|
34
|
+
const lineTitleStyle = mergeSpec({}, titleStyle, getTextAttributes(titleValueStyle, void 0, {})), {text: text, width: width, height: height} = measureTooltipText(titleValue, lineTitleStyle);
|
|
35
|
+
if (attribute.title.value = Object.assign(Object.assign({
|
|
34
36
|
width: width,
|
|
35
|
-
height: height
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, maxWidth = width, titleMaxHeight = height, titleHasShape && builtinSymbolsMap[titleShapeType]) {
|
|
37
|
+
height: height
|
|
38
|
+
}, lineTitleStyle), {
|
|
39
|
+
text: text
|
|
40
|
+
}), maxWidth = width, titleMaxHeight = height, titleHasShape && builtinSymbolsMap[titleShapeType]) {
|
|
40
41
|
const titleShapeAttrs = {
|
|
41
42
|
symbolType: titleShapeType
|
|
42
43
|
};
|
|
@@ -60,24 +61,22 @@ export const getTooltipAttributes = (actualTooltip, style) => {
|
|
|
60
61
|
let itemHeight = 0;
|
|
61
62
|
const {hasShape: hasShape, key: key, shapeColor: shapeColor, shapeHollow: shapeHollow, shapeType: shapeType = "", value: value, isKeyAdaptive: isKeyAdaptive} = item;
|
|
62
63
|
if (isValid(key)) {
|
|
63
|
-
const {width: width, height: height, text: text} = measureTooltipText(key,
|
|
64
|
-
itemAttrs.key = {
|
|
64
|
+
const lineKeyStyle = mergeSpec({}, keyStyle, getTextAttributes(item.keyStyle, void 0, {})), {width: width, height: height, text: text} = measureTooltipText(key, lineKeyStyle);
|
|
65
|
+
itemAttrs.key = Object.assign(Object.assign({
|
|
65
66
|
width: width,
|
|
66
|
-
height: height
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, isKeyAdaptive ? adaptiveKeyWidths.push(width) : keyWidths.push(width), itemHeight = Math.max(itemHeight, height);
|
|
67
|
+
height: height
|
|
68
|
+
}, lineKeyStyle), {
|
|
69
|
+
text: text
|
|
70
|
+
}), isKeyAdaptive ? adaptiveKeyWidths.push(width) : keyWidths.push(width), itemHeight = Math.max(itemHeight, height);
|
|
71
71
|
}
|
|
72
72
|
if (isValid(value)) {
|
|
73
|
-
const {width: width, height: height, text: text} = measureTooltipText(value,
|
|
74
|
-
itemAttrs.value = {
|
|
73
|
+
const lineValueStyle = mergeSpec({}, valueStyle, getTextAttributes(item.valueStyle, void 0, {})), {width: width, height: height, text: text} = measureTooltipText(value, lineValueStyle);
|
|
74
|
+
itemAttrs.value = Object.assign(Object.assign({
|
|
75
75
|
width: width,
|
|
76
|
-
height: height
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}, valueWidths.push(width), itemHeight = Math.max(itemHeight, height);
|
|
76
|
+
height: height
|
|
77
|
+
}, lineValueStyle), {
|
|
78
|
+
text: text
|
|
79
|
+
}), valueWidths.push(width), itemHeight = Math.max(itemHeight, height);
|
|
81
80
|
}
|
|
82
81
|
if (hasShape && builtinSymbolsMap[shapeType]) {
|
|
83
82
|
hasContentShape = !0;
|
|
@@ -107,6 +106,7 @@ export const getTooltipAttributes = (actualTooltip, style) => {
|
|
|
107
106
|
};
|
|
108
107
|
|
|
109
108
|
export const measureTooltipText = (text, style) => {
|
|
109
|
+
var _a;
|
|
110
110
|
const measure = initTextMeasure(style);
|
|
111
111
|
if (!style.multiLine) {
|
|
112
112
|
const {width: width, height: height} = measure.fullMeasure(text);
|
|
@@ -121,7 +121,7 @@ export const measureTooltipText = (text, style) => {
|
|
|
121
121
|
const {width: width, height: height} = measure.fullMeasure(textLines);
|
|
122
122
|
if (style.maxWidth && style.maxWidth <= width) {
|
|
123
123
|
const bound = getRichTextBounds({
|
|
124
|
-
wordBreak: style.wordBreak,
|
|
124
|
+
wordBreak: null !== (_a = style.wordBreak) && void 0 !== _a ? _a : "break-word",
|
|
125
125
|
maxWidth: style.maxWidth,
|
|
126
126
|
width: 0,
|
|
127
127
|
height: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/component/tooltip/handler/utils/attribute.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,aAA6B,EAAE,KAAoB,EAAqB,EAAE;IAC7G,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU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AAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACxF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAEzD,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,EAAE;QAE7C,MAAM,KAAK,GAAG,iBAAiB,CAAC;YAC9B,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,UAAU,EAAE,SAAS,CAAC,GAAG,CACvB,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CACV,CAAC,gCACI,KAAK,KACR,IAAI,EAAE,IAAI,GACgC,CAAA,CAC/C;SACF,CAAC,CAAC;QACH,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;YACtB,IAAI,EAAE,SAAS;SAChB,CAAC;KACH;IAED,OAAO;QACL,KAAK;QACL,MAAM;QACN,IAAI,EAAE,SAAS;KAChB,CAAC;AACJ,CAAC,CAAC","file":"attribute.js","sourcesContent":["import type {\n IContainerSize,\n TooltipAttributes,\n TooltipRowAttrs,\n TooltipSymbolAttrs\n} from '@visactor/vrender-components';\nimport type { IToolTipActual, MaybeArray } from '../../../../typings';\nimport type { ITooltipStyle, ITooltipTextStyle } from '../interface';\nimport { isValid } from '@visactor/vutils';\nimport { getRichTextBounds, initTextMeasure } from '../../../../util';\nimport type { IRichTextParagraphCharacter } from '@visactor/vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport { builtinSymbolsMap } from '@visactor/vrender';\n\nexport const getTooltipAttributes = (actualTooltip: IToolTipActual, style: ITooltipStyle): TooltipAttributes => {\n const { spaceRow, padding, title: titleStyle, shape: shapeStyle, key: keyStyle, value: valueStyle } = style;\n\n const attribute: TooltipAttributes = {\n ...style,\n\n title: {},\n content: [],\n\n titleStyle: {\n value: titleStyle,\n spaceRow\n },\n contentStyle: {\n shape: shapeStyle,\n key: keyStyle,\n value: valueStyle,\n spaceRow\n },\n\n hasContentShape: false,\n keyWidth: 0,\n valueWidth: 0\n };\n (['key', 'value', 'shape'] as (keyof ITooltipStyle)[]).forEach(key => {\n delete attribute[key];\n });\n\n const { title = {}, content = [] } = actualTooltip;\n\n let maxWidth = 0;\n let containerHeight = padding.top + padding.bottom;\n\n // calculate title\n let titleMaxHeight = 0;\n const {\n visible: titleVisible = true,\n value: titleValue = '',\n hasShape: titleHasShape,\n shapeType: titleShapeType = '',\n shapeHollow: titleShapeHollow,\n shapeColor: titleShapeColor\n } = title;\n attribute.title.visible = titleVisible;\n if (titleVisible) {\n const { text, width, height } = measureTooltipText(titleValue, titleStyle);\n attribute.title.value = {\n width,\n height,\n text,\n multiLine: titleStyle.multiLine,\n wordBreak: titleStyle.wordBreak\n };\n maxWidth = width;\n titleMaxHeight = height;\n\n if (titleHasShape && builtinSymbolsMap[titleShapeType]) {\n const titleShapeAttrs: TooltipSymbolAttrs = {\n symbolType: titleShapeType\n };\n if (titleShapeHollow) {\n titleShapeAttrs.stroke = titleShapeColor;\n } else {\n titleShapeAttrs.fill = titleShapeColor;\n }\n attribute.title.shape = titleShapeAttrs;\n maxWidth += shapeStyle.size + shapeStyle.spacing;\n titleMaxHeight = Math.max(shapeStyle.size, titleMaxHeight);\n }\n\n attribute.title.width = maxWidth;\n attribute.title.height = titleMaxHeight;\n\n containerHeight += titleMaxHeight;\n }\n\n // calculate content\n if (content.length) {\n // filter content\n const filteredContent = content.filter(item => {\n return (item.key || item.value) && item.visible !== false;\n });\n if (filteredContent.length) {\n if (titleVisible) {\n containerHeight += spaceRow; // title 与 content 之前的间隔\n }\n\n let hasContentShape = false;\n const keyWidths: number[] = [];\n const adaptiveKeyWidths: number[] = [];\n const valueWidths: number[] = [];\n\n attribute.content = filteredContent.map((item, i) => {\n const itemAttrs: TooltipRowAttrs = { height: 0, spaceRow };\n let itemHeight = 0;\n const { hasShape, key, shapeColor, shapeHollow, shapeType = '', value, isKeyAdaptive } = item;\n if (isValid(key)) {\n const { width, height, text } = measureTooltipText(key, keyStyle);\n itemAttrs.key = {\n width,\n height,\n text,\n multiLine: keyStyle.multiLine,\n wordBreak: titleStyle.wordBreak\n };\n if (!isKeyAdaptive) {\n keyWidths.push(width);\n } else {\n adaptiveKeyWidths.push(width);\n }\n itemHeight = Math.max(itemHeight, height);\n }\n if (isValid(value)) {\n const { width, height, text } = measureTooltipText(value, valueStyle);\n itemAttrs.value = {\n width,\n height,\n text,\n multiLine: valueStyle.multiLine,\n wordBreak: titleStyle.wordBreak\n };\n valueWidths.push(width);\n itemHeight = Math.max(itemHeight, height);\n }\n if (hasShape && builtinSymbolsMap[shapeType]) {\n hasContentShape = true;\n const shape: TooltipSymbolAttrs = {\n visible: true,\n symbolType: shapeType\n };\n if (shapeHollow) {\n shape.stroke = shapeColor;\n } else {\n shape.fill = shapeColor;\n }\n itemHeight = Math.max(shapeStyle.size, itemHeight);\n itemAttrs.shape = shape;\n } else {\n itemAttrs.shape = { visible: false };\n }\n\n itemAttrs.height = itemHeight;\n containerHeight += itemHeight;\n if (i < filteredContent.length - 1) {\n containerHeight += spaceRow;\n }\n\n return itemAttrs;\n });\n\n const maxKeyWidth = keyWidths.length ? Math.max(...keyWidths) : 0; // name 需要对齐\n const maxAdaptiveKeyWidth = adaptiveKeyWidths.length ? Math.max(...adaptiveKeyWidths) : 0;\n const maxValueWidth = valueWidths.length ? Math.max(...valueWidths) : 0; // value 需要对齐\n const shapeWidth = hasContentShape ? shapeStyle.size + shapeStyle.spacing : 0; // shape 列宽度\n maxWidth = Math.max(\n maxKeyWidth + maxValueWidth + keyStyle.spacing + valueStyle.spacing + shapeWidth,\n maxAdaptiveKeyWidth + shapeWidth,\n maxWidth\n );\n attribute.hasContentShape = hasContentShape;\n attribute.keyWidth = maxKeyWidth;\n attribute.valueWidth = maxValueWidth;\n }\n }\n\n const containerSize: IContainerSize = {\n width: maxWidth + padding.left + padding.right,\n height: containerHeight\n };\n\n attribute.panel.width = containerSize.width;\n attribute.panel.height = containerSize.height;\n return attribute;\n};\n\ninterface ITooltipTextInfo {\n width: number;\n height: number;\n text: MaybeArray<number> | MaybeArray<string>;\n}\n\nexport const measureTooltipText = (text: string, style: ITooltipTextStyle): ITooltipTextInfo => {\n const measure = initTextMeasure(style as any);\n if (!style.multiLine) {\n // 单行文本\n const { width, height } = measure.fullMeasure(text);\n return {\n width,\n height,\n text\n };\n }\n // 多行文本\n let textLines = text.split('\\n');\n textLines = textLines.map((line, i) => (i < textLines.length - 1 ? line + '\\n' : line));\n const { width, height } = measure.fullMeasure(textLines);\n\n if (style.maxWidth && style.maxWidth <= width) {\n // 允许自动换行的情况,改用 richText 测量\n const bound = getRichTextBounds({\n wordBreak: style.wordBreak,\n maxWidth: style.maxWidth,\n width: 0,\n height: 0,\n textConfig: textLines.map(\n (line, i) =>\n ({\n ...style,\n text: line\n } as unknown as IRichTextParagraphCharacter)\n )\n });\n return {\n width: bound.width(),\n height: bound.height(),\n text: textLines\n };\n }\n\n return {\n width,\n height,\n text: textLines\n };\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/component/tooltip/handler/utils/attribute.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,aAA6B,EAAE,KAAoB,EAAqB,EAAE;IAC7G,MAAM,EAAE,QAAQ,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ipSymbolAttrs\n} from '@visactor/vrender-components';\nimport type { IToolTipActual, MaybeArray } from '../../../../typings';\nimport type { ITooltipStyle, ITooltipTextStyle } from '../interface';\nimport { isValid } from '@visactor/vutils';\nimport { initTextMeasure, mergeSpec } from '../../../../util';\nimport type { IRichTextParagraphCharacter } from '@visactor/vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport { builtinSymbolsMap, getRichTextBounds } from '@visactor/vrender';\nimport { getTextAttributes } from './style';\n\nexport const getTooltipAttributes = (actualTooltip: IToolTipActual, style: ITooltipStyle): TooltipAttributes => {\n const { spaceRow, padding, title: titleStyle, shape: shapeStyle, key: keyStyle, value: valueStyle } = style;\n\n const attribute: TooltipAttributes = {\n ...style,\n\n title: {},\n content: [],\n\n titleStyle: {\n value: titleStyle,\n spaceRow\n },\n contentStyle: {\n shape: shapeStyle,\n key: keyStyle,\n value: valueStyle,\n spaceRow\n },\n\n hasContentShape: false,\n keyWidth: 0,\n valueWidth: 0\n };\n (['key', 'value', 'shape'] as (keyof ITooltipStyle)[]).forEach(key => {\n delete attribute[key];\n });\n\n const { title = {}, content = [] } = actualTooltip;\n\n let maxWidth = 0;\n let containerHeight = padding.top + padding.bottom;\n\n // calculate title\n let titleMaxHeight = 0;\n const {\n visible: titleVisible = true,\n value: titleValue = '',\n valueStyle: titleValueStyle,\n hasShape: titleHasShape,\n shapeType: titleShapeType = '',\n shapeHollow: titleShapeHollow,\n shapeColor: titleShapeColor\n } = title;\n attribute.title.visible = titleVisible;\n if (titleVisible) {\n const lineTitleStyle = mergeSpec({}, titleStyle, getTextAttributes(titleValueStyle, undefined, {}));\n const { text, width, height } = measureTooltipText(titleValue, lineTitleStyle);\n attribute.title.value = {\n width,\n height,\n ...lineTitleStyle,\n text\n };\n maxWidth = width;\n titleMaxHeight = height;\n\n if (titleHasShape && builtinSymbolsMap[titleShapeType]) {\n const titleShapeAttrs: TooltipSymbolAttrs = {\n symbolType: titleShapeType\n };\n if (titleShapeHollow) {\n titleShapeAttrs.stroke = titleShapeColor;\n } else {\n titleShapeAttrs.fill = titleShapeColor;\n }\n attribute.title.shape = titleShapeAttrs;\n maxWidth += shapeStyle.size + shapeStyle.spacing;\n titleMaxHeight = Math.max(shapeStyle.size, titleMaxHeight);\n }\n\n attribute.title.width = maxWidth;\n attribute.title.height = titleMaxHeight;\n\n containerHeight += titleMaxHeight;\n }\n\n // calculate content\n if (content.length) {\n // filter content\n const filteredContent = content.filter(item => {\n return (item.key || item.value) && item.visible !== false;\n });\n if (filteredContent.length) {\n if (titleVisible) {\n containerHeight += spaceRow; // title 与 content 之前的间隔\n }\n\n let hasContentShape = false;\n const keyWidths: number[] = [];\n const adaptiveKeyWidths: number[] = [];\n const valueWidths: number[] = [];\n\n attribute.content = filteredContent.map((item, i) => {\n const itemAttrs: TooltipRowAttrs = { height: 0, spaceRow };\n let itemHeight = 0;\n const { hasShape, key, shapeColor, shapeHollow, shapeType = '', value, isKeyAdaptive } = item;\n if (isValid(key)) {\n const lineKeyStyle = mergeSpec({}, keyStyle, getTextAttributes(item.keyStyle, undefined, {}));\n const { width, height, text } = measureTooltipText(key, lineKeyStyle);\n itemAttrs.key = {\n width,\n height,\n ...lineKeyStyle,\n text\n };\n if (!isKeyAdaptive) {\n keyWidths.push(width);\n } else {\n adaptiveKeyWidths.push(width);\n }\n itemHeight = Math.max(itemHeight, height);\n }\n if (isValid(value)) {\n const lineValueStyle = mergeSpec({}, valueStyle, getTextAttributes(item.valueStyle, undefined, {}));\n const { width, height, text } = measureTooltipText(value, lineValueStyle);\n itemAttrs.value = {\n width,\n height,\n ...lineValueStyle,\n text\n };\n valueWidths.push(width);\n itemHeight = Math.max(itemHeight, height);\n }\n if (hasShape && builtinSymbolsMap[shapeType]) {\n hasContentShape = true;\n const shape: TooltipSymbolAttrs = {\n visible: true,\n symbolType: shapeType\n };\n if (shapeHollow) {\n shape.stroke = shapeColor;\n } else {\n shape.fill = shapeColor;\n }\n itemHeight = Math.max(shapeStyle.size, itemHeight);\n itemAttrs.shape = shape;\n } else {\n itemAttrs.shape = { visible: false };\n }\n\n itemAttrs.height = itemHeight;\n containerHeight += itemHeight;\n if (i < filteredContent.length - 1) {\n containerHeight += spaceRow;\n }\n\n return itemAttrs;\n });\n\n const maxKeyWidth = keyWidths.length ? Math.max(...keyWidths) : 0; // name 需要对齐\n const maxAdaptiveKeyWidth = adaptiveKeyWidths.length ? Math.max(...adaptiveKeyWidths) : 0;\n const maxValueWidth = valueWidths.length ? Math.max(...valueWidths) : 0; // value 需要对齐\n const shapeWidth = hasContentShape ? shapeStyle.size + shapeStyle.spacing : 0; // shape 列宽度\n maxWidth = Math.max(\n maxKeyWidth + maxValueWidth + keyStyle.spacing + valueStyle.spacing + shapeWidth,\n maxAdaptiveKeyWidth + shapeWidth,\n maxWidth\n );\n attribute.hasContentShape = hasContentShape;\n attribute.keyWidth = maxKeyWidth;\n attribute.valueWidth = maxValueWidth;\n }\n }\n\n const containerSize: IContainerSize = {\n width: maxWidth + padding.left + padding.right,\n height: containerHeight\n };\n\n attribute.panel.width = containerSize.width;\n attribute.panel.height = containerSize.height;\n return attribute;\n};\n\ninterface ITooltipTextInfo {\n width: number;\n height: number;\n text: MaybeArray<number> | MaybeArray<string>;\n}\n\nexport const measureTooltipText = (text: string, style: ITooltipTextStyle): ITooltipTextInfo => {\n const measure = initTextMeasure(style as any);\n if (!style.multiLine) {\n // 单行文本\n const { width, height } = measure.fullMeasure(text);\n return {\n width,\n height,\n text\n };\n }\n // 多行文本\n let textLines = text.split('\\n');\n textLines = textLines.map((line, i) => (i < textLines.length - 1 ? line + '\\n' : line));\n const { width, height } = measure.fullMeasure(textLines);\n\n if (style.maxWidth && style.maxWidth <= width) {\n // 允许自动换行的情况,改用 richText 测量\n const bound = getRichTextBounds({\n wordBreak: style.wordBreak ?? 'break-word',\n maxWidth: style.maxWidth,\n width: 0,\n height: 0,\n textConfig: textLines.map(\n (line, i) =>\n ({\n ...style,\n text: line\n } as unknown as IRichTextParagraphCharacter)\n )\n });\n return {\n width: bound.width(),\n height: bound.height(),\n text: textLines\n };\n }\n\n return {\n width,\n height,\n text: textLines\n };\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TooltipActualTitleContent } from '../../tooltip';
|
|
2
2
|
import type { IToolTipLinePattern, ITooltipPattern, TooltipData, IToolTipLineActual } from '../../../../typings/tooltip';
|
|
3
3
|
import type { TooltipHandlerParams } from '../../interface';
|
|
4
|
-
export declare const getShowContent: (pattern: ITooltipPattern, data: TooltipData, params: TooltipHandlerParams) =>
|
|
4
|
+
export declare const getShowContent: (pattern: ITooltipPattern, data: TooltipData, params: TooltipHandlerParams) => TooltipActualTitleContent | null;
|
|
5
5
|
export declare const getOneLineData: (datum: any, config: IToolTipLinePattern, params: TooltipHandlerParams) => IToolTipLineActual;
|
|
@@ -19,14 +19,13 @@ export const getShowContent = (pattern, data, params) => {
|
|
|
19
19
|
content: []
|
|
20
20
|
}, {maxLineCount: maxLineCount = TOOLTIP_MAX_LINE_COUNT} = pattern, patternTitleVisible = !1 !== getTooltipContentValue(null == patternTitle ? void 0 : patternTitle.visible, data, params);
|
|
21
21
|
if (patternTitle && patternTitleVisible) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
22
|
+
const datum = getFirstDatumFromTooltipData(data);
|
|
23
|
+
tooltipContent.title = {
|
|
24
|
+
value: getTooltipContentValue(null == patternTitle ? void 0 : patternTitle.value, datum, params),
|
|
25
|
+
valueStyle: getTooltipContentValue(null == patternTitle ? void 0 : patternTitle.valueStyle, datum, params),
|
|
26
|
+
hasShape: patternTitle.hasShape,
|
|
27
|
+
shapeHollow: patternTitle.shapeHollow
|
|
28
|
+
};
|
|
30
29
|
} else tooltipContent.title = {
|
|
31
30
|
hasShape: !1,
|
|
32
31
|
visible: !1
|
|
@@ -69,7 +68,7 @@ export const getShowContent = (pattern, data, params) => {
|
|
|
69
68
|
};
|
|
70
69
|
|
|
71
70
|
export const getOneLineData = (datum, config, params) => {
|
|
72
|
-
const key = getTooltipContentValue(config.key, datum, params), value = getTooltipContentValue(config.value, datum, params), visible = !1 !== getTooltipContentValue(config.visible, datum, params) && (isValid(key) || isValid(value)), isKeyAdaptive = getTooltipContentValue(config.isKeyAdaptive, datum, params), shapeType = getTooltipContentValue(config.shapeType, datum, params), shapeColor = getTooltipContentValue(config.shapeColor, datum, params);
|
|
71
|
+
const key = getTooltipContentValue(config.key, datum, params), value = getTooltipContentValue(config.value, datum, params), visible = !1 !== getTooltipContentValue(config.visible, datum, params) && (isValid(key) || isValid(value)), isKeyAdaptive = getTooltipContentValue(config.isKeyAdaptive, datum, params), shapeType = getTooltipContentValue(config.shapeType, datum, params), shapeColor = getTooltipContentValue(config.shapeColor, datum, params), keyStyle = getTooltipContentValue(config.keyStyle, datum, params), valueStyle = getTooltipContentValue(config.valueStyle, datum, params);
|
|
73
72
|
return {
|
|
74
73
|
key: key,
|
|
75
74
|
value: value,
|
|
@@ -78,7 +77,9 @@ export const getOneLineData = (datum, config, params) => {
|
|
|
78
77
|
hasShape: config.hasShape,
|
|
79
78
|
shapeType: shapeType,
|
|
80
79
|
shapeHollow: config.shapeHollow,
|
|
81
|
-
shapeColor: shapeColor
|
|
80
|
+
shapeColor: shapeColor,
|
|
81
|
+
keyStyle: keyStyle,
|
|
82
|
+
valueStyle: valueStyle
|
|
82
83
|
};
|
|
83
84
|
};
|
|
84
85
|
//# sourceMappingURL=compose.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/component/tooltip/handler/utils/compose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAQzD,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACxG,OAAO,EAAE,0BAA0B,EA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QACH,KAAK;QACL,OAAO;QACP,aAAa;QACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,SAAgB;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU;KACX,CAAC;AACJ,CAAC,CAAC","file":"compose.js","sourcesContent":["import { isValid, isNil, array } from '../../../../util';\nimport type { TooltipContent } from '../../tooltip';\nimport type {\n IToolTipLinePattern,\n ITooltipPattern,\n TooltipData,\n IToolTipLineActual\n} from '../../../../typings/tooltip';\nimport { getFirstDatumFromTooltipData, getTooltipContentValue, getTooltipPatternValue } from './common';\nimport { getTooltipActualActiveType } from '../../utils';\nimport type { IDimensionData, IDimensionInfo } from '../../../../event/events/dimension/interface';\nimport type { TooltipHandlerParams } from '../../interface';\nimport { TOOLTIP_MAX_LINE_COUNT, TOOLTIP_OTHERS_LINE } from '../constants';\n\n/**\n * 获得tooltip的实际显示内容\n * @param pattern\n * @param data\n * @param event\n * @returns\n */\nexport const getShowContent = (\n pattern: ITooltipPattern,\n data: TooltipData,\n params: TooltipHandlerParams\n): TooltipContent | null => {\n if (\n !data ||\n // data.key === undefined ||\n params?.event?.type === 'mouseout'\n ) {\n return null;\n }\n\n const patternTitle = getTooltipPatternValue(pattern.title, data, params);\n const patternContent = array(getTooltipPatternValue(pattern.content, data, params));\n\n const tooltipContent: Required<TooltipContent> = {\n title: {\n value: patternTitle?.value?.toString(),\n hasShape: false,\n shapeType: undefined,\n shapeHollow: undefined\n },\n content: []\n };\n\n const { maxLineCount = TOOLTIP_MAX_LINE_COUNT } = pattern;\n\n /** title */\n const patternTitleVisible = getTooltipContentValue(patternTitle?.visible, data, params) !== false;\n if (!patternTitle || !patternTitleVisible) {\n tooltipContent.title = {\n hasShape: false,\n visible: false\n };\n } else {\n tooltipContent.title.hasShape = patternTitle.hasShape;\n if (isValid(patternTitle.value)) {\n tooltipContent.title = {\n hasShape: patternTitle.hasShape,\n shapeHollow: patternTitle.shapeHollow\n };\n // 找到第一个可用的datum\n const datum = getFirstDatumFromTooltipData(data);\n tooltipContent.title.value = getTooltipContentValue(patternTitle?.value, datum, params);\n }\n }\n\n /** content */\n if (pattern.activeType === 'mark') {\n for (const content of patternContent ?? []) {\n const oneLineData = getOneLineData((data as IDimensionData[])[0]?.datum[0], content, params);\n if (oneLineData.visible !== false) {\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n }\n } else if (pattern.activeType === 'dimension') {\n for (const { data: d } of data as IDimensionInfo[]) {\n for (const { datum, series } of d) {\n if (!getTooltipActualActiveType(series.tooltipHelper?.spec).includes('dimension')) {\n continue;\n }\n const contentPatterns =\n patternContent?.filter(\n c => isNil(c.seriesId) || c.seriesId === series.id // 匹配对应series\n ) ?? [];\n for (const datumItem of datum) {\n for (const linePattern of contentPatterns) {\n const oneLineData = getOneLineData(datumItem, linePattern, params);\n if (oneLineData.visible === false) {\n continue;\n }\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n }\n\n if (tooltipContent.title) {\n // TODO:对 title shape 的支持目前还不完整,尚没有相关需求\n if (tooltipContent.content.length > 0 && tooltipContent.content[0].shapeType) {\n if (isNil(tooltipContent.title.shapeType)) {\n tooltipContent.title.shapeType = tooltipContent.content[0].shapeType;\n }\n if (isNil(tooltipContent.title.shapeColor)) {\n tooltipContent.title.shapeColor = tooltipContent.content[0].shapeColor;\n }\n } else {\n tooltipContent.title.hasShape = false;\n }\n }\n\n return tooltipContent;\n};\n\n/**\n * 获得tooltip的单行实际显示内容\n * @param datum\n * @param config\n * @returns\n */\nexport const getOneLineData = (\n datum: any,\n config: IToolTipLinePattern,\n params: TooltipHandlerParams\n): IToolTipLineActual => {\n const key = getTooltipContentValue(config.key, datum, params);\n const value = getTooltipContentValue(config.value, datum, params);\n const visible: boolean =\n getTooltipContentValue(config.visible, datum, params) !== false && (isValid(key) || isValid(value));\n const isKeyAdaptive = getTooltipContentValue(config.isKeyAdaptive, datum, params);\n\n const shapeType = getTooltipContentValue(config.shapeType, datum, params);\n const shapeColor = getTooltipContentValue(config.shapeColor, datum, params);\n\n return {\n key,\n value,\n visible,\n isKeyAdaptive,\n hasShape: config.hasShape,\n shapeType: shapeType as any,\n shapeHollow: config.shapeHollow,\n shapeColor\n };\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/component/tooltip/handler/utils/compose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAQzD,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACxG,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAS3E,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAAwB,EACxB,IAAiB,EACjB,MAA4B,EACM,EAAE;;IACpC,IACE,CAAC,IAAI;QAEL,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,IAAI,MAAK,UAAU,EAClC;QACA,OAAO,IAAI,CAAC;KACb;IAED,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACzE,MAAM,cAAc,GAAG,KAAK,CAAC,sBA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cAAc,GAAG,CAC5B,KAAU,EACV,MAA2B,EAC3B,MAA4B,EACR,EAAE;IACtB,MAAM,GAAG,GAAG,sBAAsB,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAG,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAClE,MAAM,OAAO,GACX,sBAAsB,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACtG,MAAM,aAAa,GAAG,sBAAsB,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAElF,MAAM,SAAS,GAAG,sBAAsB,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1E,MAAM,UAAU,GAAG,sBAAsB,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC5E,MAAM,QAAQ,GAAG,sBAAsB,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACxE,MAAM,UAAU,GAAG,sBAAsB,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAE5E,OAAO;QACL,GAAG;QACH,KAAK;QACL,OAAO;QACP,aAAa;QACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,SAAgB;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU;QACV,QAAQ;QACR,UAAU;KACX,CAAC;AACJ,CAAC,CAAC","file":"compose.js","sourcesContent":["import { isValid, isNil, array } from '../../../../util';\nimport type { TooltipActualTitleContent } from '../../tooltip';\nimport type {\n IToolTipLinePattern,\n ITooltipPattern,\n TooltipData,\n IToolTipLineActual\n} from '../../../../typings/tooltip';\nimport { getFirstDatumFromTooltipData, getTooltipContentValue, getTooltipPatternValue } from './common';\nimport { getTooltipActualActiveType } from '../../utils';\nimport type { IDimensionData, IDimensionInfo } from '../../../../event/events/dimension/interface';\nimport type { TooltipHandlerParams } from '../../interface';\nimport { TOOLTIP_MAX_LINE_COUNT, TOOLTIP_OTHERS_LINE } from '../constants';\n\n/**\n * 获得tooltip的实际显示内容\n * @param pattern\n * @param data\n * @param event\n * @returns\n */\nexport const getShowContent = (\n pattern: ITooltipPattern,\n data: TooltipData,\n params: TooltipHandlerParams\n): TooltipActualTitleContent | null => {\n if (\n !data ||\n // data.key === undefined ||\n params?.event?.type === 'mouseout'\n ) {\n return null;\n }\n\n const patternTitle = getTooltipPatternValue(pattern.title, data, params);\n const patternContent = array(getTooltipPatternValue(pattern.content, data, params));\n\n const tooltipContent: Required<TooltipActualTitleContent> = {\n title: {\n value: patternTitle?.value?.toString(),\n hasShape: false,\n shapeType: undefined,\n shapeHollow: undefined\n },\n content: []\n };\n\n const { maxLineCount = TOOLTIP_MAX_LINE_COUNT } = pattern;\n\n /** title */\n const patternTitleVisible = getTooltipContentValue(patternTitle?.visible, data, params) !== false;\n if (!patternTitle || !patternTitleVisible) {\n tooltipContent.title = {\n hasShape: false,\n visible: false\n };\n } else {\n // 找到第一个可用的datum\n const datum = getFirstDatumFromTooltipData(data);\n tooltipContent.title = {\n value: getTooltipContentValue(patternTitle?.value, datum, params),\n valueStyle: getTooltipContentValue(patternTitle?.valueStyle, datum, params),\n hasShape: patternTitle.hasShape,\n shapeHollow: patternTitle.shapeHollow\n };\n }\n\n /** content */\n if (pattern.activeType === 'mark') {\n for (const content of patternContent ?? []) {\n const oneLineData = getOneLineData((data as IDimensionData[])[0]?.datum[0], content, params);\n if (oneLineData.visible !== false) {\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n }\n } else if (pattern.activeType === 'dimension') {\n for (const { data: d } of data as IDimensionInfo[]) {\n for (const { datum, series } of d) {\n if (!getTooltipActualActiveType(series.tooltipHelper?.spec).includes('dimension')) {\n continue;\n }\n const contentPatterns =\n patternContent?.filter(\n c => isNil(c.seriesId) || c.seriesId === series.id // 匹配对应series\n ) ?? [];\n for (const datumItem of datum) {\n for (const linePattern of contentPatterns) {\n const oneLineData = getOneLineData(datumItem, linePattern, params);\n if (oneLineData.visible === false) {\n continue;\n }\n if (tooltipContent.content.length === maxLineCount - 1) {\n tooltipContent.content.push({\n ...oneLineData,\n ...TOOLTIP_OTHERS_LINE\n });\n break;\n } else if (tooltipContent.content.length < maxLineCount) {\n tooltipContent.content.push(oneLineData);\n } else {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n if (tooltipContent.content.length >= maxLineCount) {\n break;\n }\n }\n }\n\n if (tooltipContent.title) {\n // TODO:对 title shape 的支持目前还不完整,尚没有相关需求\n if (tooltipContent.content.length > 0 && tooltipContent.content[0].shapeType) {\n if (isNil(tooltipContent.title.shapeType)) {\n tooltipContent.title.shapeType = tooltipContent.content[0].shapeType;\n }\n if (isNil(tooltipContent.title.shapeColor)) {\n tooltipContent.title.shapeColor = tooltipContent.content[0].shapeColor;\n }\n } else {\n tooltipContent.title.hasShape = false;\n }\n }\n\n return tooltipContent;\n};\n\n/**\n * 获得tooltip的单行实际显示内容\n * @param datum\n * @param config\n * @returns\n */\nexport const getOneLineData = (\n datum: any,\n config: IToolTipLinePattern,\n params: TooltipHandlerParams\n): IToolTipLineActual => {\n const key = getTooltipContentValue(config.key, datum, params);\n const value = getTooltipContentValue(config.value, datum, params);\n const visible: boolean =\n getTooltipContentValue(config.visible, datum, params) !== false && (isValid(key) || isValid(value));\n const isKeyAdaptive = getTooltipContentValue(config.isKeyAdaptive, datum, params);\n\n const shapeType = getTooltipContentValue(config.shapeType, datum, params);\n const shapeColor = getTooltipContentValue(config.shapeColor, datum, params);\n const keyStyle = getTooltipContentValue(config.keyStyle, datum, params);\n const valueStyle = getTooltipContentValue(config.valueStyle, datum, params);\n\n return {\n key,\n value,\n visible,\n isKeyAdaptive,\n hasShape: config.hasShape,\n shapeType: shapeType as any,\n shapeHollow: config.shapeHollow,\n shapeColor,\n keyStyle,\n valueStyle\n };\n};\n"]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { cloneDeep, isValid,
|
|
1
|
+
import { cloneDeep, isValid, mergeSpec, array, isFunction, isNil } from "../../../../util";
|
|
2
2
|
|
|
3
3
|
import { makeDefaultPattern } from "./pattern";
|
|
4
4
|
|
|
5
5
|
import { getTooltipActualActiveType } from "../../utils";
|
|
6
6
|
|
|
7
|
+
import { memoize } from "@visactor/vutils";
|
|
8
|
+
|
|
7
9
|
export const getTooltipSpecForShow = (activeType, globalSpec, series, dimensionInfo) => {
|
|
8
10
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
9
11
|
const finalSpec = Object.assign(Object.assign({}, globalSpec), {
|
|
@@ -22,7 +24,7 @@ export const getTooltipSpecForShow = (activeType, globalSpec, series, dimensionI
|
|
|
22
24
|
finalSpec.handler = null !== (_f = globalSpec.handler) && void 0 !== _f ? _f : void 0,
|
|
23
25
|
null === (_g = finalSpec.handler) || void 0 === _g ? void 0 : _g.showTooltip) return finalSpec;
|
|
24
26
|
}
|
|
25
|
-
const defaultPattern = getDefaultTooltipPattern(activeType, series, dimensionInfo), seriesPattern = getSeriesTooltipPattern(activeType, series, dimensionInfo), userPattern =
|
|
27
|
+
const defaultPattern = getDefaultTooltipPattern(activeType, series, dimensionInfo), seriesPattern = getSeriesTooltipPattern(activeType, series, dimensionInfo), userPattern = mergeSpec({}, cloneDeep(globalSpec[activeType]), seriesPattern), defaultPatternTitle = defaultPattern.title, titleShape = getShapePattern(void 0, userPattern, void 0, defaultPatternTitle);
|
|
26
28
|
if (isValid(userPattern.title)) if (isFunction(userPattern.title)) {
|
|
27
29
|
const userPatternTitle = userPattern.title;
|
|
28
30
|
userPattern.title = (data, params) => {
|
|
@@ -96,7 +98,7 @@ const getDefaultTooltipPattern = (activeType, series, dimensionInfo) => {
|
|
|
96
98
|
}
|
|
97
99
|
}
|
|
98
100
|
return seriesPattern;
|
|
99
|
-
}, getSeriesListFromDimensionInfo = dimensionInfo => dimensionInfo.reduce(((list, cur) => list.concat(cur.data.map((data => data.series)).filter(isValid))), []), getShapePatternMapOfEachSeries = content => {
|
|
101
|
+
}, getSeriesListFromDimensionInfo = memoize((dimensionInfo => dimensionInfo.reduce(((list, cur) => list.concat(cur.data.map((data => data.series)).filter(isValid))), []))), getShapePatternMapOfEachSeries = content => {
|
|
100
102
|
const shapePatternMap = {};
|
|
101
103
|
return content.forEach((line => {
|
|
102
104
|
var _a;
|