reke-ui 0.5.2 → 0.5.4
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/custom-elements.json +764 -3
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts +99 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.js +319 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts +2 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.js +36 -0
- package/dist/components/reke-dialog/reke-dialog.d.ts +19 -0
- package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.js +40 -15
- package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.styles.js +110 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +52 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.js +181 -42
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +47 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/dist/node_modules/echarts/lib/chart/bar/BarSeries.js +50 -0
- package/dist/node_modules/echarts/lib/chart/bar/BarView.js +431 -0
- package/dist/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +65 -0
- package/dist/node_modules/echarts/lib/chart/bar/install.js +22 -0
- package/dist/node_modules/echarts/lib/chart/helper/Symbol.js +142 -0
- package/dist/node_modules/echarts/lib/chart/helper/SymbolDraw.js +99 -0
- package/dist/node_modules/echarts/lib/chart/helper/axisSnippets.js +19 -0
- package/dist/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +50 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesData.js +55 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +3 -3
- package/dist/node_modules/echarts/lib/chart/helper/labelHelper.js +24 -0
- package/dist/node_modules/echarts/lib/chart/line/LineSeries.js +60 -0
- package/dist/node_modules/echarts/lib/chart/line/LineView.js +471 -0
- package/dist/node_modules/echarts/lib/chart/line/helper.js +34 -0
- package/dist/node_modules/echarts/lib/chart/line/install.js +16 -0
- package/dist/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +59 -0
- package/dist/node_modules/echarts/lib/chart/line/poly.js +135 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +32 -32
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +69 -69
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +25 -25
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +16 -16
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +153 -153
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +13 -13
- package/dist/node_modules/echarts/lib/component/axis/CartesianAxisView.js +106 -0
- package/dist/node_modules/echarts/lib/component/axis/axisSplitHelper.js +50 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +20 -20
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +30 -30
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +13 -13
- package/dist/node_modules/echarts/lib/component/dataZoom/AxisProxy.js +114 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomModel.js +189 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomView.js +15 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js +21 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomView.js +67 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js +75 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomView.js +465 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomAction.js +17 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js +55 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/helper.js +88 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installCommon.js +14 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js +10 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js +9 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/roams.js +132 -0
- package/dist/node_modules/echarts/lib/component/grid/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/grid/installSimple.js +32 -0
- package/dist/node_modules/echarts/lib/component/helper/RoamController.js +172 -0
- package/dist/node_modules/echarts/lib/component/helper/cursorHelper.js +17 -0
- package/dist/node_modules/echarts/lib/component/helper/interactionMutex.js +15 -0
- package/dist/node_modules/echarts/lib/component/helper/sliderMove.js +29 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +31 -31
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +61 -61
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +29 -29
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +4 -4
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +105 -105
- package/dist/node_modules/echarts/lib/coord/Axis.js +92 -0
- package/dist/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
- package/dist/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
- package/dist/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisDefault.js +124 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +123 -14
- package/dist/node_modules/echarts/lib/coord/axisModelCommonMixin.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisModelCreator.js +39 -0
- package/dist/node_modules/echarts/lib/coord/axisNiceTicks.js +64 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +101 -22
- package/dist/node_modules/echarts/lib/coord/axisStatisticsMetricsImpl.js +43 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +151 -5
- package/dist/node_modules/echarts/lib/coord/cartesian/Axis2D.js +24 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/AxisModel.js +18 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian.js +23 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +69 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Grid.js +314 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/GridModel.js +40 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +43 -12
- package/dist/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +175 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +39 -16
- package/dist/node_modules/echarts/lib/core/echarts.js +421 -421
- package/dist/node_modules/echarts/lib/data/OrdinalMeta.js +30 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +18 -18
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +6 -6
- package/dist/node_modules/echarts/lib/data/helper/dataStackHelper.js +59 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +13 -13
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +7 -4
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +40 -8
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +3 -3
- package/dist/node_modules/echarts/lib/data/helper/transform.js +8 -8
- package/dist/node_modules/echarts/lib/extension.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelStyle.js +34 -25
- package/dist/node_modules/echarts/lib/label/sectorLabel.js +83 -0
- package/dist/node_modules/echarts/lib/layout/barCommon.js +19 -0
- package/dist/node_modules/echarts/lib/layout/barGrid.js +165 -0
- package/dist/node_modules/echarts/lib/layout/points.js +37 -0
- package/dist/node_modules/echarts/lib/loading/default.js +6 -6
- package/dist/node_modules/echarts/lib/model/Component.js +39 -39
- package/dist/node_modules/echarts/lib/model/Global.js +122 -122
- package/dist/node_modules/echarts/lib/model/Series.js +78 -78
- package/dist/node_modules/echarts/lib/model/referHelper.js +58 -0
- package/dist/node_modules/echarts/lib/processor/dataSample.js +43 -0
- package/dist/node_modules/echarts/lib/scale/Interval.js +68 -0
- package/dist/node_modules/echarts/lib/scale/Log.js +100 -0
- package/dist/node_modules/echarts/lib/scale/Ordinal.js +92 -0
- package/dist/node_modules/echarts/lib/scale/Scale.js +13 -0
- package/dist/node_modules/echarts/lib/scale/Time.js +242 -0
- package/dist/node_modules/echarts/lib/scale/break.js +10 -2
- package/dist/node_modules/echarts/lib/scale/helper.js +61 -3
- package/dist/node_modules/echarts/lib/scale/minorTicks.js +22 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +89 -7
- package/dist/node_modules/echarts/lib/util/clazz.js +35 -35
- package/dist/node_modules/echarts/lib/util/component.js +16 -16
- package/dist/node_modules/echarts/lib/util/cycleCache.js +4 -1
- package/dist/node_modules/echarts/lib/util/decal.js +11 -11
- package/dist/node_modules/echarts/lib/util/format.js +1 -1
- package/dist/node_modules/echarts/lib/util/graphic.js +170 -170
- package/dist/node_modules/echarts/lib/util/layout.js +23 -23
- package/dist/node_modules/echarts/lib/util/model.js +128 -68
- package/dist/node_modules/echarts/lib/util/number.js +55 -37
- package/dist/node_modules/echarts/lib/util/shape/sausage.js +25 -0
- package/dist/node_modules/echarts/lib/util/states.js +96 -82
- package/dist/node_modules/echarts/lib/util/styleCompat.js +10 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +24 -21
- package/dist/node_modules/echarts/lib/util/time.js +154 -18
- package/dist/node_modules/echarts/lib/util/vendor.js +26 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +19 -19
- package/dist/node_modules/echarts/lib/view/Component.js +7 -7
- package/dist/node_modules/echarts/lib/visual/style.js +5 -5
- package/dist/node_modules/zrender/lib/Element.js +35 -35
- package/dist/node_modules/zrender/lib/canvas/graphic.js +36 -36
- package/dist/node_modules/zrender/lib/core/PathProxy.js +25 -25
- package/dist/node_modules/zrender/lib/core/event.js +4 -1
- package/dist/node_modules/zrender/lib/core/util.js +69 -64
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +7 -7
- package/dist/node_modules/zrender/lib/graphic/Text.js +37 -37
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +59 -59
- package/dist/node_modules/zrender/lib/tool/color.js +60 -41
- package/dist/react.d.ts +10 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +85 -73
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +1 -0
- package/package.json +5 -1
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import u from "../../../zrender/lib/core/
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import b from "./
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { __extends as e } from "../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import { assert as t, concatArray as n, createHashMap as r, curry as i, each as a, isObject as o, isTypedArray as s, keys as c, merge as l, mixin as u } from "../../../zrender/lib/core/util.js";
|
|
3
|
+
import d from "../../../zrender/lib/core/env.js";
|
|
4
|
+
import { mountExtend as f } from "../util/clazz.js";
|
|
5
|
+
import { defaultEmphasis as p, isNameSpecified as m, makeInner as h } from "../util/model.js";
|
|
6
|
+
import { fetchLayoutMode as g, getLayoutParams as _, mergeLayoutParam as v } from "../util/layout.js";
|
|
7
|
+
import y from "./Component.js";
|
|
8
|
+
import { PaletteMixin as b } from "./mixin/palette.js";
|
|
9
|
+
import { DataFormatMixin as x } from "./mixin/dataFormat.js";
|
|
10
|
+
import { createTask as S } from "../core/task.js";
|
|
11
11
|
import { SourceManager as C } from "../data/helper/sourceManager.js";
|
|
12
12
|
import { defaultSeriesFormatTooltip as w } from "../component/tooltip/seriesFormatTooltip.js";
|
|
13
13
|
//#region node_modules/echarts/lib/model/Series.js
|
|
14
|
-
var T =
|
|
14
|
+
var T = h();
|
|
15
15
|
function E(e, t) {
|
|
16
16
|
return e.getName(t) || e.getId(t);
|
|
17
17
|
}
|
|
18
|
-
var D = function(
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
var e =
|
|
18
|
+
var D = function(n) {
|
|
19
|
+
e(i, n);
|
|
20
|
+
function i() {
|
|
21
|
+
var e = n !== null && n.apply(this, arguments) || this;
|
|
22
22
|
return e._selectedDataIndicesMap = {}, e;
|
|
23
23
|
}
|
|
24
|
-
return
|
|
25
|
-
this.seriesIndex = this.componentIndex, this.dataTask =
|
|
24
|
+
return i.prototype.init = function(e, n, r) {
|
|
25
|
+
this.seriesIndex = this.componentIndex, this.dataTask = S({
|
|
26
26
|
count: A,
|
|
27
27
|
reset: j
|
|
28
|
-
}), this.dataTask.context = { model: this }, this.mergeDefaultAndTheme(
|
|
29
|
-
var i = this.getInitialData(
|
|
30
|
-
N(i, this), this.dataTask.context.data = i, process.env.NODE_ENV !== "production" &&
|
|
31
|
-
},
|
|
32
|
-
var n =
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
e =
|
|
36
|
-
var n =
|
|
37
|
-
n &&
|
|
28
|
+
}), this.dataTask.context = { model: this }, this.mergeDefaultAndTheme(e, r), (T(this).sourceManager = new C(this)).prepareSource();
|
|
29
|
+
var i = this.getInitialData(e, r);
|
|
30
|
+
N(i, this), this.dataTask.context.data = i, process.env.NODE_ENV !== "production" && t(i, "getInitialData returned invalid data."), T(this).dataBeforeProcessed = i, O(this), this._initSelectedMapFromData(i);
|
|
31
|
+
}, i.prototype.mergeDefaultAndTheme = function(e, t) {
|
|
32
|
+
var n = g(this), r = n ? _(e) : {}, i = this.subType;
|
|
33
|
+
y.hasClass(i) && (i += "Series"), l(e, t.getTheme().get(this.subType)), l(e, this.getDefaultOption()), p(e, "label", ["show"]), this.fillDataTextStyle(e.data), n && v(e, r, n);
|
|
34
|
+
}, i.prototype.mergeOption = function(e, t) {
|
|
35
|
+
e = l(this.option, e, !0), this.fillDataTextStyle(e.data);
|
|
36
|
+
var n = g(this);
|
|
37
|
+
n && v(this.option, e, n);
|
|
38
38
|
var r = T(this).sourceManager;
|
|
39
39
|
r.dirty(), r.prepareSource();
|
|
40
40
|
var i = this.getInitialData(e, t);
|
|
41
41
|
N(i, this), this.dataTask.dirty(), this.dataTask.context.data = i, T(this).dataBeforeProcessed = i, O(this), this._initSelectedMapFromData(i);
|
|
42
|
-
},
|
|
43
|
-
if (e && !
|
|
44
|
-
},
|
|
42
|
+
}, i.prototype.fillDataTextStyle = function(e) {
|
|
43
|
+
if (e && !s(e)) for (var t = ["show"], n = 0; n < e.length; n++) e[n] && e[n].label && p(e[n], "label", t);
|
|
44
|
+
}, i.prototype.getInitialData = function(e, t) {}, i.prototype.appendData = function(e) {
|
|
45
45
|
this.getRawData().appendData(e.data);
|
|
46
|
-
},
|
|
46
|
+
}, i.prototype.getData = function(e) {
|
|
47
47
|
var t = F(this);
|
|
48
48
|
if (t) {
|
|
49
49
|
var n = t.context.data;
|
|
50
50
|
return e == null || !n.getLinkedData ? n : n.getLinkedData(e);
|
|
51
51
|
} else return T(this).data;
|
|
52
|
-
},
|
|
52
|
+
}, i.prototype.getAllData = function() {
|
|
53
53
|
var e = this.getData();
|
|
54
54
|
return e && e.getLinkedDataAll ? e.getLinkedDataAll() : [{ data: e }];
|
|
55
|
-
},
|
|
55
|
+
}, i.prototype.setData = function(e) {
|
|
56
56
|
var t = F(this);
|
|
57
57
|
if (t) {
|
|
58
58
|
var n = t.context;
|
|
59
59
|
n.outputData = e, t !== this.dataTask && (n.data = e);
|
|
60
60
|
}
|
|
61
61
|
T(this).data = e;
|
|
62
|
-
},
|
|
62
|
+
}, i.prototype.getEncode = function() {
|
|
63
63
|
var e = this.get("encode", !0);
|
|
64
|
-
if (e) return
|
|
65
|
-
},
|
|
64
|
+
if (e) return r(e);
|
|
65
|
+
}, i.prototype.getSourceManager = function() {
|
|
66
66
|
return T(this).sourceManager;
|
|
67
|
-
},
|
|
67
|
+
}, i.prototype.getSource = function() {
|
|
68
68
|
return this.getSourceManager().getSource();
|
|
69
|
-
},
|
|
69
|
+
}, i.prototype.getRawData = function() {
|
|
70
70
|
return T(this).dataBeforeProcessed;
|
|
71
|
-
},
|
|
71
|
+
}, i.prototype.getColorBy = function() {
|
|
72
72
|
return this.get("colorBy") || "series";
|
|
73
|
-
},
|
|
73
|
+
}, i.prototype.isColorBySeries = function() {
|
|
74
74
|
return this.getColorBy() === "series";
|
|
75
|
-
},
|
|
75
|
+
}, i.prototype.getBaseAxis = function() {
|
|
76
76
|
var e = this.coordinateSystem;
|
|
77
77
|
return e && e.getBaseAxis && e.getBaseAxis();
|
|
78
|
-
},
|
|
78
|
+
}, i.prototype.indicesOfNearest = function(e, t, n, r) {
|
|
79
79
|
var i = this.getData(), a = this.coordinateSystem, o = a && a.getAxis(e);
|
|
80
80
|
if (!a || !o) return [];
|
|
81
81
|
var s = o.dataToCoord(n);
|
|
@@ -85,31 +85,31 @@ var D = function(t) {
|
|
|
85
85
|
v <= r && ((v < l || v === l && _ >= 0 && u < 0) && (l = v, u = _, d = 0), _ === u && (c[d++] = m));
|
|
86
86
|
}
|
|
87
87
|
return c.length = d, c;
|
|
88
|
-
},
|
|
88
|
+
}, i.prototype.formatTooltip = function(e, t, n) {
|
|
89
89
|
return w({
|
|
90
90
|
series: this,
|
|
91
91
|
dataIndex: e,
|
|
92
92
|
multipleSeries: t
|
|
93
93
|
});
|
|
94
|
-
},
|
|
94
|
+
}, i.prototype.isAnimationEnabled = function() {
|
|
95
95
|
var e = this.ecModel;
|
|
96
|
-
if (
|
|
96
|
+
if (d.node && !(e && e.ssr)) return !1;
|
|
97
97
|
var t = this.getShallow("animation");
|
|
98
98
|
return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1), !!t;
|
|
99
|
-
},
|
|
99
|
+
}, i.prototype.restoreData = function() {
|
|
100
100
|
this.dataTask.dirty();
|
|
101
|
-
},
|
|
102
|
-
var r = this.ecModel, i =
|
|
101
|
+
}, i.prototype.getColorFromPalette = function(e, t, n) {
|
|
102
|
+
var r = this.ecModel, i = b.prototype.getColorFromPalette.call(this, e, t, n);
|
|
103
103
|
return i ||= r.getColorFromPalette(e, t, n), i;
|
|
104
|
-
},
|
|
104
|
+
}, i.prototype.coordDimToDataDim = function(e) {
|
|
105
105
|
return this.getRawData().mapDimensionsAll(e);
|
|
106
|
-
},
|
|
106
|
+
}, i.prototype.getProgressive = function() {
|
|
107
107
|
return this.get("progressive");
|
|
108
|
-
},
|
|
108
|
+
}, i.prototype.getProgressiveThreshold = function() {
|
|
109
109
|
return this.get("progressiveThreshold");
|
|
110
|
-
},
|
|
110
|
+
}, i.prototype.select = function(e, t) {
|
|
111
111
|
this._innerSelect(this.getData(t), e);
|
|
112
|
-
},
|
|
112
|
+
}, i.prototype.unselect = function(e, t) {
|
|
113
113
|
var n = this.option.selectedMap;
|
|
114
114
|
if (n) {
|
|
115
115
|
var r = this.option.selectedMode, i = this.getData(t);
|
|
@@ -122,40 +122,40 @@ var D = function(t) {
|
|
|
122
122
|
n[s] = !1, this._selectedDataIndicesMap[s] = -1;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
},
|
|
125
|
+
}, i.prototype.toggleSelect = function(e, t) {
|
|
126
126
|
for (var n = [], r = 0; r < e.length; r++) n[0] = e[r], this.isSelected(e[r], t) ? this.unselect(n, t) : this.select(n, t);
|
|
127
|
-
},
|
|
127
|
+
}, i.prototype.getSelectedDataIndices = function() {
|
|
128
128
|
if (this.option.selectedMap === "all") return [].slice.call(this.getData().getIndices());
|
|
129
|
-
for (var e = this._selectedDataIndicesMap, t =
|
|
129
|
+
for (var e = this._selectedDataIndicesMap, t = c(e), n = [], r = 0; r < t.length; r++) {
|
|
130
130
|
var i = e[t[r]];
|
|
131
131
|
i >= 0 && n.push(i);
|
|
132
132
|
}
|
|
133
133
|
return n;
|
|
134
|
-
},
|
|
134
|
+
}, i.prototype.isSelected = function(e, t) {
|
|
135
135
|
var n = this.option.selectedMap;
|
|
136
136
|
if (!n) return !1;
|
|
137
137
|
var r = this.getData(t);
|
|
138
138
|
return (n === "all" || n[E(r, e)]) && !r.getItemModel(e).get(["select", "disabled"]);
|
|
139
|
-
},
|
|
139
|
+
}, i.prototype.isUniversalTransitionEnabled = function() {
|
|
140
140
|
if (this.__universalTransitionEnabled) return !0;
|
|
141
141
|
var e = this.option.universalTransition;
|
|
142
142
|
return e ? e === !0 ? !0 : e && e.enabled : !1;
|
|
143
|
-
},
|
|
144
|
-
var n, r, i = this.option,
|
|
145
|
-
if (!(!
|
|
146
|
-
if (
|
|
147
|
-
else if (
|
|
148
|
-
|
|
143
|
+
}, i.prototype._innerSelect = function(e, t) {
|
|
144
|
+
var n, r, i = this.option, a = i.selectedMode, s = t.length;
|
|
145
|
+
if (!(!a || !s)) {
|
|
146
|
+
if (a === "series") i.selectedMap = "all";
|
|
147
|
+
else if (a === "multiple") {
|
|
148
|
+
o(i.selectedMap) || (i.selectedMap = {});
|
|
149
149
|
for (var c = i.selectedMap, l = 0; l < s; l++) {
|
|
150
150
|
var u = t[l], d = E(e, u);
|
|
151
151
|
c[d] = !0, this._selectedDataIndicesMap[d] = e.getRawIndex(u);
|
|
152
152
|
}
|
|
153
|
-
} else if (
|
|
153
|
+
} else if (a === "single" || a === !0) {
|
|
154
154
|
var f = t[s - 1], d = E(e, f);
|
|
155
155
|
i.selectedMap = (n = {}, n[d] = !0, n), this._selectedDataIndicesMap = (r = {}, r[d] = e.getRawIndex(f), r);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
},
|
|
158
|
+
}, i.prototype._initSelectedMapFromData = function(e) {
|
|
159
159
|
if (!this.option.selectedMap) {
|
|
160
160
|
var t = [];
|
|
161
161
|
e.hasItemOption && e.each(function(n) {
|
|
@@ -163,21 +163,21 @@ var D = function(t) {
|
|
|
163
163
|
r && r.selected && t.push(n);
|
|
164
164
|
}), t.length > 0 && this._innerSelect(e, t);
|
|
165
165
|
}
|
|
166
|
-
},
|
|
167
|
-
return
|
|
168
|
-
},
|
|
169
|
-
var e =
|
|
166
|
+
}, i.registerClass = function(e) {
|
|
167
|
+
return y.registerClass(e);
|
|
168
|
+
}, i.protoInitialize = function() {
|
|
169
|
+
var e = i.prototype;
|
|
170
170
|
e.type = "series.__base__", e.seriesIndex = 0, e.ignoreStyleOnData = !1, e.hasSymbolVisual = !1, e.defaultSymbol = "circle", e.visualStyleAccessPath = "itemStyle", e.visualDrawType = "fill";
|
|
171
|
-
}(),
|
|
172
|
-
}(
|
|
173
|
-
|
|
171
|
+
}(), i;
|
|
172
|
+
}(y);
|
|
173
|
+
u(D, x), u(D, b), f(D, y);
|
|
174
174
|
function O(e) {
|
|
175
175
|
var t = e.name;
|
|
176
|
-
|
|
176
|
+
m(e) || (e.name = k(e) || t);
|
|
177
177
|
}
|
|
178
178
|
function k(e) {
|
|
179
179
|
var t = e.getRawData(), n = t.mapDimensionsAll("seriesName"), r = [];
|
|
180
|
-
return
|
|
180
|
+
return a(n, function(e) {
|
|
181
181
|
var n = t.getDimensionInfo(e);
|
|
182
182
|
n.displayName && r.push(n.displayName);
|
|
183
183
|
}), r.join(" ");
|
|
@@ -192,9 +192,9 @@ function j(e) {
|
|
|
192
192
|
function M(e, t) {
|
|
193
193
|
t.outputData && e.end > t.outputData.count() && t.model.getRawData().cloneShallow(t.outputData);
|
|
194
194
|
}
|
|
195
|
-
function N(e,
|
|
196
|
-
|
|
197
|
-
e.wrapMethod(
|
|
195
|
+
function N(e, t) {
|
|
196
|
+
a(n(e.CHANGABLE_METHODS, e.DOWNSAMPLE_METHODS), function(n) {
|
|
197
|
+
e.wrapMethod(n, i(P, t));
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
function P(e, t) {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createHashMap as e, each as t, retrieve as n } from "../../../zrender/lib/core/util.js";
|
|
2
|
+
import { SINGLE_REFERRING as r } from "../util/model.js";
|
|
3
|
+
//#region node_modules/echarts/lib/model/referHelper.js
|
|
4
|
+
var i = function() {
|
|
5
|
+
function t(t) {
|
|
6
|
+
this.coordSysDims = [], this.axisMap = e(), this.categoryAxisMap = e(), this.coordSysName = t;
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
}();
|
|
10
|
+
function a(e) {
|
|
11
|
+
var t = e.get("coordinateSystem"), n = new i(t), r = o[t];
|
|
12
|
+
if (r) return r(e, n, n.axisMap, n.categoryAxisMap), n;
|
|
13
|
+
}
|
|
14
|
+
var o = {
|
|
15
|
+
cartesian2d: function(e, t, i, a) {
|
|
16
|
+
var o = e.getReferringComponents("xAxis", r).models[0], c = e.getReferringComponents("yAxis", r).models[0];
|
|
17
|
+
if (process.env.NODE_ENV !== "production") {
|
|
18
|
+
if (!o) throw Error("xAxis \"" + n(e.get("xAxisIndex"), e.get("xAxisId"), 0) + "\" not found");
|
|
19
|
+
if (!c) throw Error("yAxis \"" + n(e.get("xAxisIndex"), e.get("yAxisId"), 0) + "\" not found");
|
|
20
|
+
}
|
|
21
|
+
t.coordSysDims = ["x", "y"], i.set("x", o), i.set("y", c), s(o) && (a.set("x", o), t.firstCategoryDimIndex = 0), s(c) && (a.set("y", c), t.firstCategoryDimIndex ??= 1);
|
|
22
|
+
},
|
|
23
|
+
singleAxis: function(e, t, n, i) {
|
|
24
|
+
var a = e.getReferringComponents("singleAxis", r).models[0];
|
|
25
|
+
if (process.env.NODE_ENV !== "production" && !a) throw Error("singleAxis should be specified.");
|
|
26
|
+
t.coordSysDims = ["single"], n.set("single", a), s(a) && (i.set("single", a), t.firstCategoryDimIndex = 0);
|
|
27
|
+
},
|
|
28
|
+
polar: function(e, t, n, i) {
|
|
29
|
+
var a = e.getReferringComponents("polar", r).models[0], o = a.findAxisModel("radiusAxis"), c = a.findAxisModel("angleAxis");
|
|
30
|
+
if (process.env.NODE_ENV !== "production") {
|
|
31
|
+
if (!c) throw Error("angleAxis option not found");
|
|
32
|
+
if (!o) throw Error("radiusAxis option not found");
|
|
33
|
+
}
|
|
34
|
+
t.coordSysDims = ["radius", "angle"], n.set("radius", o), n.set("angle", c), s(o) && (i.set("radius", o), t.firstCategoryDimIndex = 0), s(c) && (i.set("angle", c), t.firstCategoryDimIndex ??= 1);
|
|
35
|
+
},
|
|
36
|
+
geo: function(e, t, n, r) {
|
|
37
|
+
t.coordSysDims = ["lng", "lat"];
|
|
38
|
+
},
|
|
39
|
+
parallel: function(e, n, r, i) {
|
|
40
|
+
var a = e.ecModel, o = a.getComponent("parallel", e.get("parallelIndex")), c = n.coordSysDims = o.dimensions.slice();
|
|
41
|
+
t(o.parallelAxisIndex, function(e, t) {
|
|
42
|
+
var o = a.getComponent("parallelAxis", e), l = c[t];
|
|
43
|
+
r.set(l, o), s(o) && (i.set(l, o), n.firstCategoryDimIndex ??= t);
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
matrix: function(e, t, n, i) {
|
|
47
|
+
var a = e.getReferringComponents("matrix", r).models[0];
|
|
48
|
+
if (process.env.NODE_ENV !== "production" && !a) throw Error("matrix coordinate system should be specified.");
|
|
49
|
+
t.coordSysDims = ["x", "y"];
|
|
50
|
+
var o = a.getDimensionModel("x"), s = a.getDimensionModel("y");
|
|
51
|
+
n.set("x", o), n.set("y", s), i.set("x", o), i.set("y", s);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
function s(e) {
|
|
55
|
+
return e.get("type") === "category";
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { a as getCoordSysInfoBySeries };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { isFunction as e, isString as t } from "../../../zrender/lib/core/util.js";
|
|
2
|
+
//#region node_modules/echarts/lib/processor/dataSample.js
|
|
3
|
+
var n = {
|
|
4
|
+
average: function(e) {
|
|
5
|
+
for (var t = 0, n = 0, r = 0; r < e.length; r++) isNaN(e[r]) || (t += e[r], n++);
|
|
6
|
+
return n === 0 ? NaN : t / n;
|
|
7
|
+
},
|
|
8
|
+
sum: function(e) {
|
|
9
|
+
for (var t = 0, n = 0; n < e.length; n++) t += e[n] || 0;
|
|
10
|
+
return t;
|
|
11
|
+
},
|
|
12
|
+
max: function(e) {
|
|
13
|
+
for (var t = -Infinity, n = 0; n < e.length; n++) e[n] > t && (t = e[n]);
|
|
14
|
+
return isFinite(t) ? t : NaN;
|
|
15
|
+
},
|
|
16
|
+
min: function(e) {
|
|
17
|
+
for (var t = Infinity, n = 0; n < e.length; n++) e[n] < t && (t = e[n]);
|
|
18
|
+
return isFinite(t) ? t : NaN;
|
|
19
|
+
},
|
|
20
|
+
nearest: function(e) {
|
|
21
|
+
return e[0];
|
|
22
|
+
}
|
|
23
|
+
}, r = function(e) {
|
|
24
|
+
return Math.round(e.length / 2);
|
|
25
|
+
};
|
|
26
|
+
function i(i) {
|
|
27
|
+
return {
|
|
28
|
+
seriesType: i,
|
|
29
|
+
reset: function(i, a, o) {
|
|
30
|
+
var s = i.getData(), c = i.get("sampling"), l = i.coordinateSystem, u = s.count();
|
|
31
|
+
if (u > 10 && l.type === "cartesian2d" && c) {
|
|
32
|
+
var d = l.getBaseAxis(), f = l.getOtherAxis(d), p = d.getExtent(), m = o.getDevicePixelRatio(), h = Math.abs(p[1] - p[0]) * (m || 1), g = Math.round(u / h);
|
|
33
|
+
if (isFinite(g) && g > 1) {
|
|
34
|
+
c === "lttb" ? i.setData(s.lttbDownSample(s.mapDimension(f.dim), 1 / g)) : c === "minmax" && i.setData(s.minmaxDownSample(s.mapDimension(f.dim), 1 / g));
|
|
35
|
+
var _ = void 0;
|
|
36
|
+
t(c) ? _ = n[c] : e(c) && (_ = c), _ && i.setData(s.downSample(s.mapDimension(f.dim), 1 / g, _, r));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { i as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { __extends as e } from "../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import { assert as t, clone as n } from "../../../zrender/lib/core/util.js";
|
|
3
|
+
import { getPrecision as r, mathMin as i, mathRound as a, round as o } from "../util/number.js";
|
|
4
|
+
import { warn as s } from "../util/log.js";
|
|
5
|
+
import { getBreaksUnsafe as c, getScaleBreakHelper as l, hasBreaks as u, simplyParseBreakOption as d } from "./break.js";
|
|
6
|
+
import { addCommas as f } from "../util/format.js";
|
|
7
|
+
import p from "./Scale.js";
|
|
8
|
+
import { getScaleExtentForTickUnsafe as m, initBreakOrLinearMapper as h } from "./scaleMapper.js";
|
|
9
|
+
import { getIntervalPrecision as g } from "./helper.js";
|
|
10
|
+
import { getMinorTicks as _ } from "./minorTicks.js";
|
|
11
|
+
//#region node_modules/echarts/lib/scale/Interval.js
|
|
12
|
+
var v = function(p) {
|
|
13
|
+
e(v, p);
|
|
14
|
+
function v(e) {
|
|
15
|
+
var t = p.call(this) || this;
|
|
16
|
+
return t.type = "interval", t.parse = v.parse, e ||= {}, t.brk = h(t, d(t, e), null).brk, t._cfg = {
|
|
17
|
+
interval: 0,
|
|
18
|
+
intervalPrecision: 2,
|
|
19
|
+
intervalCount: void 0,
|
|
20
|
+
niceExtent: void 0
|
|
21
|
+
}, t;
|
|
22
|
+
}
|
|
23
|
+
return v.parse = function(e) {
|
|
24
|
+
return e == null || e === "" ? NaN : Number(e);
|
|
25
|
+
}, v.prototype.getConfig = function() {
|
|
26
|
+
return n(this._cfg);
|
|
27
|
+
}, v.prototype.setConfig = function(e) {
|
|
28
|
+
var i = m(this);
|
|
29
|
+
process.env.NODE_ENV !== "production" && (t(e.interval != null), e.intervalCount != null && t(e.intervalCount >= -1 && e.intervalPrecision != null && !u(this)), e.niceExtent != null && (t(isFinite(e.niceExtent[0]) && isFinite(e.niceExtent[1])), t(i[0] <= e.niceExtent[0] && e.niceExtent[1] <= i[1]), t(o(e.niceExtent[0] - e.niceExtent[1], r(e.interval)) <= e.interval))), this._cfg = e = n(e), e.niceExtent ??= i.slice(), e.intervalPrecision ??= g(e.interval);
|
|
30
|
+
}, v.prototype.getTicks = function(e) {
|
|
31
|
+
e ||= {};
|
|
32
|
+
var n = this._cfg, r = n.interval, c = m(this), u = n.niceExtent, d = n.intervalPrecision, f = l(), p = this.brk, h = f && p, g = [];
|
|
33
|
+
if (!r) return g;
|
|
34
|
+
if (e.breakTicks === "only_break" && h) return f.addBreaksToTicks(g, p.breaks, c), g;
|
|
35
|
+
process.env.NODE_ENV !== "production" && t(u != null);
|
|
36
|
+
var _ = 3e3;
|
|
37
|
+
c[0] < u[0] && g.push({ value: e.expandToNicedExtent ? o(u[0] - r, d) : c[0] });
|
|
38
|
+
for (var v = function(e, t) {
|
|
39
|
+
return a((t - e) / r);
|
|
40
|
+
}, y = n.intervalCount, b = u[0], x = 0;; x++) {
|
|
41
|
+
if (y == null) {
|
|
42
|
+
if (b > u[1] || !isFinite(b) || !isFinite(u[1])) break;
|
|
43
|
+
} else {
|
|
44
|
+
if (x > y) break;
|
|
45
|
+
b = i(b, u[1]), x === y && (b = u[1]);
|
|
46
|
+
}
|
|
47
|
+
if (g.push({ value: b }), b = o(b + r, d), p) {
|
|
48
|
+
var S = p.calcNiceTickMultiple(b, v);
|
|
49
|
+
S >= 0 && (b = o(b + S * r, d));
|
|
50
|
+
}
|
|
51
|
+
if (g.length > 0 && b === g[g.length - 1].value) break;
|
|
52
|
+
if (g.length > _) return process.env.NODE_ENV !== "production" && s("Exceed safe limit in IntervalScale[\"getTicks\"]."), [];
|
|
53
|
+
}
|
|
54
|
+
var C = g.length ? g[g.length - 1].value : u[1];
|
|
55
|
+
return c[1] > C && g.push({ value: e.expandToNicedExtent ? o(C + r, d) : c[1] }), h && f.pruneTicksByBreak(e.pruneByBreak, g, p.breaks, function(e) {
|
|
56
|
+
return e.value;
|
|
57
|
+
}, n.interval, c), h && e.breakTicks !== "none" && f.addBreaksToTicks(g, p.breaks, c), g;
|
|
58
|
+
}, v.prototype.getMinorTicks = function(e) {
|
|
59
|
+
return _(this, e, c(this), this._cfg.interval);
|
|
60
|
+
}, v.prototype.getLabel = function(e, t) {
|
|
61
|
+
if (e == null) return "";
|
|
62
|
+
var n = t && t.precision;
|
|
63
|
+
return n == null ? n = r(e.value) || 0 : n === "auto" && (n = this._cfg.intervalPrecision), f(o(e.value, n, !0));
|
|
64
|
+
}, v.type = "interval", v;
|
|
65
|
+
}(p);
|
|
66
|
+
p.registerClass(v);
|
|
67
|
+
//#endregion
|
|
68
|
+
export { v as default };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { __extends as e } from "../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import { map as t } from "../../../zrender/lib/core/util.js";
|
|
3
|
+
import { isNullableNumberFinite as n } from "../util/number.js";
|
|
4
|
+
import { isValidBoundsForExtent as r } from "../util/model.js";
|
|
5
|
+
import { getBreaksUnsafe as i, getScaleBreakHelper as a } from "./break.js";
|
|
6
|
+
import o from "./Scale.js";
|
|
7
|
+
import { decorateScaleMapper as s, enableScaleMapperFreeze as c } from "./scaleMapper.js";
|
|
8
|
+
import { logScaleLogTick as l, logScalePowTick as u } from "./helper.js";
|
|
9
|
+
import { getMinorTicks as d } from "./minorTicks.js";
|
|
10
|
+
import f from "./Interval.js";
|
|
11
|
+
//#region node_modules/echarts/lib/scale/Log.js
|
|
12
|
+
var p = 0, m = 1, h = 2, g = function(o) {
|
|
13
|
+
e(g, o);
|
|
14
|
+
function g(e) {
|
|
15
|
+
var t = o.call(this) || this;
|
|
16
|
+
t.type = "log", t.parse = f.parse, t.base = e.logBase || 10;
|
|
17
|
+
var n = [], r = [], i = t._lookup = {
|
|
18
|
+
from: n,
|
|
19
|
+
to: r
|
|
20
|
+
};
|
|
21
|
+
n[p] = n[m] = r[p] = r[m] = NaN, s(t, g.mapperMethods);
|
|
22
|
+
var l = a(), u = e.breakOption, d = { lookup: i };
|
|
23
|
+
return l && l.parseAxisBreakOptionInwardTransform(u, t, { noNegative: !0 }, h, d), t.powStub = new f({ breakParsed: d.original }), t.intervalStub = new f({ breakParsed: d.transformed }), c(t, t.intervalStub), t;
|
|
24
|
+
}
|
|
25
|
+
return g.prototype.getTicks = function(e) {
|
|
26
|
+
var n = this.base, r = this.powStub, o = a(), s = this.intervalStub, c = { lookup: {
|
|
27
|
+
from: s.getExtent(),
|
|
28
|
+
to: r.getExtent()
|
|
29
|
+
} };
|
|
30
|
+
return t(s.getTicks(e || {}), function(e) {
|
|
31
|
+
var t = e.value, a = u(t, n, c), s;
|
|
32
|
+
if (o) {
|
|
33
|
+
var l = o.getTicksBreakOutwardTransform(this, e, i(r), this._lookup);
|
|
34
|
+
l && (s = l.vBreak, a = l.tickVal);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
value: a,
|
|
38
|
+
break: s
|
|
39
|
+
};
|
|
40
|
+
}, this);
|
|
41
|
+
}, g.prototype.getMinorTicks = function(e) {
|
|
42
|
+
return d(this, e, i(this.powStub), this.intervalStub.getConfig().interval);
|
|
43
|
+
}, g.prototype.getLabel = function(e, t) {
|
|
44
|
+
return this.intervalStub.getLabel(e, t);
|
|
45
|
+
}, g.type = "log", g.mapperMethods = {
|
|
46
|
+
needTransform: function() {
|
|
47
|
+
return !0;
|
|
48
|
+
},
|
|
49
|
+
normalize: function(e) {
|
|
50
|
+
return this.intervalStub.normalize(l(e, this.base));
|
|
51
|
+
},
|
|
52
|
+
scale: function(e) {
|
|
53
|
+
return u(this.intervalStub.scale(e), this.base, null);
|
|
54
|
+
},
|
|
55
|
+
transformIn: function(e, t) {
|
|
56
|
+
return e = l(e, this.base), t && t.depth === 2 ? e : this.intervalStub.transformIn(e, t);
|
|
57
|
+
},
|
|
58
|
+
transformOut: function(e, t) {
|
|
59
|
+
var n = t ? t.depth : null;
|
|
60
|
+
return _.depth = n, v.lookup = this._lookup, u(n === 2 ? e : this.intervalStub.transformOut(e, _), this.base, v);
|
|
61
|
+
},
|
|
62
|
+
contain: function(e) {
|
|
63
|
+
return this.powStub.contain(e);
|
|
64
|
+
},
|
|
65
|
+
setExtent: function(e, t) {
|
|
66
|
+
this.setExtent2(0, e, t);
|
|
67
|
+
},
|
|
68
|
+
setExtent2: function(e, t, n) {
|
|
69
|
+
if (!(!r(t, n) || t <= 0 || n <= 0)) {
|
|
70
|
+
var i = y, a = y;
|
|
71
|
+
if (e === 0) {
|
|
72
|
+
var o = this._lookup;
|
|
73
|
+
i = o.to, a = o.from;
|
|
74
|
+
}
|
|
75
|
+
this.powStub.setExtent2(e, i[p] = t, i[m] = n);
|
|
76
|
+
var s = this.base;
|
|
77
|
+
this.intervalStub.setExtent2(e, a[p] = l(t, s), a[m] = l(n, s));
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
getFilter: function() {
|
|
81
|
+
return { g: 0 };
|
|
82
|
+
},
|
|
83
|
+
sanitize: function(e, t) {
|
|
84
|
+
return r(t[0], t[1]) && n(e) && e <= 0 && (e = t[0]), e;
|
|
85
|
+
},
|
|
86
|
+
getDefaultStartValue: function() {
|
|
87
|
+
return 1;
|
|
88
|
+
},
|
|
89
|
+
getExtent: function() {
|
|
90
|
+
return this.powStub.getExtent();
|
|
91
|
+
},
|
|
92
|
+
getExtentUnsafe: function(e, t) {
|
|
93
|
+
return t === null ? this.powStub.getExtentUnsafe(e, null) : this.intervalStub.getExtentUnsafe(e, t);
|
|
94
|
+
}
|
|
95
|
+
}, g;
|
|
96
|
+
}(o);
|
|
97
|
+
o.registerClass(g);
|
|
98
|
+
var _ = {}, v = {}, y = [];
|
|
99
|
+
//#endregion
|
|
100
|
+
export { g as default };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { __extends as e } from "../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import { isArray as t, isObject as n, isString as r, map as i } from "../../../zrender/lib/core/util.js";
|
|
3
|
+
import { mathMin as a, mathRound as o } from "../util/number.js";
|
|
4
|
+
import s from "./Scale.js";
|
|
5
|
+
import c from "../data/OrdinalMeta.js";
|
|
6
|
+
import { decorateScaleMapper as l, enableScaleMapperFreeze as u, getScaleExtentForTickUnsafe as d, initBreakOrLinearMapper as f } from "./scaleMapper.js";
|
|
7
|
+
import { ordinalScaleCreateTicks as p } from "./helper.js";
|
|
8
|
+
//#region node_modules/echarts/lib/scale/Ordinal.js
|
|
9
|
+
var m = function(s) {
|
|
10
|
+
e(m, s);
|
|
11
|
+
function m(e) {
|
|
12
|
+
var r = s.call(this) || this;
|
|
13
|
+
r.type = "ordinal", r.parse = m.parse, l(r, m.decoratedMethods);
|
|
14
|
+
var a = e.ordinalMeta;
|
|
15
|
+
a ||= new c({}), t(a) && (a = new c({ categories: i(a, function(e) {
|
|
16
|
+
return n(e) ? e.value : e;
|
|
17
|
+
}) })), r._ordinalMeta = a;
|
|
18
|
+
var o = f(null, null, e.extent || [0, a.categories.length - 1]);
|
|
19
|
+
return r._mapper = o.mapper, u(r, o.mapper), r;
|
|
20
|
+
}
|
|
21
|
+
return m.parse = function(e) {
|
|
22
|
+
return e == null ? e = NaN : r(e) ? (e = this._ordinalMeta.getOrdinal(e), e ??= NaN) : e = o(e), e;
|
|
23
|
+
}, m.prototype.getTicks = function() {
|
|
24
|
+
var e = [];
|
|
25
|
+
return p(this, 0, function(t) {
|
|
26
|
+
e.push(t);
|
|
27
|
+
}), e;
|
|
28
|
+
}, m.prototype.getMinorTicks = function(e) {}, m.prototype.setSortInfo = function(e) {
|
|
29
|
+
if (e == null) {
|
|
30
|
+
this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
for (var t = e.ordinalNumbers, n = this._ordinalNumbersByTick = [], r = this._ticksByOrdinalNumber = [], i = 0, o = this._ordinalMeta.categories.length, s = a(o, t.length); i < s; ++i) {
|
|
34
|
+
var c = n[i] = t[i];
|
|
35
|
+
r[c] = i;
|
|
36
|
+
}
|
|
37
|
+
for (var l = 0; i < o; ++i) {
|
|
38
|
+
for (; r[l] != null;) l++;
|
|
39
|
+
n[i] = l, r[l] = i;
|
|
40
|
+
}
|
|
41
|
+
}, m.prototype._getTickNumber = function(e) {
|
|
42
|
+
var t = this._ticksByOrdinalNumber;
|
|
43
|
+
return t && e >= 0 && e < t.length ? t[e] : e;
|
|
44
|
+
}, m.prototype.getRawOrdinalNumber = function(e) {
|
|
45
|
+
var t = this._ordinalNumbersByTick;
|
|
46
|
+
return t && e >= 0 && e < t.length ? t[e] : e;
|
|
47
|
+
}, m.prototype.getLabel = function(e) {
|
|
48
|
+
if (!this.isBlank()) {
|
|
49
|
+
var t = this.getRawOrdinalNumber(e.value), n = this._ordinalMeta.categories[t];
|
|
50
|
+
return n == null ? "" : n + "";
|
|
51
|
+
}
|
|
52
|
+
}, m.prototype.count = function() {
|
|
53
|
+
var e = d(this._mapper);
|
|
54
|
+
return e[1] - e[0] + 1;
|
|
55
|
+
}, m.prototype.getOrdinalMeta = function() {
|
|
56
|
+
return this._ordinalMeta;
|
|
57
|
+
}, m.type = "ordinal", m.decoratedMethods = {
|
|
58
|
+
needTransform: function() {
|
|
59
|
+
return this._mapper.needTransform();
|
|
60
|
+
},
|
|
61
|
+
contain: function(e) {
|
|
62
|
+
return this._mapper.contain(this._getTickNumber(e)) && e >= 0 && e < this._ordinalMeta.categories.length;
|
|
63
|
+
},
|
|
64
|
+
normalize: function(e) {
|
|
65
|
+
return this._mapper.normalize(this._getTickNumber(e));
|
|
66
|
+
},
|
|
67
|
+
scale: function(e) {
|
|
68
|
+
return this.getRawOrdinalNumber(o(this._mapper.scale(e)));
|
|
69
|
+
},
|
|
70
|
+
transformIn: function(e, t) {
|
|
71
|
+
return this._mapper.transformIn(this._getTickNumber(e), t);
|
|
72
|
+
},
|
|
73
|
+
transformOut: function(e, t) {
|
|
74
|
+
return this.getRawOrdinalNumber(this._mapper.transformOut(e, t));
|
|
75
|
+
},
|
|
76
|
+
getExtent: function() {
|
|
77
|
+
return this._mapper.getExtent();
|
|
78
|
+
},
|
|
79
|
+
getExtentUnsafe: function(e, t) {
|
|
80
|
+
return this._mapper.getExtentUnsafe(e, t);
|
|
81
|
+
},
|
|
82
|
+
setExtent: function(e, t) {
|
|
83
|
+
return this._mapper.setExtent(e, t);
|
|
84
|
+
},
|
|
85
|
+
setExtent2: function(e, t, n) {
|
|
86
|
+
return this._mapper.setExtent2(e, t, n);
|
|
87
|
+
}
|
|
88
|
+
}, m;
|
|
89
|
+
}(s);
|
|
90
|
+
s.registerClass(m);
|
|
91
|
+
//#endregion
|
|
92
|
+
export { m as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { enableClassManagement as e } from "../util/clazz.js";
|
|
2
|
+
//#region node_modules/echarts/lib/scale/Scale.js
|
|
3
|
+
var t = function() {
|
|
4
|
+
function e() {}
|
|
5
|
+
return e.prototype.isBlank = function() {
|
|
6
|
+
return this._isBlank;
|
|
7
|
+
}, e.prototype.setBlank = function(e) {
|
|
8
|
+
this._isBlank = e;
|
|
9
|
+
}, e;
|
|
10
|
+
}();
|
|
11
|
+
e(t);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as default };
|