@visactor/vchart 1.3.0-beta.7 → 1.3.0-beta.9
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 +30922 -30376
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/index.d.ts +2 -2
- package/cjs/chart/index.js +3 -3
- package/cjs/chart/index.js.map +1 -1
- package/cjs/chart/stack.js.map +1 -1
- package/cjs/chart/treemap/treemap.d.ts +1 -1
- package/cjs/chart/treemap/treemap.js +5 -5
- package/cjs/chart/treemap/treemap.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 +15 -14
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +2 -2
- package/cjs/component/axis/cartesian/axis.js +1 -0
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/cartesian/band-axis.d.ts +3 -3
- package/cjs/component/axis/cartesian/band-axis.js +1 -0
- package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/common.d.ts +2 -0
- package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
- package/cjs/component/axis/cartesian/linear-axis.d.ts +3 -3
- package/cjs/component/axis/cartesian/linear-axis.js +2 -1
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/log-axis.d.ts +3 -2
- package/cjs/component/axis/cartesian/log-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/time-axis.d.ts +3 -2
- package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
- package/cjs/component/axis/interface.d.ts +6 -1
- package/cjs/component/axis/interface.js.map +1 -1
- package/cjs/component/axis/polar/axis.d.ts +3 -2
- package/cjs/component/axis/polar/axis.js +1 -0
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/band-axis.d.ts +4 -2
- package/cjs/component/axis/polar/band-axis.js.map +1 -1
- package/cjs/component/axis/polar/interface/spec.d.ts +7 -2
- package/cjs/component/axis/polar/interface/spec.js.map +1 -1
- package/cjs/component/axis/polar/linear-axis.d.ts +2 -3
- package/cjs/component/axis/polar/linear-axis.js.map +1 -1
- package/cjs/component/base/base-component.d.ts +4 -2
- package/cjs/component/base/base-component.js +11 -4
- package/cjs/component/base/base-component.js.map +1 -1
- package/cjs/component/brush/brush.d.ts +2 -2
- package/cjs/component/brush/brush.js +1 -1
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/brush/interface.d.ts +1 -0
- package/cjs/component/brush/interface.js.map +1 -1
- package/cjs/component/crosshair/base.d.ts +2 -2
- package/cjs/component/crosshair/base.js +1 -1
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/cartesian.d.ts +3 -3
- package/cjs/component/crosshair/cartesian.js.map +1 -1
- package/cjs/component/crosshair/polar.d.ts +3 -3
- package/cjs/component/crosshair/polar.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.d.ts +1 -1
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.d.ts +4 -5
- package/cjs/component/data-zoom/data-filter-base-component.js +0 -6
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
- package/cjs/component/data-zoom/data-zoom/data-zoom.js +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/interface.d.ts +3 -1
- package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/interface.d.ts +4 -1
- package/cjs/component/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.d.ts +1 -2
- package/cjs/component/geo/geo-coordinate.js +16 -0
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/indicator/indicator.d.ts +2 -2
- package/cjs/component/indicator/indicator.js +1 -1
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/indicator/interface.d.ts +2 -0
- package/cjs/component/indicator/interface.js.map +1 -1
- package/cjs/component/label/base-label.d.ts +2 -2
- package/cjs/component/label/base-label.js.map +1 -1
- package/cjs/component/label/interface.d.ts +3 -0
- package/cjs/component/label/interface.js.map +1 -1
- package/cjs/component/label/label.d.ts +4 -3
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/legend/base-legend.d.ts +2 -2
- package/cjs/component/legend/base-legend.js.map +1 -1
- package/cjs/component/legend/continuous/legend.d.ts +3 -4
- package/cjs/component/legend/continuous/legend.js.map +1 -1
- package/cjs/component/legend/discrete/legend.d.ts +1 -2
- package/cjs/component/legend/discrete/legend.js.map +1 -1
- package/cjs/component/map-label/component.d.ts +1 -2
- package/cjs/component/map-label/component.js.map +1 -1
- package/cjs/component/marker/base-marker.d.ts +2 -2
- package/cjs/component/marker/base-marker.js.map +1 -1
- package/cjs/component/marker/mark-area/mark-area.d.ts +1 -2
- package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
- package/cjs/component/marker/mark-line/mark-line.d.ts +1 -2
- package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
- package/cjs/component/marker/mark-point/mark-point.d.ts +1 -2
- package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
- package/cjs/component/player/player.d.ts +1 -2
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/title/title.d.ts +1 -2
- package/cjs/component/title/title.js.map +1 -1
- package/cjs/component/tooltip/handler/base.js +3 -3
- package/cjs/component/tooltip/handler/base.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.js +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/style.js.map +1 -1
- package/cjs/component/tooltip/interface/theme.d.ts +6 -5
- package/cjs/component/tooltip/interface/theme.js.map +1 -1
- package/cjs/component/tooltip/tooltip.d.ts +3 -2
- package/cjs/component/tooltip/tooltip.js +6 -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 +8 -3
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/transforms/data-key.d.ts +2 -2
- package/cjs/data/transforms/data-key.js.map +1 -1
- package/cjs/data/transforms/dimension-statistics.d.ts +11 -5
- package/cjs/data/transforms/dimension-statistics.js +34 -22
- package/cjs/data/transforms/dimension-statistics.js.map +1 -1
- package/cjs/mark/base/base-mark.js +2 -2
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/symbol.js +1 -1
- package/cjs/mark/symbol.js.map +1 -1
- package/cjs/model/base-model.d.ts +4 -4
- package/cjs/model/base-model.js +13 -15
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/model/interface.d.ts +1 -0
- package/cjs/model/interface.js.map +1 -1
- package/cjs/model/layout-item.d.ts +3 -3
- package/cjs/model/layout-item.js.map +1 -1
- package/cjs/model/tooltip-helper.d.ts +0 -2
- package/cjs/model/tooltip-helper.js +0 -3
- package/cjs/model/tooltip-helper.js.map +1 -1
- package/cjs/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
- package/cjs/region/region.d.ts +2 -3
- package/cjs/region/region.js.map +1 -1
- package/cjs/series/area/area.d.ts +5 -2
- package/cjs/series/area/area.js +15 -14
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/area/constant.d.ts +2 -0
- package/cjs/series/area/constant.js +15 -0
- package/cjs/series/area/constant.js.map +1 -0
- package/cjs/series/area/interface.d.ts +2 -0
- package/cjs/series/area/interface.js.map +1 -1
- package/cjs/series/bar/bar-3d.d.ts +3 -1
- package/cjs/series/bar/bar-3d.js +2 -7
- package/cjs/series/bar/bar-3d.js.map +1 -1
- package/cjs/series/bar/bar.js +3 -8
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/bar/constant.d.ts +3 -0
- package/cjs/series/bar/constant.js +20 -0
- package/cjs/series/bar/constant.js.map +1 -0
- package/cjs/series/bar/interface.d.ts +3 -2
- package/cjs/series/bar/interface.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +4 -6
- package/cjs/series/base/base-series.js +49 -26
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/base/constant.d.ts +2 -0
- package/cjs/series/base/constant.js +15 -0
- package/cjs/series/base/constant.js.map +1 -0
- package/cjs/series/base/tooltip-helper.d.ts +0 -1
- package/cjs/series/base/tooltip-helper.js +4 -5
- package/cjs/series/base/tooltip-helper.js.map +1 -1
- package/cjs/series/box-plot/box-plot.d.ts +1 -2
- package/cjs/series/box-plot/box-plot.js +6 -15
- package/cjs/series/box-plot/box-plot.js.map +1 -1
- package/cjs/series/box-plot/constant.d.ts +2 -0
- package/cjs/series/box-plot/constant.js +19 -0
- package/cjs/series/box-plot/constant.js.map +1 -0
- package/cjs/series/cartesian/cartesian.d.ts +6 -3
- package/cjs/series/cartesian/cartesian.js +25 -25
- package/cjs/series/cartesian/cartesian.js.map +1 -1
- package/cjs/series/cartesian/interface.d.ts +2 -2
- package/cjs/series/cartesian/interface.js.map +1 -1
- package/cjs/series/circle-packing/circle-packing.d.ts +1 -2
- package/cjs/series/circle-packing/circle-packing.js +6 -11
- package/cjs/series/circle-packing/circle-packing.js.map +1 -1
- package/cjs/series/circle-packing/constant.d.ts +2 -0
- package/cjs/series/circle-packing/constant.js +15 -0
- package/cjs/series/circle-packing/constant.js.map +1 -0
- package/cjs/series/dot/constant.d.ts +2 -0
- package/cjs/series/dot/constant.js +39 -0
- package/cjs/series/dot/constant.js.map +1 -0
- package/cjs/series/dot/dot.d.ts +1 -1
- package/cjs/series/dot/dot.js +2 -31
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/funnel/constant.d.ts +3 -0
- package/cjs/series/funnel/constant.js +52 -0
- package/cjs/series/funnel/constant.js.map +1 -0
- package/cjs/series/funnel/funnel-3d.d.ts +3 -2
- package/cjs/series/funnel/funnel-3d.js +2 -23
- package/cjs/series/funnel/funnel-3d.js.map +1 -1
- package/cjs/series/funnel/funnel.d.ts +1 -1
- package/cjs/series/funnel/funnel.js +2 -23
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/gauge/constant.d.ts +3 -0
- package/cjs/series/gauge/constant.js +32 -0
- package/cjs/series/gauge/constant.js.map +1 -0
- package/cjs/series/gauge/gauge-pointer.d.ts +2 -2
- package/cjs/series/gauge/gauge-pointer.js +5 -15
- package/cjs/series/gauge/gauge-pointer.js.map +1 -1
- package/cjs/series/gauge/gauge.d.ts +2 -1
- package/cjs/series/gauge/gauge.js +8 -14
- package/cjs/series/gauge/gauge.js.map +1 -1
- package/cjs/series/heatmap/constant.d.ts +2 -0
- package/cjs/series/heatmap/constant.js +19 -0
- package/cjs/series/heatmap/constant.js.map +1 -0
- package/cjs/series/heatmap/heatmap.d.ts +1 -1
- package/cjs/series/heatmap/heatmap.js +5 -14
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/series/index.d.ts +2 -2
- package/cjs/series/index.js +3 -3
- package/cjs/series/index.js.map +1 -1
- package/cjs/series/interface/theme.d.ts +3 -2
- package/cjs/series/interface/theme.js +34 -1
- package/cjs/series/interface/theme.js.map +1 -1
- package/cjs/series/line/constant.d.ts +2 -0
- package/cjs/series/line/constant.js +10 -0
- package/cjs/series/line/constant.js.map +1 -0
- package/cjs/series/line/interface.d.ts +4 -0
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/line/line.d.ts +3 -2
- package/cjs/series/line/line.js +5 -3
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/link/constant.d.ts +2 -0
- package/cjs/series/link/constant.js +23 -0
- package/cjs/series/link/constant.js.map +1 -0
- package/cjs/series/link/link.d.ts +1 -1
- package/cjs/series/link/link.js +3 -16
- package/cjs/series/link/link.js.map +1 -1
- package/cjs/series/map/constant.d.ts +2 -0
- package/cjs/series/map/constant.js +15 -0
- package/cjs/series/map/constant.js.map +1 -0
- package/cjs/series/map/map.d.ts +1 -1
- package/cjs/series/map/map.js +2 -7
- 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 +33 -16
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/pie/constant.d.ts +3 -0
- package/cjs/series/pie/constant.js +28 -0
- package/cjs/series/pie/constant.js.map +1 -0
- package/cjs/series/pie/pie-3d.d.ts +1 -1
- package/cjs/series/pie/pie-3d.js +2 -11
- package/cjs/series/pie/pie-3d.js.map +1 -1
- package/cjs/series/pie/pie.d.ts +1 -1
- package/cjs/series/pie/pie.js +3 -12
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/progress/circular/circular.d.ts +1 -1
- package/cjs/series/progress/circular/circular.js +6 -15
- package/cjs/series/progress/circular/circular.js.map +1 -1
- package/cjs/series/progress/circular/constant.d.ts +2 -0
- package/cjs/series/progress/circular/constant.js +19 -0
- package/cjs/series/progress/circular/constant.js.map +1 -0
- package/cjs/series/progress/linear/constant.d.ts +2 -0
- package/cjs/series/progress/linear/constant.js +23 -0
- package/cjs/series/progress/linear/constant.js.map +1 -0
- package/cjs/series/progress/linear/linear.d.ts +1 -1
- package/cjs/series/progress/linear/linear.js +2 -15
- package/cjs/series/progress/linear/linear.js.map +1 -1
- package/cjs/series/radar/constant.d.ts +2 -0
- package/cjs/series/radar/constant.js +15 -0
- package/cjs/series/radar/constant.js.map +1 -0
- package/cjs/series/radar/radar.d.ts +3 -2
- package/cjs/series/radar/radar.js +8 -10
- package/cjs/series/radar/radar.js.map +1 -1
- package/cjs/series/range-area/constant.d.ts +2 -0
- package/cjs/series/range-area/constant.js +10 -0
- package/cjs/series/range-area/constant.js.map +1 -0
- package/cjs/series/range-area/range-area.d.ts +4 -1
- package/cjs/series/range-area/range-area.js +5 -2
- package/cjs/series/range-area/range-area.js.map +1 -1
- package/cjs/series/range-column/constant.d.ts +3 -0
- package/cjs/series/range-column/constant.js +28 -0
- package/cjs/series/range-column/constant.js.map +1 -0
- package/cjs/series/range-column/range-column-3d.d.ts +5 -1
- package/cjs/series/range-column/range-column-3d.js +3 -2
- package/cjs/series/range-column/range-column-3d.js.map +1 -1
- package/cjs/series/range-column/range-column.d.ts +2 -2
- package/cjs/series/range-column/range-column.js +3 -12
- package/cjs/series/range-column/range-column.js.map +1 -1
- package/cjs/series/rose/constant.d.ts +2 -0
- package/cjs/series/rose/constant.js +15 -0
- package/cjs/series/rose/constant.js.map +1 -0
- package/cjs/series/rose/rose.d.ts +2 -1
- package/cjs/series/rose/rose.js +8 -10
- package/cjs/series/rose/rose.js.map +1 -1
- package/cjs/series/sankey/constant.d.ts +2 -0
- package/cjs/series/sankey/constant.js +19 -0
- package/cjs/series/sankey/constant.js.map +1 -0
- package/cjs/series/sankey/sankey.d.ts +1 -2
- package/cjs/series/sankey/sankey.js +2 -11
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/scatter/constant.d.ts +2 -0
- package/cjs/series/scatter/constant.js +15 -0
- package/cjs/series/scatter/constant.js.map +1 -0
- package/cjs/series/scatter/interface.d.ts +2 -0
- package/cjs/series/scatter/interface.js.map +1 -1
- package/cjs/series/scatter/scatter.d.ts +3 -2
- package/cjs/series/scatter/scatter.js +20 -17
- package/cjs/series/scatter/scatter.js.map +1 -1
- package/cjs/series/sunburst/constant.d.ts +2 -0
- package/cjs/series/sunburst/constant.js +15 -0
- package/cjs/series/sunburst/constant.js.map +1 -0
- package/cjs/series/sunburst/sunburst.js +2 -7
- package/cjs/series/sunburst/sunburst.js.map +1 -1
- package/cjs/series/treemap/constant.d.ts +2 -0
- package/cjs/series/treemap/constant.js +23 -0
- package/cjs/series/treemap/constant.js.map +1 -0
- package/cjs/series/treemap/treemap.d.ts +1 -1
- package/cjs/series/treemap/treemap.js +10 -22
- package/cjs/series/treemap/treemap.js.map +1 -1
- package/cjs/series/waterfall/constant.d.ts +2 -0
- package/cjs/series/waterfall/constant.js +19 -0
- package/cjs/series/waterfall/constant.js.map +1 -0
- package/cjs/series/waterfall/waterfall.d.ts +2 -2
- package/cjs/series/waterfall/waterfall.js +2 -11
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/cjs/series/word-cloud/base.js +3 -12
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/series/word-cloud/constant.d.ts +2 -0
- package/cjs/series/word-cloud/constant.js +19 -0
- package/cjs/series/word-cloud/constant.js.map +1 -0
- package/cjs/series/word-cloud/word-cloud-3d.d.ts +1 -1
- package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/cjs/series/word-cloud/word-cloud.d.ts +1 -1
- package/cjs/series/word-cloud/word-cloud.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
- package/cjs/theme/builtin/common/component/axis/band-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/log-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
- package/cjs/theme/builtin/common/component/brush.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/crosshair.js +16 -4
- package/cjs/theme/builtin/common/component/crosshair.js.map +1 -0
- package/cjs/theme/builtin/common/component/data-zoom.js +160 -0
- package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -0
- package/cjs/theme/builtin/common/component/index.js.map +1 -0
- package/cjs/theme/builtin/common/component/indicator.js.map +1 -0
- package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.js +1 -1
- package/cjs/theme/builtin/common/component/legend/continuous.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.js +8 -5
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
- package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -0
- package/cjs/theme/builtin/common/component/map-label.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-area.js +8 -2
- package/cjs/theme/builtin/common/component/mark-area.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-line.js +8 -2
- package/cjs/theme/builtin/common/component/mark-line.js.map +1 -0
- package/cjs/theme/builtin/common/component/mark-point.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/player.js +4 -1
- package/cjs/theme/builtin/common/component/player.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/poptip.js +16 -4
- package/cjs/theme/builtin/common/component/poptip.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/title.js +2 -2
- package/cjs/theme/builtin/common/component/title.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/tooltip.js +25 -6
- package/cjs/theme/builtin/common/component/tooltip.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/component/total-label.js +4 -1
- package/cjs/theme/builtin/common/component/total-label.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/constants.js +3 -3
- package/cjs/theme/builtin/common/constants.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/mark.js +12 -3
- package/cjs/theme/builtin/common/mark.js.map +1 -0
- package/cjs/theme/builtin/common/series/area.js.map +1 -0
- package/cjs/theme/builtin/common/series/bar.js.map +1 -0
- package/cjs/theme/builtin/common/series/bar3d.js.map +1 -0
- package/cjs/theme/builtin/common/series/box-plot.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/series/circle-packing.js +8 -2
- package/cjs/theme/builtin/common/series/circle-packing.js.map +1 -0
- package/cjs/theme/builtin/common/series/circular-progress.js.map +1 -0
- package/cjs/theme/builtin/common/series/dot.js.map +1 -0
- package/cjs/theme/builtin/common/series/funnel.js.map +1 -0
- package/cjs/theme/builtin/common/series/funnel3d.js.map +1 -0
- package/cjs/theme/builtin/common/series/gauge-pointer.js.map +1 -0
- package/cjs/theme/builtin/common/series/gauge.js.map +1 -0
- package/cjs/theme/builtin/common/series/heatmap.js.map +1 -0
- package/cjs/theme/builtin/common/series/index.js.map +1 -0
- package/cjs/theme/builtin/common/series/line.js.map +1 -0
- package/cjs/theme/builtin/common/series/linear-progress.js.map +1 -0
- package/cjs/theme/builtin/common/series/link.js.map +1 -0
- package/cjs/theme/builtin/common/series/map.js.map +1 -0
- package/cjs/theme/builtin/common/series/pie.js.map +1 -0
- package/cjs/theme/builtin/common/series/pie3d.js.map +1 -0
- package/cjs/theme/builtin/common/series/radar.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.js +4 -1
- package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -0
- package/cjs/theme/builtin/common/series/rose.js.map +1 -0
- package/cjs/theme/builtin/common/series/sankey.js.map +1 -0
- package/cjs/theme/builtin/common/series/scatter.js.map +1 -0
- package/cjs/theme/{buildin-theme/light → builtin/common}/series/sunburst.js +8 -2
- package/cjs/theme/builtin/common/series/sunburst.js.map +1 -0
- package/cjs/theme/builtin/common/series/treemap.js.map +1 -0
- package/cjs/theme/builtin/common/series/waterfall.js.map +1 -0
- package/cjs/theme/builtin/common/series/word-cloud.js.map +1 -0
- package/cjs/theme/builtin/common/series/word-cloud3d.js.map +1 -0
- package/cjs/theme/{buildin-theme/config.js → builtin/constant.js} +1 -1
- package/cjs/theme/builtin/constant.js.map +1 -0
- package/cjs/theme/builtin/dark/color-scheme.js +33 -0
- package/cjs/theme/builtin/dark/color-scheme.js.map +1 -0
- package/cjs/theme/builtin/dark/index.d.ts +2 -0
- package/cjs/theme/builtin/dark/index.js +13 -0
- package/cjs/theme/builtin/dark/index.js.map +1 -0
- package/{esm/theme/buildin-theme → cjs/theme/builtin}/index.d.ts +2 -2
- package/cjs/theme/{buildin-theme → builtin}/index.js +3 -3
- package/cjs/theme/builtin/index.js.map +1 -0
- package/cjs/theme/builtin/light/color-scheme.js +33 -0
- package/cjs/theme/builtin/light/color-scheme.js.map +1 -0
- package/cjs/theme/{buildin-theme → builtin}/light/index.js +5 -1
- package/cjs/theme/builtin/light/index.js.map +1 -0
- package/cjs/theme/color-scheme/builtin/default.d.ts +2 -0
- package/cjs/theme/color-scheme/builtin/default.js +11 -0
- package/cjs/theme/color-scheme/builtin/default.js.map +1 -0
- package/cjs/theme/color-scheme/util.d.ts +2 -1
- package/cjs/theme/color-scheme/util.js +9 -2
- package/cjs/theme/color-scheme/util.js.map +1 -1
- package/cjs/theme/index.d.ts +1 -1
- package/cjs/theme/index.js +1 -1
- package/cjs/theme/index.js.map +1 -1
- package/cjs/theme/interface.d.ts +2 -2
- package/cjs/theme/interface.js.map +1 -1
- package/cjs/theme/theme-manager.js +7 -7
- package/cjs/theme/theme-manager.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +5 -0
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/util/spec.d.ts +7 -0
- package/cjs/util/spec.js +55 -6
- package/cjs/util/spec.js.map +1 -1
- package/cjs/util/text.d.ts +0 -4
- package/cjs/util/text.js +6 -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/esm/chart/index.d.ts +2 -2
- package/esm/chart/index.js +2 -2
- package/esm/chart/index.js.map +1 -1
- package/esm/chart/stack.js.map +1 -1
- package/esm/chart/treemap/treemap.d.ts +1 -1
- package/esm/chart/treemap/treemap.js +4 -4
- package/esm/chart/treemap/treemap.js.map +1 -1
- package/esm/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 +15 -14
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +2 -2
- package/esm/component/axis/cartesian/axis.js +1 -0
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/cartesian/band-axis.d.ts +3 -3
- package/esm/component/axis/cartesian/band-axis.js +1 -0
- package/esm/component/axis/cartesian/band-axis.js.map +1 -1
- package/esm/component/axis/cartesian/interface/common.d.ts +2 -0
- package/esm/component/axis/cartesian/interface/common.js.map +1 -1
- package/esm/component/axis/cartesian/linear-axis.d.ts +3 -3
- package/esm/component/axis/cartesian/linear-axis.js +2 -1
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/axis/cartesian/log-axis.d.ts +3 -2
- package/esm/component/axis/cartesian/log-axis.js.map +1 -1
- package/esm/component/axis/cartesian/time-axis.d.ts +3 -2
- package/esm/component/axis/cartesian/time-axis.js.map +1 -1
- package/esm/component/axis/interface.d.ts +6 -1
- package/esm/component/axis/interface.js.map +1 -1
- package/esm/component/axis/polar/axis.d.ts +3 -2
- package/esm/component/axis/polar/axis.js +1 -0
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/band-axis.d.ts +4 -2
- package/esm/component/axis/polar/band-axis.js.map +1 -1
- package/esm/component/axis/polar/interface/spec.d.ts +7 -2
- package/esm/component/axis/polar/interface/spec.js.map +1 -1
- package/esm/component/axis/polar/linear-axis.d.ts +2 -3
- package/esm/component/axis/polar/linear-axis.js.map +1 -1
- package/esm/component/base/base-component.d.ts +4 -2
- package/esm/component/base/base-component.js +11 -1
- package/esm/component/base/base-component.js.map +1 -1
- package/esm/component/brush/brush.d.ts +2 -2
- package/esm/component/brush/brush.js +1 -1
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/brush/interface.d.ts +1 -0
- package/esm/component/brush/interface.js.map +1 -1
- package/esm/component/crosshair/base.d.ts +2 -2
- package/esm/component/crosshair/base.js +1 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/cartesian.d.ts +3 -3
- package/esm/component/crosshair/cartesian.js.map +1 -1
- package/esm/component/crosshair/polar.d.ts +3 -3
- package/esm/component/crosshair/polar.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.d.ts +1 -1
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.d.ts +4 -5
- package/esm/component/data-zoom/data-filter-base-component.js +0 -6
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.d.ts +5 -4
- package/esm/component/data-zoom/data-zoom/data-zoom.js +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/interface.d.ts +3 -1
- package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/interface.d.ts +4 -1
- package/esm/component/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -2
- package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/esm/component/geo/geo-coordinate.d.ts +1 -2
- package/esm/component/geo/geo-coordinate.js +16 -0
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/indicator/indicator.d.ts +2 -2
- package/esm/component/indicator/indicator.js +1 -1
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/indicator/interface.d.ts +2 -0
- package/esm/component/indicator/interface.js.map +1 -1
- package/esm/component/label/base-label.d.ts +2 -2
- package/esm/component/label/base-label.js.map +1 -1
- package/esm/component/label/interface.d.ts +3 -0
- package/esm/component/label/interface.js.map +1 -1
- package/esm/component/label/label.d.ts +4 -3
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/legend/base-legend.d.ts +2 -2
- package/esm/component/legend/base-legend.js.map +1 -1
- package/esm/component/legend/continuous/legend.d.ts +3 -4
- package/esm/component/legend/continuous/legend.js.map +1 -1
- package/esm/component/legend/discrete/legend.d.ts +1 -2
- package/esm/component/legend/discrete/legend.js.map +1 -1
- package/esm/component/map-label/component.d.ts +1 -2
- package/esm/component/map-label/component.js.map +1 -1
- package/esm/component/marker/base-marker.d.ts +2 -2
- package/esm/component/marker/base-marker.js.map +1 -1
- package/esm/component/marker/mark-area/mark-area.d.ts +1 -2
- package/esm/component/marker/mark-area/mark-area.js.map +1 -1
- package/esm/component/marker/mark-line/mark-line.d.ts +1 -2
- package/esm/component/marker/mark-line/mark-line.js.map +1 -1
- package/esm/component/marker/mark-point/mark-point.d.ts +1 -2
- package/esm/component/marker/mark-point/mark-point.js.map +1 -1
- package/esm/component/player/player.d.ts +1 -2
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/title/title.d.ts +1 -2
- package/esm/component/title/title.js.map +1 -1
- package/esm/component/tooltip/handler/base.js +3 -3
- package/esm/component/tooltip/handler/base.js.map +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/esm/component/tooltip/handler/utils/attribute.js +2 -2
- package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/esm/component/tooltip/handler/utils/style.js.map +1 -1
- package/esm/component/tooltip/interface/theme.d.ts +6 -5
- package/esm/component/tooltip/interface/theme.js.map +1 -1
- package/esm/component/tooltip/tooltip.d.ts +3 -2
- package/esm/component/tooltip/tooltip.js +6 -2
- 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 +8 -3
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/transforms/data-key.d.ts +2 -2
- package/esm/data/transforms/data-key.js.map +1 -1
- package/esm/data/transforms/dimension-statistics.d.ts +11 -5
- package/esm/data/transforms/dimension-statistics.js +33 -22
- package/esm/data/transforms/dimension-statistics.js.map +1 -1
- package/esm/mark/base/base-mark.js +2 -2
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/symbol.js +1 -1
- package/esm/mark/symbol.js.map +1 -1
- package/esm/model/base-model.d.ts +4 -4
- package/esm/model/base-model.js +14 -16
- package/esm/model/base-model.js.map +1 -1
- package/esm/model/interface.d.ts +1 -0
- package/esm/model/interface.js.map +1 -1
- package/esm/model/layout-item.d.ts +3 -3
- package/esm/model/layout-item.js.map +1 -1
- package/esm/model/tooltip-helper.d.ts +0 -2
- package/esm/model/tooltip-helper.js +0 -3
- package/esm/model/tooltip-helper.js.map +1 -1
- package/esm/plugin/components/axis-sync-plugin/axis-sync.js.map +1 -1
- package/esm/region/region.d.ts +2 -3
- package/esm/region/region.js.map +1 -1
- package/esm/series/area/area.d.ts +5 -2
- package/esm/series/area/area.js +12 -13
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/area/constant.d.ts +2 -0
- package/esm/series/area/constant.js +15 -0
- package/esm/series/area/constant.js.map +1 -0
- package/esm/series/area/interface.d.ts +2 -0
- package/esm/series/area/interface.js.map +1 -1
- package/esm/series/bar/bar-3d.d.ts +3 -1
- package/esm/series/bar/bar-3d.js +3 -8
- package/esm/series/bar/bar-3d.js.map +1 -1
- package/esm/series/bar/bar.js +4 -9
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/bar/constant.d.ts +3 -0
- package/esm/series/bar/constant.js +20 -0
- package/esm/series/bar/constant.js.map +1 -0
- package/esm/series/bar/interface.d.ts +3 -2
- package/esm/series/bar/interface.js.map +1 -1
- package/esm/series/base/base-series.d.ts +4 -6
- package/esm/series/base/base-series.js +50 -27
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/base/constant.d.ts +2 -0
- package/esm/series/base/constant.js +11 -0
- package/esm/series/base/constant.js.map +1 -0
- package/esm/series/base/tooltip-helper.d.ts +0 -1
- package/esm/series/base/tooltip-helper.js +4 -5
- package/esm/series/base/tooltip-helper.js.map +1 -1
- package/esm/series/box-plot/box-plot.d.ts +1 -2
- package/esm/series/box-plot/box-plot.js +4 -15
- package/esm/series/box-plot/box-plot.js.map +1 -1
- package/esm/series/box-plot/constant.d.ts +2 -0
- package/esm/series/box-plot/constant.js +17 -0
- package/esm/series/box-plot/constant.js.map +1 -0
- package/esm/series/cartesian/cartesian.d.ts +6 -3
- package/esm/series/cartesian/cartesian.js +24 -25
- package/esm/series/cartesian/cartesian.js.map +1 -1
- package/esm/series/cartesian/interface.d.ts +2 -2
- package/esm/series/cartesian/interface.js.map +1 -1
- package/esm/series/circle-packing/circle-packing.d.ts +1 -2
- package/esm/series/circle-packing/circle-packing.js +4 -10
- package/esm/series/circle-packing/circle-packing.js.map +1 -1
- package/esm/series/circle-packing/constant.d.ts +2 -0
- package/esm/series/circle-packing/constant.js +13 -0
- package/esm/series/circle-packing/constant.js.map +1 -0
- package/esm/series/dot/constant.d.ts +2 -0
- package/esm/series/dot/constant.js +37 -0
- package/esm/series/dot/constant.js.map +1 -0
- package/esm/series/dot/dot.d.ts +1 -1
- package/esm/series/dot/dot.js +3 -34
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/funnel/constant.d.ts +3 -0
- package/esm/series/funnel/constant.js +52 -0
- package/esm/series/funnel/constant.js.map +1 -0
- package/esm/series/funnel/funnel-3d.d.ts +3 -2
- package/esm/series/funnel/funnel-3d.js +3 -24
- package/esm/series/funnel/funnel-3d.js.map +1 -1
- package/esm/series/funnel/funnel.d.ts +1 -1
- package/esm/series/funnel/funnel.js +3 -22
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/gauge/constant.d.ts +3 -0
- package/esm/series/gauge/constant.js +32 -0
- package/esm/series/gauge/constant.js.map +1 -0
- package/esm/series/gauge/gauge-pointer.d.ts +2 -2
- package/esm/series/gauge/gauge-pointer.js +6 -16
- package/esm/series/gauge/gauge-pointer.js.map +1 -1
- package/esm/series/gauge/gauge.d.ts +2 -1
- package/esm/series/gauge/gauge.js +6 -14
- package/esm/series/gauge/gauge.js.map +1 -1
- package/esm/series/heatmap/constant.d.ts +2 -0
- package/esm/series/heatmap/constant.js +17 -0
- package/esm/series/heatmap/constant.js.map +1 -0
- package/esm/series/heatmap/heatmap.d.ts +1 -1
- package/esm/series/heatmap/heatmap.js +3 -14
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/series/index.d.ts +2 -2
- package/esm/series/index.js +2 -2
- package/esm/series/index.js.map +1 -1
- package/esm/series/interface/theme.d.ts +3 -2
- package/esm/series/interface/theme.js +78 -1
- package/esm/series/interface/theme.js.map +1 -1
- package/esm/series/line/constant.d.ts +2 -0
- package/esm/series/line/constant.js +6 -0
- package/esm/series/line/constant.js.map +1 -0
- package/esm/series/line/interface.d.ts +4 -0
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/line/line.d.ts +3 -2
- package/esm/series/line/line.js +7 -5
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/link/constant.d.ts +2 -0
- package/esm/series/link/constant.js +21 -0
- package/esm/series/link/constant.js.map +1 -0
- package/esm/series/link/link.d.ts +1 -1
- package/esm/series/link/link.js +4 -21
- package/esm/series/link/link.js.map +1 -1
- package/esm/series/map/constant.d.ts +2 -0
- package/esm/series/map/constant.js +13 -0
- package/esm/series/map/constant.js.map +1 -0
- package/esm/series/map/map.d.ts +1 -1
- package/esm/series/map/map.js +3 -8
- 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 +34 -15
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/pie/constant.d.ts +3 -0
- package/esm/series/pie/constant.js +28 -0
- package/esm/series/pie/constant.js.map +1 -0
- package/esm/series/pie/pie-3d.d.ts +1 -1
- package/esm/series/pie/pie-3d.js +3 -12
- package/esm/series/pie/pie-3d.js.map +1 -1
- package/esm/series/pie/pie.d.ts +1 -1
- package/esm/series/pie/pie.js +4 -13
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/progress/circular/circular.d.ts +1 -1
- package/esm/series/progress/circular/circular.js +3 -14
- package/esm/series/progress/circular/circular.js.map +1 -1
- package/esm/series/progress/circular/constant.d.ts +2 -0
- package/esm/series/progress/circular/constant.js +17 -0
- package/esm/series/progress/circular/constant.js.map +1 -0
- package/esm/series/progress/linear/constant.d.ts +2 -0
- package/esm/series/progress/linear/constant.js +21 -0
- package/esm/series/progress/linear/constant.js.map +1 -0
- package/esm/series/progress/linear/linear.d.ts +1 -1
- package/esm/series/progress/linear/linear.js +3 -18
- package/esm/series/progress/linear/linear.js.map +1 -1
- package/esm/series/radar/constant.d.ts +2 -0
- package/esm/series/radar/constant.js +15 -0
- package/esm/series/radar/constant.js.map +1 -0
- package/esm/series/radar/radar.d.ts +3 -2
- package/esm/series/radar/radar.js +7 -11
- package/esm/series/radar/radar.js.map +1 -1
- package/esm/series/range-area/constant.d.ts +2 -0
- package/esm/series/range-area/constant.js +4 -0
- package/esm/series/range-area/constant.js.map +1 -0
- package/esm/series/range-area/range-area.d.ts +4 -1
- package/esm/series/range-area/range-area.js +6 -1
- package/esm/series/range-area/range-area.js.map +1 -1
- package/esm/series/range-column/constant.d.ts +3 -0
- package/esm/series/range-column/constant.js +28 -0
- package/esm/series/range-column/constant.js.map +1 -0
- package/esm/series/range-column/range-column-3d.d.ts +5 -1
- package/esm/series/range-column/range-column-3d.js +3 -1
- package/esm/series/range-column/range-column-3d.js.map +1 -1
- package/esm/series/range-column/range-column.d.ts +2 -2
- package/esm/series/range-column/range-column.js +4 -11
- package/esm/series/range-column/range-column.js.map +1 -1
- package/esm/series/rose/constant.d.ts +2 -0
- package/esm/series/rose/constant.js +13 -0
- package/esm/series/rose/constant.js.map +1 -0
- package/esm/series/rose/rose.d.ts +2 -1
- package/esm/series/rose/rose.js +6 -10
- package/esm/series/rose/rose.js.map +1 -1
- package/esm/series/sankey/constant.d.ts +2 -0
- package/esm/series/sankey/constant.js +17 -0
- package/esm/series/sankey/constant.js.map +1 -0
- package/esm/series/sankey/sankey.d.ts +1 -2
- package/esm/series/sankey/sankey.js +3 -14
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/scatter/constant.d.ts +2 -0
- package/esm/series/scatter/constant.js +13 -0
- package/esm/series/scatter/constant.js.map +1 -0
- package/esm/series/scatter/interface.d.ts +2 -0
- package/esm/series/scatter/interface.js.map +1 -1
- package/esm/series/scatter/scatter.d.ts +3 -2
- package/esm/series/scatter/scatter.js +18 -17
- package/esm/series/scatter/scatter.js.map +1 -1
- package/esm/series/sunburst/constant.d.ts +2 -0
- package/esm/series/sunburst/constant.js +13 -0
- package/esm/series/sunburst/constant.js.map +1 -0
- package/esm/series/sunburst/sunburst.js +5 -9
- package/esm/series/sunburst/sunburst.js.map +1 -1
- package/esm/series/treemap/constant.d.ts +2 -0
- package/esm/series/treemap/constant.js +21 -0
- package/esm/series/treemap/constant.js.map +1 -0
- package/esm/series/treemap/treemap.d.ts +1 -1
- package/esm/series/treemap/treemap.js +10 -22
- package/esm/series/treemap/treemap.js.map +1 -1
- package/esm/series/waterfall/constant.d.ts +2 -0
- package/esm/series/waterfall/constant.js +17 -0
- package/esm/series/waterfall/constant.js.map +1 -0
- package/esm/series/waterfall/waterfall.d.ts +2 -2
- package/esm/series/waterfall/waterfall.js +3 -12
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/esm/series/word-cloud/base.js +3 -12
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/series/word-cloud/constant.d.ts +2 -0
- package/esm/series/word-cloud/constant.js +17 -0
- package/esm/series/word-cloud/constant.js.map +1 -0
- package/esm/series/word-cloud/word-cloud-3d.d.ts +1 -1
- package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/esm/series/word-cloud/word-cloud.d.ts +1 -1
- package/esm/series/word-cloud/word-cloud.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/band-axis.d.ts +2 -0
- package/esm/theme/builtin/common/component/axis/band-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/linear-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/log-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/axis/polar-axis.js.map +1 -0
- package/esm/theme/builtin/common/component/brush.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/crosshair.js +16 -4
- package/esm/theme/builtin/common/component/crosshair.js.map +1 -0
- package/esm/theme/builtin/common/component/data-zoom.js +156 -0
- package/esm/theme/builtin/common/component/data-zoom.js.map +1 -0
- package/esm/theme/builtin/common/component/index.js.map +1 -0
- package/esm/theme/builtin/common/component/indicator.js.map +1 -0
- package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.js +1 -1
- package/esm/theme/builtin/common/component/legend/continuous.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.js +8 -5
- package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -0
- package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -0
- package/esm/theme/builtin/common/component/map-label.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-area.js +8 -2
- package/esm/theme/builtin/common/component/mark-area.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-line.js +8 -2
- package/esm/theme/builtin/common/component/mark-line.js.map +1 -0
- package/esm/theme/builtin/common/component/mark-point.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/player.js +4 -1
- package/esm/theme/builtin/common/component/player.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/poptip.js +16 -4
- package/esm/theme/builtin/common/component/poptip.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/title.js +2 -2
- package/esm/theme/builtin/common/component/title.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/tooltip.js +25 -6
- package/esm/theme/builtin/common/component/tooltip.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/component/total-label.js +4 -1
- package/esm/theme/builtin/common/component/total-label.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/constants.js +1 -1
- package/esm/theme/builtin/common/constants.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/mark.js +12 -3
- package/esm/theme/builtin/common/mark.js.map +1 -0
- package/esm/theme/builtin/common/series/area.js.map +1 -0
- package/esm/theme/builtin/common/series/bar.js.map +1 -0
- package/esm/theme/builtin/common/series/bar3d.js.map +1 -0
- package/esm/theme/builtin/common/series/box-plot.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/series/circle-packing.js +8 -2
- package/esm/theme/builtin/common/series/circle-packing.js.map +1 -0
- package/esm/theme/builtin/common/series/circular-progress.js.map +1 -0
- package/esm/theme/builtin/common/series/dot.js.map +1 -0
- package/esm/theme/builtin/common/series/funnel.js.map +1 -0
- package/esm/theme/builtin/common/series/funnel3d.js.map +1 -0
- package/esm/theme/builtin/common/series/gauge-pointer.js.map +1 -0
- package/esm/theme/builtin/common/series/gauge.js.map +1 -0
- package/esm/theme/builtin/common/series/heatmap.js.map +1 -0
- package/esm/theme/builtin/common/series/index.js.map +1 -0
- package/esm/theme/builtin/common/series/line.js.map +1 -0
- package/esm/theme/builtin/common/series/linear-progress.js.map +1 -0
- package/esm/theme/builtin/common/series/link.js.map +1 -0
- package/esm/theme/builtin/common/series/map.js.map +1 -0
- package/esm/theme/builtin/common/series/pie.js.map +1 -0
- package/esm/theme/builtin/common/series/pie3d.js.map +1 -0
- package/esm/theme/builtin/common/series/radar.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.js +4 -1
- package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -0
- package/esm/theme/builtin/common/series/rose.js.map +1 -0
- package/esm/theme/builtin/common/series/sankey.js.map +1 -0
- package/esm/theme/builtin/common/series/scatter.js.map +1 -0
- package/esm/theme/{buildin-theme/light → builtin/common}/series/sunburst.js +8 -2
- package/esm/theme/builtin/common/series/sunburst.js.map +1 -0
- package/esm/theme/builtin/common/series/treemap.js.map +1 -0
- package/esm/theme/builtin/common/series/waterfall.js.map +1 -0
- package/esm/theme/builtin/common/series/word-cloud.js.map +1 -0
- package/esm/theme/builtin/common/series/word-cloud3d.js.map +1 -0
- package/esm/theme/{buildin-theme/config.js → builtin/constant.js} +1 -1
- package/esm/theme/builtin/constant.js.map +1 -0
- package/esm/theme/builtin/dark/color-scheme.d.ts +2 -0
- package/esm/theme/builtin/dark/color-scheme.js +27 -0
- package/esm/theme/builtin/dark/color-scheme.js.map +1 -0
- package/esm/theme/builtin/dark/index.d.ts +2 -0
- package/esm/theme/builtin/dark/index.js +7 -0
- package/esm/theme/builtin/dark/index.js.map +1 -0
- package/{cjs/theme/buildin-theme → esm/theme/builtin}/index.d.ts +2 -2
- package/esm/theme/builtin/index.js +12 -0
- package/esm/theme/builtin/index.js.map +1 -0
- package/esm/theme/builtin/light/color-scheme.d.ts +2 -0
- package/esm/theme/builtin/light/color-scheme.js +27 -0
- package/esm/theme/builtin/light/color-scheme.js.map +1 -0
- package/esm/theme/{buildin-theme → builtin}/light/index.js +8 -4
- package/esm/theme/builtin/light/index.js.map +1 -0
- package/esm/theme/color-scheme/builtin/default.d.ts +2 -0
- package/esm/theme/color-scheme/builtin/default.js +7 -0
- package/esm/theme/color-scheme/builtin/default.js.map +1 -0
- package/esm/theme/color-scheme/util.d.ts +2 -1
- package/esm/theme/color-scheme/util.js +6 -0
- package/esm/theme/color-scheme/util.js.map +1 -1
- package/esm/theme/index.d.ts +1 -1
- package/esm/theme/index.js +1 -1
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/interface.d.ts +2 -2
- package/esm/theme/interface.js.map +1 -1
- package/esm/theme/theme-manager.js +6 -6
- package/esm/theme/theme-manager.js.map +1 -1
- package/esm/typings/spec/common.d.ts +5 -0
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/util/spec.d.ts +7 -0
- package/esm/util/spec.js +52 -4
- package/esm/util/spec.js.map +1 -1
- package/esm/util/text.d.ts +0 -4
- package/esm/util/text.js +2 -8
- package/esm/util/text.js.map +1 -1
- package/esm/vchart-all.js +2 -2
- package/esm/vchart-all.js.map +1 -1
- package/package.json +8 -8
- package/cjs/theme/buildin-theme/config.js.map +0 -1
- package/cjs/theme/buildin-theme/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/color-scheme.js +0 -21
- package/cjs/theme/buildin-theme/light/color-scheme.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
- package/cjs/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/brush.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/crosshair.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/data-zoom.js +0 -105
- package/cjs/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/indicator.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/map-label.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/mark-area.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/mark-line.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/mark-point.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/player.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/poptip.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/title.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/tooltip.js.map +0 -1
- package/cjs/theme/buildin-theme/light/component/total-label.js.map +0 -1
- package/cjs/theme/buildin-theme/light/constants.js.map +0 -1
- package/cjs/theme/buildin-theme/light/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/mark.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/area.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/bar.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/bar3d.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/box-plot.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/dot.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/funnel.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/gauge.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/heatmap.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/index.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/line.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/link.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/map.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/pie.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/pie3d.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/radar.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/rose.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/sankey.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/scatter.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/sunburst.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/treemap.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/waterfall.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
- package/cjs/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
- package/esm/theme/buildin-theme/config.js.map +0 -1
- package/esm/theme/buildin-theme/index.js +0 -10
- package/esm/theme/buildin-theme/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/color-scheme.js +0 -17
- package/esm/theme/buildin-theme/light/color-scheme.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/band-axis.d.ts +0 -2
- package/esm/theme/buildin-theme/light/component/axis/band-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/common-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/linear-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/log-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/axis/polar-axis.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/brush.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/crosshair.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/data-zoom.js +0 -101
- package/esm/theme/buildin-theme/light/component/data-zoom.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/indicator.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/color-legend.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/continuous.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/discrete-legend.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/legend/size-legend.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/map-label.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/mark-area.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/mark-line.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/mark-point.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/player.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/poptip.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/title.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/tooltip.js.map +0 -1
- package/esm/theme/buildin-theme/light/component/total-label.js.map +0 -1
- package/esm/theme/buildin-theme/light/constants.js.map +0 -1
- package/esm/theme/buildin-theme/light/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/mark.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/area.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/bar.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/bar3d.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/box-plot.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/circle-packing.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/circular-progress.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/dot.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/funnel.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/funnel3d.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/gauge-pointer.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/gauge.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/heatmap.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/index.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/line.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/linear-progress.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/link.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/map.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/pie.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/pie3d.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/radar.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/rangeColumn.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/rose.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/sankey.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/scatter.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/sunburst.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/treemap.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/waterfall.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/word-cloud.js.map +0 -1
- package/esm/theme/buildin-theme/light/series/word-cloud3d.js.map +0 -1
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/index.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/indicator.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/map-label.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/poptip.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/component/total-label.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/area.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/bar3d.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/dot.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/funnel3d.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/line.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/map.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/pie3d.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/radar.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/rose.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sankey.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/scatter.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/treemap.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/waterfall.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
- /package/cjs/theme/{buildin-theme/config.d.ts → builtin/constant.d.ts} +0 -0
- /package/cjs/theme/{buildin-theme/light → builtin/dark}/color-scheme.d.ts +0 -0
- /package/{esm/theme/buildin-theme → cjs/theme/builtin}/light/color-scheme.d.ts +0 -0
- /package/cjs/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/band-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/cartesian-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/common-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/linear-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/log-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/axis/polar-axis.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/brush.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/crosshair.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/data-zoom.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/index.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/index.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/indicator.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/indicator.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/color-legend.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/continuous.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/discrete-legend.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/legend/size-legend.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/map-label.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/map-label.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-area.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-line.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/mark-point.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/player.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/poptip.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/title.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/tooltip.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/component/total-label.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/constants.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/mark.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/area.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/area.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/bar3d.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/box-plot.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/circle-packing.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/circular-progress.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/dot.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/dot.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/funnel3d.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge-pointer.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/gauge.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/heatmap.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/index.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/line.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/line.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/linear-progress.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/link.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/map.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/map.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/pie3d.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/radar.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/radar.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/rangeColumn.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/rose.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/rose.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/sankey.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/sankey.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/scatter.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/scatter.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/sunburst.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/treemap.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/treemap.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/waterfall.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/waterfall.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud.js +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.d.ts +0 -0
- /package/esm/theme/{buildin-theme/light → builtin/common}/series/word-cloud3d.js +0 -0
- /package/esm/theme/{buildin-theme/config.d.ts → builtin/constant.d.ts} +0 -0
- /package/esm/theme/{buildin-theme → builtin}/light/index.d.ts +0 -0
|
@@ -153,6 +153,11 @@ export interface ISeriesSpec extends ITriggerSpec {
|
|
|
153
153
|
extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | IExtensionGroupMarkSpec)[];
|
|
154
154
|
}
|
|
155
155
|
export type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph'>;
|
|
156
|
+
export type AdaptiveSpec<T, K extends keyof any> = {
|
|
157
|
+
[key in Exclude<keyof T, K>]: T[key];
|
|
158
|
+
} & {
|
|
159
|
+
[key in K]: any;
|
|
160
|
+
};
|
|
156
161
|
export type IMarkSpec<T extends ICommonSpec = ICommonSpec> = {
|
|
157
162
|
id?: StringOrNumber;
|
|
158
163
|
interactive?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/typings/spec/common.ts"],"names":[],"mappings":";;;AAyGA,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,qDAAqC,CAAA;IACrC,mDAAmC,CAAA;IACnC,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,qDAAqC,CAAA;IACrC,+BAAe,CAAA;AACjB,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB","file":"common.js","sourcesContent":["import type { IFillMarkSpec, IImageMarkSpec } from './../visual';\nimport type { ILayoutPaddingSpec } from '../../model/interface';\nimport type { LayoutCallBack } from '../../layout/interface';\nimport type { IElement, srIOption3DType } from '@visactor/vgrammar';\nimport type {\n DataSet,\n DataView,\n ISimplifyOptions,\n IFieldsOptions,\n IFilterOptions,\n IFoldOptions,\n IDsvParserOptions\n} from '@visactor/vdataset';\nimport type { IRegionSpec } from '../../region/interface';\nimport type { IDiscreteLegendSpec } from '../../component/legend/discrete/interface';\nimport type { IHoverSpec, ISelectSpec, ITriggerSpec } from '../../interaction/interface';\nimport type { IRenderOption } from '../../compile/interface';\nimport type { ITooltipSpec } from '../../component/tooltip/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport type { ILayoutSpec } from '../../layout/interface';\nimport type {\n ConvertToMarkStyleSpec,\n IArc3dMarkSpec,\n IArcMarkSpec,\n IAreaMarkSpec,\n IBoxPlotMarkSpec,\n ICommonSpec,\n IGroupMarkSpec,\n ILineMarkSpec,\n ILinkPathMarkSpec,\n IPathMarkSpec,\n IPolygonMarkSpec,\n IProgressArcMarkSpec,\n IPyramid3dMarkSpec,\n IRect3dMarkSpec,\n IRectMarkSpec,\n IRuleMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec,\n IVisualSpecScale\n} from '../visual';\nimport type { StateValue } from '../../compile/mark';\nimport type { ISeriesStyle, SeriesType } from '../../series/interface';\nimport type { ILayoutOrientPadding } from '../../model/interface';\nimport type { Datum, StringOrNumber } from '../common';\nimport type { IInvalidType } from '../data';\nimport type { IMorphSeriesSpec } from '../../animation/spec';\nimport type { IPlayer } from '../../component/player';\nimport type { IMarkProgressiveConfig, MarkTypeEnum } from '../../mark/interface';\nimport type { IDataZoomSpec, IScrollBarSpec } from '../../component/data-zoom';\nimport type { ICrosshairSpec } from '../../component/crosshair/interface';\nimport type { ITheme } from '../../theme';\nimport type { ITitleSpec } from '../../component/title/interface';\nimport type { IBrushSpec } from '../../component/brush';\nimport type { ITotalLabelSpec } from '../../component/label';\n\nexport type IChartPadding = ILayoutOrientPadding | number;\n\n/** chart option */\nexport interface IInitOption extends Omit<IRenderOption, 'pluginList'> {\n /**\n * **仅生效于浏览器环境。**\n * 图表挂载的父容器,可以直接指定容器 id,也可以传入 dom 对象\n */\n dom?: string | HTMLElement;\n /**\n * 除去选择 dom 属性进行挂载父容器,也可以使用 renderCanvas 属性直接传入 canvas 实例/ canvasId\n * 小程序/小组件环境请直接传入 id\n */\n renderCanvas?: string | HTMLCanvasElement;\n /** 数据集 */\n dataSet?: DataSet;\n /** 是否自适应容器大小 */\n autoFit?: boolean;\n /**\n * 性能测试钩子\n */\n performanceHook?: IPerformanceHook;\n /**\n * 是否开启动画\n */\n animation?: boolean;\n /**\n * 3d配置\n */\n options3d?: srIOption3DType;\n\n /**\n * 自定义布局函数\n */\n layout?: LayoutCallBack;\n\n /**\n * 当文本省略时,鼠标 hover 到文本上时是否显示 poptip\n * @default true\n */\n poptip?: boolean;\n\n /**\n * 报错的回调函数\n * @since 1.2.0\n */\n onError?: (...args: any[]) => void;\n}\n\nexport enum RenderModeEnum {\n 'desktop-browser' = 'desktop-browser',\n 'mobile-browser' = 'mobile-browser',\n 'node' = 'node',\n 'worker' = 'worker',\n 'miniApp' = 'miniApp',\n 'desktop-miniApp' = 'desktop-miniApp',\n 'lynx' = 'lynx'\n}\nexport type RenderMode = keyof typeof RenderModeEnum;\n\n/** chart spec */\nexport interface IChartSpec {\n /** 图表类型 */\n type: string;\n /** 数据 */\n data?: IData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /**\n * 图表宽高是否自适应容器,浏览器环境下默认为 true。\n * 该配置的优先级高于构造函数中的 autoFit 配置。\n * 如果用户配置了 width,则以用户配置的 width 为准,height 同理。\n */\n autoFit?: boolean;\n /**\n * 图表整体 padding 设置\n */\n padding?: ILayoutPaddingSpec;\n /**\n * 图表色系配置\n */\n color?: string[] | Omit<IVisualSpecScale<unknown, string>, 'id'>;\n /**\n * 系列\n * @description 仅在组合图中使用, 文档中除组合图外均未透出该配置\n */\n series?: ISeriesSpec[];\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /** hover 交互 */\n hover?: boolean | IHoverSpec;\n /** select 交互 */\n select?: boolean | ISelectSpec;\n\n /** region配置 */\n region?: IRegionSpec[];\n /** 图表标题配置 */\n title?: ITitleSpec;\n /** 布局配置 */\n layout?: ILayoutSpec;\n /** 图例配置 */\n legends?: IDiscreteLegendSpec | IDiscreteLegendSpec[];\n /** 十字辅助线配置 */\n crosshair?: ICrosshairSpec | ICrosshairSpec[];\n /** tooltip配置 */\n tooltip?: ITooltipSpec;\n /** 播放器配置 */\n player?: IPlayer;\n /** 缩略轴配置 */\n dataZoom?: IDataZoomSpec[];\n /** 滚动条配置 */\n scrollBar?: IScrollBarSpec[];\n /** 框选配置 */\n brush?: IBrushSpec;\n /** 全局 scale 配置 */\n scales?: IVisualSpecScale<unknown, unknown>[];\n /** 自定义mark */\n customMark?: ICustomMarkSpec<EnableMarkType>[];\n /**\n * 图表上的主题定义。\n * 可以直接配置主题名,前提是该主题名已经注册\n */\n theme?: Omit<ITheme, 'name'> | string;\n /**\n * 图表背景色配置,优先级高于构造函数中的 background 配置\n */\n background?: IBackgroundSpec;\n\n // TODO:后续开放,现在仍有问题\n // poptip?: PopTipAttributes;\n // TODO: 补充动画配置\n}\n\nexport type IBackgroundStyleSpec = ConvertToMarkStyleSpec<Omit<IFillMarkSpec, 'width' | 'height' | 'background'>> & {\n image?: IRectMarkSpec['background'];\n cornerRadius?: IRectMarkSpec['cornerRadius'];\n};\n\nexport type IBackgroundSpec = string | IBackgroundStyleSpec;\n\n/** data */\nexport type IDataType = IDataValues | DataView;\nexport type IData = IDataType | IDataType[];\nexport type DataKeyType = string | string[] | ((data: Datum, index: number) => string);\nexport type BuildInTransformOptions =\n | {\n /** 地理数据简化 */\n type: 'simplify';\n options: ISimplifyOptions;\n }\n | {\n /** 数据维度处理,包括排序,逆序,数据筛选能力 */\n type: 'fields';\n options: IFieldsOptions;\n }\n | {\n /** 使用回调的自定义筛选 */\n type: 'filter';\n options: IFilterOptions;\n }\n | {\n /** 数据展开 */\n type: 'fold';\n options: IFoldOptions;\n };\n\nexport interface IFieldsMeta {\n /** TODO: 字段通用format, 暂时先不支持 */\n // format?: (datum: Datum, index: number) => unknown;\n /** 字段别名 */\n alias?: string;\n /** 字段取值范围 */\n domain?: StringOrNumber[];\n /** 是否使用 domain 锁定统计信息。默认为 false */\n lockStatisticsByDomain?: boolean;\n /** 连续型 还是 离散型 */\n type?: 'ordinal' | 'linear';\n /** 排序顺序 不设置的话当前维度不进行排序 */\n sortIndex?: number;\n /** 排序时是否反转 默认为 false */\n sortReverse?: boolean;\n}\n\nexport interface SheetParseOptions {\n type: 'csv' | 'dsv' | 'tsv';\n options?: IDsvParserOptions;\n}\n\nexport interface CommonParseOptions {\n /**\n * 是否需要对数据进行 clone,默认为 true。\n * 如果考虑性能,你可以将其关闭,但是这会带了一些副作用,即我们会对传入的数据进行修改(不会对原有字段及值修改,只会在原有数据基础上添加一些字段)。\n * @default true\n * @since 1.3.0\n */\n clone?: boolean;\n}\n\nexport interface IDataValues {\n /**\n * 数据唯一标识\n */\n id?: StringOrNumber;\n /**\n * 数据\n */\n values: Datum[] | string;\n /**\n * 引用的数据索引\n */\n fromDataIndex?: number;\n /**\n * 引用的数据 id\n */\n fromDataId?: StringOrNumber;\n /**\n * 数据 transform 配置\n */\n transforms?: BuildInTransformOptions[];\n /**\n * 数据字段相关配置\n */\n fields?: Record<\n /** 字段key */\n string,\n IFieldsMeta\n >;\n\n parser?: SheetParseOptions | CommonParseOptions;\n}\n\nexport type IHierarchyNodeData = {\n value?: number;\n children?: IHierarchyNodeData[];\n} & Datum;\n\nexport interface IHierarchyDataValues extends Omit<IDataValues, 'values'> {\n values: IHierarchyNodeData;\n}\n\nexport type IHierarchyData = DataView | IHierarchyDataValues;\n\n/** series */\nexport interface ISeriesSpec extends ITriggerSpec {\n /** 系列类型 */\n type: SeriesType;\n\n /** 系列名称 */\n name?: string;\n\n /** 用户自定义的 series id */\n id?: StringOrNumber;\n /**\n * 系列数据\n * @description 系列可以配置自身的数据,也可以从chart.data中获取数据\n */\n data?: IDataType;\n /**\n * 系列关联的数据索引\n * @default 0\n */\n dataIndex?: number;\n /**\n * 系列关联的数据id\n */\n dataId?: StringOrNumber;\n /**\n * dataKey用于绑定数据与Mark的关系, 该配置在动画中非常重要.\n */\n dataKey?: DataKeyType;\n\n /**\n * 系列关联的region索引\n * @default 0\n */\n regionIndex?: number;\n /** 系列关联的region id */\n regionId?: StringOrNumber;\n /**\n * 分组字段\n */\n seriesField?: string;\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /** 是否对数据进行堆叠处理 */\n stack?: boolean;\n\n /** 堆叠汇总标签\n * @since 1.3.0\n */\n totalLabel?: ITotalLabelSpec;\n\n /** 是否对数据进行百分比处理 */\n percent?: boolean;\n\n /** 是否围绕中心轴偏移轮廓 */\n stackOffsetSilhouette?: boolean;\n\n /**\n * 非合规数据点连接方式\n * @description null,undefined等非法数据点连接方式。\n * @default 'break'\n * 'break'指在该数据点处断开\n * 'link' 指忽略该点保持连续\n * 'zero' 指该点默认数值为0\n * 'ignore' 指不处理\n */\n invalidType?: IInvalidType;\n\n /** 提示信息 */\n tooltip?: ITooltipSpec;\n\n /**\n * 是否开启系列动画\n */\n animation?: boolean;\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /**\n * 是否支持3d视角\n */\n support3d?: boolean;\n /**\n * morph 动画配置\n */\n morph?: IMorphSeriesSpec;\n\n /**\n * 扩展mark\n */\n extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | IExtensionGroupMarkSpec)[];\n\n /**\n * series background\n * 作用是支持系列的图形对系列背景进行 mask,或者切分等效果。不是作为背景图\n * 暂时不开放api,避免出现break change\n */\n // background?: IBackgroundSpec;\n}\n\nexport type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph'>;\n\n/** markSpec */\nexport type IMarkSpec<T extends ICommonSpec = ICommonSpec> = {\n /**\n * 用户id\n */\n id?: StringOrNumber;\n /**\n * 是否响应交互\n */\n interactive?: boolean;\n // /**\n // * 是否会被region区域裁减\n // * @todo 暂未支持\n // */\n // clip?: boolean;\n /**\n * 与其他mark元素的层级\n */\n zIndex?: number;\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: ConvertToMarkStyleSpec<T>;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, IMarkStateSpec<T> | IMarkStateStyleSpec<T>>;\n\n /* 是否是3d视角的mark */\n support3d?: boolean;\n} & IMarkProgressiveConfig;\n\nexport type IMarkStateFilter =\n | {\n /** 维度筛选 */\n fields: { [key in string]: { type: 'ordinal' | 'linear'; domain: StringOrNumber[] } };\n }\n | {\n /** 筛选数据 */\n datums: Datum[];\n /** 筛选数据 */\n datumKeys: string[];\n }\n | {\n /** 筛选 item */\n items: IElement[];\n }\n /** 筛选函数 */\n | ((datum: Datum, options: Record<string, any>) => boolean);\n\nexport interface IMarkStateSpec<T> {\n /** 筛选器 */\n filter?: IMarkStateFilter;\n /** 状态优先级 */\n level?: number | undefined;\n style: ConvertToMarkStyleSpec<T>;\n}\n\nexport type IMarkStateStyleSpec<T> = ConvertToMarkStyleSpec<T>;\n\nexport type IMarkTheme<T> = {\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: T;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, T>;\n /**\n * 可交互的开关\n */\n interactive?: boolean;\n};\n\nexport interface IPerformanceHook {\n // InitRender\n // ├── InitializeChart\n // ├── CompileToVGrammar\n // ├── ParseView\n // | └── ParseExpression\n // ├── (new View)\n // | ├── CreateRuntime\n // | └── (view.initialize)\n // | └── CreateVRenderStage\n // └── SrViewEvaluateAsync / SrViewRunAsync\n // ├── MarkTransform\n // ├── FacetTransform\n // ├── CreateVRenderMark\n // └── VRenderDraw\n\n // 初始化图表配置\n beforeInitializeChart?: () => void;\n afterInitializeChart?: () => void;\n\n // 编译\n beforeCompileToVGrammar?: () => void;\n afterCompileToVGrammar?: () => void;\n // 各个图表模块编译\n beforeRegionCompile?: () => void;\n afterRegionCompile?: () => void;\n beforeSeriesCompile?: () => void;\n afterSeriesCompile?: () => void;\n beforeComponentCompile?: () => void;\n afterComponentCompile?: () => void;\n\n // resize的时候的钩子\n beforeResizeWithUpdate?: () => void;\n afterResizeWithUpdate?: () => void;\n\n // LayoutWithSceneGraph 二次布局\n beforeLayoutWithSceneGraph?: () => void;\n afterLayoutWithSceneGraph?: () => void;\n\n // VGrammar 解析spec\n beforeParseView?: () => void;\n afterParseView?: () => void;\n\n // 初始化runtime\n beforeCreateRuntime?: () => void;\n afterCreateRuntime?: () => void;\n\n // VGrammar EvaluateAsync 时间\n beforeSrViewEvaluateAsync?: () => void;\n afterSrViewEvaluateAsync?: () => void;\n\n // VGrammar RunAsync 时间\n beforeSrViewRunAsync?: () => void;\n afterSrViewRunAsync?: () => void;\n\n // transform测量\n beforeTransform?: (name: string) => void;\n afterTransform?: (name: string) => void;\n\n // Create VRender Stage 时间\n beforeCreateVRenderStage?: () => void;\n afterCreateVRenderStage?: () => void;\n\n // Create VRender Mark 时间\n beforeCreateVRenderMark?: () => void;\n afterCreateVRenderMark?: () => void;\n\n // VRender Draw 时间\n beforeVRenderDraw?: () => void;\n afterVRenderDraw?: () => void;\n}\n\nexport type IBuildinMarkSpec = {\n [MarkTypeEnum.group]: IGroupMarkSpec;\n\n [MarkTypeEnum.symbol]: ISymbolMarkSpec;\n [MarkTypeEnum.rule]: IRuleMarkSpec;\n [MarkTypeEnum.line]: ILineMarkSpec;\n [MarkTypeEnum.text]: ITextMarkSpec;\n [MarkTypeEnum.rect]: IRectMarkSpec;\n [MarkTypeEnum.rect3d]: IRect3dMarkSpec;\n [MarkTypeEnum.image]: IImageMarkSpec;\n [MarkTypeEnum.path]: IPathMarkSpec;\n [MarkTypeEnum.area]: IAreaMarkSpec;\n [MarkTypeEnum.arc]: IArcMarkSpec;\n [MarkTypeEnum.arc3d]: IArc3dMarkSpec;\n [MarkTypeEnum.polygon]: IPolygonMarkSpec;\n [MarkTypeEnum.pyramid3d]: IPyramid3dMarkSpec;\n [MarkTypeEnum.boxPlot]: IBoxPlotMarkSpec;\n [MarkTypeEnum.linkPath]: ILinkPathMarkSpec;\n [MarkTypeEnum.progressArc]: IProgressArcMarkSpec;\n};\nexport type EnableMarkType = keyof IBuildinMarkSpec;\nexport interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBuildinMarkSpec[T]> {\n type: T;\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\nexport interface ICustomMarkGroupSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n\nexport interface IExtensionMarkSpec<T extends Exclude<EnableMarkType, MarkTypeEnum.group>> extends ICustomMarkSpec<T> {\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\n\nexport interface IExtensionGroupMarkSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n /**\n * 支持子节点\n */\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/typings/spec/common.ts"],"names":[],"mappings":";;;AAyGA,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,qDAAqC,CAAA;IACrC,mDAAmC,CAAA;IACnC,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,qDAAqC,CAAA;IACrC,+BAAe,CAAA;AACjB,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB","file":"common.js","sourcesContent":["import type { IFillMarkSpec, IImageMarkSpec } from './../visual';\nimport type { ILayoutPaddingSpec } from '../../model/interface';\nimport type { LayoutCallBack } from '../../layout/interface';\nimport type { IElement, srIOption3DType } from '@visactor/vgrammar';\nimport type {\n DataSet,\n DataView,\n ISimplifyOptions,\n IFieldsOptions,\n IFilterOptions,\n IFoldOptions,\n IDsvParserOptions\n} from '@visactor/vdataset';\nimport type { IRegionSpec } from '../../region/interface';\nimport type { IDiscreteLegendSpec } from '../../component/legend/discrete/interface';\nimport type { IHoverSpec, ISelectSpec, ITriggerSpec } from '../../interaction/interface';\nimport type { IRenderOption } from '../../compile/interface';\nimport type { ITooltipSpec } from '../../component/tooltip/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport type { ILayoutSpec } from '../../layout/interface';\nimport type {\n ConvertToMarkStyleSpec,\n IArc3dMarkSpec,\n IArcMarkSpec,\n IAreaMarkSpec,\n IBoxPlotMarkSpec,\n ICommonSpec,\n IGroupMarkSpec,\n ILineMarkSpec,\n ILinkPathMarkSpec,\n IPathMarkSpec,\n IPolygonMarkSpec,\n IProgressArcMarkSpec,\n IPyramid3dMarkSpec,\n IRect3dMarkSpec,\n IRectMarkSpec,\n IRuleMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec,\n IVisualSpecScale\n} from '../visual';\nimport type { StateValue } from '../../compile/mark';\nimport type { ISeriesStyle, SeriesType } from '../../series/interface';\nimport type { ILayoutOrientPadding } from '../../model/interface';\nimport type { Datum, StringOrNumber } from '../common';\nimport type { IInvalidType } from '../data';\nimport type { IMorphSeriesSpec } from '../../animation/spec';\nimport type { IPlayer } from '../../component/player';\nimport type { IMarkProgressiveConfig, MarkTypeEnum } from '../../mark/interface';\nimport type { IDataZoomSpec, IScrollBarSpec } from '../../component/data-zoom';\nimport type { ICrosshairSpec } from '../../component/crosshair/interface';\nimport type { ITheme } from '../../theme';\nimport type { ITitleSpec } from '../../component/title/interface';\nimport type { IBrushSpec } from '../../component/brush';\nimport type { ITotalLabelSpec } from '../../component/label';\n\nexport type IChartPadding = ILayoutOrientPadding | number;\n\n/** chart option */\nexport interface IInitOption extends Omit<IRenderOption, 'pluginList'> {\n /**\n * **仅生效于浏览器环境。**\n * 图表挂载的父容器,可以直接指定容器 id,也可以传入 dom 对象\n */\n dom?: string | HTMLElement;\n /**\n * 除去选择 dom 属性进行挂载父容器,也可以使用 renderCanvas 属性直接传入 canvas 实例/ canvasId\n * 小程序/小组件环境请直接传入 id\n */\n renderCanvas?: string | HTMLCanvasElement;\n /** 数据集 */\n dataSet?: DataSet;\n /** 是否自适应容器大小 */\n autoFit?: boolean;\n /**\n * 性能测试钩子\n */\n performanceHook?: IPerformanceHook;\n /**\n * 是否开启动画\n */\n animation?: boolean;\n /**\n * 3d配置\n */\n options3d?: srIOption3DType;\n\n /**\n * 自定义布局函数\n */\n layout?: LayoutCallBack;\n\n /**\n * 当文本省略时,鼠标 hover 到文本上时是否显示 poptip\n * @default true\n */\n poptip?: boolean;\n\n /**\n * 报错的回调函数\n * @since 1.2.0\n */\n onError?: (...args: any[]) => void;\n}\n\nexport enum RenderModeEnum {\n 'desktop-browser' = 'desktop-browser',\n 'mobile-browser' = 'mobile-browser',\n 'node' = 'node',\n 'worker' = 'worker',\n 'miniApp' = 'miniApp',\n 'desktop-miniApp' = 'desktop-miniApp',\n 'lynx' = 'lynx'\n}\nexport type RenderMode = keyof typeof RenderModeEnum;\n\n/** chart spec */\nexport interface IChartSpec {\n /** 图表类型 */\n type: string;\n /** 数据 */\n data?: IData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /**\n * 图表宽高是否自适应容器,浏览器环境下默认为 true。\n * 该配置的优先级高于构造函数中的 autoFit 配置。\n * 如果用户配置了 width,则以用户配置的 width 为准,height 同理。\n */\n autoFit?: boolean;\n /**\n * 图表整体 padding 设置\n */\n padding?: ILayoutPaddingSpec;\n /**\n * 图表色系配置\n */\n color?: string[] | Omit<IVisualSpecScale<unknown, string>, 'id'>;\n /**\n * 系列\n * @description 仅在组合图中使用, 文档中除组合图外均未透出该配置\n */\n series?: ISeriesSpec[];\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /** hover 交互 */\n hover?: boolean | IHoverSpec;\n /** select 交互 */\n select?: boolean | ISelectSpec;\n\n /** region配置 */\n region?: IRegionSpec[];\n /** 图表标题配置 */\n title?: ITitleSpec;\n /** 布局配置 */\n layout?: ILayoutSpec;\n /** 图例配置 */\n legends?: IDiscreteLegendSpec | IDiscreteLegendSpec[];\n /** 十字辅助线配置 */\n crosshair?: ICrosshairSpec | ICrosshairSpec[];\n /** tooltip配置 */\n tooltip?: ITooltipSpec;\n /** 播放器配置 */\n player?: IPlayer;\n /** 缩略轴配置 */\n dataZoom?: IDataZoomSpec[];\n /** 滚动条配置 */\n scrollBar?: IScrollBarSpec[];\n /** 框选配置 */\n brush?: IBrushSpec;\n /** 全局 scale 配置 */\n scales?: IVisualSpecScale<unknown, unknown>[];\n /** 自定义mark */\n customMark?: ICustomMarkSpec<EnableMarkType>[];\n /**\n * 图表上的主题定义。\n * 可以直接配置主题名,前提是该主题名已经注册\n */\n theme?: Omit<ITheme, 'name'> | string;\n /**\n * 图表背景色配置,优先级高于构造函数中的 background 配置\n */\n background?: IBackgroundSpec;\n\n // TODO:后续开放,现在仍有问题\n // poptip?: PopTipAttributes;\n // TODO: 补充动画配置\n}\n\nexport type IBackgroundStyleSpec = ConvertToMarkStyleSpec<Omit<IFillMarkSpec, 'width' | 'height' | 'background'>> & {\n image?: IRectMarkSpec['background'];\n cornerRadius?: IRectMarkSpec['cornerRadius'];\n};\n\nexport type IBackgroundSpec = string | IBackgroundStyleSpec;\n\n/** data */\nexport type IDataType = IDataValues | DataView;\nexport type IData = IDataType | IDataType[];\nexport type DataKeyType = string | string[] | ((data: Datum, index: number) => string);\nexport type BuildInTransformOptions =\n | {\n /** 地理数据简化 */\n type: 'simplify';\n options: ISimplifyOptions;\n }\n | {\n /** 数据维度处理,包括排序,逆序,数据筛选能力 */\n type: 'fields';\n options: IFieldsOptions;\n }\n | {\n /** 使用回调的自定义筛选 */\n type: 'filter';\n options: IFilterOptions;\n }\n | {\n /** 数据展开 */\n type: 'fold';\n options: IFoldOptions;\n };\n\nexport interface IFieldsMeta {\n /** TODO: 字段通用format, 暂时先不支持 */\n // format?: (datum: Datum, index: number) => unknown;\n /** 字段别名 */\n alias?: string;\n /** 字段取值范围 */\n domain?: StringOrNumber[];\n /** 是否使用 domain 锁定统计信息。默认为 false */\n lockStatisticsByDomain?: boolean;\n /** 连续型 还是 离散型 */\n type?: 'ordinal' | 'linear';\n /** 排序顺序 不设置的话当前维度不进行排序 */\n sortIndex?: number;\n /** 排序时是否反转 默认为 false */\n sortReverse?: boolean;\n}\n\nexport interface SheetParseOptions {\n type: 'csv' | 'dsv' | 'tsv';\n options?: IDsvParserOptions;\n}\n\nexport interface CommonParseOptions {\n /**\n * 是否需要对数据进行 clone,默认为 true。\n * 如果考虑性能,你可以将其关闭,但是这会带了一些副作用,即我们会对传入的数据进行修改(不会对原有字段及值修改,只会在原有数据基础上添加一些字段)。\n * @default true\n * @since 1.3.0\n */\n clone?: boolean;\n}\n\nexport interface IDataValues {\n /**\n * 数据唯一标识\n */\n id?: StringOrNumber;\n /**\n * 数据\n */\n values: Datum[] | string;\n /**\n * 引用的数据索引\n */\n fromDataIndex?: number;\n /**\n * 引用的数据 id\n */\n fromDataId?: StringOrNumber;\n /**\n * 数据 transform 配置\n */\n transforms?: BuildInTransformOptions[];\n /**\n * 数据字段相关配置\n */\n fields?: Record<\n /** 字段key */\n string,\n IFieldsMeta\n >;\n\n parser?: SheetParseOptions | CommonParseOptions;\n}\n\nexport type IHierarchyNodeData = {\n value?: number;\n children?: IHierarchyNodeData[];\n} & Datum;\n\nexport interface IHierarchyDataValues extends Omit<IDataValues, 'values'> {\n values: IHierarchyNodeData;\n}\n\nexport type IHierarchyData = DataView | IHierarchyDataValues;\n\n/** series */\nexport interface ISeriesSpec extends ITriggerSpec {\n /** 系列类型 */\n type: SeriesType;\n\n /** 系列名称 */\n name?: string;\n\n /** 用户自定义的 series id */\n id?: StringOrNumber;\n /**\n * 系列数据\n * @description 系列可以配置自身的数据,也可以从chart.data中获取数据\n */\n data?: IDataType;\n /**\n * 系列关联的数据索引\n * @default 0\n */\n dataIndex?: number;\n /**\n * 系列关联的数据id\n */\n dataId?: StringOrNumber;\n /**\n * dataKey用于绑定数据与Mark的关系, 该配置在动画中非常重要.\n */\n dataKey?: DataKeyType;\n\n /**\n * 系列关联的region索引\n * @default 0\n */\n regionIndex?: number;\n /** 系列关联的region id */\n regionId?: StringOrNumber;\n /**\n * 分组字段\n */\n seriesField?: string;\n /**\n * 系列样式\n * @description 仅在图表配置了seriesField时生效\n */\n seriesStyle?: ISeriesStyle;\n\n /** 是否对数据进行堆叠处理 */\n stack?: boolean;\n\n /** 堆叠汇总标签\n * @since 1.3.0\n */\n totalLabel?: ITotalLabelSpec;\n\n /** 是否对数据进行百分比处理 */\n percent?: boolean;\n\n /** 是否围绕中心轴偏移轮廓 */\n stackOffsetSilhouette?: boolean;\n\n /**\n * 非合规数据点连接方式\n * @description null,undefined等非法数据点连接方式。\n * @default 'break'\n * 'break'指在该数据点处断开\n * 'link' 指忽略该点保持连续\n * 'zero' 指该点默认数值为0\n * 'ignore' 指不处理\n */\n invalidType?: IInvalidType;\n\n /** 提示信息 */\n tooltip?: ITooltipSpec;\n\n /**\n * 是否开启系列动画\n */\n animation?: boolean;\n /**\n * 自动关闭动画的阀值,对应的是单系列data的长度\n * @since 1.2.0\n */\n animationThreshold?: number;\n\n /**\n * 是否支持3d视角\n */\n support3d?: boolean;\n /**\n * morph 动画配置\n */\n morph?: IMorphSeriesSpec;\n\n /**\n * 扩展mark\n */\n extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | IExtensionGroupMarkSpec)[];\n\n /**\n * series background\n * 作用是支持系列的图形对系列背景进行 mask,或者切分等效果。不是作为背景图\n * 暂时不开放api,避免出现break change\n */\n // background?: IBackgroundSpec;\n}\n\nexport type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph'>;\n\nexport type AdaptiveSpec<T, K extends keyof any> = {\n [key in Exclude<keyof T, K>]: T[key];\n} & { [key in K]: any };\n\n/** markSpec */\nexport type IMarkSpec<T extends ICommonSpec = ICommonSpec> = {\n /**\n * 用户id\n */\n id?: StringOrNumber;\n /**\n * 是否响应交互\n */\n interactive?: boolean;\n // /**\n // * 是否会被region区域裁减\n // * @todo 暂未支持\n // */\n // clip?: boolean;\n /**\n * 与其他mark元素的层级\n */\n zIndex?: number;\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: ConvertToMarkStyleSpec<T>;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, IMarkStateSpec<T> | IMarkStateStyleSpec<T>>;\n\n /* 是否是3d视角的mark */\n support3d?: boolean;\n} & IMarkProgressiveConfig;\n\nexport type IMarkStateFilter =\n | {\n /** 维度筛选 */\n fields: { [key in string]: { type: 'ordinal' | 'linear'; domain: StringOrNumber[] } };\n }\n | {\n /** 筛选数据 */\n datums: Datum[];\n /** 筛选数据 */\n datumKeys: string[];\n }\n | {\n /** 筛选 item */\n items: IElement[];\n }\n /** 筛选函数 */\n | ((datum: Datum, options: Record<string, any>) => boolean);\n\nexport interface IMarkStateSpec<T> {\n /** 筛选器 */\n filter?: IMarkStateFilter;\n /** 状态优先级 */\n level?: number | undefined;\n style: ConvertToMarkStyleSpec<T>;\n}\n\nexport type IMarkStateStyleSpec<T> = ConvertToMarkStyleSpec<T>;\n\nexport type IMarkTheme<T> = {\n /**\n * mark 层 是否显示配置\n */\n visible?: boolean;\n /** 默认样式设置 */\n style?: T;\n /** 不同状态下的样式配置 */\n state?: Record<StateValue, T>;\n /**\n * 可交互的开关\n */\n interactive?: boolean;\n};\n\nexport interface IPerformanceHook {\n // InitRender\n // ├── InitializeChart\n // ├── CompileToVGrammar\n // ├── ParseView\n // | └── ParseExpression\n // ├── (new View)\n // | ├── CreateRuntime\n // | └── (view.initialize)\n // | └── CreateVRenderStage\n // └── SrViewEvaluateAsync / SrViewRunAsync\n // ├── MarkTransform\n // ├── FacetTransform\n // ├── CreateVRenderMark\n // └── VRenderDraw\n\n // 初始化图表配置\n beforeInitializeChart?: () => void;\n afterInitializeChart?: () => void;\n\n // 编译\n beforeCompileToVGrammar?: () => void;\n afterCompileToVGrammar?: () => void;\n // 各个图表模块编译\n beforeRegionCompile?: () => void;\n afterRegionCompile?: () => void;\n beforeSeriesCompile?: () => void;\n afterSeriesCompile?: () => void;\n beforeComponentCompile?: () => void;\n afterComponentCompile?: () => void;\n\n // resize的时候的钩子\n beforeResizeWithUpdate?: () => void;\n afterResizeWithUpdate?: () => void;\n\n // LayoutWithSceneGraph 二次布局\n beforeLayoutWithSceneGraph?: () => void;\n afterLayoutWithSceneGraph?: () => void;\n\n // VGrammar 解析spec\n beforeParseView?: () => void;\n afterParseView?: () => void;\n\n // 初始化runtime\n beforeCreateRuntime?: () => void;\n afterCreateRuntime?: () => void;\n\n // VGrammar EvaluateAsync 时间\n beforeSrViewEvaluateAsync?: () => void;\n afterSrViewEvaluateAsync?: () => void;\n\n // VGrammar RunAsync 时间\n beforeSrViewRunAsync?: () => void;\n afterSrViewRunAsync?: () => void;\n\n // transform测量\n beforeTransform?: (name: string) => void;\n afterTransform?: (name: string) => void;\n\n // Create VRender Stage 时间\n beforeCreateVRenderStage?: () => void;\n afterCreateVRenderStage?: () => void;\n\n // Create VRender Mark 时间\n beforeCreateVRenderMark?: () => void;\n afterCreateVRenderMark?: () => void;\n\n // VRender Draw 时间\n beforeVRenderDraw?: () => void;\n afterVRenderDraw?: () => void;\n}\n\nexport type IBuildinMarkSpec = {\n [MarkTypeEnum.group]: IGroupMarkSpec;\n\n [MarkTypeEnum.symbol]: ISymbolMarkSpec;\n [MarkTypeEnum.rule]: IRuleMarkSpec;\n [MarkTypeEnum.line]: ILineMarkSpec;\n [MarkTypeEnum.text]: ITextMarkSpec;\n [MarkTypeEnum.rect]: IRectMarkSpec;\n [MarkTypeEnum.rect3d]: IRect3dMarkSpec;\n [MarkTypeEnum.image]: IImageMarkSpec;\n [MarkTypeEnum.path]: IPathMarkSpec;\n [MarkTypeEnum.area]: IAreaMarkSpec;\n [MarkTypeEnum.arc]: IArcMarkSpec;\n [MarkTypeEnum.arc3d]: IArc3dMarkSpec;\n [MarkTypeEnum.polygon]: IPolygonMarkSpec;\n [MarkTypeEnum.pyramid3d]: IPyramid3dMarkSpec;\n [MarkTypeEnum.boxPlot]: IBoxPlotMarkSpec;\n [MarkTypeEnum.linkPath]: ILinkPathMarkSpec;\n [MarkTypeEnum.progressArc]: IProgressArcMarkSpec;\n};\nexport type EnableMarkType = keyof IBuildinMarkSpec;\nexport interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBuildinMarkSpec[T]> {\n type: T;\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\nexport interface ICustomMarkGroupSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n\nexport interface IExtensionMarkSpec<T extends Exclude<EnableMarkType, MarkTypeEnum.group>> extends ICustomMarkSpec<T> {\n /**\n * 关联的数据索引\n * @default 与系列使用同一份数据\n */\n dataIndex?: number;\n /**\n * 关联的数据id\n */\n dataId?: StringOrNumber;\n}\n\nexport interface IExtensionGroupMarkSpec extends ICustomMarkSpec<MarkTypeEnum.group> {\n /**\n * 支持子节点\n */\n children?: ICustomMarkSpec<EnableMarkType>[];\n}\n"]}
|
package/cjs/util/spec.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { IBackgroundSpec, IBackgroundStyleSpec } from './../typings/spec/common';
|
|
2
|
+
import type { Maybe } from '@visactor/vutils';
|
|
2
3
|
import { DataView } from '@visactor/vdataset';
|
|
4
|
+
import type { IThemeColorScheme } from '../theme/color-scheme/interface';
|
|
5
|
+
import type { SeriesTypeEnum } from '../series/interface';
|
|
6
|
+
import type { ITheme } from '../theme';
|
|
3
7
|
export declare function specTransform(spec: unknown, special?: {
|
|
4
8
|
[key: string]: (v: unknown) => unknown;
|
|
5
9
|
}): unknown;
|
|
6
10
|
export declare function cloneDeepSpec(spec: any): any;
|
|
7
11
|
export declare function isDataView(obj: any): obj is DataView;
|
|
12
|
+
export declare function isHTMLElement(obj: any): obj is Element;
|
|
8
13
|
export declare function convertBackgroundSpec(bg: IBackgroundSpec): Omit<IBackgroundStyleSpec, 'image'> & {
|
|
9
14
|
background?: IBackgroundStyleSpec['image'];
|
|
10
15
|
};
|
|
16
|
+
export declare function preprocessSpecOrTheme(obj: any, colorScheme?: IThemeColorScheme, seriesType?: SeriesTypeEnum): any;
|
|
17
|
+
export declare function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme>;
|
package/cjs/util/spec.js
CHANGED
|
@@ -12,9 +12,9 @@ var __rest = this && this.__rest || function(s, e) {
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", {
|
|
14
14
|
value: !0
|
|
15
|
-
}), exports.convertBackgroundSpec = exports.isDataView = exports.cloneDeepSpec = exports.specTransform = void 0;
|
|
15
|
+
}), exports.mergeTheme = exports.preprocessSpecOrTheme = exports.convertBackgroundSpec = exports.isHTMLElement = exports.isDataView = exports.cloneDeepSpec = exports.specTransform = void 0;
|
|
16
16
|
|
|
17
|
-
const vutils_1 = require("@visactor/vutils"), vdataset_1 = require("@visactor/vdataset");
|
|
17
|
+
const vutils_1 = require("@visactor/vutils"), vdataset_1 = require("@visactor/vdataset"), util_1 = require("../theme/color-scheme/util"), interface_1 = require("../series/interface");
|
|
18
18
|
|
|
19
19
|
function specTransform(spec, special = {
|
|
20
20
|
data: v => v
|
|
@@ -38,7 +38,7 @@ function cloneDeepSpec(spec) {
|
|
|
38
38
|
const value = spec;
|
|
39
39
|
let result;
|
|
40
40
|
if (!(0, vutils_1.isValid)(value) || "object" != typeof value) return value;
|
|
41
|
-
if (isDataView(value)) return value;
|
|
41
|
+
if (isDataView(value) || isHTMLElement(value)) return value;
|
|
42
42
|
const isArr = (0, vutils_1.isArray)(value), length = value.length;
|
|
43
43
|
result = isArr ? new Array(length) : "object" == typeof value ? {} : (0, vutils_1.isBoolean)(value) || (0,
|
|
44
44
|
vutils_1.isNumber)(value) || (0, vutils_1.isString)(value) ? value : (0, vutils_1.isDate)(value) ? new Date(+value) : void 0;
|
|
@@ -52,8 +52,16 @@ function cloneDeepSpec(spec) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
function isDataView(obj) {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return obj instanceof vdataset_1.DataView;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function isHTMLElement(obj) {
|
|
59
|
+
try {
|
|
60
|
+
return obj instanceof Element;
|
|
61
|
+
} catch (_a) {
|
|
62
|
+
const htmlElementKeys = [ "children", "innerHTML", "classList", "setAttribute", "tagName", "getBoundingClientRect" ], keys = Object.keys(obj);
|
|
63
|
+
return htmlElementKeys.every((key => keys.includes(key)));
|
|
64
|
+
}
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
function convertBackgroundSpec(bg) {
|
|
@@ -67,6 +75,47 @@ function convertBackgroundSpec(bg) {
|
|
|
67
75
|
return rest.background = image, rest;
|
|
68
76
|
}
|
|
69
77
|
|
|
78
|
+
function preprocessSpecOrTheme(obj, colorScheme, seriesType) {
|
|
79
|
+
if ((0, vutils_1.isArray)(obj)) return obj.map((element => (0, vutils_1.isObject)(element) && !(0,
|
|
80
|
+
vutils_1.isFunction)(element) ? preprocessSpecOrTheme(element, colorScheme, seriesType) : element));
|
|
81
|
+
const newObj = Object.assign({}, obj);
|
|
82
|
+
return Object.keys(newObj).forEach((key => {
|
|
83
|
+
if (key.includes("data")) return;
|
|
84
|
+
const value = obj[key];
|
|
85
|
+
(0, vutils_1.isObject)(value) && (isDataView(value) || isHTMLElement(value)) || (0,
|
|
86
|
+
vutils_1.isObject)(value) && !(0, vutils_1.isFunction)(value) && ((0, util_1.isColorKey)(value) ? newObj[key] = (0,
|
|
87
|
+
util_1.getActualColor)(value, colorScheme, seriesType) : newObj[key] = preprocessSpecOrTheme(value, colorScheme, seriesType));
|
|
88
|
+
})), newObj;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function mergeTheme(target, ...sources) {
|
|
92
|
+
return (0, vutils_1.merge)(preprocessThemeToMerge(target), ...sources.map(preprocessThemeToMerge));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function preprocessThemeToMerge(theme) {
|
|
96
|
+
if (!theme) return theme;
|
|
97
|
+
let {colorScheme: colorScheme} = theme;
|
|
98
|
+
colorScheme && (colorScheme = Object.keys(colorScheme).reduce(((scheme, key) => {
|
|
99
|
+
const value = colorScheme[key];
|
|
100
|
+
return scheme[key] = (0, util_1.transformColorSchemeToStandardStruct)(value), scheme;
|
|
101
|
+
}), {}));
|
|
102
|
+
let {series: series} = theme;
|
|
103
|
+
const {mark: markByType, markByName: markByName} = theme;
|
|
104
|
+
return (markByType || markByName) && (series = Object.keys(interface_1.seriesMarkInfoMap).reduce(((newSeriesTheme, key) => {
|
|
105
|
+
var _a;
|
|
106
|
+
const value = null !== (_a = null == series ? void 0 : series[key]) && void 0 !== _a ? _a : {}, newValue = {};
|
|
107
|
+
return Object.values(interface_1.seriesMarkInfoMap[key]).forEach((({type: type, name: name}) => {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
newValue[name] = (0, vutils_1.merge)({}, null !== (_a = null == markByType ? void 0 : markByType[(0,
|
|
110
|
+
vutils_1.array)(type)[0]]) && void 0 !== _a ? _a : {}, null !== (_b = null == markByName ? void 0 : markByName[name]) && void 0 !== _b ? _b : {}, value[name]);
|
|
111
|
+
})), newSeriesTheme[key] = Object.assign(Object.assign({}, value), newValue), newSeriesTheme;
|
|
112
|
+
}), {})), Object.assign(Object.assign({}, theme), {
|
|
113
|
+
colorScheme: colorScheme,
|
|
114
|
+
series: series
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
70
118
|
exports.specTransform = specTransform, exports.cloneDeepSpec = cloneDeepSpec, exports.isDataView = isDataView,
|
|
71
|
-
exports.convertBackgroundSpec = convertBackgroundSpec
|
|
119
|
+
exports.isHTMLElement = isHTMLElement, exports.convertBackgroundSpec = convertBackgroundSpec,
|
|
120
|
+
exports.preprocessSpecOrTheme = preprocessSpecOrTheme, exports.mergeTheme = mergeTheme;
|
|
72
121
|
//# sourceMappingURL=spec.js.map
|
package/cjs/util/spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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AAS,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACrH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,GAAG,YAAY,mBAAQ,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAClF,CAAC;AAJD,gCAIC;AAED,SAAgB,qBAAqB,CACnC,EAAmB;IAEnB,IAAI,CAAC,EAAE,EAAE;QACP,OAAO,IAAI,CAAC;KACb;IACD,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO;YACL,IAAI,EAAE,EAAE;YACR,WAAW,EAAE,CAAC;SACf,CAAC;KACH;IACD,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,KAAc,EAAE,EAAX,IAAI,UAAK,EAAE,EAApD,kDAA+C,CAAK,CAAC;IAC3D,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC;AAlBD,sDAkBC","file":"spec.js","sourcesContent":["import type { IBackgroundSpec, IBackgroundStyleSpec } from './../typings/spec/common';\nimport { isArray, isBoolean, isDate, isNumber, isString, isValid } from '@visactor/vutils';\nimport { DataView } from '@visactor/vdataset';\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\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 // 判断是不是 DataView 对象\n if (isDataView(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\nexport function isDataView(obj: any): obj is DataView {\n const dataViewKeys: (keyof DataView)[] = ['dataSet', 'latestData', 'rawData', 'parserData', 'isDataView', 'history'];\n const keys = Object.keys(obj);\n return obj instanceof DataView || dataViewKeys.every(key => keys.includes(key));\n}\n\nexport function convertBackgroundSpec(\n bg: IBackgroundSpec\n): Omit<IBackgroundStyleSpec, 'image'> & { background?: IBackgroundStyleSpec['image'] } {\n if (!bg) {\n return null;\n }\n if (typeof bg === 'string') {\n return {\n fill: bg,\n fillOpacity: 1\n };\n }\n if (typeof bg !== 'object') {\n return null;\n }\n const { x, y, width, height, x1, y1, image, ...rest } = bg;\n rest.background = image;\n return rest;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/util/spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,6CAW0B;AAC1B,iDAA8C;AAC9C,qDAA8G;AAI9G,mDAAwD;AAKxD,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;AAMD,SAAgB,aAAa,CAAC,IAAS;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC;IAEnB,IAAI,MAAM,CAAC;IACX,IAAI,CAAC,IAAA,gBAAO,EAAC,KAAK,CAA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,CAAC,CAAC,CAAC,CAAC,mCAAI,EAAE,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,IAAI,CAAC,mCAAI,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YACxG,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":"spec.js","sourcesContent":["import type { IBackgroundSpec, IBackgroundStyleSpec } from './../typings/spec/common';\nimport type { Maybe } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport {\n array,\n isArray,\n isBoolean,\n isDate,\n isFunction,\n isNumber,\n isObject,\n isString,\n isValid,\n merge\n} from '@visactor/vutils';\nimport { DataView } from '@visactor/vdataset';\nimport { getActualColor, isColorKey, transformColorSchemeToStandardStruct } from '../theme/color-scheme/util';\nimport type { IThemeColorScheme } from '../theme/color-scheme/interface';\nimport type { ISeriesMarkInfo, ISeriesTheme, SeriesTypeEnum } from '../series/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { seriesMarkInfoMap } from '../series/interface';\nimport type { ITheme } from '../theme';\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\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\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\nexport function convertBackgroundSpec(\n bg: IBackgroundSpec\n): Omit<IBackgroundStyleSpec, 'image'> & { background?: IBackgroundStyleSpec['image'] } {\n if (!bg) {\n return null;\n }\n if (typeof bg === 'string') {\n return {\n fill: bg,\n fillOpacity: 1\n };\n }\n if (typeof bg !== 'object') {\n return null;\n }\n const { x, y, width, height, x1, y1, image, ...rest } = bg;\n rest.background = image;\n return rest;\n}\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 = { ...obj };\n Object.keys(newObj).forEach(key => {\n // 绕过数据\n if (key.includes('data')) {\n return;\n }\n const value = obj[key];\n // 绕过不可深拷贝的对象\n if (isObject(value) && (isDataView(value) || isHTMLElement(value))) {\n return;\n }\n if (isObject(value) && !isFunction(value)) {\n // 查询、替换语义化颜色\n if (isColorKey(value)) {\n newObj[key] = getActualColor(value, colorScheme, seriesType);\n } else {\n newObj[key] = preprocessSpecOrTheme(value, colorScheme, seriesType);\n }\n }\n });\n\n return newObj;\n}\n\nexport function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme> {\n return merge(preprocessThemeToMerge(target), ...sources.map(preprocessThemeToMerge));\n}\n\nfunction preprocessThemeToMerge(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] = merge({}, 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"]}
|
package/cjs/util/text.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { ITextMeasureOption } from '@visactor/vutils';
|
|
2
2
|
import { TextMeasure, TestTextMeasure } from '@visactor/vutils';
|
|
3
|
-
import type { IRichTextAttribute } from '@visactor/vrender';
|
|
4
3
|
import type { ITextMarkSpec } from '../typings';
|
|
5
4
|
export declare const initTextMeasure: (textSpec?: Partial<ITextMarkSpec>, option?: Partial<ITextMeasureOption>, useNaiveCanvas?: boolean) => TextMeasure<ITextMarkSpec>;
|
|
6
5
|
export declare const testTextMeasure: (textSpec?: Partial<ITextMarkSpec>, useVRender?: boolean) => TestTextMeasure<any>;
|
|
7
|
-
type IRichTextBoundsParams = Partial<IRichTextAttribute>;
|
|
8
|
-
export declare function getRichTextBounds(params: IRichTextBoundsParams): import("@visactor/vutils").IBounds;
|
|
9
|
-
export {};
|
package/cjs/util/text.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.
|
|
5
|
+
}), exports.testTextMeasure = 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"), constant_1 = require("../theme/builtin/constant"), initTextMeasure = (textSpec, option, useNaiveCanvas) => new vutils_1.TextMeasure(Object.assign({
|
|
8
8
|
defaultFontParams: {
|
|
9
|
-
fontFamily:
|
|
10
|
-
fontSize:
|
|
9
|
+
fontFamily: constant_1.DEFAULT_TEXT_FONT_FAMILY,
|
|
10
|
+
fontSize: constant_1.DEFAULT_TEXT_FONT_SIZE
|
|
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()
|
|
@@ -17,19 +17,11 @@ exports.initTextMeasure = initTextMeasure;
|
|
|
17
17
|
|
|
18
18
|
const testTextMeasure = (textSpec, useVRender) => new vutils_1.TestTextMeasure({
|
|
19
19
|
defaultFontParams: {
|
|
20
|
-
fontFamily:
|
|
21
|
-
fontSize:
|
|
20
|
+
fontFamily: constant_1.DEFAULT_TEXT_FONT_FAMILY,
|
|
21
|
+
fontSize: constant_1.DEFAULT_TEXT_FONT_SIZE
|
|
22
22
|
},
|
|
23
23
|
getTextBounds: useVRender ? vrender_1.getTextBounds : void 0
|
|
24
24
|
}, textSpec);
|
|
25
25
|
|
|
26
26
|
exports.testTextMeasure = testTextMeasure;
|
|
27
|
-
|
|
28
|
-
const richText = (0, vrender_1.createRichText)({});
|
|
29
|
-
|
|
30
|
-
function getRichTextBounds(params) {
|
|
31
|
-
return richText.setAttributes(params), richText.AABBBounds;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
exports.getRichTextBounds = getRichTextBounds;
|
|
35
27
|
//# sourceMappingURL=text.js.map
|
package/cjs/util/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":";;;AAEA,6CAAgE;
|
|
1
|
+
{"version":3,"sources":["../src/util/text.ts"],"names":[],"mappings":";;;AAEA,6CAAgE;AAChE,+CAAkD;AAElD,wDAA6F;AAEtF,MAAM,eAAe,GAAG,CAC7B,QAAiC,EACjC,MAAoC,EACpC,cAAwB,EACI,EAAE;IAC9B,OAAO,IAAI,oBAAW,iBAElB,iBAAiB,EAAE;YACjB,UAAU,EAAE,mCAAwB;YACpC,QAAQ,EAAE,iCAAsB;SACjC,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;AAGK,MAAM,eAAe,GAAG,CAAC,QAAiC,EAAE,UAAoB,EAAwB,EAAE;IAC/G,OAAO,IAAI,wBAAe,CACxB;QACE,iBAAiB,EAAE;YACjB,UAAU,EAAE,mCAAwB;YACpC,QAAQ,EAAE,iCAAsB;SACjC;QACD,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,uBAAa,CAAC,CAAC,CAAC,SAAS;KACtD,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,eAAe,mBAW1B","file":"text.js","sourcesContent":["import type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure, TestTextMeasure } from '@visactor/vutils';\nimport { getTextBounds } from '@visactor/vrender';\nimport type { ITextMarkSpec } from '../typings';\nimport { DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TEXT_FONT_SIZE } from '../theme/builtin/constant';\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: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\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\n/** 测试方法 */\nexport const testTextMeasure = (textSpec?: Partial<ITextMarkSpec>, useVRender?: boolean): TestTextMeasure<any> => {\n return new TestTextMeasure(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useVRender ? getTextBounds : undefined\n },\n textSpec\n );\n};\n"]}
|
package/cjs/vchart-all.js
CHANGED
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "VChart", {
|
|
|
15
15
|
|
|
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
|
-
(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.
|
|
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
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 ]),
|
|
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;AAwIhC,uFAxIA,aAAM,OAwIA;AAvIf,mCAgCiB;AAEjB,2CA0BqB;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,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
|
|
1
|
+
{"version":3,"sources":["../src/vchart-all.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAwIhC,uFAxIA,aAAM,OAwIA;AAvIf,mCAgCiB;AAEjB,2CA0BqB;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,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 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 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/esm/chart/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ import { SequenceChart } from './sequence';
|
|
|
43
43
|
import type { ISunburstChartSpec } from './sunburst';
|
|
44
44
|
import { SunburstChart } from './sunburst';
|
|
45
45
|
import type { ITreemapChartSpec } from './treemap';
|
|
46
|
-
import {
|
|
46
|
+
import { TreemapChart } from './treemap';
|
|
47
47
|
import type { IWaterfallChartSpec } from './waterfall';
|
|
48
48
|
import { WaterfallChart } from './waterfall';
|
|
49
49
|
import type { IWordCloudChartSpec, IWordCloud3dChartSpec } from './word-cloud';
|
|
@@ -53,5 +53,5 @@ import type { ICartesianChartSpec } from './cartesian';
|
|
|
53
53
|
import { CartesianChart } from './cartesian';
|
|
54
54
|
import type { IPolarChartSpec } from './polar';
|
|
55
55
|
import { PolarChart, RoseLikeChart, ProgressLikeChart } from './polar';
|
|
56
|
-
export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart,
|
|
56
|
+
export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart, TreemapChart as TreemapChart, BaseChart, PolarChart, ProgressLikeChart, RoseLikeChart, CartesianChart };
|
|
57
57
|
export type { IAreaChartSpec, IBarChartSpec, IBar3dChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IFunnel3dChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, IHistogram3dChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, IPie3dChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeColumn3dChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, IWordCloud3dChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec };
|
package/esm/chart/index.js
CHANGED
|
@@ -42,7 +42,7 @@ import { SequenceChart } from "./sequence";
|
|
|
42
42
|
|
|
43
43
|
import { SunburstChart } from "./sunburst";
|
|
44
44
|
|
|
45
|
-
import {
|
|
45
|
+
import { TreemapChart } from "./treemap";
|
|
46
46
|
|
|
47
47
|
import { WaterfallChart } from "./waterfall";
|
|
48
48
|
|
|
@@ -54,5 +54,5 @@ import { CartesianChart } from "./cartesian";
|
|
|
54
54
|
|
|
55
55
|
import { PolarChart, RoseLikeChart, ProgressLikeChart } from "./polar";
|
|
56
56
|
|
|
57
|
-
export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart,
|
|
57
|
+
export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, WordCloudChart, WordCloud3dChart, TreemapChart, BaseChart, PolarChart, ProgressLikeChart, RoseLikeChart, CartesianChart };
|
|
58
58
|
//# sourceMappingURL=index.js.map
|
package/esm/chart/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chart/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ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,MAAM,SAAS,CAAC;AAEvE,OAAO,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,IAAI,YAAY,EAC5B,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,cAAc,EACf,CAAC","file":"index.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\n/**\n * @description export all chart modules\n */\nimport type { IAreaChartSpec } from './area';\nimport { AreaChart } from './area';\nimport type { IBarChartSpec, IBar3dChartSpec } from './bar';\nimport { BarChart, Bar3dChart } from './bar';\nimport type { IBoxPlotChartSpec } from './box-plot';\nimport { BoxPlotChart } from './box-plot';\nimport type { ICirclePackingChartSpec } from './circle-packing';\nimport { CirclePackingChart } from './circle-packing';\nimport type { ICommonChartSpec } from './common';\nimport { CommonChart } from './common';\nimport type { IFunnelChartSpec, IFunnel3dChartSpec } from './funnel';\nimport { FunnelChart, Funnel3dChart } from './funnel';\nimport type { IGaugeChartSpec } from './gauge';\nimport { GaugeChart } from './gauge';\nimport type { IHeatmapChartSpec } from './heatmap';\nimport { HeatmapChart } from './heatmap';\nimport type { IHistogramChartSpec, IHistogram3dChartSpec } from './histogram';\nimport { HistogramChart, Histogram3dChart } from './histogram';\nimport type { ILineChartSpec } from './line';\nimport { LineChart } from './line';\nimport type { IMapChartSpec } from './map';\nimport { MapChart } from './map';\nimport type { IPieChartSpec, IPie3dChartSpec } from './pie';\nimport { PieChart, Pie3dChart } from './pie';\nimport type { ICircularProgressChartSpec } from './progress/circular';\nimport { CircularProgressChart } from './progress/circular';\nimport type { ILinearProgressChartSpec } from './progress/linear';\nimport { LinearProgressChart } from './progress/linear';\nimport type { IRadarChartSpec } from './radar';\nimport { RadarChart } from './radar';\nimport type { IRangeAreaChartSpec } from './range-area';\nimport { RangeAreaChart } from './range-area';\nimport type { IRangeColumnChartSpec, IRangeColumn3dChartSpec } from './range-column';\nimport { RangeColumnChart, RangeColumn3dChart } from './range-column';\nimport type { IRoseChartSpec } from './rose';\nimport { RoseChart } from './rose';\nimport type { ISankeyChartSpec } from './sankey';\nimport { SankeyChart } from './sankey';\nimport type { IScatterChartSpec } from './scatter';\nimport { ScatterChart } from './scatter';\nimport type { ISequenceChartSpec } from './sequence';\nimport { SequenceChart } from './sequence';\nimport type { ISunburstChartSpec } from './sunburst';\nimport { SunburstChart } from './sunburst';\nimport type { ITreemapChartSpec } from './treemap';\nimport { TreemapChart } from './treemap';\nimport type { IWaterfallChartSpec } from './waterfall';\nimport { WaterfallChart } from './waterfall';\nimport type { IWordCloudChartSpec, IWordCloud3dChartSpec } from './word-cloud';\nimport { WordCloudChart, WordCloud3dChart } from './word-cloud';\nimport { BaseChart } from './base-chart';\nimport type { ICartesianChartSpec } from './cartesian';\nimport { CartesianChart } from './cartesian';\nimport type { IPolarChartSpec } from './polar';\nimport { PolarChart, RoseLikeChart, ProgressLikeChart } from './polar';\n\nexport {\n AreaChart,\n BarChart,\n Bar3dChart,\n BoxPlotChart,\n CirclePackingChart,\n CommonChart,\n FunnelChart,\n Funnel3dChart,\n GaugeChart,\n HeatmapChart,\n HistogramChart,\n Histogram3dChart,\n LineChart,\n MapChart,\n PieChart,\n Pie3dChart,\n CircularProgressChart,\n LinearProgressChart,\n RadarChart,\n RangeColumnChart,\n RangeColumn3dChart,\n RangeAreaChart,\n RoseChart,\n SankeyChart,\n ScatterChart,\n SunburstChart,\n SequenceChart,\n WaterfallChart,\n WordCloudChart,\n WordCloud3dChart,\n TreemapChart as TreemapChart,\n BaseChart,\n PolarChart,\n ProgressLikeChart,\n RoseLikeChart,\n CartesianChart\n};\n\nexport type {\n IAreaChartSpec,\n IBarChartSpec,\n IBar3dChartSpec,\n IBoxPlotChartSpec,\n ICirclePackingChartSpec,\n ICommonChartSpec,\n IFunnelChartSpec,\n IFunnel3dChartSpec,\n IGaugeChartSpec,\n IHeatmapChartSpec,\n IHistogramChartSpec,\n IHistogram3dChartSpec,\n ILineChartSpec,\n IMapChartSpec,\n IPieChartSpec,\n IPie3dChartSpec,\n ICircularProgressChartSpec,\n ILinearProgressChartSpec,\n IRadarChartSpec,\n IRangeColumnChartSpec,\n IRangeColumn3dChartSpec,\n IRangeAreaChartSpec,\n IRoseChartSpec,\n IScatterChartSpec,\n ISankeyChartSpec,\n ISequenceChartSpec,\n ISunburstChartSpec,\n ITreemapChartSpec,\n IWaterfallChartSpec,\n IWordCloud3dChartSpec,\n IWordCloudChartSpec,\n IPolarChartSpec,\n ICartesianChartSpec\n};\n"]}
|
package/esm/chart/stack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chart/stack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,GAAG,EAAY,GAAG,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS5D,MAAM,OAAO,KAAK;IAGhB,YAAY,KAAa;QAoBzB,gBAAW,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE;YAC9C,MAAM,UAAU,GAAoB;gBAClC,KAAK,EAAE,EAAE;aACV,CAAC;YAEF,KAAK,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAC5B,MAAM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CAAC,CAAC,CAAC,CAAC;YACnF,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;YAC5C,OAAO;SACR;QACD,KAAK,MAAM,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE;YACjC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;gBACpB,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG;oBACvB,MAAM,EAAE,EAAE;oBACV,KAAK,EAAE,EAAE;iBACV,CAAC,CAAC;YACL,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;SAC1E;IACH,CAAC;CACF","file":"stack.js","sourcesContent":["import {\n STACK_FIELD_END,\n STACK_FIELD_START_PERCENT,\n STACK_FIELD_END_PERCENT,\n ChartEvent,\n STACK_FIELD_END_OffsetSilhouette,\n STACK_FIELD_START_OffsetSilhouette,\n STACK_FIELD_TOTAL,\n STACK_FIELD_TOTAL_PERCENT,\n STACK_FIELD_TOTAL_TOP\n} from '../constant/index';\nimport type { ISeriesStackDataMeta } from '../series/interface';\nimport type { IRegion } from '../region/interface';\nimport type { IChart } from './interface';\nimport { STACK_FIELD_START } from '../constant';\nimport { max, maxInArr, sum, toValidNumber } from '../util';\nimport type { EventCallback } from '../event/interface';\n\n// stack\n// 1. 不可以多个region之间的series进行堆积,目前看这种需求没有场景。将堆积改为针对 region\n// 2. 堆积是一个数据层面的逻辑,但是会影响系列当前使用的yField到底是什么。\n// 3. ECharts 线系列参与堆积后,线系列的y不变,但是与它一起堆积的柱图,数据变化了了,是堆积后的值\n// 4. x 方向分组的功能,是属于轴的,与堆积和怎么堆积无关。\n// 现有功能,有支持堆积时的方向可以调整。也就是sort\nexport class Stack {\n protected _chart: IChart;\n\n constructor(chart: IChart) {\n this._chart = chart;\n }\n\n init() {\n this._chart.getAllRegions().forEach(r => {\n r.event.on(\n ChartEvent.regionSeriesDataFilterOver,\n { filter: ({ model }) => model?.id === r.id },\n this.stackRegion as EventCallback<unknown>\n );\n });\n }\n\n stackAll() {\n this._chart.getAllRegions().forEach(r => {\n this.stackRegion({ model: r });\n });\n }\n\n stackRegion = ({ model }: { model: IRegion }) => {\n const stackCache: IStackCacheRoot = {\n nodes: {}\n };\n // 分组\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackGroup(stackData, stackCache as unknown as IStackCacheNode, stackValueField);\n }\n });\n\n // 计算堆积\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n\n // 围绕中心轴偏移轮廓\n for (const key in stackCache.nodes) {\n this.stackOffsetSilhouette(stackCache.nodes[key]);\n }\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackTotal(stackCache as IStackCacheNode, stackValueField);\n }\n });\n };\n\n private stackTotal(stackData: IStackCacheNode, valueField: string) {\n if ('values' in stackData && stackData.values.length) {\n const total = sum(stackData.values, valueField);\n const percent = max(stackData.values, STACK_FIELD_END_PERCENT);\n stackData.values.forEach(v => {\n v[STACK_FIELD_TOTAL] = total;\n v[STACK_FIELD_TOTAL_PERCENT] = percent;\n delete v[STACK_FIELD_TOTAL_TOP];\n });\n const maxNode = stackData.values.reduce((max, current) => {\n return current[STACK_FIELD_END] > max[STACK_FIELD_END] ? current : max;\n });\n maxNode[STACK_FIELD_TOTAL_TOP] = true;\n return;\n }\n for (const key in stackData.nodes) {\n this.stackTotal(stackData.nodes[key], valueField);\n }\n }\n\n private stackOffsetSilhouette(stackCache: IStackCacheNode) {\n if (!stackCache.values.length) {\n return;\n }\n const centerValue = stackCache.values[stackCache.values.length - 1][STACK_FIELD_END] / 2;\n for (let j = 0; j < stackCache.values.length; j++) {\n stackCache.values[j][STACK_FIELD_START_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_START] - centerValue;\n stackCache.values[j][STACK_FIELD_END_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_END] - centerValue;\n }\n }\n\n private stack(stackCache: IStackCacheNode) {\n if (stackCache.values.length > 0) {\n // 设置一个小数以保证 log 计算不会报错\n let positiveStart = 0;\n let negativeStart = 0;\n // temp\n let sign = 1;\n let value = 0;\n\n // stack\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n if (value >= 0) {\n v[STACK_FIELD_START] = positiveStart;\n positiveStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = positiveStart;\n } else {\n v[STACK_FIELD_START] = negativeStart;\n negativeStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = negativeStart;\n }\n });\n // normalize\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n const denominator = value >= 0 ? positiveStart : negativeStart;\n sign = value >= 0 ? 1 : -1;\n v[STACK_FIELD_START_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_START] / denominator) * sign;\n v[STACK_FIELD_END_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_END] / denominator) * sign;\n });\n }\n\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n }\n\n private stackGroup(stackData: ISeriesStackDataMeta, stackCache: IStackCacheNode, valueField: string) {\n if ('values' in stackData) {\n // 初值\n stackData.values.forEach(v => (v[STACK_FIELD_END] = toValidNumber(v[valueField])));\n stackCache.values.push(...stackData.values);\n return;\n }\n for (const key in stackData.nodes) {\n !stackCache.nodes[key] &&\n (stackCache.nodes[key] = {\n values: [],\n nodes: {}\n });\n this.stackGroup(stackData.nodes[key], stackCache.nodes[key], valueField);\n }\n }\n}\n\ninterface IStackCacheNode {\n values: any[];\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\ninterface IStackCacheRoot {\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\n"]}
|
|
1
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AAC,GAAG,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC,GAAG,IAAI,CAAC;YAC5G,CAAC,CAAC,CAAC;SACJ;QAED,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,EAAE;YAClC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;SACnC;IACH,CAAC;IAEO,UAAU,CAAC,SAA+B,EAAE,UAA2B,EAAE,UAAkB;QACjG,IAAI,QAAQ,IAAI,SAAS,EAAE;YAEzB,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACnF,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;YAC5C,OAAO;SACR;QACD,KAAK,MAAM,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE;YACjC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;gBACpB,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG;oBACvB,MAAM,EAAE,EAAE;oBACV,KAAK,EAAE,EAAE;iBACV,CAAC,CAAC;YACL,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;SAC1E;IACH,CAAC;CACF","file":"stack.js","sourcesContent":["import {\n STACK_FIELD_END,\n STACK_FIELD_START_PERCENT,\n STACK_FIELD_END_PERCENT,\n ChartEvent,\n STACK_FIELD_END_OffsetSilhouette,\n STACK_FIELD_START_OffsetSilhouette,\n STACK_FIELD_TOTAL,\n STACK_FIELD_TOTAL_PERCENT,\n STACK_FIELD_TOTAL_TOP\n} from '../constant/index';\nimport type { ISeriesStackDataMeta } from '../series/interface';\nimport type { IRegion } from '../region/interface';\nimport type { IChart } from './interface';\nimport { STACK_FIELD_START } from '../constant';\nimport { max, sum, toValidNumber } from '../util';\nimport type { EventCallback } from '../event/interface';\n\n// stack\n// 1. 不可以多个region之间的series进行堆积,目前看这种需求没有场景。将堆积改为针对 region\n// 2. 堆积是一个数据层面的逻辑,但是会影响系列当前使用的yField到底是什么。\n// 3. ECharts 线系列参与堆积后,线系列的y不变,但是与它一起堆积的柱图,数据变化了了,是堆积后的值\n// 4. x 方向分组的功能,是属于轴的,与堆积和怎么堆积无关。\n// 现有功能,有支持堆积时的方向可以调整。也就是sort\nexport class Stack {\n protected _chart: IChart;\n\n constructor(chart: IChart) {\n this._chart = chart;\n }\n\n init() {\n this._chart.getAllRegions().forEach(r => {\n r.event.on(\n ChartEvent.regionSeriesDataFilterOver,\n { filter: ({ model }) => model?.id === r.id },\n this.stackRegion as EventCallback<unknown>\n );\n });\n }\n\n stackAll() {\n this._chart.getAllRegions().forEach(r => {\n this.stackRegion({ model: r });\n });\n }\n\n stackRegion = ({ model }: { model: IRegion }) => {\n const stackCache: IStackCacheRoot = {\n nodes: {}\n };\n // 分组\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackGroup(stackData, stackCache as unknown as IStackCacheNode, stackValueField);\n }\n });\n\n // 计算堆积\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n\n // 围绕中心轴偏移轮廓\n for (const key in stackCache.nodes) {\n this.stackOffsetSilhouette(stackCache.nodes[key]);\n }\n model.getSeries().forEach(s => {\n const stackData = s.getStackData();\n const stackValueField = s.getStackValueField(); // yField\n if (stackData && stackValueField) {\n this.stackTotal(stackCache as IStackCacheNode, stackValueField);\n }\n });\n };\n\n private stackTotal(stackData: IStackCacheNode, valueField: string) {\n if ('values' in stackData && stackData.values.length) {\n const total = sum(stackData.values, valueField);\n const percent = max(stackData.values, STACK_FIELD_END_PERCENT);\n stackData.values.forEach(v => {\n v[STACK_FIELD_TOTAL] = total;\n v[STACK_FIELD_TOTAL_PERCENT] = percent;\n delete v[STACK_FIELD_TOTAL_TOP];\n });\n const maxNode = stackData.values.reduce((max, current) => {\n return current[STACK_FIELD_END] > max[STACK_FIELD_END] ? current : max;\n });\n maxNode[STACK_FIELD_TOTAL_TOP] = true;\n return;\n }\n for (const key in stackData.nodes) {\n this.stackTotal(stackData.nodes[key], valueField);\n }\n }\n\n private stackOffsetSilhouette(stackCache: IStackCacheNode) {\n if (!stackCache.values.length) {\n return;\n }\n const centerValue = stackCache.values[stackCache.values.length - 1][STACK_FIELD_END] / 2;\n for (let j = 0; j < stackCache.values.length; j++) {\n stackCache.values[j][STACK_FIELD_START_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_START] - centerValue;\n stackCache.values[j][STACK_FIELD_END_OffsetSilhouette] = stackCache.values[j][STACK_FIELD_END] - centerValue;\n }\n }\n\n private stack(stackCache: IStackCacheNode) {\n if (stackCache.values.length > 0) {\n // 设置一个小数以保证 log 计算不会报错\n let positiveStart = 0;\n let negativeStart = 0;\n // temp\n let sign = 1;\n let value = 0;\n\n // stack\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n if (value >= 0) {\n v[STACK_FIELD_START] = positiveStart;\n positiveStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = positiveStart;\n } else {\n v[STACK_FIELD_START] = negativeStart;\n negativeStart += v[STACK_FIELD_END];\n v[STACK_FIELD_END] = negativeStart;\n }\n });\n // normalize\n stackCache.values.forEach(v => {\n value = v[STACK_FIELD_END];\n const denominator = value >= 0 ? positiveStart : negativeStart;\n sign = value >= 0 ? 1 : -1;\n v[STACK_FIELD_START_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_START] / denominator) * sign;\n v[STACK_FIELD_END_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_END] / denominator) * sign;\n });\n }\n\n for (const key in stackCache.nodes) {\n this.stack(stackCache.nodes[key]);\n }\n }\n\n private stackGroup(stackData: ISeriesStackDataMeta, stackCache: IStackCacheNode, valueField: string) {\n if ('values' in stackData) {\n // 初值\n stackData.values.forEach(v => (v[STACK_FIELD_END] = toValidNumber(v[valueField])));\n stackCache.values.push(...stackData.values);\n return;\n }\n for (const key in stackData.nodes) {\n !stackCache.nodes[key] &&\n (stackCache.nodes[key] = {\n values: [],\n nodes: {}\n });\n this.stackGroup(stackData.nodes[key], stackCache.nodes[key], valueField);\n }\n }\n}\n\ninterface IStackCacheNode {\n values: any[];\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\ninterface IStackCacheRoot {\n nodes: {\n [key: string]: IStackCacheNode;\n };\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseChart } from '../base-chart';
|
|
2
2
|
import type { ITreemapChartSpec } from './interface';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class TreemapChart extends BaseChart {
|
|
4
4
|
static readonly type: string;
|
|
5
5
|
static readonly view: string;
|
|
6
6
|
readonly type: string;
|
|
@@ -6,11 +6,11 @@ import { ChartTypeEnum } from "../interface";
|
|
|
6
6
|
|
|
7
7
|
import { VChart } from "../../core/vchart";
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { TreemapSeries } from "../../series";
|
|
10
10
|
|
|
11
|
-
VChart.useSeries([
|
|
11
|
+
VChart.useSeries([ TreemapSeries ]);
|
|
12
12
|
|
|
13
|
-
export class
|
|
13
|
+
export class TreemapChart extends BaseChart {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.type = ChartTypeEnum.treemap, this.seriesType = SeriesTypeEnum.treemap;
|
|
16
16
|
}
|
|
@@ -48,5 +48,5 @@ export class TreeMapChart extends BaseChart {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
TreemapChart.type = ChartTypeEnum.treemap, TreemapChart.view = "singleDefault";
|
|
52
52
|
//# sourceMappingURL=treemap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chart/treemap/treemap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,MAAM,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AAElC,MAAM,OAAO,YAAa,SAAQ,SAAS;IAA3C;;QAGW,SAAI,GAAW,aAAa,CAAC,OAAO,CAAC;QACrC,eAAU,GAAW,cAAc,CAAC,OAAO,CAAC;IAwDvD,CAAC;IAtDW,oBAAoB,CAAC,IAAuB;QACpD,MAAM,MAAM,mCACP,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAE3B,WAAW,EAAE,IAAI,CAAC,WAAW,EAE7B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EAEnD,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IA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ISeries } from '../../series/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { BaseChart } from '../base-chart';\nimport { ChartTypeEnum } from '../interface';\nimport type { ITreemapChartSpec } from './interface';\nimport { VChart } from '../../core/vchart';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/chart/treemap/treemap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,MAAM,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AAElC,MAAM,OAAO,YAAa,SAAQ,SAAS;IAA3C;;QAGW,SAAI,GAAW,aAAa,CAAC,OAAO,CAAC;QACrC,eAAU,GAAW,cAAc,CAAC,OAAO,CAAC;IAwDvD,CAAC;IAtDW,oBAAoB,CAAC,IAAuB;QACpD,MAAM,MAAM,mCACP,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAE3B,WAAW,EAAE,IAAI,CAAC,WAAW,EAE7B,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EAEnD,IAAI,EAAE,IAAI,CAAC,I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":"treemap.js","sourcesContent":["import type { ISeries } from '../../series/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { BaseChart } from '../base-chart';\nimport { ChartTypeEnum } from '../interface';\nimport type { ITreemapChartSpec } from './interface';\nimport { VChart } from '../../core/vchart';\nimport { TreemapSeries } from '../../series';\nVChart.useSeries([TreemapSeries]);\n\nexport class TreemapChart extends BaseChart {\n static readonly type: string = ChartTypeEnum.treemap;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.treemap;\n readonly seriesType: string = SeriesTypeEnum.treemap;\n\n protected getDefaultSeriesSpec(spec: ITreemapChartSpec): any {\n const series: any = {\n ...super._getDefaultSeriesSpec(spec),\n categoryField: spec.categoryField,\n valueField: spec.valueField,\n\n seriesField: spec.seriesField,\n\n aspectRatio: spec.aspectRatio,\n splitType: spec.splitType,\n maxDepth: spec.maxDepth,\n gapWidth: spec.gapWidth,\n nodePadding: spec.nodePadding,\n minVisibleArea: spec.minVisibleArea,\n minChildrenVisibleArea: spec.minChildrenVisibleArea,\n minChildrenVisibleSize: spec.minChildrenVisibleSize,\n\n roam: spec.roam,\n drill: spec.drill,\n drillField: spec.drillField,\n\n leaf: spec.leaf,\n nonLeaf: spec.nonLeaf,\n nonLeafLabel: spec.nonLeafLabel\n };\n const seriesType = this.seriesType;\n if (seriesType) {\n series.type = seriesType;\n series[seriesType] = spec[seriesType];\n }\n\n return series;\n }\n\n transformSpec(spec: any): void {\n super.transformSpec(spec);\n\n /* 处理 series 配置 */\n const defaultSeriesSpec = this.getDefaultSeriesSpec(spec);\n if (!spec.series || spec.series.length === 0) {\n spec.series = [defaultSeriesSpec];\n } else {\n spec.series.forEach((s: ISeries) => {\n if (!this.isValidSeries(s.type)) {\n return;\n }\n Object.keys(defaultSeriesSpec).forEach(k => {\n if (!(k in s)) {\n s[k] = defaultSeriesSpec[k];\n }\n });\n });\n }\n }\n}\n"]}
|
|
@@ -14,7 +14,7 @@ import { isNil, isValid } from "../../util";
|
|
|
14
14
|
|
|
15
15
|
import { LayoutZIndex, PREFIX, VGRAMMAR_HOOK_EVENT } from "../../constant";
|
|
16
16
|
|
|
17
|
-
import { attrTransform, isStateAttrChangeable } from "./util";
|
|
17
|
+
import { attrTransform, isStateAttrChangeable, needAttrTransform } from "./util";
|
|
18
18
|
|
|
19
19
|
import { MarkStateManager } from "./mark-state-manager";
|
|
20
20
|
|
|
@@ -178,11 +178,11 @@ export class CompilableMark extends GrammarItem {
|
|
|
178
178
|
compileEncode() {
|
|
179
179
|
const _a = this.stateStyle, _b = STATE_VALUE_ENUM.STATE_NORMAL, normalStyle = _a[_b], temp = __rest(_a, [ "symbol" == typeof _b ? _b : _b + "" ]), enterStyles = {}, updateStyles = {};
|
|
180
180
|
Object.keys(normalStyle).forEach((key => {
|
|
181
|
-
this._unCompileChannel[key] || (isStateAttrChangeable(key, normalStyle) ? updateStyles[key] = {
|
|
181
|
+
this._unCompileChannel[key] || (isStateAttrChangeable(key, normalStyle, this.getFacet()) ? updateStyles[key] = {
|
|
182
182
|
callback: this.compileCommonAttributeCallback(key, "normal"),
|
|
183
183
|
dependency: [ this.stateKeyToSignalName("markUpdateRank") ]
|
|
184
184
|
} : enterStyles[key] = this.compileCommonAttributeCallback(key, "normal"));
|
|
185
|
-
})), this._product.encode(updateStyles), this._product.encodeState("enter", enterStyles),
|
|
185
|
+
})), this._product.encode(updateStyles), this._product.encodeState(this._facet ? "group" : "enter", enterStyles),
|
|
186
186
|
Object.keys(temp).forEach((state => {
|
|
187
187
|
const styles = {};
|
|
188
188
|
Object.keys(temp[state]).forEach((key => {
|
|
@@ -239,15 +239,13 @@ export class CompilableMark extends GrammarItem {
|
|
|
239
239
|
this.state.compile();
|
|
240
240
|
}
|
|
241
241
|
compileCommonAttributeCallback(key, state) {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
states: element.getStates(),
|
|
247
|
-
element: element
|
|
248
|
-
};
|
|
249
|
-
return attrTransform(this.type, key, this.getAttribute(key, datum, state, opt));
|
|
242
|
+
const noAttrTransform = !needAttrTransform(this.type, key), opt = {
|
|
243
|
+
mark: null,
|
|
244
|
+
parent: null,
|
|
245
|
+
element: null
|
|
250
246
|
};
|
|
247
|
+
return (datum, element) => (opt.mark = element.mark, opt.parent = element.mark.group,
|
|
248
|
+
opt.element = element, noAttrTransform ? this.getAttribute(key, datum, state, opt) : attrTransform(this.type, key, this.getAttribute(key, datum, state, opt)));
|
|
251
249
|
}
|
|
252
250
|
compileTransform() {
|
|
253
251
|
var _a;
|