@lingshugroup/web-plus 1.8.7 → 1.8.8

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.
Files changed (94) hide show
  1. package/lib/index.css +1 -1
  2. package/lib/index.css.br +0 -0
  3. package/lib/index.css.gz +0 -0
  4. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.cjs +1 -0
  5. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.js +47 -0
  6. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.js.br +0 -0
  7. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.js.gz +0 -0
  8. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.cjs +1 -0
  9. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.js +46 -0
  10. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.js.br +0 -0
  11. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.js.gz +0 -0
  12. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.cjs +1 -0
  13. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.js +159 -0
  14. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.js.br +0 -0
  15. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.js.gz +0 -0
  16. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/install/index.cjs +1 -0
  17. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/install/index.js +11 -0
  18. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.cjs +1 -0
  19. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.js +113 -0
  20. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.js.br +0 -0
  21. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.js.gz +0 -0
  22. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.cjs +1 -0
  23. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.js +388 -0
  24. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.js.br +0 -0
  25. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.js.gz +0 -0
  26. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.cjs +1 -0
  27. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.js +220 -0
  28. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.js.br +0 -0
  29. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.js.gz +0 -0
  30. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.cjs +1 -0
  31. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.js +120 -0
  32. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.js.br +0 -0
  33. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.js.gz +0 -0
  34. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.cjs +1 -0
  35. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.js +166 -0
  36. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.js.br +0 -0
  37. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.js.gz +0 -0
  38. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.cjs +1 -0
  39. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.js +81 -0
  40. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.js.br +0 -0
  41. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.js.gz +0 -0
  42. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.cjs +1 -0
  43. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.js +28 -0
  44. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.js.br +0 -0
  45. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.js.gz +0 -0
  46. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/install/index.cjs +1 -0
  47. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/install/index.js +12 -0
  48. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installCommon/index.cjs +1 -0
  49. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installCommon/index.js +18 -0
  50. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapContinuous/index.cjs +1 -0
  51. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapContinuous/index.js +12 -0
  52. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise/index.cjs +1 -0
  53. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise/index.js +12 -0
  54. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/preprocessor/index.cjs +1 -0
  55. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/preprocessor/index.js +24 -0
  56. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.cjs +1 -0
  57. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.js +54 -0
  58. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.js.br +0 -0
  59. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.js.gz +0 -0
  60. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualMapAction/index.cjs +1 -0
  61. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualMapAction/index.js +19 -0
  62. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.cjs +1 -1
  63. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.js +199 -165
  64. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.js.br +0 -0
  65. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.js.gz +0 -0
  66. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.cjs +1 -1
  67. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.js +129 -113
  68. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.js.br +0 -0
  69. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.js.gz +0 -0
  70. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.cjs +1 -0
  71. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.js +278 -0
  72. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.js.br +0 -0
  73. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.js.gz +0 -0
  74. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.cjs +1 -1
  75. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.js +30 -10
  76. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.js.br +0 -0
  77. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.js.gz +0 -0
  78. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualDefault/index.cjs +1 -0
  79. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualDefault/index.js +48 -0
  80. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.cjs +1 -0
  81. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.js +81 -0
  82. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.js.br +0 -0
  83. package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.js.gz +0 -0
  84. package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.cjs +1 -1
  85. package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.js +165 -123
  86. package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.js.br +0 -0
  87. package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.js.gz +0 -0
  88. package/lib/packages/ls-components/components/chart/Index.vue/index.cjs +1 -1
  89. package/lib/packages/ls-components/components/chart/Index.vue/index.js +2 -2
  90. package/lib/packages/ls-components/components/chart/Index.vue/index2.cjs +1 -1
  91. package/lib/packages/ls-components/components/chart/Index.vue/index2.js +17 -13
  92. package/lib/packages/ls-components/components/chart/Index.vue/index2.js.br +0 -0
  93. package/lib/packages/ls-components/components/chart/Index.vue/index2.js.gz +0 -0
  94. package/package.json +1 -1
