reke-ui 0.3.0 → 0.4.1
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/README.md +6 -0
- package/custom-elements.json +1888 -445
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/components/reke-chip/reke-chip.d.ts +7 -0
- package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.js +8 -2
- package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.styles.js +32 -0
- package/dist/components/reke-combobox/reke-combobox.d.ts +21 -1
- package/dist/components/reke-combobox/reke-combobox.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.js +76 -16
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.styles.js +128 -0
- package/dist/components/reke-input/reke-input.d.ts +14 -0
- package/dist/components/reke-input/reke-input.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.js +41 -22
- package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.styles.js +44 -16
- package/dist/components/reke-menu/reke-menu.d.ts +51 -0
- package/dist/components/reke-menu/reke-menu.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.js +106 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts +2 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.styles.js +25 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts +32 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.js +49 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts +2 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.js +53 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +59 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.js +117 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts +2 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +28 -0
- package/dist/components/reke-table/reke-table.d.ts +202 -3
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +244 -64
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +29 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- package/dist/node_modules/echarts/lib/animation/basicTransition.js +70 -0
- package/dist/node_modules/echarts/lib/chart/custom/customSeriesRegister.js +7 -0
- package/dist/node_modules/echarts/lib/chart/helper/createRenderPlanner.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/sectorHelper.js +19 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +112 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +119 -0
- package/dist/node_modules/echarts/lib/chart/pie/install.js +12 -0
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +190 -0
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +72 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +554 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +36 -0
- package/dist/node_modules/echarts/lib/component/axis/axisAction.js +4 -0
- package/dist/node_modules/echarts/lib/component/axis/axisBreakHelper.js +5 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js +57 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js +28 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +174 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +65 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/axisTrigger.js +189 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js +27 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/globalListener.js +56 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/install.js +25 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/modelHelper.js +117 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +103 -0
- package/dist/node_modules/echarts/lib/component/helper/listComponent.js +20 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +184 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +227 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js +45 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +145 -0
- package/dist/node_modules/echarts/lib/component/legend/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendPlain.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendScroll.js +11 -0
- package/dist/node_modules/echarts/lib/component/legend/legendAction.js +38 -0
- package/dist/node_modules/echarts/lib/component/legend/legendFilter.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/scrollableLegendAction.js +15 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js +170 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipModel.js +55 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +102 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +367 -0
- package/dist/node_modules/echarts/lib/component/tooltip/helper.js +37 -0
- package/dist/node_modules/echarts/lib/component/tooltip/install.js +19 -0
- package/dist/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js +56 -0
- package/dist/node_modules/echarts/lib/component/tooltip/tooltipMarkup.js +173 -0
- package/dist/node_modules/echarts/lib/coord/axisBand.js +31 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +21 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +38 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +14 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +31 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +50 -0
- package/dist/node_modules/echarts/lib/core/ExtensionAPI.js +32 -0
- package/dist/node_modules/echarts/lib/core/Scheduler.js +203 -0
- package/dist/node_modules/echarts/lib/core/echarts.js +986 -0
- package/dist/node_modules/echarts/lib/core/impl.js +11 -0
- package/dist/node_modules/echarts/lib/core/lifecycle.js +5 -0
- package/dist/node_modules/echarts/lib/core/locale.js +27 -0
- package/dist/node_modules/echarts/lib/core/task.js +81 -0
- package/dist/node_modules/echarts/lib/data/DataDiffer.js +68 -0
- package/dist/node_modules/echarts/lib/data/DataStore.js +359 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +328 -0
- package/dist/node_modules/echarts/lib/data/SeriesDimensionDefine.js +10 -0
- package/dist/node_modules/echarts/lib/data/Source.js +132 -0
- package/dist/node_modules/echarts/lib/data/helper/SeriesDataSchema.js +80 -0
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +105 -0
- package/dist/node_modules/echarts/lib/data/helper/dataProvider.js +155 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +87 -0
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +50 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +98 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +115 -0
- package/dist/node_modules/echarts/lib/data/helper/transform.js +145 -0
- package/dist/node_modules/echarts/lib/extension.js +62 -0
- package/dist/node_modules/echarts/lib/i18n/langEN.js +148 -0
- package/dist/node_modules/echarts/lib/i18n/langZH.js +148 -0
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +106 -0
- package/dist/node_modules/echarts/lib/label/labelLayoutHelper.js +152 -0
- package/dist/node_modules/echarts/lib/label/labelStyle.js +190 -0
- package/dist/node_modules/echarts/lib/legacy/dataSelectAction.js +53 -0
- package/dist/node_modules/echarts/lib/loading/default.js +85 -0
- package/dist/node_modules/echarts/lib/model/Component.js +64 -0
- package/dist/node_modules/echarts/lib/model/Global.js +320 -0
- package/dist/node_modules/echarts/lib/model/Model.js +50 -0
- package/dist/node_modules/echarts/lib/model/OptionManager.js +78 -0
- package/dist/node_modules/echarts/lib/model/Series.js +216 -0
- package/dist/node_modules/echarts/lib/model/globalDefault.js +94 -0
- package/dist/node_modules/echarts/lib/model/internalComponentCreator.js +14 -0
- package/dist/node_modules/echarts/lib/model/mixin/areaStyle.js +16 -0
- package/dist/node_modules/echarts/lib/model/mixin/dataFormat.js +63 -0
- package/dist/node_modules/echarts/lib/model/mixin/itemStyle.js +24 -0
- package/dist/node_modules/echarts/lib/model/mixin/lineStyle.js +23 -0
- package/dist/node_modules/echarts/lib/model/mixin/makeStyleMapper.js +17 -0
- package/dist/node_modules/echarts/lib/model/mixin/palette.js +32 -0
- package/dist/node_modules/echarts/lib/model/mixin/textStyle.js +36 -0
- package/dist/node_modules/echarts/lib/preprocessor/backwardCompat.js +89 -0
- package/dist/node_modules/echarts/lib/preprocessor/helper/compatStyle.js +118 -0
- package/dist/node_modules/echarts/lib/processor/dataFilter.js +18 -0
- package/dist/node_modules/echarts/lib/processor/dataStack.js +52 -0
- package/dist/node_modules/echarts/lib/processor/negativeDataFilter.js +16 -0
- package/dist/node_modules/echarts/lib/renderer/installCanvasRenderer.js +7 -0
- package/dist/node_modules/echarts/lib/scale/break.js +9 -0
- package/dist/node_modules/echarts/lib/scale/helper.js +9 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +26 -0
- package/dist/node_modules/echarts/lib/theme/dark.js +159 -0
- package/dist/node_modules/echarts/lib/util/ECEventProcessor.js +52 -0
- package/dist/node_modules/echarts/lib/util/clazz.js +99 -0
- package/dist/node_modules/echarts/lib/util/component.js +75 -0
- package/dist/node_modules/echarts/lib/util/cycleCache.js +14 -0
- package/dist/node_modules/echarts/lib/util/decal.js +162 -0
- package/dist/node_modules/echarts/lib/util/event.js +7 -0
- package/dist/node_modules/echarts/lib/util/format.js +87 -0
- package/dist/node_modules/echarts/lib/util/graphic.js +361 -0
- package/dist/node_modules/echarts/lib/util/innerStore.js +13 -0
- package/dist/node_modules/echarts/lib/util/layout.js +174 -0
- package/dist/node_modules/echarts/lib/util/log.js +54 -0
- package/dist/node_modules/echarts/lib/util/model.js +296 -0
- package/dist/node_modules/echarts/lib/util/number.js +132 -0
- package/dist/node_modules/echarts/lib/util/states.js +323 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +146 -0
- package/dist/node_modules/echarts/lib/util/throttle.js +37 -0
- package/dist/node_modules/echarts/lib/util/time.js +43 -0
- package/dist/node_modules/echarts/lib/util/types.js +13 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +81 -0
- package/dist/node_modules/echarts/lib/view/Component.js +16 -0
- package/dist/node_modules/echarts/lib/visual/LegendVisualProvider.js +18 -0
- package/dist/node_modules/echarts/lib/visual/decal.js +25 -0
- package/dist/node_modules/echarts/lib/visual/helper.js +23 -0
- package/dist/node_modules/echarts/lib/visual/style.js +79 -0
- package/dist/node_modules/echarts/lib/visual/symbol.js +47 -0
- package/dist/node_modules/echarts/lib/visual/tokens.js +108 -0
- package/dist/node_modules/echarts/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/node_modules/zrender/lib/Element.js +442 -0
- package/dist/node_modules/zrender/lib/Handler.js +167 -0
- package/dist/node_modules/zrender/lib/Storage.js +68 -0
- package/dist/node_modules/zrender/lib/animation/Animation.js +65 -0
- package/dist/node_modules/zrender/lib/animation/Animator.js +348 -0
- package/dist/node_modules/zrender/lib/animation/Clip.js +31 -0
- package/dist/node_modules/zrender/lib/animation/cubicEasing.js +17 -0
- package/dist/node_modules/zrender/lib/animation/easing.js +104 -0
- package/dist/node_modules/zrender/lib/animation/requestAnimationFrame.js +7 -0
- package/dist/node_modules/zrender/lib/canvas/Layer.js +135 -0
- package/dist/node_modules/zrender/lib/canvas/Painter.js +352 -0
- package/dist/node_modules/zrender/lib/canvas/dashStyle.js +17 -0
- package/dist/node_modules/zrender/lib/canvas/graphic.js +199 -0
- package/dist/node_modules/zrender/lib/canvas/helper.js +33 -0
- package/dist/node_modules/zrender/lib/config.js +7 -0
- package/dist/node_modules/zrender/lib/contain/arc.js +20 -0
- package/dist/node_modules/zrender/lib/contain/cubic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/line.js +12 -0
- package/dist/node_modules/zrender/lib/contain/path.js +133 -0
- package/dist/node_modules/zrender/lib/contain/quadratic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/text.js +106 -0
- package/dist/node_modules/zrender/lib/contain/util.js +7 -0
- package/dist/node_modules/zrender/lib/contain/windingLine.js +10 -0
- package/dist/node_modules/zrender/lib/core/BoundingRect.js +111 -0
- package/dist/node_modules/zrender/lib/core/Eventful.js +82 -0
- package/dist/node_modules/zrender/lib/core/GestureMgr.js +56 -0
- package/dist/node_modules/zrender/lib/core/LRU.js +49 -0
- package/dist/node_modules/zrender/lib/core/OrientedBoundingRect.js +41 -0
- package/dist/node_modules/zrender/lib/core/PathProxy.js +288 -0
- package/dist/node_modules/zrender/lib/core/Point.js +72 -0
- package/dist/node_modules/zrender/lib/core/Transformable.js +96 -0
- package/dist/node_modules/zrender/lib/core/WeakMap.js +25 -0
- package/dist/node_modules/zrender/lib/core/bbox.js +40 -0
- package/dist/node_modules/zrender/lib/core/curve.js +142 -0
- package/dist/node_modules/zrender/lib/core/dom.js +74 -0
- package/dist/node_modules/zrender/lib/core/env.js +22 -0
- package/dist/node_modules/zrender/lib/core/event.js +58 -0
- package/dist/node_modules/zrender/lib/core/fourPointsTransform.js +109 -0
- package/dist/node_modules/zrender/lib/core/matrix.js +39 -0
- package/dist/node_modules/zrender/lib/core/platform.js +42 -0
- package/dist/node_modules/zrender/lib/core/timsort.js +246 -0
- package/dist/node_modules/zrender/lib/core/util.js +314 -0
- package/dist/node_modules/zrender/lib/core/vector.js +52 -0
- package/dist/node_modules/zrender/lib/dom/HandlerProxy.js +190 -0
- package/dist/node_modules/zrender/lib/graphic/CompoundPath.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/Displayable.js +133 -0
- package/dist/node_modules/zrender/lib/graphic/Gradient.js +14 -0
- package/dist/node_modules/zrender/lib/graphic/Group.js +86 -0
- package/dist/node_modules/zrender/lib/graphic/Image.js +49 -0
- package/dist/node_modules/zrender/lib/graphic/IncrementalDisplayable.js +65 -0
- package/dist/node_modules/zrender/lib/graphic/LinearGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/Path.js +200 -0
- package/dist/node_modules/zrender/lib/graphic/RadialGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/Text.js +216 -0
- package/dist/node_modules/zrender/lib/graphic/helper/image.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +226 -0
- package/dist/node_modules/zrender/lib/graphic/helper/poly.js +21 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundRect.js +9 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundSector.js +85 -0
- package/dist/node_modules/zrender/lib/graphic/helper/smoothBezier.js +26 -0
- package/dist/node_modules/zrender/lib/graphic/helper/subPixelOptimize.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Arc.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/BezierCurve.js +40 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Circle.js +22 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ellipse.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Line.js +37 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polygon.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polyline.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Rect.js +31 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ring.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Sector.js +25 -0
- package/dist/node_modules/zrender/lib/mixin/Draggable.js +28 -0
- package/dist/node_modules/zrender/lib/svg/helper.js +19 -0
- package/dist/node_modules/zrender/lib/tool/color.js +1039 -0
- package/dist/node_modules/zrender/lib/tool/path.js +153 -0
- package/dist/node_modules/zrender/lib/tool/transformPath.js +41 -0
- package/dist/node_modules/zrender/lib/zrender.js +124 -0
- package/dist/node_modules/zrender/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/react-bridge/table.d.ts.map +1 -1
- package/dist/react-bridge/table.js +36 -21
- package/dist/react.d.ts +8 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +58 -46
- package/dist/shared/base-element.d.ts +1 -0
- package/dist/shared/base-element.d.ts.map +1 -1
- package/dist/shared/base-element.js +6 -0
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +15 -0
- package/package.json +15 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { bind as e, clone as t, curry as n, each as r, isArray as i, isObject as a } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { makeInner as o } from "../../util/model.js";
|
|
3
|
+
import s from "../../../../zrender/lib/graphic/Group.js";
|
|
4
|
+
import c from "../../../../zrender/lib/graphic/Text.js";
|
|
5
|
+
import { updateProps as l } from "../../animation/basicTransition.js";
|
|
6
|
+
import { createIcon as u, graphic_exports as d } from "../../util/graphic.js";
|
|
7
|
+
import { getAxisInfo as f } from "./modelHelper.js";
|
|
8
|
+
import { stop as p } from "../../../../zrender/lib/core/event.js";
|
|
9
|
+
import { clear as m, createOrUpdate as h } from "../../util/throttle.js";
|
|
10
|
+
import { calcBandWidth as g } from "../../coord/axisBand.js";
|
|
11
|
+
//#region node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js
|
|
12
|
+
var _ = o(), v = t, y = e, b = function() {
|
|
13
|
+
function e() {
|
|
14
|
+
this._dragging = !1, this.animationThreshold = 15;
|
|
15
|
+
}
|
|
16
|
+
return e.prototype.render = function(e, t, r, i) {
|
|
17
|
+
var a = t.get("value"), o = t.get("status");
|
|
18
|
+
if (this._axisModel = e, this._axisPointerModel = t, this._api = r, !(!i && this._lastValue === a && this._lastStatus === o)) {
|
|
19
|
+
this._lastValue = a, this._lastStatus = o;
|
|
20
|
+
var c = this._group, l = this._handle;
|
|
21
|
+
if (!o || o === "hide") {
|
|
22
|
+
c && c.hide(), l && l.hide();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
c && c.show(), l && l.show();
|
|
26
|
+
var u = {};
|
|
27
|
+
this.makeElOption(u, a, e, t, r);
|
|
28
|
+
var d = u.graphicKey;
|
|
29
|
+
d !== this._lastGraphicKey && this.clear(r), this._lastGraphicKey = d;
|
|
30
|
+
var f = this._moveAnimation = this.determineAnimation(e, t);
|
|
31
|
+
if (!c) c = this._group = new s(), this.createPointerEl(c, u, e, t), this.createLabelEl(c, u, e, t), r.getZr().add(c);
|
|
32
|
+
else {
|
|
33
|
+
var p = n(x, t, f);
|
|
34
|
+
this.updatePointerEl(c, u, p), this.updateLabelEl(c, u, p, t);
|
|
35
|
+
}
|
|
36
|
+
T(c, t, !0), this._renderHandle(a);
|
|
37
|
+
}
|
|
38
|
+
}, e.prototype.remove = function(e) {
|
|
39
|
+
this.clear(e);
|
|
40
|
+
}, e.prototype.dispose = function(e) {
|
|
41
|
+
this.clear(e);
|
|
42
|
+
}, e.prototype.determineAnimation = function(e, t) {
|
|
43
|
+
var n = t.get("animation"), r = e.axis, i = r.type === "category", a = t.get("snap");
|
|
44
|
+
if (!a && !i) return !1;
|
|
45
|
+
if (n === "auto" || n == null) {
|
|
46
|
+
var o = this.animationThreshold;
|
|
47
|
+
if (i && g(r).w > o) return !0;
|
|
48
|
+
if (a) {
|
|
49
|
+
var s = f(e).seriesDataCount, c = r.getExtent();
|
|
50
|
+
return Math.abs(c[0] - c[1]) / s > o;
|
|
51
|
+
}
|
|
52
|
+
return !1;
|
|
53
|
+
}
|
|
54
|
+
return n === !0;
|
|
55
|
+
}, e.prototype.makeElOption = function(e, t, n, r, i) {}, e.prototype.createPointerEl = function(e, t, n, r) {
|
|
56
|
+
var i = t.pointer;
|
|
57
|
+
if (i) {
|
|
58
|
+
var a = _(e).pointerEl = new d[i.type](v(t.pointer));
|
|
59
|
+
e.add(a);
|
|
60
|
+
}
|
|
61
|
+
}, e.prototype.createLabelEl = function(e, t, n, r) {
|
|
62
|
+
if (t.label) {
|
|
63
|
+
var i = _(e).labelEl = new c(v(t.label));
|
|
64
|
+
e.add(i), C(i, r);
|
|
65
|
+
}
|
|
66
|
+
}, e.prototype.updatePointerEl = function(e, t, n) {
|
|
67
|
+
var r = _(e).pointerEl;
|
|
68
|
+
r && t.pointer && (r.setStyle(t.pointer.style), n(r, { shape: t.pointer.shape }));
|
|
69
|
+
}, e.prototype.updateLabelEl = function(e, t, n, r) {
|
|
70
|
+
var i = _(e).labelEl;
|
|
71
|
+
i && (i.setStyle(t.label.style), n(i, {
|
|
72
|
+
x: t.label.x,
|
|
73
|
+
y: t.label.y
|
|
74
|
+
}), C(i, r));
|
|
75
|
+
}, e.prototype._renderHandle = function(e) {
|
|
76
|
+
if (!(this._dragging || !this.updateHandleTransform)) {
|
|
77
|
+
var t = this._axisPointerModel, n = this._api.getZr(), r = this._handle, a = t.getModel("handle"), o = t.get("status");
|
|
78
|
+
if (!a.get("show") || !o || o === "hide") {
|
|
79
|
+
r && n.remove(r), this._handle = null;
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
var s;
|
|
83
|
+
this._handle || (s = !0, r = this._handle = u(a.get("icon"), {
|
|
84
|
+
cursor: "move",
|
|
85
|
+
draggable: !0,
|
|
86
|
+
onmousemove: function(e) {
|
|
87
|
+
p(e.event);
|
|
88
|
+
},
|
|
89
|
+
onmousedown: y(this._onHandleDragMove, this, 0, 0),
|
|
90
|
+
drift: y(this._onHandleDragMove, this),
|
|
91
|
+
ondragend: y(this._onHandleDragEnd, this)
|
|
92
|
+
}), n.add(r)), T(r, t, !1), r.setStyle(a.getItemStyle(null, [
|
|
93
|
+
"color",
|
|
94
|
+
"borderColor",
|
|
95
|
+
"borderWidth",
|
|
96
|
+
"opacity",
|
|
97
|
+
"shadowColor",
|
|
98
|
+
"shadowBlur",
|
|
99
|
+
"shadowOffsetX",
|
|
100
|
+
"shadowOffsetY"
|
|
101
|
+
]));
|
|
102
|
+
var c = a.get("size");
|
|
103
|
+
i(c) || (c = [c, c]), r.scaleX = c[0] / 2, r.scaleY = c[1] / 2, h(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
|
|
104
|
+
}
|
|
105
|
+
}, e.prototype._moveHandleToValue = function(e, t) {
|
|
106
|
+
x(this._axisPointerModel, !t && this._moveAnimation, this._handle, w(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
|
|
107
|
+
}, e.prototype._onHandleDragMove = function(e, t) {
|
|
108
|
+
var n = this._handle;
|
|
109
|
+
if (n) {
|
|
110
|
+
this._dragging = !0;
|
|
111
|
+
var r = this.updateHandleTransform(w(n), [e, t], this._axisModel, this._axisPointerModel);
|
|
112
|
+
this._payloadInfo = r, n.stopAnimation(), n.attr(w(r)), _(n).lastProp = null, this._doDispatchAxisPointer();
|
|
113
|
+
}
|
|
114
|
+
}, e.prototype._doDispatchAxisPointer = function() {
|
|
115
|
+
if (this._handle) {
|
|
116
|
+
var e = this._payloadInfo, t = this._axisModel;
|
|
117
|
+
this._api.dispatchAction({
|
|
118
|
+
type: "updateAxisPointer",
|
|
119
|
+
x: e.cursorPoint[0],
|
|
120
|
+
y: e.cursorPoint[1],
|
|
121
|
+
tooltipOption: e.tooltipOption,
|
|
122
|
+
axesInfo: [{
|
|
123
|
+
axisDim: t.axis.dim,
|
|
124
|
+
axisIndex: t.componentIndex
|
|
125
|
+
}]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}, e.prototype._onHandleDragEnd = function() {
|
|
129
|
+
if (this._dragging = !1, this._handle) {
|
|
130
|
+
var e = this._axisPointerModel.get("value");
|
|
131
|
+
this._moveHandleToValue(e), this._api.dispatchAction({ type: "hideTip" });
|
|
132
|
+
}
|
|
133
|
+
}, e.prototype.clear = function(e) {
|
|
134
|
+
this._lastValue = null, this._lastStatus = null;
|
|
135
|
+
var t = e.getZr(), n = this._group, r = this._handle;
|
|
136
|
+
t && n && (this._lastGraphicKey = null, n && t.remove(n), r && t.remove(r), this._group = null, this._handle = null, this._payloadInfo = null), m(this, "_doDispatchAxisPointer");
|
|
137
|
+
}, e.prototype.doClear = function() {}, e.prototype.buildLabel = function(e, t, n) {
|
|
138
|
+
return n ||= 0, {
|
|
139
|
+
x: e[n],
|
|
140
|
+
y: e[1 - n],
|
|
141
|
+
width: t[n],
|
|
142
|
+
height: t[1 - n]
|
|
143
|
+
};
|
|
144
|
+
}, e;
|
|
145
|
+
}();
|
|
146
|
+
function x(e, t, n, r) {
|
|
147
|
+
S(_(n).lastProp, r) || (_(n).lastProp = r, t ? l(n, r, e) : (n.stopAnimation(), n.attr(r)));
|
|
148
|
+
}
|
|
149
|
+
function S(e, t) {
|
|
150
|
+
if (a(e) && a(t)) {
|
|
151
|
+
var n = !0;
|
|
152
|
+
return r(t, function(t, r) {
|
|
153
|
+
n &&= S(e[r], t);
|
|
154
|
+
}), !!n;
|
|
155
|
+
} else return e === t;
|
|
156
|
+
}
|
|
157
|
+
function C(e, t) {
|
|
158
|
+
e[t.get(["label", "show"]) ? "show" : "hide"]();
|
|
159
|
+
}
|
|
160
|
+
function w(e) {
|
|
161
|
+
return {
|
|
162
|
+
x: e.x || 0,
|
|
163
|
+
y: e.y || 0,
|
|
164
|
+
rotation: e.rotation || 0
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function T(e, t, n) {
|
|
168
|
+
var r = t.get("z"), i = t.get("zlevel");
|
|
169
|
+
e && e.traverse(function(e) {
|
|
170
|
+
e.type !== "group" && (r != null && (e.z = r), i != null && (e.zlevel = i), e.silent = n);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
export { b as default };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { mathMax as e, mathMin as t } from "../../util/number.js";
|
|
2
|
+
import { __extends as n } from "../../../node_modules/tslib/tslib.es6.js";
|
|
3
|
+
import r from "./BaseAxisPointer.js";
|
|
4
|
+
import { buildCartesianSingleLabelElOption as i, buildElStyle as a, calcAxisPointerShadowBandWidth as o, calcAxisPointerShadowEnds as s, getTransformedPosition as c, makeLineShape as l, makeRectShape as u } from "./viewHelper.js";
|
|
5
|
+
import { layout as d } from "../../coord/cartesian/cartesianAxisHelper.js";
|
|
6
|
+
//#region node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js
|
|
7
|
+
var f = function(r) {
|
|
8
|
+
n(o, r);
|
|
9
|
+
function o() {
|
|
10
|
+
return r !== null && r.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
return o.prototype.makeElOption = function(e, t, n, r, o) {
|
|
13
|
+
var s = n.axis, c = s.grid, l = r.get("type"), u = s.getGlobalExtent(), f = p(c, s).getOtherAxis(s).getGlobalExtent(), h = s.toGlobalCoord(s.dataToCoord(t, !0));
|
|
14
|
+
if (l && l !== "none") {
|
|
15
|
+
var g = a(r), _ = m[l](s, h, u, f, r.get("seriesDataIndices"), r.ecModel);
|
|
16
|
+
_.style = g, e.graphicKey = _.type, e.pointer = _;
|
|
17
|
+
}
|
|
18
|
+
i(t, e, d(c.getRect(), n), n, r, o);
|
|
19
|
+
}, o.prototype.getHandleTransform = function(e, t, n) {
|
|
20
|
+
var r = d(t.axis.grid.getRect(), t, { labelInside: !1 });
|
|
21
|
+
r.labelMargin = n.get(["handle", "margin"]);
|
|
22
|
+
var i = c(t.axis, e, r);
|
|
23
|
+
return {
|
|
24
|
+
x: i[0],
|
|
25
|
+
y: i[1],
|
|
26
|
+
rotation: r.rotation + (r.labelDirection < 0 ? Math.PI : 0)
|
|
27
|
+
};
|
|
28
|
+
}, o.prototype.updateHandleTransform = function(n, r, i, a) {
|
|
29
|
+
var o = i.axis, s = o.grid, c = o.getGlobalExtent(!0), l = p(s, o).getOtherAxis(o).getGlobalExtent(), u = o.dim === "x" ? 0 : 1, d = [n.x, n.y];
|
|
30
|
+
d[u] += r[u], d[u] = t(c[1], d[u]), d[u] = e(c[0], d[u]);
|
|
31
|
+
var f = (l[1] + l[0]) / 2, m = [f, f];
|
|
32
|
+
return m[u] = d[u], {
|
|
33
|
+
x: d[0],
|
|
34
|
+
y: d[1],
|
|
35
|
+
rotation: n.rotation,
|
|
36
|
+
cursorPoint: m,
|
|
37
|
+
tooltipOption: [{ verticalAlign: "middle" }, { align: "center" }][u]
|
|
38
|
+
};
|
|
39
|
+
}, o;
|
|
40
|
+
}(r);
|
|
41
|
+
function p(e, t) {
|
|
42
|
+
var n = {};
|
|
43
|
+
return n[t.dim + "AxisIndex"] = t.index, e.getCartesian(n);
|
|
44
|
+
}
|
|
45
|
+
var m = {
|
|
46
|
+
line: function(e, t, n, r) {
|
|
47
|
+
return {
|
|
48
|
+
type: "Line",
|
|
49
|
+
subPixelOptimize: !0,
|
|
50
|
+
shape: l([t, r[0]], [t, r[1]], h(e))
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
shadow: function(e, t, n, r, i, a) {
|
|
54
|
+
var c = o(e, i, a), l = r[1] - r[0], d = s(t, n, c), f = d[0], p = d[1];
|
|
55
|
+
return {
|
|
56
|
+
type: "Rect",
|
|
57
|
+
shape: u([f, r[0]], [p - f, l], h(e))
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function h(e) {
|
|
62
|
+
return e.dim === "x" ? 0 : 1;
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { f as default };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { bind as e, curry as t, each as n, extend as r } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { isNullableNumberFinite as i } from "../../util/number.js";
|
|
3
|
+
import { makeInner as a } from "../../util/model.js";
|
|
4
|
+
import { makeKey as o } from "./modelHelper.js";
|
|
5
|
+
import s from "./findPointFromSeries.js";
|
|
6
|
+
//#region node_modules/echarts/lib/component/axisPointer/axisTrigger.js
|
|
7
|
+
var c = a();
|
|
8
|
+
function l(r, i, a) {
|
|
9
|
+
var o = r.currTrigger, c = [r.x, r.y], l = r, d = r.dispatchAction || e(a.dispatchAction, a), b = i.getComponent("axisPointer").coordSysAxesInfo;
|
|
10
|
+
if (b) {
|
|
11
|
+
y(c) && (c = s({
|
|
12
|
+
seriesIndex: l.seriesIndex,
|
|
13
|
+
dataIndex: l.dataIndex
|
|
14
|
+
}, i).point);
|
|
15
|
+
var x = y(c), S = l.axesInfo, C = b.axesInfo, w = o === "leave" || y(c), T = {}, E = {}, D = {
|
|
16
|
+
list: [],
|
|
17
|
+
map: {}
|
|
18
|
+
}, O = {
|
|
19
|
+
showPointer: t(f, E),
|
|
20
|
+
showTooltip: t(p, D)
|
|
21
|
+
};
|
|
22
|
+
n(b.coordSysMap, function(e, t) {
|
|
23
|
+
var r = x || e.containPoint(c);
|
|
24
|
+
n(b.coordSysAxesInfo[t], function(e, t) {
|
|
25
|
+
var n = e.axis, i = _(S, e);
|
|
26
|
+
if (!w && r && (!S || i)) {
|
|
27
|
+
var a = i && i.value;
|
|
28
|
+
a == null && !x && (a = n.pointToData(c)), a != null && u(e, a, O, !1, T);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
var k = {};
|
|
33
|
+
return n(C, function(e, t) {
|
|
34
|
+
var r = e.linkGroup;
|
|
35
|
+
r && !E[t] && n(r.axesInfo, function(t, n) {
|
|
36
|
+
var i = E[n];
|
|
37
|
+
if (t !== e && i) {
|
|
38
|
+
var a = i.value;
|
|
39
|
+
r.mapper && (a = e.axis.scale.parse(r.mapper(a, v(t), v(e)))), k[e.key] = a;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}), n(k, function(e, t) {
|
|
43
|
+
u(C[t], e, O, !0, T);
|
|
44
|
+
}), m(E, C, T), h(D, c, r, d), g(C, d, a), T;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function u(e, t, n, i, a) {
|
|
48
|
+
var o = e.axis;
|
|
49
|
+
if (!(o.scale.isBlank() || !o.containData(t))) {
|
|
50
|
+
if (!e.involveSeries) {
|
|
51
|
+
n.showPointer(e, t);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
var s = d(t, e), c = s.payloadBatch, l = s.snapToValue;
|
|
55
|
+
c[0] && a.seriesIndex == null && r(a, c[0]), !i && e.snap && o.containData(l) && l != null && (t = l), n.showPointer(e, t, c), n.showTooltip(e, s, l);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function d(e, t) {
|
|
59
|
+
var r = t.axis, a = r.dim, o = e, s = [], c = Number.MAX_VALUE, l = -1;
|
|
60
|
+
return n(t.seriesModels, function(t, u) {
|
|
61
|
+
var d = t.getData().mapDimensionsAll(a), f, p;
|
|
62
|
+
if (t.getAxisTooltipData) {
|
|
63
|
+
var m = t.getAxisTooltipData(d, e, r);
|
|
64
|
+
p = m.dataIndices, f = m.nestestValue;
|
|
65
|
+
} else {
|
|
66
|
+
if (p = t.indicesOfNearest(a, d[0], e, r.type === "category" ? .5 : null), !p.length) return;
|
|
67
|
+
f = t.getData().get(d[0], p[0]);
|
|
68
|
+
}
|
|
69
|
+
if (i(f)) {
|
|
70
|
+
var h = e - f, g = Math.abs(h);
|
|
71
|
+
g <= c && ((g < c || h >= 0 && l < 0) && (c = g, l = h, o = f, s.length = 0), n(p, function(e) {
|
|
72
|
+
s.push({
|
|
73
|
+
seriesIndex: t.seriesIndex,
|
|
74
|
+
dataIndexInside: e,
|
|
75
|
+
dataIndex: t.getData().getRawIndex(e)
|
|
76
|
+
});
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
}), {
|
|
80
|
+
payloadBatch: s,
|
|
81
|
+
snapToValue: o
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function f(e, t, n, r) {
|
|
85
|
+
e[t.key] = {
|
|
86
|
+
value: n,
|
|
87
|
+
payloadBatch: r
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function p(e, t, n, r) {
|
|
91
|
+
var i = n.payloadBatch, a = t.axis, s = a.model, c = t.axisPointerModel;
|
|
92
|
+
if (!(!t.triggerTooltip || !i.length)) {
|
|
93
|
+
var l = t.coordSys.model, u = o(l), d = e.map[u];
|
|
94
|
+
d || (d = e.map[u] = {
|
|
95
|
+
coordSysId: l.id,
|
|
96
|
+
coordSysIndex: l.componentIndex,
|
|
97
|
+
coordSysType: l.type,
|
|
98
|
+
coordSysMainType: l.mainType,
|
|
99
|
+
dataByAxis: []
|
|
100
|
+
}, e.list.push(d)), d.dataByAxis.push({
|
|
101
|
+
axisDim: a.dim,
|
|
102
|
+
axisIndex: s.componentIndex,
|
|
103
|
+
axisType: s.type,
|
|
104
|
+
axisId: s.id,
|
|
105
|
+
value: r,
|
|
106
|
+
valueLabelOpt: {
|
|
107
|
+
precision: c.get(["label", "precision"]),
|
|
108
|
+
formatter: c.get(["label", "formatter"])
|
|
109
|
+
},
|
|
110
|
+
seriesDataIndices: i.slice()
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function m(e, t, r) {
|
|
115
|
+
var i = r.axesInfo = [];
|
|
116
|
+
n(t, function(t, n) {
|
|
117
|
+
var r = t.axisPointerModel.option, a = e[n];
|
|
118
|
+
a ? (!t.useHandle && (r.status = "show"), r.value = a.value, r.seriesDataIndices = (a.payloadBatch || []).slice()) : !t.useHandle && (r.status = "hide"), r.status === "show" && i.push({
|
|
119
|
+
axisDim: t.axis.dim,
|
|
120
|
+
axisIndex: t.axis.model.componentIndex,
|
|
121
|
+
value: r.value
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function h(e, t, n, r) {
|
|
126
|
+
if (y(t) || !e.list.length) {
|
|
127
|
+
r({ type: "hideTip" });
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
var i = ((e.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
|
|
131
|
+
r({
|
|
132
|
+
type: "showTip",
|
|
133
|
+
escapeConnect: !0,
|
|
134
|
+
x: t[0],
|
|
135
|
+
y: t[1],
|
|
136
|
+
tooltipOption: n.tooltipOption,
|
|
137
|
+
position: n.position,
|
|
138
|
+
dataIndexInside: i.dataIndexInside,
|
|
139
|
+
dataIndex: i.dataIndex,
|
|
140
|
+
seriesIndex: i.seriesIndex,
|
|
141
|
+
dataByCoordSys: e.list
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function g(e, t, r) {
|
|
145
|
+
var i = r.getZr(), a = "axisPointerLastHighlights", o = c(i)[a] || {}, s = c(i)[a] = {};
|
|
146
|
+
n(e, function(e, t) {
|
|
147
|
+
var r = e.axisPointerModel.option;
|
|
148
|
+
r.status === "show" && e.triggerEmphasis && n(r.seriesDataIndices, function(e) {
|
|
149
|
+
s[e.seriesIndex + "|" + e.dataIndex] = e;
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
var l = [], u = [];
|
|
153
|
+
function d(e) {
|
|
154
|
+
return {
|
|
155
|
+
seriesIndex: e.seriesIndex,
|
|
156
|
+
dataIndex: e.dataIndex
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
n(o, function(e, t) {
|
|
160
|
+
!s[t] && u.push(d(e));
|
|
161
|
+
}), n(s, function(e, t) {
|
|
162
|
+
!o[t] && l.push(d(e));
|
|
163
|
+
}), u.length && r.dispatchAction({
|
|
164
|
+
type: "downplay",
|
|
165
|
+
escapeConnect: !0,
|
|
166
|
+
notBlur: !0,
|
|
167
|
+
batch: u
|
|
168
|
+
}), l.length && r.dispatchAction({
|
|
169
|
+
type: "highlight",
|
|
170
|
+
escapeConnect: !0,
|
|
171
|
+
notBlur: !0,
|
|
172
|
+
batch: l
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function _(e, t) {
|
|
176
|
+
for (var n = 0; n < (e || []).length; n++) {
|
|
177
|
+
var r = e[n];
|
|
178
|
+
if (t.axis.dim === r.axisDim && t.axis.model.componentIndex === r.axisIndex) return r;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function v(e) {
|
|
182
|
+
var t = e.axis.model, n = {}, r = n.axisDim = e.axis.dim;
|
|
183
|
+
return n.axisIndex = n[r + "AxisIndex"] = t.componentIndex, n.axisName = n[r + "AxisName"] = t.name, n.axisId = n[r + "AxisId"] = t.id, n;
|
|
184
|
+
}
|
|
185
|
+
function y(e) {
|
|
186
|
+
return !e || e[0] == null || isNaN(e[0]) || e[1] == null || isNaN(e[1]);
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
export { l as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isArray as e, map as t } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { queryDataIndex as n } from "../../util/model.js";
|
|
3
|
+
//#region node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js
|
|
4
|
+
function r(r, i) {
|
|
5
|
+
var a = [], o = r.seriesIndex, s;
|
|
6
|
+
if (o == null || !(s = i.getSeriesByIndex(o))) return { point: [] };
|
|
7
|
+
var c = s.getData(), l = n(c, r);
|
|
8
|
+
if (l == null || l < 0 || e(l)) return { point: [] };
|
|
9
|
+
var u = c.getItemGraphicEl(l), d = s.coordinateSystem;
|
|
10
|
+
if (s.getTooltipPosition) a = s.getTooltipPosition(l) || [];
|
|
11
|
+
else if (d && d.dataToPoint) if (r.isStacked) {
|
|
12
|
+
var f = d.getBaseAxis(), p = d.getOtherAxis(f).dim, m = f.dim, h = +(p === "x" || p === "radius"), g = c.mapDimension(m), _ = [];
|
|
13
|
+
_[h] = c.get(g, l), _[1 - h] = c.get(c.getCalculationInfo("stackResultDimension"), l), a = d.dataToPoint(_) || [];
|
|
14
|
+
} else a = d.dataToPoint(c.getValues(t(d.dimensions, function(e) {
|
|
15
|
+
return c.mapDimension(e);
|
|
16
|
+
}), l)) || [];
|
|
17
|
+
else if (u) {
|
|
18
|
+
var v = u.getBoundingRect().clone();
|
|
19
|
+
v.applyTransform(u.transform), a = [v.x + v.width / 2, v.y + v.height / 2];
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
point: a,
|
|
23
|
+
el: u
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { r as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { curry as e, each as t } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import n from "../../../../zrender/lib/core/env.js";
|
|
3
|
+
import { makeInner as r } from "../../util/model.js";
|
|
4
|
+
//#region node_modules/echarts/lib/component/axisPointer/globalListener.js
|
|
5
|
+
var i = r(), a = t;
|
|
6
|
+
function o(e, t, r) {
|
|
7
|
+
if (!n.node) {
|
|
8
|
+
var a = t.getZr();
|
|
9
|
+
i(a).records || (i(a).records = {}), s(a, t);
|
|
10
|
+
var o = i(a).records[e] || (i(a).records[e] = {});
|
|
11
|
+
o.handler = r;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function s(t, n) {
|
|
15
|
+
if (i(t).initialized) return;
|
|
16
|
+
i(t).initialized = !0, r("click", e(u, "click")), r("mousemove", e(u, "mousemove")), r("mousewheel", e(u, "mousewheel")), r("globalout", l);
|
|
17
|
+
function r(e, r) {
|
|
18
|
+
t.on(e, function(e) {
|
|
19
|
+
var o = d(n);
|
|
20
|
+
a(i(t).records, function(t) {
|
|
21
|
+
t && r(t, e, o.dispatchAction);
|
|
22
|
+
}), c(o.pendings, n);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function c(e, t) {
|
|
27
|
+
var n = e.showTip.length, r = e.hideTip.length, i;
|
|
28
|
+
n ? i = e.showTip[n - 1] : r && (i = e.hideTip[r - 1]), i && (i.dispatchAction = null, t.dispatchAction(i));
|
|
29
|
+
}
|
|
30
|
+
function l(e, t, n) {
|
|
31
|
+
e.handler("leave", null, n);
|
|
32
|
+
}
|
|
33
|
+
function u(e, t, n, r) {
|
|
34
|
+
t.handler(e, n, r);
|
|
35
|
+
}
|
|
36
|
+
function d(e) {
|
|
37
|
+
var t = {
|
|
38
|
+
showTip: [],
|
|
39
|
+
hideTip: []
|
|
40
|
+
}, n = function(r) {
|
|
41
|
+
var i = t[r.type];
|
|
42
|
+
i ? i.push(r) : (r.dispatchAction = n, e.dispatchAction(r));
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
dispatchAction: n,
|
|
46
|
+
pendings: t
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function f(e, t) {
|
|
50
|
+
if (!n.node) {
|
|
51
|
+
var r = t.getZr();
|
|
52
|
+
(i(r).records || {})[e] && (i(r).records[e] = null);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { o as register, f as unregister };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isArray as e } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { collect as t } from "./modelHelper.js";
|
|
3
|
+
import n from "../axis/AxisView.js";
|
|
4
|
+
import r from "./CartesianAxisPointer.js";
|
|
5
|
+
import i from "./AxisPointerModel.js";
|
|
6
|
+
import a from "./AxisPointerView.js";
|
|
7
|
+
import o from "./axisTrigger.js";
|
|
8
|
+
//#region node_modules/echarts/lib/component/axisPointer/install.js
|
|
9
|
+
function s(s) {
|
|
10
|
+
n.registerAxisPointerClass("CartesianAxisPointer", r), s.registerComponentModel(i), s.registerComponentView(a), s.registerPreprocessor(function(t) {
|
|
11
|
+
if (t) {
|
|
12
|
+
(!t.axisPointer || t.axisPointer.length === 0) && (t.axisPointer = {});
|
|
13
|
+
var n = t.axisPointer.link;
|
|
14
|
+
n && !e(n) && (t.axisPointer.link = [n]);
|
|
15
|
+
}
|
|
16
|
+
}), s.registerProcessor(s.PRIORITY.PROCESSOR.STATISTIC, { overallReset: function(e, n) {
|
|
17
|
+
e.getComponent("axisPointer").coordSysAxesInfo = t(e, n);
|
|
18
|
+
} }), s.registerAction({
|
|
19
|
+
type: "updateAxisPointer",
|
|
20
|
+
event: "updateAxisPointer",
|
|
21
|
+
update: ":updateAxisPointer"
|
|
22
|
+
}, o);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { s as install };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { clone as e, curry as t, defaults as n, each as r, indexOf as i, isArray as a } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import o from "../../model/Model.js";
|
|
3
|
+
//#region node_modules/echarts/lib/component/axisPointer/modelHelper.js
|
|
4
|
+
function s(e, t) {
|
|
5
|
+
var n = {
|
|
6
|
+
axesInfo: {},
|
|
7
|
+
seriesInvolved: !1,
|
|
8
|
+
coordSysAxesInfo: {},
|
|
9
|
+
coordSysMap: {}
|
|
10
|
+
};
|
|
11
|
+
return c(n, e, t), n.seriesInvolved && u(n, e), n;
|
|
12
|
+
}
|
|
13
|
+
function c(e, n, i) {
|
|
14
|
+
var a = n.getComponent("tooltip"), o = n.getComponent("axisPointer"), s = o.get("link", !0) || [], c = [];
|
|
15
|
+
r(i.getCoordinateSystems(), function(i) {
|
|
16
|
+
if (!i.axisPointerEnabled) return;
|
|
17
|
+
var u = _(i.model), f = e.coordSysAxesInfo[u] = {};
|
|
18
|
+
e.coordSysMap[u] = i;
|
|
19
|
+
var p = i.model.getModel("tooltip", a);
|
|
20
|
+
if (r(i.getAxes(), t(y, !1, null)), i.getTooltipAxes && a && p.get("show")) {
|
|
21
|
+
var m = p.get("trigger") === "axis", h = p.get(["axisPointer", "type"]) === "cross", v = i.getTooltipAxes(p.get(["axisPointer", "axis"]));
|
|
22
|
+
(m || h) && r(v.baseAxes, t(y, h ? "cross" : !0, m)), h && r(v.otherAxes, t(y, "cross", !1));
|
|
23
|
+
}
|
|
24
|
+
function y(t, r, a) {
|
|
25
|
+
var u = a.model.getModel("axisPointer", o), m = u.get("show");
|
|
26
|
+
if (!(!m || m === "auto" && !t && !g(u))) {
|
|
27
|
+
r ??= u.get("triggerTooltip"), u = t ? l(a, p, o, n, t, r) : u;
|
|
28
|
+
var h = u.get("snap"), v = u.get("triggerEmphasis"), y = _(a.model), b = r || h || a.type === "category", x = e.axesInfo[y] = {
|
|
29
|
+
key: y,
|
|
30
|
+
axis: a,
|
|
31
|
+
coordSys: i,
|
|
32
|
+
axisPointerModel: u,
|
|
33
|
+
triggerTooltip: r,
|
|
34
|
+
triggerEmphasis: v,
|
|
35
|
+
involveSeries: b,
|
|
36
|
+
snap: h,
|
|
37
|
+
useHandle: g(u),
|
|
38
|
+
seriesModels: [],
|
|
39
|
+
linkGroup: null
|
|
40
|
+
};
|
|
41
|
+
f[y] = x, e.seriesInvolved = e.seriesInvolved || b;
|
|
42
|
+
var S = d(s, a);
|
|
43
|
+
if (S != null) {
|
|
44
|
+
var C = c[S] || (c[S] = { axesInfo: {} });
|
|
45
|
+
C.axesInfo[y] = x, C.mapper = s[S].mapper, x.linkGroup = C;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function l(t, i, a, s, c, l) {
|
|
52
|
+
var u = i.getModel("axisPointer"), d = [
|
|
53
|
+
"type",
|
|
54
|
+
"snap",
|
|
55
|
+
"lineStyle",
|
|
56
|
+
"shadowStyle",
|
|
57
|
+
"label",
|
|
58
|
+
"animation",
|
|
59
|
+
"animationDurationUpdate",
|
|
60
|
+
"animationEasingUpdate",
|
|
61
|
+
"z"
|
|
62
|
+
], f = {};
|
|
63
|
+
r(d, function(t) {
|
|
64
|
+
f[t] = e(u.get(t));
|
|
65
|
+
}), f.snap = t.type !== "category" && !!l, u.get("type") === "cross" && (f.type = "line");
|
|
66
|
+
var p = f.label ||= {};
|
|
67
|
+
if (p.show ??= !1, c === "cross" && (p.show = u.get(["label", "show"]) ?? !0, !l)) {
|
|
68
|
+
var m = f.lineStyle = u.get("crossStyle");
|
|
69
|
+
m && n(p, m.textStyle);
|
|
70
|
+
}
|
|
71
|
+
return t.model.getModel("axisPointer", new o(f, a, s));
|
|
72
|
+
}
|
|
73
|
+
function u(e, t) {
|
|
74
|
+
t.eachSeries(function(t) {
|
|
75
|
+
var n = t.coordinateSystem, i = t.get(["tooltip", "trigger"], !0), a = t.get(["tooltip", "show"], !0);
|
|
76
|
+
!n || !n.model || i === "none" || i === !1 || i === "item" || a === !1 || t.get(["axisPointer", "show"], !0) === !1 || r(e.coordSysAxesInfo[_(n.model)], function(e) {
|
|
77
|
+
var r = e.axis;
|
|
78
|
+
n.getAxis(r.dim) === r && (e.seriesModels.push(t), e.seriesDataCount ??= 0, e.seriesDataCount += t.getData().count());
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function d(e, t) {
|
|
83
|
+
for (var n = t.model, r = t.dim, i = 0; i < e.length; i++) {
|
|
84
|
+
var a = e[i] || {};
|
|
85
|
+
if (f(a[r + "AxisId"], n.id) || f(a[r + "AxisIndex"], n.componentIndex) || f(a[r + "AxisName"], n.name)) return i;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function f(e, t) {
|
|
89
|
+
return e === "all" || a(e) && i(e, t) >= 0 || e === t;
|
|
90
|
+
}
|
|
91
|
+
function p(e) {
|
|
92
|
+
var t = m(e);
|
|
93
|
+
if (t) {
|
|
94
|
+
var n = t.axisPointerModel, r = t.axis.scale, i = n.option, a = n.get("status"), o = n.get("value");
|
|
95
|
+
o != null && (o = r.parse(o));
|
|
96
|
+
var s = g(n);
|
|
97
|
+
a ?? (i.status = s ? "show" : "hide");
|
|
98
|
+
var c = r.getExtent();
|
|
99
|
+
(o == null || o > c[1]) && (o = c[1]), o < c[0] && (o = c[0]), i.value = o, s && (i.status = t.axis.scale.isBlank() ? "hide" : "show");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function m(e) {
|
|
103
|
+
var t = (e.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
|
|
104
|
+
return t && t.axesInfo[_(e)];
|
|
105
|
+
}
|
|
106
|
+
function h(e) {
|
|
107
|
+
var t = m(e);
|
|
108
|
+
return t && t.axisPointerModel;
|
|
109
|
+
}
|
|
110
|
+
function g(e) {
|
|
111
|
+
return !!e.get(["handle", "show"]);
|
|
112
|
+
}
|
|
113
|
+
function _(e) {
|
|
114
|
+
return e.type + "||" + e.id;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { s as collect, p as fixValue, m as getAxisInfo, h as getAxisPointerModel, _ as makeKey };
|