@visactor/vchart 1.3.0-beta.8 → 1.3.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 +17083 -16200
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/utils.js +2 -2
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/chart/area/area.js +2 -2
- 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 +1 -0
- package/cjs/chart/base-chart.js +14 -8
- 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 +1 -1
- 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 +1 -1
- package/cjs/chart/index.js.map +1 -1
- package/cjs/chart/line/line.js +2 -2
- 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 -4
- 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.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.js +2 -2
- package/cjs/chart/treemap/treemap.js.map +1 -1
- package/cjs/chart/util.js +1 -1
- 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 +4 -0
- package/cjs/compile/compiler.js +4 -0
- 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 +0 -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 +1 -14
- package/cjs/component/axis/base-axis.js +18 -29
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +1 -1
- package/cjs/component/axis/cartesian/axis.js +24 -23
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/cartesian/band-axis.d.ts +1 -0
- 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 +2 -0
- 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.js +4 -3
- package/cjs/component/axis/cartesian/linear-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.js +2 -2
- package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
- package/cjs/component/axis/interface.d.ts +4 -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 +2 -1
- package/cjs/component/axis/polar/axis.js +15 -14
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/band-axis.d.ts +1 -0
- 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/{utils.d.ts → util.d.ts} +1 -1
- package/cjs/component/axis/{utils.js → util.js} +6 -6
- package/cjs/component/axis/util.js.map +1 -0
- package/cjs/component/base/base-component.d.ts +10 -2
- package/cjs/component/base/base-component.js +10 -5
- 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 +12 -2
- package/cjs/component/brush/brush.js +74 -63
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/crosshair/base.d.ts +2 -2
- package/cjs/component/crosshair/base.js +1 -1
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/cartesian.js +9 -9
- 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.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 +1 -1
- 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 +0 -1
- 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.js +6 -6
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/interface.d.ts +2 -2
- package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/interface.d.ts +2 -5
- package/cjs/component/data-zoom/interface.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.d.ts +2 -0
- package/cjs/component/geo/geo-coordinate.js +29 -3
- 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 +2 -2
- package/cjs/component/index.js +6 -1
- package/cjs/component/index.js.map +1 -1
- package/cjs/component/indicator/indicator.d.ts +1 -0
- package/cjs/component/indicator/indicator.js +10 -7
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/indicator/interface.d.ts +5 -6
- package/cjs/component/indicator/interface.js.map +1 -1
- package/cjs/component/interface/theme.d.ts +2 -2
- package/cjs/component/interface/theme.js.map +1 -1
- package/cjs/component/interface/type.d.ts +1 -0
- package/cjs/component/interface/type.js +12 -11
- package/cjs/component/interface/type.js.map +1 -1
- package/cjs/component/label/base-label.d.ts +0 -1
- package/cjs/component/label/base-label.js +0 -5
- package/cjs/component/label/base-label.js.map +1 -1
- package/cjs/component/label/interface.d.ts +2 -1
- package/cjs/component/label/interface.js.map +1 -1
- package/cjs/component/label/label.d.ts +0 -1
- package/cjs/component/label/label.js +1 -6
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/label/totalLabel.js +1 -1
- package/cjs/component/label/totalLabel.js.map +1 -1
- package/cjs/component/legend/base-legend.js +4 -4
- package/cjs/component/legend/base-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.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/marker/interface.d.ts +2 -2
- package/cjs/component/marker/interface.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/tooltip/handler/dom/model/content-column-model.js +5 -5
- 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 +2 -2
- 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 +3 -3
- package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.js +3 -3
- package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/get-spec.js +1 -1
- package/cjs/component/tooltip/handler/utils/get-spec.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/style.js +2 -2
- package/cjs/component/tooltip/handler/utils/style.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.js +3 -2
- package/cjs/component/tooltip/tooltip.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/vchart.js +20 -17
- package/cjs/core/vchart.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/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/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/util.js +5 -5
- package/cjs/data/transforms/tick-data/util.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/interaction/trigger.js +2 -2
- package/cjs/interaction/trigger.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.js +2 -2
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/model/interface.d.ts +1 -1
- package/cjs/model/interface.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/series/area/area.d.ts +4 -1
- package/cjs/series/area/area.js +9 -5
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/bar/bar.js +10 -10
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +2 -0
- package/cjs/series/base/base-series.js +71 -15
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/base/tooltip-helper.js +4 -2
- package/cjs/series/base/tooltip-helper.js.map +1 -1
- package/cjs/series/box-plot/box-plot.js +1 -1
- package/cjs/series/box-plot/box-plot.js.map +1 -1
- package/cjs/series/cartesian/cartesian.d.ts +10 -3
- package/cjs/series/cartesian/cartesian.js +39 -27
- package/cjs/series/cartesian/cartesian.js.map +1 -1
- package/cjs/series/cartesian/interface.d.ts +1 -0
- package/cjs/series/cartesian/interface.js.map +1 -1
- package/cjs/series/dot/dot.js +1 -1
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/funnel/funnel.js +13 -3
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/heatmap/heatmap.js +1 -1
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/series/line/interface.d.ts +0 -2
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/line/line.d.ts +1 -0
- package/cjs/series/line/line.js +1 -1
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/link/link.js +1 -1
- package/cjs/series/link/link.js.map +1 -1
- 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.js +8 -4
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/mixin/line-mixin.d.ts +3 -2
- package/cjs/series/mixin/line-mixin.js +30 -13
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/pie/pie.js +1 -1
- 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 +4 -0
- package/cjs/series/polar/polar.js +15 -3
- package/cjs/series/polar/polar.js.map +1 -1
- package/cjs/series/radar/radar.d.ts +1 -0
- package/cjs/series/radar/radar.js +1 -1
- package/cjs/series/radar/radar.js.map +1 -1
- package/cjs/series/range-area/range-area.d.ts +2 -0
- package/cjs/series/range-area/range-area.js +3 -0
- package/cjs/series/range-area/range-area.js.map +1 -1
- package/cjs/series/range-column/range-column.js +2 -2
- package/cjs/series/range-column/range-column.js.map +1 -1
- package/cjs/series/rose/rose.js +1 -1
- package/cjs/series/rose/rose.js.map +1 -1
- 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 +5 -0
- package/cjs/series/sankey/sankey.js +246 -92
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/scatter/scatter.d.ts +1 -1
- package/cjs/series/scatter/scatter.js +13 -8
- package/cjs/series/scatter/scatter.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/theme/builtin/common/component/axis/cartesian-axis.js +4 -4
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/common-axis.js +12 -6
- package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/polar-axis.js +1 -1
- package/cjs/theme/builtin/common/component/axis/polar-axis.js.map +1 -1
- package/cjs/theme/builtin/common/component/crosshair.js +73 -117
- package/cjs/theme/builtin/common/component/crosshair.js.map +1 -1
- package/cjs/theme/builtin/common/component/data-zoom.js +19 -7
- package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -1
- package/cjs/theme/builtin/common/component/indicator.js +17 -5
- package/cjs/theme/builtin/common/component/indicator.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/color-legend.js +31 -5
- package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/continuous.js +26 -12
- package/cjs/theme/builtin/common/component/legend/continuous.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js +22 -9
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/size-legend.js +54 -15
- package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -1
- package/cjs/theme/builtin/common/component/map-label.js +5 -5
- package/cjs/theme/builtin/common/component/map-label.js.map +1 -1
- package/cjs/theme/builtin/common/component/mark-area.js +7 -2
- package/cjs/theme/builtin/common/component/mark-area.js.map +1 -1
- package/cjs/theme/builtin/common/component/mark-line.js +7 -2
- package/cjs/theme/builtin/common/component/mark-line.js.map +1 -1
- package/cjs/theme/builtin/common/component/player.js +33 -7
- package/cjs/theme/builtin/common/component/player.js.map +1 -1
- package/cjs/theme/builtin/common/component/poptip.d.ts +2 -2
- package/cjs/theme/builtin/common/component/poptip.js +20 -12
- package/cjs/theme/builtin/common/component/poptip.js.map +1 -1
- package/cjs/theme/builtin/common/component/title.js +9 -5
- package/cjs/theme/builtin/common/component/title.js.map +1 -1
- package/cjs/theme/builtin/common/component/tooltip.js +13 -10
- package/cjs/theme/builtin/common/component/tooltip.js.map +1 -1
- package/cjs/theme/builtin/common/component/total-label.js +4 -4
- package/cjs/theme/builtin/common/component/total-label.js.map +1 -1
- package/cjs/theme/builtin/common/constants.js +17 -10
- package/cjs/theme/builtin/common/constants.js.map +1 -1
- package/cjs/theme/builtin/common/mark.js +8 -4
- package/cjs/theme/builtin/common/mark.js.map +1 -1
- package/cjs/theme/builtin/common/series/area.js +2 -7
- package/cjs/theme/builtin/common/series/area.js.map +1 -1
- package/cjs/theme/builtin/common/series/bar.js +2 -7
- package/cjs/theme/builtin/common/series/bar.js.map +1 -1
- package/cjs/theme/builtin/common/series/bar3d.js +1 -6
- package/cjs/theme/builtin/common/series/bar3d.js.map +1 -1
- package/cjs/theme/builtin/common/series/circle-packing.js +11 -5
- package/cjs/theme/builtin/common/series/circle-packing.js.map +1 -1
- package/cjs/theme/builtin/common/series/dot.js +11 -3
- package/cjs/theme/builtin/common/series/dot.js.map +1 -1
- package/cjs/theme/builtin/common/series/funnel.js +7 -4
- package/cjs/theme/builtin/common/series/funnel.js.map +1 -1
- package/cjs/theme/builtin/common/series/funnel3d.js +7 -4
- package/cjs/theme/builtin/common/series/funnel3d.js.map +1 -1
- package/cjs/theme/builtin/common/series/line.js +2 -7
- package/cjs/theme/builtin/common/series/line.js.map +1 -1
- package/cjs/theme/builtin/common/series/map.js +4 -2
- package/cjs/theme/builtin/common/series/map.js.map +1 -1
- package/cjs/theme/builtin/common/series/pie.js +1 -6
- package/cjs/theme/builtin/common/series/pie.js.map +1 -1
- package/cjs/theme/builtin/common/series/pie3d.js +2 -9
- package/cjs/theme/builtin/common/series/pie3d.js.map +1 -1
- package/cjs/theme/builtin/common/series/radar.js +2 -7
- package/cjs/theme/builtin/common/series/radar.js.map +1 -1
- package/cjs/theme/builtin/common/series/rangeColumn.js +2 -3
- package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -1
- package/cjs/theme/builtin/common/series/rose.js +1 -2
- package/cjs/theme/builtin/common/series/rose.js.map +1 -1
- package/cjs/theme/builtin/common/series/sankey.js +0 -1
- package/cjs/theme/builtin/common/series/sankey.js.map +1 -1
- package/cjs/theme/builtin/common/series/scatter.js +2 -7
- package/cjs/theme/builtin/common/series/scatter.js.map +1 -1
- package/cjs/theme/builtin/common/series/sunburst.js +5 -2
- package/cjs/theme/builtin/common/series/sunburst.js.map +1 -1
- package/cjs/theme/builtin/common/series/treemap.js +9 -5
- package/cjs/theme/builtin/common/series/treemap.js.map +1 -1
- package/cjs/theme/builtin/common/series/waterfall.js +5 -6
- package/cjs/theme/builtin/common/series/waterfall.js.map +1 -1
- package/cjs/theme/builtin/dark/color-scheme.js +5 -3
- package/cjs/theme/builtin/dark/color-scheme.js.map +1 -1
- package/cjs/theme/builtin/index.d.ts +0 -1
- package/cjs/theme/builtin/index.js +1 -2
- package/cjs/theme/builtin/index.js.map +1 -1
- package/cjs/theme/builtin/light/color-scheme.js +4 -2
- package/cjs/theme/builtin/light/color-scheme.js.map +1 -1
- package/cjs/theme/builtin/light/index.js +2 -2
- package/cjs/theme/builtin/light/index.js.map +1 -1
- 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.js +8 -2
- package/cjs/theme/color-scheme/util.js.map +1 -1
- package/cjs/theme/interface.d.ts +16 -5
- package/cjs/theme/interface.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +2 -1
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/visual.d.ts +10 -20
- 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 +3 -10
- package/cjs/util/space.js +13 -28
- 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 -2
- package/cjs/util/text.js +4 -14
- package/cjs/util/text.js.map +1 -1
- package/cjs/vchart-all.js +1 -1
- 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/utils.js +3 -3
- package/esm/animation/utils.js.map +1 -1
- package/esm/chart/area/area.js +3 -3
- 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 +1 -0
- package/esm/chart/base-chart.js +14 -8
- 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 +1 -1
- 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 +1 -1
- package/esm/chart/index.js.map +1 -1
- package/esm/chart/line/line.js +1 -1
- 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 -5
- 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.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.js +1 -1
- package/esm/chart/treemap/treemap.js.map +1 -1
- package/esm/chart/util.js +2 -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 +4 -0
- package/esm/compile/compiler.js +4 -0
- 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 +0 -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 +1 -14
- package/esm/component/axis/base-axis.js +19 -30
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +1 -1
- package/esm/component/axis/cartesian/axis.js +21 -20
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/cartesian/band-axis.d.ts +1 -0
- 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 +2 -0
- 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.js +3 -4
- package/esm/component/axis/cartesian/linear-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.js +3 -3
- package/esm/component/axis/cartesian/time-axis.js.map +1 -1
- package/esm/component/axis/interface.d.ts +4 -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 +2 -1
- package/esm/component/axis/polar/axis.js +14 -13
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/band-axis.d.ts +1 -0
- 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/{utils.d.ts → util.d.ts} +1 -1
- package/esm/component/axis/{utils.js → util.js} +7 -5
- package/esm/component/axis/util.js.map +1 -0
- package/esm/component/base/base-component.d.ts +10 -2
- package/esm/component/base/base-component.js +9 -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 +12 -2
- package/esm/component/brush/brush.js +74 -62
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/crosshair/base.d.ts +2 -2
- package/esm/component/crosshair/base.js +1 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/cartesian.js +7 -7
- 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.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 +1 -1
- 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 +0 -1
- 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.js +8 -6
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/interface.d.ts +2 -2
- package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/interface.d.ts +2 -5
- package/esm/component/data-zoom/interface.js.map +1 -1
- package/esm/component/geo/geo-coordinate.d.ts +2 -0
- package/esm/component/geo/geo-coordinate.js +30 -4
- 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 +2 -2
- package/esm/component/index.js +2 -2
- package/esm/component/index.js.map +1 -1
- package/esm/component/indicator/indicator.d.ts +1 -0
- package/esm/component/indicator/indicator.js +8 -7
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/indicator/interface.d.ts +5 -6
- package/esm/component/indicator/interface.js.map +1 -1
- package/esm/component/interface/theme.d.ts +2 -2
- package/esm/component/interface/theme.js.map +1 -1
- package/esm/component/interface/type.d.ts +1 -0
- package/esm/component/interface/type.js +12 -11
- package/esm/component/interface/type.js.map +1 -1
- package/esm/component/label/base-label.d.ts +0 -1
- package/esm/component/label/base-label.js +0 -5
- package/esm/component/label/base-label.js.map +1 -1
- package/esm/component/label/interface.d.ts +2 -1
- package/esm/component/label/interface.js.map +1 -1
- package/esm/component/label/label.d.ts +0 -1
- package/esm/component/label/label.js +2 -7
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/label/totalLabel.js +2 -2
- package/esm/component/label/totalLabel.js.map +1 -1
- package/esm/component/legend/base-legend.js +5 -5
- package/esm/component/legend/base-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.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/marker/interface.d.ts +2 -2
- package/esm/component/marker/interface.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/tooltip/handler/dom/model/content-column-model.js +7 -5
- 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 +3 -3
- 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 +4 -4
- package/esm/component/tooltip/handler/dom/util.js.map +1 -1
- package/esm/component/tooltip/handler/utils/attribute.js +5 -5
- package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/esm/component/tooltip/handler/utils/get-spec.js +2 -2
- package/esm/component/tooltip/handler/utils/get-spec.js.map +1 -1
- package/esm/component/tooltip/handler/utils/style.js +2 -2
- package/esm/component/tooltip/handler/utils/style.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.js +4 -3
- package/esm/component/tooltip/tooltip.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/vchart.js +22 -19
- package/esm/core/vchart.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/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/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/util.js +1 -1
- package/esm/data/transforms/tick-data/util.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/interaction/trigger.js +3 -3
- package/esm/interaction/trigger.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.js +4 -4
- package/esm/model/base-model.js.map +1 -1
- package/esm/model/interface.d.ts +1 -1
- package/esm/model/interface.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/series/area/area.d.ts +4 -1
- package/esm/series/area/area.js +10 -7
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/bar/bar.js +3 -5
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/base/base-series.d.ts +2 -0
- package/esm/series/base/base-series.js +71 -16
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/base/tooltip-helper.js +4 -2
- package/esm/series/base/tooltip-helper.js.map +1 -1
- package/esm/series/box-plot/box-plot.js +1 -1
- package/esm/series/box-plot/box-plot.js.map +1 -1
- package/esm/series/cartesian/cartesian.d.ts +10 -3
- package/esm/series/cartesian/cartesian.js +37 -26
- package/esm/series/cartesian/cartesian.js.map +1 -1
- package/esm/series/cartesian/interface.d.ts +1 -0
- package/esm/series/cartesian/interface.js.map +1 -1
- package/esm/series/dot/dot.js +2 -2
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/funnel/funnel.js +12 -2
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/heatmap/heatmap.js +2 -2
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/series/line/interface.d.ts +0 -2
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/line/line.d.ts +1 -0
- package/esm/series/line/line.js +1 -1
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/link/link.js +1 -1
- package/esm/series/link/link.js.map +1 -1
- 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.js +9 -3
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/mixin/line-mixin.d.ts +3 -2
- package/esm/series/mixin/line-mixin.js +32 -13
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/pie/pie.js +2 -2
- 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 +4 -0
- package/esm/series/polar/polar.js +15 -2
- package/esm/series/polar/polar.js.map +1 -1
- package/esm/series/radar/radar.d.ts +1 -0
- package/esm/series/radar/radar.js +1 -1
- package/esm/series/radar/radar.js.map +1 -1
- package/esm/series/range-area/range-area.d.ts +2 -0
- package/esm/series/range-area/range-area.js +3 -0
- package/esm/series/range-area/range-area.js.map +1 -1
- package/esm/series/range-column/range-column.js +3 -3
- package/esm/series/range-column/range-column.js.map +1 -1
- package/esm/series/rose/rose.js +2 -2
- package/esm/series/rose/rose.js.map +1 -1
- 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 +5 -0
- package/esm/series/sankey/sankey.js +248 -93
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/scatter/scatter.d.ts +1 -1
- package/esm/series/scatter/scatter.js +14 -9
- package/esm/series/scatter/scatter.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/theme/builtin/common/component/axis/cartesian-axis.js +4 -4
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/common-axis.js +12 -6
- package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/polar-axis.js +1 -1
- package/esm/theme/builtin/common/component/axis/polar-axis.js.map +1 -1
- package/esm/theme/builtin/common/component/crosshair.js +73 -117
- package/esm/theme/builtin/common/component/crosshair.js.map +1 -1
- package/esm/theme/builtin/common/component/data-zoom.js +16 -6
- package/esm/theme/builtin/common/component/data-zoom.js.map +1 -1
- package/esm/theme/builtin/common/component/indicator.js +14 -4
- package/esm/theme/builtin/common/component/indicator.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/color-legend.js +32 -4
- package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/continuous.js +26 -12
- package/esm/theme/builtin/common/component/legend/continuous.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/discrete-legend.js +22 -9
- package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/size-legend.js +55 -14
- package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -1
- package/esm/theme/builtin/common/component/map-label.js +4 -6
- package/esm/theme/builtin/common/component/map-label.js.map +1 -1
- package/esm/theme/builtin/common/component/mark-area.js +4 -1
- package/esm/theme/builtin/common/component/mark-area.js.map +1 -1
- package/esm/theme/builtin/common/component/mark-line.js +4 -1
- package/esm/theme/builtin/common/component/mark-line.js.map +1 -1
- package/esm/theme/builtin/common/component/player.js +33 -7
- package/esm/theme/builtin/common/component/player.js.map +1 -1
- package/esm/theme/builtin/common/component/poptip.d.ts +2 -2
- package/esm/theme/builtin/common/component/poptip.js +17 -11
- package/esm/theme/builtin/common/component/poptip.js.map +1 -1
- package/esm/theme/builtin/common/component/title.js +9 -5
- package/esm/theme/builtin/common/component/title.js.map +1 -1
- package/esm/theme/builtin/common/component/tooltip.js +12 -11
- package/esm/theme/builtin/common/component/tooltip.js.map +1 -1
- package/esm/theme/builtin/common/component/total-label.js +3 -5
- package/esm/theme/builtin/common/component/total-label.js.map +1 -1
- package/esm/theme/builtin/common/constants.js +16 -7
- package/esm/theme/builtin/common/constants.js.map +1 -1
- package/esm/theme/builtin/common/mark.js +8 -4
- package/esm/theme/builtin/common/mark.js.map +1 -1
- package/esm/theme/builtin/common/series/area.js +1 -4
- package/esm/theme/builtin/common/series/area.js.map +1 -1
- package/esm/theme/builtin/common/series/bar.js +1 -4
- package/esm/theme/builtin/common/series/bar.js.map +1 -1
- package/esm/theme/builtin/common/series/bar3d.js +0 -3
- package/esm/theme/builtin/common/series/bar3d.js.map +1 -1
- package/esm/theme/builtin/common/series/circle-packing.js +8 -4
- package/esm/theme/builtin/common/series/circle-packing.js.map +1 -1
- package/esm/theme/builtin/common/series/dot.js +8 -2
- package/esm/theme/builtin/common/series/dot.js.map +1 -1
- package/esm/theme/builtin/common/series/funnel.js +6 -5
- package/esm/theme/builtin/common/series/funnel.js.map +1 -1
- package/esm/theme/builtin/common/series/funnel3d.js +6 -5
- package/esm/theme/builtin/common/series/funnel3d.js.map +1 -1
- package/esm/theme/builtin/common/series/line.js +1 -4
- package/esm/theme/builtin/common/series/line.js.map +1 -1
- package/esm/theme/builtin/common/series/map.js +4 -2
- package/esm/theme/builtin/common/series/map.js.map +1 -1
- package/esm/theme/builtin/common/series/pie.js +0 -3
- package/esm/theme/builtin/common/series/pie.js.map +1 -1
- package/esm/theme/builtin/common/series/pie3d.js +1 -6
- package/esm/theme/builtin/common/series/pie3d.js.map +1 -1
- package/esm/theme/builtin/common/series/radar.js +1 -4
- package/esm/theme/builtin/common/series/radar.js.map +1 -1
- package/esm/theme/builtin/common/series/rangeColumn.js +1 -4
- package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -1
- package/esm/theme/builtin/common/series/rose.js +1 -2
- package/esm/theme/builtin/common/series/rose.js.map +1 -1
- package/esm/theme/builtin/common/series/sankey.js +0 -1
- package/esm/theme/builtin/common/series/sankey.js.map +1 -1
- package/esm/theme/builtin/common/series/scatter.js +1 -4
- package/esm/theme/builtin/common/series/scatter.js.map +1 -1
- package/esm/theme/builtin/common/series/sunburst.js +6 -1
- package/esm/theme/builtin/common/series/sunburst.js.map +1 -1
- package/esm/theme/builtin/common/series/treemap.js +8 -6
- package/esm/theme/builtin/common/series/treemap.js.map +1 -1
- package/esm/theme/builtin/common/series/waterfall.js +4 -7
- package/esm/theme/builtin/common/series/waterfall.js.map +1 -1
- package/esm/theme/builtin/dark/color-scheme.js +5 -3
- package/esm/theme/builtin/dark/color-scheme.js.map +1 -1
- package/esm/theme/builtin/index.d.ts +0 -1
- package/esm/theme/builtin/index.js +0 -2
- package/esm/theme/builtin/index.js.map +1 -1
- package/esm/theme/builtin/light/color-scheme.js +4 -2
- package/esm/theme/builtin/light/color-scheme.js.map +1 -1
- package/esm/theme/builtin/light/index.js +2 -2
- package/esm/theme/builtin/light/index.js.map +1 -1
- 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.js +8 -3
- package/esm/theme/color-scheme/util.js.map +1 -1
- package/esm/theme/interface.d.ts +16 -5
- package/esm/theme/interface.js.map +1 -1
- package/esm/typings/spec/common.d.ts +2 -1
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/visual.d.ts +10 -20
- 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 +3 -10
- package/esm/util/space.js +5 -23
- 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 -2
- package/esm/util/text.js +4 -12
- package/esm/util/text.js.map +1 -1
- package/esm/vchart-all.js +2 -2
- 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 +20 -13
- 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/builtin/common/component/axis/log-axis.d.ts +0 -2
- package/cjs/theme/builtin/common/component/axis/log-axis.js +0 -22
- package/cjs/theme/builtin/common/component/axis/log-axis.js.map +0 -1
- package/cjs/theme/builtin/constant.d.ts +0 -2
- package/cjs/theme/builtin/constant.js +0 -8
- package/cjs/theme/builtin/constant.js.map +0 -1
- package/cjs/util/spec.d.ts +0 -17
- package/cjs/util/spec.js +0 -121
- package/cjs/util/spec.js.map +0 -1
- 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/builtin/common/component/axis/log-axis.d.ts +0 -2
- package/esm/theme/builtin/common/component/axis/log-axis.js +0 -18
- package/esm/theme/builtin/common/component/axis/log-axis.js.map +0 -1
- package/esm/theme/builtin/constant.d.ts +0 -2
- package/esm/theme/builtin/constant.js +0 -4
- package/esm/theme/builtin/constant.js.map +0 -1
- package/esm/util/spec.d.ts +0 -17
- package/esm/util/spec.js +0 -112
- package/esm/util/spec.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.cloneDeepSpec = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), common_1 = require("./common");
|
|
8
|
+
|
|
9
|
+
function cloneDeepSpec(spec) {
|
|
10
|
+
const value = spec;
|
|
11
|
+
let result;
|
|
12
|
+
if (!(0, vutils_1.isValid)(value) || "object" != typeof value) return value;
|
|
13
|
+
if ((0, common_1.isDataView)(value) || (0, common_1.isHTMLElement)(value)) return value;
|
|
14
|
+
const isArr = (0, vutils_1.isArray)(value), length = value.length;
|
|
15
|
+
result = isArr ? new Array(length) : "object" == typeof value ? {} : (0, vutils_1.isBoolean)(value) || (0,
|
|
16
|
+
vutils_1.isNumber)(value) || (0, vutils_1.isString)(value) ? value : (0, vutils_1.isDate)(value) ? new Date(+value) : void 0;
|
|
17
|
+
const props = isArr ? void 0 : Object.keys(Object(value));
|
|
18
|
+
let index = -1;
|
|
19
|
+
if (result) for (;++index < (props || value).length; ) {
|
|
20
|
+
const key = props ? props[index] : index, subValue = value[key];
|
|
21
|
+
result[key] = cloneDeepSpec(subValue);
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.cloneDeepSpec = cloneDeepS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G,CAAC,CAAC,CAAC;IACf,IAAI,MAAM,EAAE;QACV,OAAO,EAAE,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE;YACxC,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACzC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;SACvC;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAhDD,sCAgDC","file":"clone-deep.js","sourcesContent":["import { isArray, isBoolean, isDate, isNumber, isString, isValid } from '@visactor/vutils';\nimport { isDataView, isHTMLElement } from './common';\n\n/**\n * 深拷贝 spec,为避免循环引用,DataView 维持原有引用\n * @param spec 原spec\n */\nexport function cloneDeepSpec(spec: any) {\n const value = spec;\n\n let result;\n if (!isValid(value) || typeof value !== 'object') {\n return value;\n }\n\n // 判断是不是不能深拷贝的对象\n if (isDataView(value) || isHTMLElement(value)) {\n return value;\n }\n\n const isArr = isArray(value);\n const length = value.length;\n // 不考虑特殊数组的额外处理\n if (isArr) {\n result = new Array(length);\n }\n // 不考虑 buffer / arguments 类型的处理以及 prototype 的额外处理\n else if (typeof value === 'object') {\n result = {};\n }\n // 不建议使用作为 Boolean / Number / String 作为构造器\n else if (isBoolean(value) || isNumber(value) || isString(value)) {\n result = value;\n } else if (isDate(value)) {\n result = new Date(+value);\n }\n // 不考虑 ArrayBuffer / DataView / TypedArray / map / set / regexp / symbol 类型\n else {\n result = undefined;\n }\n\n // 不考虑 map / set / TypedArray 类型的赋值\n\n // 不考虑对象的 symbol 属性\n const props = isArr ? undefined : Object.keys(Object(value));\n\n let index = -1;\n if (result) {\n while (++index < (props || value).length) {\n const key = props ? props[index] : index;\n const subValue = value[key];\n result[key] = cloneDeepSpec(subValue);\n }\n }\n return result;\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.isHTMLElement = exports.isDataView = void 0;
|
|
6
|
+
|
|
7
|
+
const vdataset_1 = require("@visactor/vdataset");
|
|
8
|
+
|
|
9
|
+
function isDataView(obj) {
|
|
10
|
+
return obj instanceof vdataset_1.DataView;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function isHTMLElement(obj) {
|
|
14
|
+
try {
|
|
15
|
+
return obj instanceof Element;
|
|
16
|
+
} catch (_a) {
|
|
17
|
+
const htmlElementKeys = [ "children", "innerHTML", "classList", "setAttribute", "tagName", "getBoundingClientRect" ], keys = Object.keys(obj);
|
|
18
|
+
return htmlElementKeys.every((key => keys.includes(key)));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.isDataView = isDataView, exports.isHTMLElement = isHTMLElement;
|
|
23
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/common.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C,SAAgB,UAAU,CAAC,GAAQ;IACjC,OAAO,GAAG,YAAY,mBAAQ,CAAC;AACjC,CAAC;AAFD,gCAEC;AAED,SAAgB,aAAa,CAAC,GAAQ;IACpC,IAAI;QACF,OAAO,GAAG,YAAY,OAAO,CAAC;KAC/B;IAAC,WAAM;QAEN,MAAM,eAAe,GAAsB;YACzC,UAAU;YACV,WAAW;YACX,WAAW;YACX,cAAc;YACd,SAAS;YACT,uBAAuB;SACxB,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;KACzD;AACH,CAAC;AAhBD,sCAgBC","file":"common.js","sourcesContent":["import { DataView } from '@visactor/vdataset';\n\nexport function isDataView(obj: any): obj is DataView {\n return obj instanceof DataView;\n}\n\nexport function isHTMLElement(obj: any): obj is Element {\n try {\n return obj instanceof Element;\n } catch {\n // 跨端 plan B\n const htmlElementKeys: (keyof Element)[] = [\n 'children',\n 'innerHTML',\n 'classList',\n 'setAttribute',\n 'tagName',\n 'getBoundingClientRect'\n ];\n const keys = Object.keys(obj);\n return htmlElementKeys.every(key => keys.includes(key));\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
4
|
+
void 0 === k2 && (k2 = k);
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
get: function() {
|
|
9
|
+
return m[k];
|
|
10
|
+
}
|
|
11
|
+
}), Object.defineProperty(o, k2, desc);
|
|
12
|
+
} : function(o, m, k, k2) {
|
|
13
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
14
|
+
}), __exportStar = this && this.__exportStar || function(m, exports) {
|
|
15
|
+
for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
Object.defineProperty(exports, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), __exportStar(require("./background"), exports), __exportStar(require("./clone-deep"), exports),
|
|
21
|
+
__exportStar(require("./common"), exports), __exportStar(require("./merge-spec"), exports),
|
|
22
|
+
__exportStar(require("./merge-theme"), exports), __exportStar(require("./preprocess"), exports),
|
|
23
|
+
__exportStar(require("./transform"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B","file":"index.js","sourcesContent":["export * from './background';\nexport * from './clone-deep';\nexport * from './common';\nexport * from './merge-spec';\nexport * from './merge-theme';\nexport * from './preprocess';\nexport * from './transform';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeSpec(target: any, ...sources: any[]): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.mergeSpec = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils");
|
|
8
|
+
|
|
9
|
+
function baseMerge(target, source, shallowArray = !1) {
|
|
10
|
+
if (source) {
|
|
11
|
+
if (target === source) return;
|
|
12
|
+
if ((0, vutils_1.isValid)(source) && "object" == typeof source) {
|
|
13
|
+
const iterable = Object(source), props = [];
|
|
14
|
+
for (const key in iterable) props.push(key);
|
|
15
|
+
let {length: length} = props, propIndex = -1;
|
|
16
|
+
for (;length--; ) {
|
|
17
|
+
const key = props[++propIndex];
|
|
18
|
+
(0, vutils_1.isValid)(iterable[key]) && "object" == typeof iterable[key] && !(0,
|
|
19
|
+
vutils_1.isArray)(target[key]) ? baseMergeDeep(target, source, key, shallowArray) : assignMergeValue(target, key, iterable[key]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function baseMergeDeep(target, source, key, shallowArray = !1) {
|
|
26
|
+
const objValue = target[key], srcValue = source[key];
|
|
27
|
+
let newValue = source[key], isCommon = !0;
|
|
28
|
+
if ((0, vutils_1.isArray)(srcValue)) {
|
|
29
|
+
if (shallowArray) newValue = []; else if ((0, vutils_1.isArray)(objValue)) newValue = objValue; else if ((0,
|
|
30
|
+
vutils_1.isArrayLike)(objValue)) {
|
|
31
|
+
newValue = new Array(objValue.length);
|
|
32
|
+
let index = -1;
|
|
33
|
+
const length = objValue.length;
|
|
34
|
+
for (;++index < length; ) newValue[index] = objValue[index];
|
|
35
|
+
}
|
|
36
|
+
} else (0, vutils_1.isPlainObject)(srcValue) ? (newValue = objValue, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
|
|
37
|
+
isCommon && baseMerge(newValue, srcValue, shallowArray), assignMergeValue(target, key, newValue);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function assignMergeValue(target, key, value) {
|
|
41
|
+
(void 0 !== value && !eq(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function eq(value, other) {
|
|
45
|
+
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function mergeSpec(target, ...sources) {
|
|
49
|
+
let sourceIndex = -1;
|
|
50
|
+
const length = sources.length;
|
|
51
|
+
for (;++sourceIndex < length; ) {
|
|
52
|
+
baseMerge(target, sources[sourceIndex], !0);
|
|
53
|
+
}
|
|
54
|
+
return target;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
exports.mergeSpec = mergeSpec;
|
|
58
|
+
//# sourceMappingURL=merge-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/merge-spec.ts"],"names":[],"mappings":";;;AAAA,6CAAgF;AAEhF,SAAS,SAAS,CAAC,MAAW,EAAE,MAAW,EAAE,eAAwB,KAAK;IACxE,IAAI,MAAM,EAAE;QACV,IAAI,MAAM,KAAK,MAAM,EAAE;YACrB,OAAO;SACR;QACD,IAAI,IAAA,gBAAO,EAAC,MAAM,CAAC,IAAI,OAAO,MAAM,KAAK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AAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACzE,CAAC;AAKD,SAAgB,SAAS,CAAC,MAAW,EAAE,GAAG,OAAc;IACtD,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC;IACrB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,WAAW,GAAG,MAAM,EAAE;QAC7B,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QACpC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;KACjC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AARD,8BAQC","file":"merge-spec.js","sourcesContent":["import { isArray, isArrayLike, isPlainObject, isValid } from '@visactor/vutils';\n\nfunction baseMerge(target: any, source: any, shallowArray: boolean = false) {\n if (source) {\n if (target === source) {\n return;\n }\n if (isValid(source) && typeof source === 'object') {\n // baseFor\n const iterable = Object(source);\n const props = [];\n // keysIn\n for (const key in iterable) {\n props.push(key);\n }\n let { length } = props;\n let propIndex = -1;\n while (length--) {\n const key = props[++propIndex];\n if (\n isValid(iterable[key]) &&\n typeof iterable[key] === 'object' &&\n !isArray(target[key]) // VChart 特有逻辑\n ) {\n baseMergeDeep(target, source, key, shallowArray);\n } else {\n assignMergeValue(target, key, iterable[key]);\n }\n }\n }\n }\n}\n\n// 由于目前 VChart 内部对 spec 会先执行一次深拷贝,merge 暂时不考虑 source 中有环的问题\nfunction baseMergeDeep(target: object, source: object, key: string, shallowArray: boolean = false) {\n const objValue = target[key];\n const srcValue = source[key];\n let newValue = source[key];\n let isCommon = true;\n // 不考虑 buffer / typedArray 类型\n if (isArray(srcValue)) {\n if (shallowArray) {\n // 依据参数对数组做浅拷贝\n newValue = [];\n } else if (isArray(objValue)) {\n newValue = objValue;\n } else if (isArrayLike(objValue)) {\n // 如果 source 为数组,则 target 的 arrayLike 对象也视作为数组处理\n newValue = new Array(objValue.length);\n let index = -1;\n const length = objValue.length;\n while (++index < length) {\n newValue[index] = objValue[index];\n }\n }\n }\n // else if (isArray(srcValue) && shallowArray) {\n // newValue = [];\n // }\n // 不考虑 argument 类型\n else if (isPlainObject(srcValue)) {\n newValue = objValue;\n // 不考虑 prototype 的额外处理\n if (typeof objValue === 'function' || typeof objValue !== 'object') {\n newValue = {};\n }\n } else {\n isCommon = false;\n }\n // 对 class 等复杂对象或者浅拷贝的 array 不做拷贝处理\n if (isCommon) {\n baseMerge(newValue, srcValue, shallowArray);\n }\n assignMergeValue(target, key, newValue);\n}\n\nfunction assignMergeValue(target: object, key: string, value: any) {\n if ((value !== undefined && !eq(target[key], value)) || (value === undefined && !(key in target))) {\n // 不考虑 __proto__ 的赋值处理\n target[key] = value;\n }\n}\n\nfunction eq(value: any, other: any) {\n return value === other || (Number.isNaN(value) && Number.isNaN(other));\n}\n\n/* 与原生的 lodash merge 差异在于对数组是否应用最后一个 source 的结果\n * 以及对一些特殊情况的处理,比如对数组类型 padding 和对象类型的 padding 的 merge\n */\nexport function mergeSpec(target: any, ...sources: any[]): any {\n let sourceIndex = -1;\n const length = sources.length;\n while (++sourceIndex < length) {\n const source = sources[sourceIndex];\n baseMerge(target, source, true);\n }\n return target;\n}\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.mergeTheme = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), util_1 = require("../../theme/color-scheme/util"), interface_1 = require("../../series/interface"), merge_spec_1 = require("./merge-spec");
|
|
8
|
+
|
|
9
|
+
function mergeTheme(target, ...sources) {
|
|
10
|
+
return (0, merge_spec_1.mergeSpec)(transformThemeToMerge(target), ...sources.map(transformThemeToMerge));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function transformThemeToMerge(theme) {
|
|
14
|
+
if (!theme) return theme;
|
|
15
|
+
let {colorScheme: colorScheme} = theme;
|
|
16
|
+
colorScheme && (colorScheme = Object.keys(colorScheme).reduce(((scheme, key) => {
|
|
17
|
+
const value = colorScheme[key];
|
|
18
|
+
return scheme[key] = (0, util_1.transformColorSchemeToStandardStruct)(value), scheme;
|
|
19
|
+
}), {}));
|
|
20
|
+
let {series: series} = theme;
|
|
21
|
+
const {mark: markByType, markByName: markByName} = theme;
|
|
22
|
+
return (markByType || markByName) && (series = Object.keys(interface_1.seriesMarkInfoMap).reduce(((newSeriesTheme, key) => {
|
|
23
|
+
var _a;
|
|
24
|
+
const value = null !== (_a = null == series ? void 0 : series[key]) && void 0 !== _a ? _a : {}, newValue = {};
|
|
25
|
+
return Object.values(interface_1.seriesMarkInfoMap[key]).forEach((({type: type, name: name}) => {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
newValue[name] = (0, merge_spec_1.mergeSpec)({}, null !== (_a = null == markByType ? void 0 : markByType[(0,
|
|
28
|
+
vutils_1.array)(type)[0]]) && void 0 !== _a ? _a : {}, null !== (_b = null == markByName ? void 0 : markByName[name]) && void 0 !== _b ? _b : {}, value[name]);
|
|
29
|
+
})), newSeriesTheme[key] = Object.assign(Object.assign({}, value), newValue), newSeriesTheme;
|
|
30
|
+
}), {})), Object.assign(Object.assign({}, theme), {
|
|
31
|
+
colorScheme: colorScheme,
|
|
32
|
+
series: series
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
exports.mergeTheme = mergeTheme;
|
|
37
|
+
//# sourceMappingURL=merge-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/merge-theme.ts"],"names":[],"mappings":";;;AAAA,6CAAqD;AAErD,wDAAqF;AAIrF,sDAAiF;AACjF,6CAAyC;AAEzC,SAAgB,UAAU,CAAC,MAAqB,EAAE,GAAG,OAAwB;IAC3E,OAAO,IAAA,sBAAS,EAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,q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AI,EAAE,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,IAAI,CAAC,mCAAI,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5G,CAAC,CAAC,CAAC;YACH,cAAc,CAAC,GAAG,CAAC,mCACd,KAAK,GACL,QAAQ,CACZ,CAAC;YACF,OAAO,cAAc,CAAC;QACxB,CAAC,EAAE,EAAkB,CAAC,CAAC;KACxB;IAED,uCACK,KAAK,KACR,WAAW;QACX,MAAM,IACN;AACJ,CAAC","file":"merge-theme.js","sourcesContent":["import { type Maybe, array } from '@visactor/vutils';\nimport type { ITheme } from '../../theme';\nimport { transformColorSchemeToStandardStruct } from '../../theme/color-scheme/util';\nimport type { IThemeColorScheme } from '../../theme/color-scheme/interface';\nimport type { ISeriesTheme } from '../../series/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { seriesMarkInfoMap, type ISeriesMarkInfo } from '../../series/interface';\nimport { mergeSpec } from './merge-spec';\n\nexport function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme> {\n return mergeSpec(transformThemeToMerge(target), ...sources.map(transformThemeToMerge));\n}\n\nfunction transformThemeToMerge(theme?: Maybe<ITheme>): Maybe<ITheme> {\n if (!theme) {\n return theme;\n }\n\n // 将色板转化为标准形式\n let { colorScheme } = theme;\n if (colorScheme) {\n colorScheme = Object.keys(colorScheme).reduce<IThemeColorScheme>((scheme, key) => {\n const value = colorScheme[key];\n scheme[key] = transformColorSchemeToStandardStruct(value);\n return scheme;\n }, {} as IThemeColorScheme);\n }\n\n // 将全局 mark 主题 merge 进系列主题\n let { series } = theme;\n const { mark: markByType, markByName } = theme;\n if (markByType || markByName) {\n series = Object.keys(seriesMarkInfoMap).reduce((newSeriesTheme, key) => {\n const value = series?.[key] ?? {};\n const newValue = {};\n Object.values<ISeriesMarkInfo>(seriesMarkInfoMap[key]).forEach(({ type, name }) => {\n newValue[name] = mergeSpec({}, markByType?.[array(type)[0]] ?? {}, markByName?.[name] ?? {}, value[name]);\n });\n newSeriesTheme[key] = {\n ...value,\n ...newValue\n };\n return newSeriesTheme;\n }, {} as ISeriesTheme);\n }\n\n return {\n ...theme,\n colorScheme,\n series\n };\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.preprocessSpecOrTheme = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), common_1 = require("./common"), util_1 = require("../../theme/color-scheme/util"), space_1 = require("../space");
|
|
8
|
+
|
|
9
|
+
function preprocessSpecOrTheme(obj, colorScheme, seriesType) {
|
|
10
|
+
if ((0, vutils_1.isArray)(obj)) return obj.map((element => (0, vutils_1.isObject)(element) && !(0,
|
|
11
|
+
vutils_1.isFunction)(element) ? preprocessSpecOrTheme(element, colorScheme, seriesType) : element));
|
|
12
|
+
const newObj = {};
|
|
13
|
+
return Object.keys(obj).forEach((key => {
|
|
14
|
+
const value = obj[key];
|
|
15
|
+
if (key.includes("data")) newObj[key] = value; else if ((0, vutils_1.isObject)(value)) {
|
|
16
|
+
if ((0, vutils_1.isFunction)(value) || (0, common_1.isDataView)(value) || (0, common_1.isHTMLElement)(value)) return void (newObj[key] = value);
|
|
17
|
+
(0, util_1.isColorKey)(value) ? newObj[key] = (0, util_1.getActualColor)(value, colorScheme, seriesType) : newObj[key] = "padding" === key ? (0,
|
|
18
|
+
space_1.normalizeLayoutPaddingSpec)(value) : preprocessSpecOrTheme(value, colorScheme, seriesType);
|
|
19
|
+
} else newObj[key] = value;
|
|
20
|
+
})), newObj;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.preprocessSpecOrTheme = preprocessSpecOrTheme;
|
|
24
|
+
//# sourceMappingURL=preprocess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/sp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AC,GAAG,IAAA,kCAA0B,EAAC,KAAK,CAAC,CAAC;aACjD;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;aACrE;SACF;aAAM;YACL,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SACrB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAvCD,sDAuCC","file":"preprocess.js","sourcesContent":["import { isArray, isFunction, isObject } from '@visactor/vutils';\nimport type { SeriesTypeEnum } from '../../series/interface';\nimport type { IThemeColorScheme } from '../../theme/color-scheme/interface';\nimport { isDataView, isHTMLElement } from './common';\nimport { getActualColor, isColorKey } from '../../theme/color-scheme/util';\nimport { normalizeLayoutPaddingSpec } from '../space';\n\n/** 对 spec 或者类 spec 配置(如 theme)进行预处理,如进行语义化颜色的转换等 */\nexport function preprocessSpecOrTheme(obj: any, colorScheme?: IThemeColorScheme, seriesType?: SeriesTypeEnum): any {\n if (isArray(obj)) {\n return obj.map(element => {\n if (isObject(element) && !isFunction(element)) {\n return preprocessSpecOrTheme(element, colorScheme, seriesType);\n }\n return element;\n });\n }\n\n const newObj = {};\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n // 绕过数据\n if (key.includes('data')) {\n newObj[key] = value;\n return;\n }\n if (isObject(value)) {\n // 绕过不可深拷贝的对象\n if (isFunction(value) || isDataView(value) || isHTMLElement(value)) {\n newObj[key] = value;\n return;\n }\n if (isColorKey(value)) {\n // 查询、替换语义化颜色\n newObj[key] = getActualColor(value, colorScheme, seriesType);\n } else if (key === 'padding') {\n // 标准化 padding\n newObj[key] = normalizeLayoutPaddingSpec(value);\n } else {\n newObj[key] = preprocessSpecOrTheme(value, colorScheme, seriesType);\n }\n } else {\n newObj[key] = value;\n }\n });\n\n return newObj;\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.specTransform = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils");
|
|
8
|
+
|
|
9
|
+
function specTransform(spec, special = {
|
|
10
|
+
data: v => v
|
|
11
|
+
}) {
|
|
12
|
+
if (!spec) return spec;
|
|
13
|
+
if (spec.constructor === Object) {
|
|
14
|
+
const result = {};
|
|
15
|
+
for (const key in spec) if (Object.prototype.hasOwnProperty.call(spec, key)) {
|
|
16
|
+
if (special[key]) {
|
|
17
|
+
result[key] = special[key](spec[key]);
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
result[key] = specTransform(spec[key], special);
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
return (0, vutils_1.isArray)(spec) ? spec.map((s => specTransform(s, special))) : spec;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
exports.specTransform = specTransform;
|
|
28
|
+
//# sourceMappingURL=transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/transform.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAI3C,SAAgB,aAAa,CAC3B,IAAa,EACb,UAEI;IACF,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;CACb;IAED,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,IAAI,IAAI,CAAC,WAAW,KAAK,MAAM,EAAE;QAC/B,MAAM,MAAM,GAAQ,EAAE,CAAC;QACvB,KAAK,MAAM,GAAG,IAAI,IAAW,EAAE;YAC7B,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;gBAEnD,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;oBAChB,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;oBACtC,SAAS;iBACV;gBACD,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;aACjD;SACF;QACD,OAAO,MAAM,CAAC;KACf;IAED,IAAI,IAAA,gBAAO,EAAC,IAAI,CAAC,EAAE;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;KACjD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AA/BD,sCA+BC","file":"transform.js","sourcesContent":["import { isArray } from '@visactor/vutils';\n\n// todo 以目前的场景来看,并没有递归的需要。\n// 考虑到不确定性,还是递归处理spec对象,时间消耗很少\nexport function specTransform(\n spec: unknown,\n special: {\n [key: string]: (v: unknown) => unknown;\n } = {\n data: v => v\n }\n): unknown {\n if (!spec) {\n return spec;\n }\n // 如果是普通对象\n if (spec.constructor === Object) {\n const result: any = {};\n for (const key in spec as any) {\n if (Object.prototype.hasOwnProperty.call(spec, key)) {\n // todo 特殊处理怎样更合理?\n if (special[key]) {\n result[key] = special[key](spec[key]);\n continue;\n }\n result[key] = specTransform(spec[key], special);\n }\n }\n return result;\n }\n // 如果是数组\n if (isArray(spec)) {\n return spec.map(s => specTransform(s, special));\n }\n return spec;\n}\n"]}
|
package/cjs/util/text.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ITextMeasureOption } from '@visactor/vutils';
|
|
2
|
-
import { TextMeasure
|
|
2
|
+
import { TextMeasure } from '@visactor/vutils';
|
|
3
3
|
import type { ITextMarkSpec } from '../typings';
|
|
4
4
|
export declare const initTextMeasure: (textSpec?: Partial<ITextMarkSpec>, option?: Partial<ITextMeasureOption>, useNaiveCanvas?: boolean) => TextMeasure<ITextMarkSpec>;
|
|
5
|
-
export declare const testTextMeasure: (textSpec?: Partial<ITextMarkSpec>, useVRender?: boolean) => TestTextMeasure<any>;
|
package/cjs/util/text.js
CHANGED
|
@@ -2,26 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.
|
|
5
|
+
}), exports.initTextMeasure = void 0;
|
|
6
6
|
|
|
7
|
-
const vutils_1 = require("@visactor/vutils"), vrender_1 = require("@visactor/vrender"),
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), vrender_1 = require("@visactor/vrender"), constants_1 = require("../theme/builtin/common/constants"), initTextMeasure = (textSpec, option, useNaiveCanvas) => new vutils_1.TextMeasure(Object.assign({
|
|
8
8
|
defaultFontParams: {
|
|
9
|
-
fontFamily:
|
|
10
|
-
fontSize:
|
|
9
|
+
fontFamily: constants_1.THEME_CONSTANTS.defaultFontFamily,
|
|
10
|
+
fontSize: constants_1.THEME_CONSTANTS.defaultFontSize
|
|
11
11
|
},
|
|
12
12
|
getTextBounds: useNaiveCanvas ? void 0 : vrender_1.getTextBounds,
|
|
13
13
|
specialCharSet: "-/: .,@%'\"~" + vutils_1.TextMeasure.ALPHABET_CHAR_SET + vutils_1.TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
|
|
14
14
|
}, null != option ? option : {}), textSpec);
|
|
15
15
|
|
|
16
16
|
exports.initTextMeasure = initTextMeasure;
|
|
17
|
-
|
|
18
|
-
const testTextMeasure = (textSpec, useVRender) => new vutils_1.TestTextMeasure({
|
|
19
|
-
defaultFontParams: {
|
|
20
|
-
fontFamily: constant_1.DEFAULT_TEXT_FONT_FAMILY,
|
|
21
|
-
fontSize: constant_1.DEFAULT_TEXT_FONT_SIZE
|
|
22
|
-
},
|
|
23
|
-
getTextBounds: useVRender ? vrender_1.getTextBounds : void 0
|
|
24
|
-
}, textSpec);
|
|
25
|
-
|
|
26
|
-
exports.testTextMeasure = testTextMeasure;
|
|
27
17
|
//# sourceMappingURL=text.js.map
|
package/cjs/util/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":";;;AAEA,6CAA+C;AAC/C,+CAAkD;AAElD,iEAAoE;AAE7D,MAAM,eAAe,GAAG,CAC7B,QAAiC,EACjC,MAAoC,EACpC,cAAwB,EACI,EAAE;IAC9B,OAAO,IAAI,oBAAW,iBAElB,iBAAiB,EAAE;YACjB,UAAU,EAAE,2BAAe,CAAC,iBAAiB;YAC7C,QAAQ,EAAE,2BAAe,CAAC,eAAe;SAC1C,EACD,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,uBAAa,EACzD,cAAc,EAAE,cAAc,GAAG,oBAAW,CAAC,iBAAiB,GAAG,oBAAW,CAAC,iBAAiB,CAAC,WAAW,EAAE,IACzG,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,GAEnB,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,eAAe,mBAiB1B","file":"text.js","sourcesContent":["import type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure } from '@visactor/vutils';\nimport { getTextBounds } from '@visactor/vrender';\nimport type { ITextMarkSpec } from '../typings';\nimport { THEME_CONSTANTS } from '../theme/builtin/common/constants';\n\nexport const initTextMeasure = (\n textSpec?: Partial<ITextMarkSpec>,\n option?: Partial<ITextMeasureOption>,\n useNaiveCanvas?: boolean\n): TextMeasure<ITextMarkSpec> => {\n return new TextMeasure<ITextMarkSpec>(\n {\n defaultFontParams: {\n fontFamily: THEME_CONSTANTS.defaultFontFamily,\n fontSize: THEME_CONSTANTS.defaultFontSize\n },\n getTextBounds: useNaiveCanvas ? undefined : getTextBounds,\n specialCharSet: '-/: .,@%\\'\"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),\n ...(option ?? {})\n },\n textSpec\n );\n};\n"]}
|
package/cjs/vchart-all.js
CHANGED
|
@@ -16,6 +16,6 @@ Object.defineProperty(exports, "VChart", {
|
|
|
16
16
|
const chart_1 = require("./chart"), component_1 = require("./component"), layout_1 = require("./layout"), vrender_components_1 = require("@visactor/vrender-components");
|
|
17
17
|
|
|
18
18
|
(0, vrender_components_1.loadPoptip)({}), core_1.VChart.useChart([ chart_1.AreaChart, chart_1.LineChart, chart_1.BarChart, chart_1.Bar3dChart, chart_1.ScatterChart, chart_1.MapChart, chart_1.PieChart, chart_1.Pie3dChart, chart_1.RoseChart, chart_1.RadarChart, chart_1.CommonChart, chart_1.SequenceChart, chart_1.HistogramChart, chart_1.Histogram3dChart, chart_1.CircularProgressChart, chart_1.WordCloudChart, chart_1.WordCloud3dChart, chart_1.FunnelChart, chart_1.Funnel3dChart, chart_1.LinearProgressChart, chart_1.RangeColumnChart, chart_1.RangeColumn3dChart, chart_1.SunburstChart, chart_1.CirclePackingChart, chart_1.TreemapChart, chart_1.WaterfallChart, chart_1.BoxPlotChart, chart_1.SankeyChart, chart_1.GaugeChart, chart_1.RangeAreaChart, chart_1.HeatmapChart ]),
|
|
19
|
-
core_1.VChart.useComponent([ component_1.CartesianLinearAxis, component_1.CartesianBandAxis, component_1.CartesianTimeAxis, component_1.CartesianLogAxis, component_1.PolarBandAxis, component_1.PolarLinearAxis, component_1.DiscreteLegend, component_1.ContinuousLegend, component_1.Tooltip, component_1.CartesianCrossHair, component_1.PolarCrossHair, component_1.DataZoom, component_1.ScrollBar, component_1.Indicator, component_1.GeoCoordinate, component_1.MarkLine, component_1.Title, component_1.MarkArea, component_1.Player, component_1.TotalLabel, component_1.Label, component_1.MarkPoint, component_1.Brush, component_1.CustomMark, component_1.MapLabelComponent ]),
|
|
19
|
+
core_1.VChart.useComponent([ component_1.CartesianLinearAxis, component_1.CartesianBandAxis, component_1.CartesianTimeAxis, component_1.CartesianLogAxis, component_1.CartesianSymlogAxis, component_1.PolarBandAxis, component_1.PolarLinearAxis, component_1.DiscreteLegend, component_1.ContinuousLegend, component_1.Tooltip, component_1.CartesianCrossHair, component_1.PolarCrossHair, component_1.DataZoom, component_1.ScrollBar, component_1.Indicator, component_1.GeoCoordinate, component_1.MarkLine, component_1.Title, component_1.MarkArea, component_1.Player, component_1.TotalLabel, component_1.Label, component_1.MarkPoint, component_1.Brush, component_1.CustomMark, component_1.MapLabelComponent ]),
|
|
20
20
|
core_1.Factory.registerLayout("grid", layout_1.GridLayout), core_1.Factory.registerLayout("layout3d", layout_1.Layout3d);
|
|
21
21
|
//# sourceMappingURL=vchart-all.js.map
|
package/cjs/vchart-all.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vchart-all.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;
|
|
1
|
+
{"version":3,"sources":["../src/vchart-all.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AA0IhC,uFA1IA,aAAM,OA0IA;AAzIf,mCAgCiB;AAEjB,2CA2BqB;AACrB,qCAAgD;AAChD,qEAA0D;AAG1D,IAAA,+BAAU,EAAC,EAAE,CAAC,CAAC;AAGf,aAAM,CAAC,QAAQ,CAAC;IACd,iBAAS;IACT,iBAAS;IACT,gBAAQ;IACR,kBAAU;IACV,oBAAY;IACZ,gBAAQ;IACR,gBAAQ;IACR,kBAAU;IACV,iBAAS;IACT,kBAAU;IACV,mBAAW;IACX,qBAAa;IACb,sBAAc;IACd,wBAAgB;IAChB,6BAAqB;IACrB,sBAAc;IACd,wBAAgB;IAChB,mBAAW;IACX,qBAAa;IACb,2BAAmB;IACnB,wBAAgB;IAChB,0BAAkB;IAClB,qBAAa;IACb,0BAAkB;IAClB,oBAAY;IACZ,sBAAc;IACd,oBAAY;IACZ,mBAAW;IACX,kBAAU;IACV,sBAAc;IACd,oBAAY;CACb,CAAC,CAAC;AAGH,aAAM,CAAC,YAAY,CAAC;IAClB,+BAAmB;IACnB,6BAAiB;IACjB,6BAAiB;IACjB,4BAAgB;IAChB,+BAAmB;IACnB,yBAAa;IACb,2BAAe;IACf,0BAAc;IACd,4BAAgB;IAChB,mBAAO;IACP,8BAAkB;IAClB,0BAAc;IACd,oBAAQ;IACR,qBAAS;IACT,qBAAS;IACT,yBAAa;IACb,oBAAQ;IACR,iBAAK;IACL,oBAAQ;IACR,kBAAM;IACN,sBAAU;IACV,iBAAK;IACL,qBAAS;IACT,iBAAK;IACL,sBAAU;IACV,6BAAiB;CAClB,CAAC,CAAC;AAGH,cAAO,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAiB,CAAC,CAAC;AAClD,cAAO,CAAC,cAAc,CAAC,UAAU,EAAE,iBAAe,CAAC,CAAC","file":"vchart-all.js","sourcesContent":["import { VChart, Factory } from './core';\nimport {\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreemapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n} from './chart';\n\nimport {\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n PolarBandAxis,\n CartesianLogAxis,\n CartesianSymlogAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent,\n TotalLabel\n} from './component';\nimport { GridLayout, Layout3d } from './layout';\nimport { loadPoptip } from '@visactor/vrender-components';\n\n// 装载 poptip\nloadPoptip({});\n\n// charts\nVChart.useChart([\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreemapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n]);\n\n// components\nVChart.useComponent([\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n CartesianLogAxis,\n CartesianSymlogAxis,\n PolarBandAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n TotalLabel,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent\n]);\n\n// layout\nFactory.registerLayout('grid', GridLayout as any);\nFactory.registerLayout('layout3d', Layout3d as any);\n\nexport { VChart };\n"]}
|
package/cjs/vchart-simple.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.VChart = void 0;
|
|
6
6
|
|
|
7
|
-
const core_1 = require("./core");
|
|
7
|
+
const label_1 = require("./component/label/label"), cartesian_1 = require("./component/crosshair/cartesian"), tooltip_1 = require("./component/tooltip/tooltip"), legend_1 = require("./component/legend/discrete/legend"), time_axis_1 = require("./component/axis/cartesian/time-axis"), band_axis_1 = require("./component/axis/cartesian/band-axis"), linear_axis_1 = require("./component/axis/cartesian/linear-axis"), core_1 = require("./core");
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "VChart", {
|
|
10
10
|
enumerable: !0,
|
|
@@ -13,8 +13,7 @@ Object.defineProperty(exports, "VChart", {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const line_1 = require("./chart/line"), pie_1 = require("./chart/pie"), bar_1 = require("./chart/bar");
|
|
17
17
|
|
|
18
|
-
core_1.VChart.useChart([
|
|
19
|
-
core_1.VChart.useComponent([ component_1.CartesianLinearAxis, component_1.CartesianBandAxis, component_1.CartesianTimeAxis, component_1.DiscreteLegend, component_1.Tooltip, component_1.CartesianCrossHair, component_1.Label ]);
|
|
18
|
+
core_1.VChart.useChart([ line_1.LineChart, bar_1.BarChart, pie_1.PieChart ]), core_1.VChart.useComponent([ linear_axis_1.CartesianLinearAxis, band_axis_1.CartesianBandAxis, time_axis_1.CartesianTimeAxis, legend_1.DiscreteLegend, tooltip_1.Tooltip, cartesian_1.CartesianCrossHair, label_1.Label ]);
|
|
20
19
|
//# sourceMappingURL=vchart-simple.js.map
|
package/cjs/vchart-simple.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vchart-simple.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/vchart-simple.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,+DAAqE;AACrE,yDAAsD;AACtD,+DAAoE;AACpE,oEAAyE;AACzE,oEAAyE;AACzE,wEAA6E;AAI7E,iCAAgC;AAmBvB,uFAnBA,aAAM,OAmBA;AAlBf,uCAAyC;AACzC,qCAAuC;AACvC,qCAAuC;AAGvC,aAAM,CAAC,QAAQ,CAAC,CAAC,gBAAS,EAAE,cAAQ,EAAE,cAAQ,CAAC,CAAC,CAAC;AAGjD,aAAM,CAAC,YAAY,CAAC;IAClB,iCAAmB;IACnB,6BAAiB;IACjB,6BAAiB;IACjB,uBAAc;IACd,iBAAO;IACP,8BAAkB;IAClB,aAAK;CACN,CAAC,CAAC","file":"vchart-simple.js","sourcesContent":["import { Label } from './component/label/label';\nimport { CartesianCrossHair } from './component/crosshair/cartesian';\nimport { Tooltip } from './component/tooltip/tooltip';\nimport { DiscreteLegend } from './component/legend/discrete/legend';\nimport { CartesianTimeAxis } from './component/axis/cartesian/time-axis';\nimport { CartesianBandAxis } from './component/axis/cartesian/band-axis';\nimport { CartesianLinearAxis } from './component/axis/cartesian/linear-axis';\n/**\n * @description 包含基础的折柱饼图,提供坐标轴、离散图例以及 tooltip、crosshair、label 组件\n */\nimport { VChart } from './core';\nimport { LineChart } from './chart/line';\nimport { PieChart } from './chart/pie';\nimport { BarChart } from './chart/bar';\n\n// charts\nVChart.useChart([LineChart, BarChart, PieChart]);\n\n// components\nVChart.useComponent([\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n DiscreteLegend,\n Tooltip,\n CartesianCrossHair,\n Label\n]);\n\nexport { VChart };\n"]}
|
package/esm/animation/utils.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { merge } from "../util";
|
|
2
|
-
|
|
3
1
|
import { isFunction, isValidNumber } from "../util/type";
|
|
4
2
|
|
|
5
3
|
import { DEFAULT_DATA_INDEX } from "../constant";
|
|
@@ -8,6 +6,8 @@ import { DEFAULT_ANIMATION_CONFIG } from "./config";
|
|
|
8
6
|
|
|
9
7
|
import { isArray, isValid } from "@visactor/vutils";
|
|
10
8
|
|
|
9
|
+
import { mergeSpec } from "../util/spec";
|
|
10
|
+
|
|
11
11
|
export const AnimationStates = [ "appear", "enter", "update", "exit", "disappear", "normal" ];
|
|
12
12
|
|
|
13
13
|
export function animationConfig(defaultConfig, userConfig, params) {
|
|
@@ -26,7 +26,7 @@ export function animationConfig(defaultConfig, userConfig, params) {
|
|
|
26
26
|
stopWhenStateChange: !0
|
|
27
27
|
})), null == userConfig ? void 0 : userConfig[state]) {
|
|
28
28
|
if (isArray(userConfig[state])) stateConfig = userConfig[state]; else {
|
|
29
|
-
let singleConfig =
|
|
29
|
+
let singleConfig = mergeSpec({}, defaultStateConfig[0], userConfig[state]);
|
|
30
30
|
isChannelAnimation(singleConfig) && delete singleConfig.type, singleConfig.oneByOne && (singleConfig = produceOneByOne(singleConfig, null !== (_a = null == params ? void 0 : params.dataIndex) && void 0 !== _a ? _a : defaultDataIndex)),
|
|
31
31
|
stateConfig = [ singleConfig ];
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/animation/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/animation/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAE5F,MAAM,UAAU,eAAe,CAC7B,aAAgC,EAChC,UAEC,EACD,MAEC;;IAED,MAAM,MAAM,GAAG,EAAuB,CAAC;IAEvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QAEjC,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,KAAK,CAAC,MAAK,KAAK,EAAE;YACjC,SAAS;SACV;QAED,IAAI,KAAK,KAAK,QAAQ,EAAE;YACtB,UAAU,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG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ationConfig } from '@visactor/vgrammar';\n// eslint-disable-next-line no-duplicate-imports\nimport type { IElement, IAnimationTypeConfig, IStateAnimationConfig, IAnimationTimeline } from '@visactor/vgrammar';\nimport type { MarkAnimationSpec, IAnimationState } from './interface';\nimport type { IStateAnimateSpec, IAnimationSpec, IMorphSeriesSpec } from './spec';\nimport { isFunction, isValidNumber } from '../util/type';\nimport { DEFAULT_DATA_INDEX } from '../constant';\nimport { DEFAULT_ANIMATION_CONFIG } from './config';\nimport { isArray, isValid } from '@visactor/vutils';\nimport type { SeriesMarkNameEnum } from '../series/interface';\nimport { mergeSpec } from '../util/spec';\n\nexport const AnimationStates = ['appear', 'enter', 'update', 'exit', 'disappear', 'normal'];\n\nexport function animationConfig<Preset extends string>(\n defaultConfig: MarkAnimationSpec,\n userConfig?: Partial<\n Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>\n >,\n params?: {\n dataIndex: (datum: any) => number;\n }\n) {\n const config = {} as MarkAnimationSpec;\n\n for (let i = 0; i < AnimationStates.length; i++) {\n const state = AnimationStates[i];\n\n if (userConfig?.[state] === false) {\n continue;\n }\n\n if (state === 'normal') {\n userConfig.normal && (config.normal = userConfig.normal as IAnimationTypeConfig);\n continue;\n }\n // 开始处理默认动画逻辑\n let defaultStateConfig: IAnimationConfig[];\n if (isArray(defaultConfig[state])) {\n defaultStateConfig = defaultConfig[state] as IAnimationConfig[];\n } else {\n defaultStateConfig = [{ ...DEFAULT_ANIMATION_CONFIG[state], ...defaultConfig[state] } as any];\n // FIXME: 用来控制当动画状态发生变更时是否清除正在执行的动画。\n // 现在 vrender 对于同一个视觉通道的 tween 不会做覆盖的处理。若不做动画清空同时 exit 动画比 update 动画时间长的情况下,效果会不正确\n if (state === 'exit') {\n defaultStateConfig[0].controlOptions = { stopWhenStateChange: true };\n }\n }\n\n if (!userConfig?.[state]) {\n config[state] = defaultStateConfig;\n continue;\n }\n\n // 开始处理用户配置的动画逻辑\n let stateConfig: IAnimationConfig[];\n\n if (isArray(userConfig[state])) {\n stateConfig = userConfig[state];\n } else {\n let singleConfig: IAnimationConfig = mergeSpec({}, defaultStateConfig[0], userConfig[state]) as IAnimationConfig;\n\n if (isChannelAnimation(singleConfig)) {\n // `type` and `channel` is conflict, and `type` has a higher priority.\n // here if user configured `channel`, we should remove `type` which will come from default animation config\n delete (singleConfig as IAnimationTypeConfig).type;\n }\n\n if (singleConfig.oneByOne) {\n singleConfig = produceOneByOne(singleConfig as IAnimationTypeConfig, params?.dataIndex ?? defaultDataIndex);\n }\n\n stateConfig = [singleConfig];\n }\n\n config[state] = stateConfig;\n }\n\n // 将 update copy 到 state 保证 useState 效果与 update 对齐\n config.state = config.update as IStateAnimationConfig;\n return config;\n}\n\nexport function userAnimationConfig<M extends string, Preset extends string>(\n markName: SeriesMarkNameEnum | string,\n spec: IAnimationSpec<M, Preset>\n) {\n return {\n appear: spec.animationAppear?.[markName] ?? spec.animationAppear,\n disappear: spec.animationDisappear?.[markName] ?? spec.animationDisappear,\n enter: spec.animationEnter?.[markName] ?? spec.animationEnter,\n exit: spec.animationExit?.[markName] ?? spec.animationExit,\n update: spec.animationUpdate?.[markName] ?? spec.animationUpdate,\n normal: spec.animationNormal?.[markName]\n };\n}\n\n/**\n * oneByOne\n */\nfunction produceOneByOne(stateConfig: IAnimationTypeConfig, dataIndex: (datum: any) => number) {\n const { oneByOne, duration } = stateConfig;\n stateConfig.delay = (datum: any, element: IElement, params: any) => {\n const _index = dataIndex(datum);\n const _durationTime = isFunction(duration)\n ? duration(datum, element, params)\n : isValidNumber(duration)\n ? duration\n : 0;\n let _oneByOneTime = isFunction(oneByOne) ? oneByOne(datum, element, params) : oneByOne;\n if (_oneByOneTime === false) {\n return 0;\n }\n _oneByOneTime = _oneByOneTime === true ? 0 : _oneByOneTime;\n return _index * (_durationTime + _oneByOneTime);\n };\n delete stateConfig.oneByOne;\n return stateConfig;\n}\n\nfunction defaultDataIndex(datum: any) {\n return datum?.[DEFAULT_DATA_INDEX];\n}\n\nexport function shouldDoMorph(\n hasAnimation: boolean,\n morphConfig?: IMorphSeriesSpec,\n animationConfig?: ReturnType<typeof userAnimationConfig>\n) {\n if (hasAnimation === false) {\n return false;\n }\n\n if (animationConfig?.appear === false || animationConfig?.update === false) {\n return false;\n }\n\n if (morphConfig?.enable === false) {\n return false;\n }\n\n return true;\n}\n\nexport function isTimeLineAnimation(animationConfig: IAnimationConfig) {\n return isValid((animationConfig as IAnimationTimeline).timeSlices);\n}\n\nexport function isChannelAnimation(animationConfig: IAnimationConfig) {\n return !isTimeLineAnimation(animationConfig) && isValid((animationConfig as IAnimationTypeConfig).channel);\n}\n"]}
|
package/esm/chart/area/area.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { AreaSeries } from "./../../series/area/area";
|
|
2
|
+
|
|
1
3
|
import { SeriesTypeEnum } from "../../series/interface";
|
|
2
4
|
|
|
3
5
|
import { CartesianChart } from "../cartesian/cartesian";
|
|
4
6
|
|
|
5
7
|
import { ChartTypeEnum } from "../interface";
|
|
6
8
|
|
|
7
|
-
import { setDefaultCrosshairForCartesianChart } from "../util";
|
|
8
|
-
|
|
9
9
|
import { VChart } from "../../core/vchart";
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { setDefaultCrosshairForCartesianChart } from "../util";
|
|
12
12
|
|
|
13
13
|
VChart.useSeries([ AreaSeries ]);
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chart/area/area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/chart/area/area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,oCAAoC,EAAE,MAAM,SAAS,CAAC;AAC/D,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/B,MAAM,OAAO,SAAU,SAAQ,cAAc;IAA7C;;QAGW,SAAI,GAAW,aAAa,CAAC,IAAI,CAAC;QAClC,eAAU,GAAW,cAAc,CAAC,IAAI,CAAC;IAiBpD,CAAC;IAfW,qBAAqB,CAAC,IAAoB;;QAClD,uCACK,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,MAAA,IAAI,CAAC,UAAU,mCAAI,MAAM,EACrC,WAAW,EAAE,IAAI,CAAC,WAAW,IAC7B;IACJ,CAAC;IAED,aAAa,CAAC,IAAS;QACrB,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1B,oCAAoC,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;;AAnBe,cAAI,GAAW,aAAa,CAAC,IAAI,CAAC;AAClC,cAAI,GAAW,eAAe,CAAC","file":"area.js","sourcesContent":["import { AreaSeries } from './../../series/area/area';\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { CartesianChart } from '../cartesian/cartesian';\nimport { ChartTypeEnum } from '../interface';\nimport type { IAreaChartSpec } from './interface';\nimport { VChart } from '../../core/vchart';\nimport { setDefaultCrosshairForCartesianChart } from '../util';\nVChart.useSeries([AreaSeries]);\n\nexport class AreaChart extends CartesianChart {\n static readonly type: string = ChartTypeEnum.area;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.area;\n readonly seriesType: string = SeriesTypeEnum.area;\n\n protected _getDefaultSeriesSpec(spec: IAreaChartSpec): any {\n return {\n ...super._getDefaultSeriesSpec(spec),\n point: spec.point,\n line: spec.line,\n area: spec.area,\n seriesMark: spec.seriesMark ?? 'area',\n activePoint: spec.activePoint\n };\n }\n\n transformSpec(spec: any): void {\n super.transformSpec(spec);\n setDefaultCrosshairForCartesianChart(spec);\n }\n}\n"]}
|
package/esm/chart/bar/bar-3d.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Bar3dSeries } from "./../../series/bar/bar-3d";
|
|
2
|
+
|
|
1
3
|
import { SeriesTypeEnum } from "../../series/interface";
|
|
2
4
|
|
|
3
5
|
import { CartesianChart } from "../cartesian/cartesian";
|
|
@@ -6,8 +8,6 @@ import { ChartTypeEnum } from "../interface";
|
|
|
6
8
|
|
|
7
9
|
import { VChart } from "../../core/vchart";
|
|
8
10
|
|
|
9
|
-
import { Bar3dSeries } from "../../series";
|
|
10
|
-
|
|
11
11
|
VChart.useSeries([ Bar3dSeries ]);
|
|
12
12
|
|
|
13
13
|
export class Bar3dChart extends CartesianChart {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chart/bar/bar-3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/chart/bar/bar-3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAEhC,MAAM,OAAO,UAAW,SAAQ,cAAc;IAA9C;;QAGW,SAAI,GAAW,aAAa,CAAC,KAAK,CAAC;QACnC,eAAU,GAAW,cAAc,CAAC,KAAK,CAAC;IAWrD,CAAC;IATW,qBAAqB,CAAC,IAAS;QACvC,uCACK,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,QAAQ,EAAoB,IAAK,CAAC,QAAQ,EAC1C,WAAW,EAAoB,IAAK,CAAC,WAAW,EAChD,WAAW,EAAoB,IAAK,CAAC,WAAW,EAChD,aAAa,EAAoB,IAAK,CAAC,aAAa,IACpD;IACJ,CAAC;;AAbe,eAAI,GAAW,aAAa,CAAC,KAAK,CAAC;AACnC,eAAI,GAAW,eAAe,CAAC","file":"bar-3d.js","sourcesContent":["import { Bar3dSeries } from './../../series/bar/bar-3d';\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { CartesianChart } from '../cartesian/cartesian';\nimport { ChartTypeEnum } from '../interface';\nimport { VChart } from '../../core/vchart';\nimport type { IBar3dChartSpec } from './interface';\nVChart.useSeries([Bar3dSeries]);\n\nexport class Bar3dChart extends CartesianChart {\n static readonly type: string = ChartTypeEnum.bar3d;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.bar3d;\n readonly seriesType: string = SeriesTypeEnum.bar3d;\n\n protected _getDefaultSeriesSpec(spec: any): any {\n return {\n ...super._getDefaultSeriesSpec(spec),\n barWidth: (<IBar3dChartSpec>spec).barWidth,\n barMaxWidth: (<IBar3dChartSpec>spec).barMaxWidth,\n barMinWidth: (<IBar3dChartSpec>spec).barMinWidth,\n barGapInGroup: (<IBar3dChartSpec>spec).barGapInGroup\n };\n }\n}\n"]}
|
package/esm/chart/bar/bar.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BarSeries } from "./../../series/bar/bar";
|
|
2
|
+
|
|
1
3
|
import { SeriesTypeEnum } from "../../series/interface";
|
|
2
4
|
|
|
3
5
|
import { CartesianChart } from "../cartesian/cartesian";
|
|
@@ -8,8 +10,6 @@ import { setDefaultCrosshairForCartesianChart } from "../util";
|
|
|
8
10
|
|
|
9
11
|
import { VChart } from "../../core/vchart";
|
|
10
12
|
|
|
11
|
-
import { BarSeries } from "../../series";
|
|
12
|
-
|
|
13
13
|
VChart.useSeries([ BarSeries ]);
|
|
14
14
|
|
|
15
15
|
export class BarChart extends CartesianChart {
|
package/esm/chart/bar/bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chart/bar/bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/chart/bar/bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,oCAAoC,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAE9B,MAAM,OAAO,QAAS,SAAQ,cAAc;IAA5C;;QAGW,SAAI,GAAW,aAAa,CAAC,GAAG,CAAC;QACjC,eAAU,GAAW,cAAc,CAAC,GAAG,CAAC;IAgBnD,CAAC;IAdW,qBAAqB,CAAC,IAAS;QACvC,uCACK,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,QAAQ,EAAkB,IAAK,CAAC,QAAQ,EACxC,WAAW,EAAkB,IAAK,CAAC,WAAW,EAC9C,WAAW,EAAkB,IAAK,CAAC,WAAW,EAC9C,aAAa,EAAkB,IAAK,CAAC,aAAa,IAClD;IACJ,CAAC;IAED,aAAa,CAAC,IAAS;QACrB,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1B,oCAAoC,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;;AAlBe,aAAI,GAAW,aAAa,CAAC,GAAG,CAAC;AACjC,aAAI,GAAW,eAAe,CAAC","file":"bar.js","sourcesContent":["import { BarSeries } from './../../series/bar/bar';\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { CartesianChart } from '../cartesian/cartesian';\nimport { ChartTypeEnum } from '../interface';\nimport { setDefaultCrosshairForCartesianChart } from '../util';\nimport { VChart } from '../../core/vchart';\nimport type { IBarChartSpec } from './interface';\nVChart.useSeries([BarSeries]);\n\nexport class BarChart extends CartesianChart {\n static readonly type: string = ChartTypeEnum.bar;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.bar;\n readonly seriesType: string = SeriesTypeEnum.bar;\n\n protected _getDefaultSeriesSpec(spec: any): any {\n return {\n ...super._getDefaultSeriesSpec(spec),\n barWidth: (<IBarChartSpec>spec).barWidth,\n barMaxWidth: (<IBarChartSpec>spec).barMaxWidth,\n barMinWidth: (<IBarChartSpec>spec).barMinWidth,\n barGapInGroup: (<IBarChartSpec>spec).barGapInGroup\n };\n }\n\n transformSpec(spec: any): void {\n super.transformSpec(spec);\n setDefaultCrosshairForCartesianChart(spec);\n }\n}\n"]}
|