@@ -0,0 +1,388 @@
1
+ var Y = Object.defineProperty;
2
+ var m = (p, s) => Y(p, "name", { value: s, configurable: !0 });
3
+ import { __extends as K } from "../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.js";
4
+ import { bind as M, extend as $, each as U, isArray as W } from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.js";
5
+ import j from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/LinearGradient/index.js";
6
+ import { stop as I } from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/event/index.js";
7
+ import q from "../VisualMapView/index.js";
8
+ import { applyTransform as L, getTransform as H, transformDirection as J } from "../../../util/graphic/index.js";
9
+ import { linearMap as Q } from "../../../util/number/index.js";
10
+ import tt from "../../helper/sliderMove/index.js";
11
+ import { getItemAlign as et, makeHighDownBatch as z } from "../helper/index.js";
12
+ import { compressBatches as it } from "../../../util/model/index.js";
13
+ import { parsePercent as P } from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/contain/text/index.js";
14
+ import { setAsHighDownDispatcher as rt } from "../../../util/states/index.js";
15
+ import { createSymbol as O } from "../../../util/symbol/index.js";
16
+ import at from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Image/index.js";
17
+ import { getECData as ot } from "../../../util/innerStore/index.js";
18
+ import { createTextStyle as T } from "../../../label/labelStyle/index.js";
19
+ import { findEventDispatcher as nt } from "../../../util/event/index.js";
20
+ import k from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Text/index.js";
21
+ import B from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Group/index.js";
22
+ import st from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/shape/Rect/index.js";
23
+ import lt from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/shape/Polygon/index.js";
24
+ var f = Q, ht = U, F = Math.min, w = Math.max, vt = 12, ut = 6, Gt = (
25
+ /** @class */
26
+ function(p) {
27
+ K(s, p);
28
+ function s() {
29
+ var t = p !== null && p.apply(this, arguments) || this;
30
+ return t.type = s.type, t._shapes = {}, t._dataInterval = [], t._handleEnds = [], t._hoverLinkDataIndices = [], t;
31
+ }
32
+ return m(s, "ContinuousView"), s.prototype.init = function(t, i) {
33
+ p.prototype.init.call(this, t, i), this._hoverLinkFromSeriesMouseOver = M(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = M(this._hideIndicator, this);
34
+ }, s.prototype.doRender = function(t, i, e, r) {
35
+ (!r || r.type !== "selectDataRange" || r.from !== this.uid) && this._buildView();
36
+ }, s.prototype._buildView = function() {
37
+ this.group.removeAll();
38
+ var t = this.visualMapModel, i = this.group;
39
+ this._orient = t.get("orient"), this._useHandle = t.get("calculable"), this._resetInterval(), this._renderBar(i);
40
+ var e = t.get("text");
41
+ this._renderEndsText(i, e, 0), this._renderEndsText(i, e, 1), this._updateView(!0), this.renderBackground(i), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(i);
42
+ }, s.prototype._renderEndsText = function(t, i, e) {
43
+ if (i) {
44
+ var r = i[1 - e];
45
+ r = r != null ? r + "" : "";
46
+ var a = this.visualMapModel, l = a.get("textGap"), n = a.itemSize, v = this._shapes.mainGroup, h = this._applyTransform([n[0] / 2, e === 0 ? -l : n[1] + l], v), o = this._applyTransform(e === 0 ? "bottom" : "top", v), u = this._orient, c = this.visualMapModel.textStyleModel;
47
+ this.group.add(new k({
48
+ style: T(c, {
49
+ x: h[0],
50
+ y: h[1],
51
+ verticalAlign: u === "horizontal" ? "middle" : o,
52
+ align: u === "horizontal" ? o : "center",
53
+ text: r
54
+ })
55
+ }));
56
+ }
57
+ }, s.prototype._renderBar = function(t) {
58
+ var i = this.visualMapModel, e = this._shapes, r = i.itemSize, a = this._orient, l = this._useHandle, n = et(i, this.api, r), v = e.mainGroup = this._createBarGroup(n), h = new B();
59
+ v.add(h), h.add(e.outOfRange = A()), h.add(e.inRange = A(null, l ? X(this._orient) : null, M(this._dragHandle, this, "all", !1), M(this._dragHandle, this, "all", !0))), h.setClipPath(new st({
60
+ shape: {
61
+ x: 0,
62
+ y: 0,
63
+ width: r[0],
64
+ height: r[1],
65
+ r: 3
66
+ }
67
+ }));
68
+ var o = i.textStyleModel.getTextRect("国"), u = w(o.width, o.height);
69
+ l && (e.handleThumbs = [], e.handleLabels = [], e.handleLabelPoints = [], this._createHandle(i, v, 0, r, u, a), this._createHandle(i, v, 1, r, u, a)), this._createIndicator(i, v, r, u, a), t.add(v);
70
+ }, s.prototype._createHandle = function(t, i, e, r, a, l) {
71
+ var n = M(this._dragHandle, this, e, !1), v = M(this._dragHandle, this, e, !0), h = P(t.get("handleSize"), r[0]), o = O(t.get("handleIcon"), -h / 2, -h / 2, h, h, null, !0), u = X(this._orient);
72
+ o.attr({
73
+ cursor: u,
74
+ draggable: !0,
75
+ drift: n,
76
+ ondragend: v,
77
+ onmousemove: /* @__PURE__ */ m(function(y) {
78
+ I(y.event);
79
+ }, "onmousemove")
80
+ }), o.x = r[0] / 2, o.useStyle(t.getModel("handleStyle").getItemStyle()), o.setStyle({
81
+ strokeNoScale: !0,
82
+ strokeFirst: !0
83
+ }), o.style.lineWidth *= 2, o.ensureState("emphasis").style = t.getModel(["emphasis", "handleStyle"]).getItemStyle(), rt(o, !0), i.add(o);
84
+ var c = this.visualMapModel.textStyleModel, d = new k({
85
+ cursor: u,
86
+ draggable: !0,
87
+ drift: n,
88
+ onmousemove: /* @__PURE__ */ m(function(y) {
89
+ I(y.event);
90
+ }, "onmousemove"),
91
+ ondragend: v,
92
+ style: T(c, {
93
+ x: 0,
94
+ y: 0,
95
+ text: ""
96
+ })
97
+ });
98
+ d.ensureState("blur").style = {
99
+ opacity: 0.1
100
+ }, d.stateTransition = {
101
+ duration: 200
102
+ }, this.group.add(d);
103
+ var _ = [h, 0], g = this._shapes;
104
+ g.handleThumbs[e] = o, g.handleLabelPoints[e] = _, g.handleLabels[e] = d;
105
+ }, s.prototype._createIndicator = function(t, i, e, r, a) {
106
+ var l = P(t.get("indicatorSize"), e[0]), n = O(t.get("indicatorIcon"), -l / 2, -l / 2, l, l, null, !0);
107
+ n.attr({
108
+ cursor: "move",
109
+ invisible: !0,
110
+ silent: !0,
111
+ x: e[0] / 2
112
+ });
113
+ var v = t.getModel("indicatorStyle").getItemStyle();
114
+ if (n instanceof at) {
115
+ var h = n.style;
116
+ n.useStyle($({
117
+ // TODO other properties like x, y ?
118
+ image: h.image,
119
+ x: h.x,
120
+ y: h.y,
121
+ width: h.width,
122
+ height: h.height
123
+ }, v));
124
+ } else
125
+ n.useStyle(v);
126
+ i.add(n);
127
+ var o = this.visualMapModel.textStyleModel, u = new k({
128
+ silent: !0,
129
+ invisible: !0,
130
+ style: T(o, {
131
+ x: 0,
132
+ y: 0,
133
+ text: ""
134
+ })
135
+ });
136
+ this.group.add(u);
137
+ var c = [(a === "horizontal" ? r / 2 : ut) + e[0] / 2, 0], d = this._shapes;
138
+ d.indicator = n, d.indicatorLabel = u, d.indicatorLabelPoint = c, this._firstShowIndicator = !0;
139
+ }, s.prototype._dragHandle = function(t, i, e, r) {
140
+ if (this._useHandle) {
141
+ if (this._dragging = !i, !i) {
142
+ var a = this._applyTransform([e, r], this._shapes.mainGroup, !0);
143
+ this._updateInterval(t, a[1]), this._hideIndicator(), this._updateView();
144
+ }
145
+ i === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
146
+ type: "selectDataRange",
147
+ from: this.uid,
148
+ visualMapId: this.visualMapModel.id,
149
+ selected: this._dataInterval.slice()
150
+ }), i ? !this._hovering && this._clearHoverLinkToSeries() : N(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1);
151
+ }
152
+ }, s.prototype._resetInterval = function() {
153
+ var t = this.visualMapModel, i = this._dataInterval = t.getSelected(), e = t.getExtent(), r = [0, t.itemSize[1]];
154
+ this._handleEnds = [f(i[0], e, r, !0), f(i[1], e, r, !0)];
155
+ }, s.prototype._updateInterval = function(t, i) {
156
+ i = i || 0;
157
+ var e = this.visualMapModel, r = this._handleEnds, a = [0, e.itemSize[1]];
158
+ tt(
159
+ i,
160
+ r,
161
+ a,
162
+ t,
163
+ // cross is forbidden
164
+ 0
165
+ );
166
+ var l = e.getExtent();
167
+ this._dataInterval = [f(r[0], a, l, !0), f(r[1], a, l, !0)];
168
+ }, s.prototype._updateView = function(t) {
169
+ var i = this.visualMapModel, e = i.getExtent(), r = this._shapes, a = [0, i.itemSize[1]], l = t ? a : this._handleEnds, n = this._createBarVisual(this._dataInterval, e, l, "inRange"), v = this._createBarVisual(e, e, a, "outOfRange");
170
+ r.inRange.setStyle({
171
+ fill: n.barColor
172
+ // opacity: visualInRange.opacity
173
+ }).setShape("points", n.barPoints), r.outOfRange.setStyle({
174
+ fill: v.barColor
175
+ // opacity: visualOutOfRange.opacity
176
+ }).setShape("points", v.barPoints), this._updateHandle(l, n);
177
+ }, s.prototype._createBarVisual = function(t, i, e, r) {
178
+ var a = {
179
+ forceState: r,
180
+ convertOpacityToAlpha: !0
181
+ }, l = this._makeColorGradient(t, a), n = [this.getControllerVisual(t[0], "symbolSize", a), this.getControllerVisual(t[1], "symbolSize", a)], v = this._createBarPoints(e, n);
182
+ return {
183
+ barColor: new j(0, 0, 0, 1, l),
184
+ barPoints: v,
185
+ handlesColor: [l[0].color, l[l.length - 1].color]
186
+ };
187
+ }, s.prototype._makeColorGradient = function(t, i) {
188
+ var e = 100, r = [], a = (t[1] - t[0]) / e;
189
+ r.push({
190
+ color: this.getControllerVisual(t[0], "color", i),
191
+ offset: 0
192
+ });
193
+ for (var l = 1; l < e; l++) {
194
+ var n = t[0] + a * l;
195
+ if (n > t[1])
196
+ break;
197
+ r.push({
198
+ color: this.getControllerVisual(n, "color", i),
199
+ offset: l / e
200
+ });
201
+ }
202
+ return r.push({
203
+ color: this.getControllerVisual(t[1], "color", i),
204
+ offset: 1
205
+ }), r;
206
+ }, s.prototype._createBarPoints = function(t, i) {
207
+ var e = this.visualMapModel.itemSize;
208
+ return [[e[0] - i[0], t[0]], [e[0], t[0]], [e[0], t[1]], [e[0] - i[1], t[1]]];
209
+ }, s.prototype._createBarGroup = function(t) {
210
+ var i = this._orient, e = this.visualMapModel.get("inverse");
211
+ return new B(i === "horizontal" && !e ? {
212
+ scaleX: t === "bottom" ? 1 : -1,
213
+ rotation: Math.PI / 2
214
+ } : i === "horizontal" && e ? {
215
+ scaleX: t === "bottom" ? -1 : 1,
216
+ rotation: -Math.PI / 2
217
+ } : i === "vertical" && !e ? {
218
+ scaleX: t === "left" ? 1 : -1,
219
+ scaleY: -1
220
+ } : {
221
+ scaleX: t === "left" ? 1 : -1
222
+ });
223
+ }, s.prototype._updateHandle = function(t, i) {
224
+ if (this._useHandle) {
225
+ var e = this._shapes, r = this.visualMapModel, a = e.handleThumbs, l = e.handleLabels, n = r.itemSize, v = r.getExtent(), h = this._applyTransform("left", e.mainGroup);
226
+ ht([0, 1], function(o) {
227
+ var u = a[o];
228
+ u.setStyle("fill", i.handlesColor[o]), u.y = t[o];
229
+ var c = f(t[o], [0, n[1]], v, !0), d = this.getControllerVisual(c, "symbolSize");
230
+ u.scaleX = u.scaleY = d / n[0], u.x = n[0] - d / 2;
231
+ var _ = L(e.handleLabelPoints[o], H(u, this.group));
232
+ if (this._orient === "horizontal") {
233
+ var g = h === "left" || h === "top" ? (n[0] - d) / 2 : (n[0] - d) / -2;
234
+ _[1] += g;
235
+ }
236
+ l[o].setStyle({
237
+ x: _[0],
238
+ y: _[1],
239
+ text: r.formatValueText(this._dataInterval[o]),
240
+ verticalAlign: "middle",
241
+ align: this._orient === "vertical" ? this._applyTransform("left", e.mainGroup) : "center"
242
+ });
243
+ }, this);
244
+ }
245
+ }, s.prototype._showIndicator = function(t, i, e, r) {
246
+ var a = this.visualMapModel, l = a.getExtent(), n = a.itemSize, v = [0, n[1]], h = this._shapes, o = h.indicator;
247
+ if (o) {
248
+ o.attr("invisible", !1);
249
+ var u = {
250
+ convertOpacityToAlpha: !0
251
+ }, c = this.getControllerVisual(t, "color", u), d = this.getControllerVisual(t, "symbolSize"), _ = f(t, l, v, !0), g = n[0] - d / 2, y = {
252
+ x: o.x,
253
+ y: o.y
254
+ };
255
+ o.y = _, o.x = g;
256
+ var E = L(h.indicatorLabelPoint, H(o, this.group)), S = h.indicatorLabel;
257
+ S.attr("invisible", !1);
258
+ var D = this._applyTransform("left", h.mainGroup), Z = this._orient, V = Z === "horizontal";
259
+ S.setStyle({
260
+ text: (e || "") + a.formatValueText(i),
261
+ verticalAlign: V ? D : "middle",
262
+ align: V ? "center" : D
263
+ });
264
+ var R = {
265
+ x: g,
266
+ y: _,
267
+ style: {
268
+ fill: c
269
+ }
270
+ }, G = {
271
+ style: {
272
+ x: E[0],
273
+ y: E[1]
274
+ }
275
+ };
276
+ if (a.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
277
+ var C = {
278
+ duration: 100,
279
+ easing: "cubicInOut",
280
+ additive: !0
281
+ };
282
+ o.x = y.x, o.y = y.y, o.animateTo(R, C), S.animateTo(G, C);
283
+ } else
284
+ o.attr(R), S.attr(G);
285
+ this._firstShowIndicator = !1;
286
+ var b = this._shapes.handleLabels;
287
+ if (b)
288
+ for (var x = 0; x < b.length; x++)
289
+ this.api.enterBlur(b[x]);
290
+ }
291
+ }, s.prototype._enableHoverLinkToSeries = function() {
292
+ var t = this;
293
+ this._shapes.mainGroup.on("mousemove", function(i) {
294
+ if (t._hovering = !0, !t._dragging) {
295
+ var e = t.visualMapModel.itemSize, r = t._applyTransform([i.offsetX, i.offsetY], t._shapes.mainGroup, !0, !0);
296
+ r[1] = F(w(0, r[1]), e[1]), t._doHoverLinkToSeries(r[1], 0 <= r[0] && r[0] <= e[0]);
297
+ }
298
+ }).on("mouseout", function() {
299
+ t._hovering = !1, !t._dragging && t._clearHoverLinkToSeries();
300
+ });
301
+ }, s.prototype._enableHoverLinkFromSeries = function() {
302
+ var t = this.api.getZr();
303
+ this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
304
+ }, s.prototype._doHoverLinkToSeries = function(t, i) {
305
+ var e = this.visualMapModel, r = e.itemSize;
306
+ if (e.option.hoverLink) {
307
+ var a = [0, r[1]], l = e.getExtent();
308
+ t = F(w(a[0], t), a[1]);
309
+ var n = dt(e, l, a), v = [t - n, t + n], h = f(t, a, l, !0), o = [f(v[0], a, l, !0), f(v[1], a, l, !0)];
310
+ v[0] < a[0] && (o[0] = -1 / 0), v[1] > a[1] && (o[1] = 1 / 0), i && (o[0] === -1 / 0 ? this._showIndicator(h, o[1], "< ", n) : o[1] === 1 / 0 ? this._showIndicator(h, o[0], "> ", n) : this._showIndicator(h, h, "≈ ", n));
311
+ var u = this._hoverLinkDataIndices, c = [];
312
+ (i || N(e)) && (c = this._hoverLinkDataIndices = e.findTargetDataIndices(o));
313
+ var d = it(u, c);
314
+ this._dispatchHighDown("downplay", z(d[0], e)), this._dispatchHighDown("highlight", z(d[1], e));
315
+ }
316
+ }, s.prototype._hoverLinkFromSeriesMouseOver = function(t) {
317
+ var i;
318
+ if (nt(t.target, function(n) {
319
+ var v = ot(n);
320
+ if (v.dataIndex != null)
321
+ return i = v, !0;
322
+ }, !0), !!i) {
323
+ var e = this.ecModel.getSeriesByIndex(i.seriesIndex), r = this.visualMapModel;
324
+ if (r.isTargetSeries(e)) {
325
+ var a = e.getData(i.dataType), l = a.getStore().get(r.getDataDimensionIndex(a), i.dataIndex);
326
+ isNaN(l) || this._showIndicator(l, l);
327
+ }
328
+ }
329
+ }, s.prototype._hideIndicator = function() {
330
+ var t = this._shapes;
331
+ t.indicator && t.indicator.attr("invisible", !0), t.indicatorLabel && t.indicatorLabel.attr("invisible", !0);
332
+ var i = this._shapes.handleLabels;
333
+ if (i)
334
+ for (var e = 0; e < i.length; e++)
335
+ this.api.leaveBlur(i[e]);
336
+ }, s.prototype._clearHoverLinkToSeries = function() {
337
+ this._hideIndicator();
338
+ var t = this._hoverLinkDataIndices;
339
+ this._dispatchHighDown("downplay", z(t, this.visualMapModel)), t.length = 0;
340
+ }, s.prototype._clearHoverLinkFromSeries = function() {
341
+ this._hideIndicator();
342
+ var t = this.api.getZr();
343
+ t.off("mouseover", this._hoverLinkFromSeriesMouseOver), t.off("mouseout", this._hideIndicator);
344
+ }, s.prototype._applyTransform = function(t, i, e, r) {
345
+ var a = H(i, r ? null : this.group);
346
+ return W(t) ? L(t, a, e) : J(t, a, e);
347
+ }, s.prototype._dispatchHighDown = function(t, i) {
348
+ i && i.length && this.api.dispatchAction({
349
+ type: t,
350
+ batch: i
351
+ });
352
+ }, s.prototype.dispose = function() {
353
+ this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
354
+ }, s.type = "visualMap.continuous", s;
355
+ }(q)
356
+ );
357
+ function A(p, s, t, i) {
358
+ return new lt({
359
+ shape: {
360
+ points: p
361
+ },
362
+ draggable: !!t,
363
+ cursor: s,
364
+ drift: t,
365
+ onmousemove: /* @__PURE__ */ m(function(e) {
366
+ I(e.event);
367
+ }, "onmousemove"),
368
+ ondragend: i
369
+ });
370
+ }
371
+ m(A, "createPolygon");
372
+ function dt(p, s, t) {
373
+ var i = vt / 2, e = p.get("hoverLinkDataSize");
374
+ return e && (i = f(e, s, t, !0) / 2), i;
375
+ }
376
+ m(dt, "getHalfHoverLinkSize");
377
+ function N(p) {
378
+ var s = p.get("hoverLinkOnHandle");
379
+ return !!(s ?? p.get("realtime"));
380
+ }
381
+ m(N, "useHoverLinkOnHandle");
382
+ function X(p) {
383
+ return p === "vertical" ? "ns-resize" : "ew-resize";
384
+ }
385
+ m(X, "getCursor");
386
+ export {
387
+ Gt as default
388
+ };
@@ -0,0 +1 @@
1
+ "use strict";var I=Object.defineProperty;var v=(l,n)=>I(l,"name",{value:n,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.cjs"),h=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.cjs"),g=require("../VisualMapModel/index.cjs"),y=require("../../../visual/VisualMapping/index.cjs"),O=require("../../../visual/visualDefault/index.cjs"),m=require("../../../util/number/index.cjs"),V=require("../../../util/component/index.cjs");var b=function(l){M.__extends(n,l);function n(){var e=l!==null&&l.apply(this,arguments)||this;return e.type=n.type,e._pieceList=[],e}return v(n,"PiecewiseModel"),n.prototype.optionUpdated=function(e,s){l.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var t=this._mode=this._determineMode();this._pieceList=[],S[this._mode].call(this,this._pieceList),this._resetSelected(e,s);var u=this.option.categories;this.resetVisual(function(i,r){t==="categories"?(i.mappingMethod="category",i.categories=h.clone(u)):(i.dataExtent=this.getExtent(),i.mappingMethod="piecewise",i.pieceList=h.map(this._pieceList,function(a){return a=h.clone(a),r!=="inRange"&&(a.visual=null),a}))})},n.prototype.completeVisualOption=function(){var e=this.option,s={},t=y.default.listVisualTypes(),u=this.isCategory();h.each(e.pieces,function(r){h.each(t,function(a){r.hasOwnProperty(a)&&(s[a]=1)})}),h.each(s,function(r,a){var c=!1;h.each(this.stateList,function(o){c=c||i(e,o,a)||i(e.target,o,a)},this),!c&&h.each(this.stateList,function(o){(e[o]||(e[o]={}))[a]=O.default.get(a,o==="inRange"?"active":"inactive",u)})},this);function i(r,a,c){return r&&r[a]&&r[a].hasOwnProperty(c)}v(i,"has"),l.prototype.completeVisualOption.apply(this,arguments)},n.prototype._resetSelected=function(e,s){var t=this.option,u=this._pieceList,i=(s?t:e).selected||{};if(t.selected=i,h.each(u,function(a,c){var o=this.getSelectedMapKey(a);i.hasOwnProperty(o)||(i[o]=!0)},this),t.selectedMode==="single"){var r=!1;h.each(u,function(a,c){var o=this.getSelectedMapKey(a);i[o]&&(r?i[o]=!1:r=!0)},this)}},n.prototype.getItemSymbol=function(){return this.get("itemSymbol")},n.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},n.prototype.getPieceList=function(){return this._pieceList},n.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},n.prototype.setSelected=function(e){this.option.selected=h.clone(e)},n.prototype.getValueState=function(e){var s=y.default.findPieceIndex(e,this._pieceList);return s!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[s])]?"inRange":"outOfRange"},n.prototype.findTargetDataIndices=function(e){var s=[],t=this._pieceList;return this.eachTargetSeries(function(u){var i=[],r=u.getData();r.each(this.getDataDimensionIndex(r),function(a,c){var o=y.default.findPieceIndex(a,t);o===e&&i.push(c)},this),s.push({seriesId:u.id,dataIndex:i})},this),s},n.prototype.getRepresentValue=function(e){var s;if(this.isCategory())s=e.value;else if(e.value!=null)s=e.value;else{var t=e.interval||[];s=t[0]===-1/0&&t[1]===1/0?0:(t[0]+t[1])/2}return s},n.prototype.getVisualMeta=function(e){if(this.isCategory())return;var s=[],t=["",""],u=this;function i(o,f){var d=u.getRepresentValue({interval:o});f||(f=u.getValueState(d));var p=e(d,f);o[0]===-1/0?t[0]=p:o[1]===1/0?t[1]=p:s.push({value:o[0],color:p},{value:o[1],color:p})}v(i,"setStop");var r=this._pieceList.slice();if(!r.length)r.push({interval:[-1/0,1/0]});else{var a=r[0].interval[0];a!==-1/0&&r.unshift({interval:[-1/0,a]}),a=r[r.length-1].interval[1],a!==1/0&&r.push({interval:[a,1/0]})}var c=-1/0;return h.each(r,function(o){var f=o.interval;f&&(f[0]>c&&i([c,f[0]],"outOfRange"),i(f.slice()),c=f[1])},this),{stops:s,outerColors:t}},n.type="visualMap.piecewise",n.defaultOption=V.inheritDefaultOption(g.default.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),n}(g.default),S={splitNumber:v(function(l){var n=this.option,e=Math.min(n.precision,20),s=this.getExtent(),t=n.splitNumber;t=Math.max(parseInt(t,10),1),n.splitNumber=t;for(var u=(s[1]-s[0])/t;+u.toFixed(e)!==u&&e<5;)e++;n.precision=e,u=+u.toFixed(e),n.minOpen&&l.push({interval:[-1/0,s[0]],close:[0,0]});for(var i=0,r=s[0];i<t;r+=u,i++){var a=i===t-1?s[1]:r+u;l.push({interval:[r,a],close:[1,1]})}n.maxOpen&&l.push({interval:[s[1],1/0],close:[0,0]}),m.reformIntervals(l),h.each(l,function(c,o){c.index=o,c.text=this.formatValueText(c.interval)},this)},"splitNumber"),categories:v(function(l){var n=this.option;h.each(n.categories,function(e){l.push({text:this.formatValueText(e,!0),value:e})},this),x(n,l)},"categories"),pieces:v(function(l){var n=this.option;h.each(n.pieces,function(e,s){h.isObject(e)||(e={value:e});var t={text:"",index:s};if(e.label!=null&&(t.text=e.label),e.hasOwnProperty("value")){var u=t.value=e.value;t.interval=[u,u],t.close=[1,1]}else{for(var i=t.interval=[],r=t.close=[0,0],a=[1,0,1],c=[-1/0,1/0],o=[],f=0;f<2;f++){for(var d=[["gte","gt","min"],["lte","lt","max"]][f],p=0;p<3&&i[f]==null;p++)i[f]=e[d[p]],r[f]=a[p],o[f]=p===2;i[f]==null&&(i[f]=c[f])}o[0]&&i[1]===1/0&&(r[0]=0),o[1]&&i[0]===-1/0&&(r[1]=0),process.env.NODE_ENV!=="production"&&i[0]>i[1]&&console.warn("Piece "+s+"is illegal: "+i+" lower bound should not greater then uppper bound."),i[0]===i[1]&&r[0]&&r[1]&&(t.value=i[0])}t.visual=y.default.retrieveVisuals(e),l.push(t)},this),x(n,l),m.reformIntervals(l),h.each(l,function(e){var s=e.close,t=[["<","≤"][s[1]],[">","≥"][s[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,t)},this)},"pieces")};function x(l,n){var e=l.inverse;(l.orient==="vertical"?!e:e)&&n.reverse()}v(x,"normalizeReverse");exports.default=b;
@@ -0,0 +1,220 @@
1
+ var V = Object.defineProperty;
2
+ var v = (l, n) => V(l, "name", { value: n, configurable: !0 });
3
+ import { __extends as M } from "../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.js";
4
+ import { clone as m, map as O, each as h, isObject as b } from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.js";
5
+ import g from "../VisualMapModel/index.js";
6
+ import y from "../../../visual/VisualMapping/index.js";
7
+ import S from "../../../visual/visualDefault/index.js";
8
+ import { reformIntervals as x } from "../../../util/number/index.js";
9
+ import { inheritDefaultOption as _ } from "../../../util/component/index.js";
10
+ var P = (
11
+ /** @class */
12
+ function(l) {
13
+ M(n, l);
14
+ function n() {
15
+ var t = l !== null && l.apply(this, arguments) || this;
16
+ return t.type = n.type, t._pieceList = [], t;
17
+ }
18
+ return v(n, "PiecewiseModel"), n.prototype.optionUpdated = function(t, r) {
19
+ l.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
20
+ var e = this._mode = this._determineMode();
21
+ this._pieceList = [], w[this._mode].call(this, this._pieceList), this._resetSelected(t, r);
22
+ var u = this.option.categories;
23
+ this.resetVisual(function(i, s) {
24
+ e === "categories" ? (i.mappingMethod = "category", i.categories = m(u)) : (i.dataExtent = this.getExtent(), i.mappingMethod = "piecewise", i.pieceList = O(this._pieceList, function(o) {
25
+ return o = m(o), s !== "inRange" && (o.visual = null), o;
26
+ }));
27
+ });
28
+ }, n.prototype.completeVisualOption = function() {
29
+ var t = this.option, r = {}, e = y.listVisualTypes(), u = this.isCategory();
30
+ h(t.pieces, function(s) {
31
+ h(e, function(o) {
32
+ s.hasOwnProperty(o) && (r[o] = 1);
33
+ });
34
+ }), h(r, function(s, o) {
35
+ var f = !1;
36
+ h(this.stateList, function(a) {
37
+ f = f || i(t, a, o) || i(t.target, a, o);
38
+ }, this), !f && h(this.stateList, function(a) {
39
+ (t[a] || (t[a] = {}))[o] = S.get(o, a === "inRange" ? "active" : "inactive", u);
40
+ });
41
+ }, this);
42
+ function i(s, o, f) {
43
+ return s && s[o] && s[o].hasOwnProperty(f);
44
+ }
45
+ v(i, "has"), l.prototype.completeVisualOption.apply(this, arguments);
46
+ }, n.prototype._resetSelected = function(t, r) {
47
+ var e = this.option, u = this._pieceList, i = (r ? e : t).selected || {};
48
+ if (e.selected = i, h(u, function(o, f) {
49
+ var a = this.getSelectedMapKey(o);
50
+ i.hasOwnProperty(a) || (i[a] = !0);
51
+ }, this), e.selectedMode === "single") {
52
+ var s = !1;
53
+ h(u, function(o, f) {
54
+ var a = this.getSelectedMapKey(o);
55
+ i[a] && (s ? i[a] = !1 : s = !0);
56
+ }, this);
57
+ }
58
+ }, n.prototype.getItemSymbol = function() {
59
+ return this.get("itemSymbol");
60
+ }, n.prototype.getSelectedMapKey = function(t) {
61
+ return this._mode === "categories" ? t.value + "" : t.index + "";
62
+ }, n.prototype.getPieceList = function() {
63
+ return this._pieceList;
64
+ }, n.prototype._determineMode = function() {
65
+ var t = this.option;
66
+ return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
67
+ }, n.prototype.setSelected = function(t) {
68
+ this.option.selected = m(t);
69
+ }, n.prototype.getValueState = function(t) {
70
+ var r = y.findPieceIndex(t, this._pieceList);
71
+ return r != null && this.option.selected[this.getSelectedMapKey(this._pieceList[r])] ? "inRange" : "outOfRange";
72
+ }, n.prototype.findTargetDataIndices = function(t) {
73
+ var r = [], e = this._pieceList;
74
+ return this.eachTargetSeries(function(u) {
75
+ var i = [], s = u.getData();
76
+ s.each(this.getDataDimensionIndex(s), function(o, f) {
77
+ var a = y.findPieceIndex(o, e);
78
+ a === t && i.push(f);
79
+ }, this), r.push({
80
+ seriesId: u.id,
81
+ dataIndex: i
82
+ });
83
+ }, this), r;
84
+ }, n.prototype.getRepresentValue = function(t) {
85
+ var r;
86
+ if (this.isCategory())
87
+ r = t.value;
88
+ else if (t.value != null)
89
+ r = t.value;
90
+ else {
91
+ var e = t.interval || [];
92
+ r = e[0] === -1 / 0 && e[1] === 1 / 0 ? 0 : (e[0] + e[1]) / 2;
93
+ }
94
+ return r;
95
+ }, n.prototype.getVisualMeta = function(t) {
96
+ if (this.isCategory())
97
+ return;
98
+ var r = [], e = ["", ""], u = this;
99
+ function i(a, p) {
100
+ var d = u.getRepresentValue({
101
+ interval: a
102
+ });
103
+ p || (p = u.getValueState(d));
104
+ var c = t(d, p);
105
+ a[0] === -1 / 0 ? e[0] = c : a[1] === 1 / 0 ? e[1] = c : r.push({
106
+ value: a[0],
107
+ color: c
108
+ }, {
109
+ value: a[1],
110
+ color: c
111
+ });
112
+ }
113
+ v(i, "setStop");
114
+ var s = this._pieceList.slice();
115
+ if (!s.length)
116
+ s.push({
117
+ interval: [-1 / 0, 1 / 0]
118
+ });
119
+ else {
120
+ var o = s[0].interval[0];
121
+ o !== -1 / 0 && s.unshift({
122
+ interval: [-1 / 0, o]
123
+ }), o = s[s.length - 1].interval[1], o !== 1 / 0 && s.push({
124
+ interval: [o, 1 / 0]
125
+ });
126
+ }
127
+ var f = -1 / 0;
128
+ return h(s, function(a) {
129
+ var p = a.interval;
130
+ p && (p[0] > f && i([f, p[0]], "outOfRange"), i(p.slice()), f = p[1]);
131
+ }, this), {
132
+ stops: r,
133
+ outerColors: e
134
+ };
135
+ }, n.type = "visualMap.piecewise", n.defaultOption = _(g.defaultOption, {
136
+ selected: null,
137
+ minOpen: !1,
138
+ maxOpen: !1,
139
+ align: "auto",
140
+ itemWidth: 20,
141
+ itemHeight: 14,
142
+ itemSymbol: "roundRect",
143
+ pieces: null,
144
+ categories: null,
145
+ splitNumber: 5,
146
+ selectedMode: "multiple",
147
+ itemGap: 10,
148
+ hoverLink: !0
149
+ // Enable hover highlight.
150
+ }), n;
151
+ }(g)
152
+ ), w = {
153
+ splitNumber: /* @__PURE__ */ v(function(l) {
154
+ var n = this.option, t = Math.min(n.precision, 20), r = this.getExtent(), e = n.splitNumber;
155
+ e = Math.max(parseInt(e, 10), 1), n.splitNumber = e;
156
+ for (var u = (r[1] - r[0]) / e; +u.toFixed(t) !== u && t < 5; )
157
+ t++;
158
+ n.precision = t, u = +u.toFixed(t), n.minOpen && l.push({
159
+ interval: [-1 / 0, r[0]],
160
+ close: [0, 0]
161
+ });
162
+ for (var i = 0, s = r[0]; i < e; s += u, i++) {
163
+ var o = i === e - 1 ? r[1] : s + u;
164
+ l.push({
165
+ interval: [s, o],
166
+ close: [1, 1]
167
+ });
168
+ }
169
+ n.maxOpen && l.push({
170
+ interval: [r[1], 1 / 0],
171
+ close: [0, 0]
172
+ }), x(l), h(l, function(f, a) {
173
+ f.index = a, f.text = this.formatValueText(f.interval);
174
+ }, this);
175
+ }, "splitNumber"),
176
+ categories: /* @__PURE__ */ v(function(l) {
177
+ var n = this.option;
178
+ h(n.categories, function(t) {
179
+ l.push({
180
+ text: this.formatValueText(t, !0),
181
+ value: t
182
+ });
183
+ }, this), I(n, l);
184
+ }, "categories"),
185
+ pieces: /* @__PURE__ */ v(function(l) {
186
+ var n = this.option;
187
+ h(n.pieces, function(t, r) {
188
+ b(t) || (t = {
189
+ value: t
190
+ });
191
+ var e = {
192
+ text: "",
193
+ index: r
194
+ };
195
+ if (t.label != null && (e.text = t.label), t.hasOwnProperty("value")) {
196
+ var u = e.value = t.value;
197
+ e.interval = [u, u], e.close = [1, 1];
198
+ } else {
199
+ for (var i = e.interval = [], s = e.close = [0, 0], o = [1, 0, 1], f = [-1 / 0, 1 / 0], a = [], p = 0; p < 2; p++) {
200
+ for (var d = [["gte", "gt", "min"], ["lte", "lt", "max"]][p], c = 0; c < 3 && i[p] == null; c++)
201
+ i[p] = t[d[c]], s[p] = o[c], a[p] = c === 2;
202
+ i[p] == null && (i[p] = f[p]);
203
+ }
204
+ a[0] && i[1] === 1 / 0 && (s[0] = 0), a[1] && i[0] === -1 / 0 && (s[1] = 0), process.env.NODE_ENV !== "production" && i[0] > i[1] && console.warn("Piece " + r + "is illegal: " + i + " lower bound should not greater then uppper bound."), i[0] === i[1] && s[0] && s[1] && (e.value = i[0]);
205
+ }
206
+ e.visual = y.retrieveVisuals(t), l.push(e);
207
+ }, this), I(n, l), x(l), h(l, function(t) {
208
+ var r = t.close, e = [["<", "≤"][r[1]], [">", "≥"][r[0]]];
209
+ t.text = t.text || this.formatValueText(t.value != null ? t.value : t.interval, !1, e);
210
+ }, this);
211
+ }, "pieces")
212
+ };
213
+ function I(l, n) {
214
+ var t = l.inverse;
215
+ (l.orient === "vertical" ? !t : t) && n.reverse();
216
+ }
217
+ v(I, "normalizeReverse");
218
+ export {
219
+ P as default
220
+ };
@@ -0,0 +1 @@
1
+ "use strict";var S=Object.defineProperty;var M=(d,n)=>S(d,"name",{value:n,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.cjs"),u=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.cjs"),V=require("../VisualMapView/index.cjs"),I=require("../../../util/symbol/index.cjs"),L=require("../../../util/layout/index.cjs"),m=require("../helper/index.cjs"),q=require("../../../label/labelStyle/index.cjs"),w=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Group/index.cjs"),_=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Text/index.cjs");var k=function(d){T.__extends(n,d);function n(){var e=d!==null&&d.apply(this,arguments)||this;return e.type=n.type,e}return M(n,"PiecewiseVisualMapView"),n.prototype.doRender=function(){var e=this.group;e.removeAll();var i=this.visualMapModel,t=i.get("textGap"),o=i.textStyleModel,r=o.getFont(),a=o.getTextColor(),l=this._getItemAlign(),s=i.itemSize,g=this._getViewData(),c=g.endsText,p=u.retrieve(i.get("showLabel",!0),!c),f=!i.get("selectedMode");c&&this._renderEndsText(e,c[0],s,p,l),u.each(g.viewPieceList,function(y){var h=y.piece,v=new w.default;v.onclick=u.bind(this._onItemClick,this,h),this._enableHoverLink(v,y.indexInModelPieceList);var x=i.getRepresentValue(h);if(this._createItemSymbol(v,x,[0,0,s[0],s[1]],f),p){var b=this.visualMapModel.getValueState(x);v.add(new _.default({style:{x:l==="right"?-t:s[0]+t,y:s[1]/2,text:h.text,verticalAlign:"middle",align:l,font:r,fill:a,opacity:b==="outOfRange"?.5:1},silent:f}))}e.add(v)},this),c&&this._renderEndsText(e,c[1],s,p,l),L.box(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},n.prototype._enableHoverLink=function(e,i){var t=this;e.on("mouseover",function(){return o("highlight")}).on("mouseout",function(){return o("downplay")});var o=M(function(r){var a=t.visualMapModel;a.option.hoverLink&&t.api.dispatchAction({type:r,batch:m.makeHighDownBatch(a.findTargetDataIndices(i),a)})},"onHoverLink")},n.prototype._getItemAlign=function(){var e=this.visualMapModel,i=e.option;if(i.orient==="vertical")return m.getItemAlign(e,this.api,e.itemSize);var t=i.align;return(!t||t==="auto")&&(t="left"),t},n.prototype._renderEndsText=function(e,i,t,o,r){if(i){var a=new w.default,l=this.visualMapModel.textStyleModel;a.add(new _.default({style:q.createTextStyle(l,{x:o?r==="right"?t[0]:0:t[0]/2,y:t[1]/2,verticalAlign:"middle",align:o?r:"center",text:i})})),e.add(a)}},n.prototype._getViewData=function(){var e=this.visualMapModel,i=u.map(e.getPieceList(),function(a,l){return{piece:a,indexInModelPieceList:l}}),t=e.get("text"),o=e.get("orient"),r=e.get("inverse");return(o==="horizontal"?r:!r)?i.reverse():t&&(t=t.slice().reverse()),{viewPieceList:i,endsText:t}},n.prototype._createItemSymbol=function(e,i,t,o){var r=I.createSymbol(this.getControllerVisual(i,"symbol"),t[0],t[1],t[2],t[3],this.getControllerVisual(i,"color"));r.silent=o,e.add(r)},n.prototype._onItemClick=function(e){var i=this.visualMapModel,t=i.option,o=t.selectedMode;if(o){var r=u.clone(t.selected),a=i.getSelectedMapKey(e);o==="single"||o===!0?(r[a]=!0,u.each(r,function(l,s){r[s]=s===a})):r[a]=!r[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},n.type="visualMap.piecewise",n}(V.default);exports.default=k;