reke-ui 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1873 -499
- 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 +90 -0
- package/dist/components/reke-combobox/reke-combobox.d.ts.map +1 -0
- package/dist/components/reke-combobox/reke-combobox.js +206 -0
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts +2 -0
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts.map +1 -0
- package/dist/components/reke-combobox/reke-combobox.styles.js +290 -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 +12 -0
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +45 -7
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +28 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -11
- 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 +17 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +73 -52
- 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 +18 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { each as e, isFunction as t, isString as n, map as r } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { mathMax as i, mathMin as a } from "../../util/number.js";
|
|
3
|
+
import { create as o, rotate as s, translate as c } from "../../../../zrender/lib/core/matrix.js";
|
|
4
|
+
import { getBoundingRect as l } from "../../../../zrender/lib/contain/text.js";
|
|
5
|
+
import { applyTransform as u } from "../../util/graphic.js";
|
|
6
|
+
import { createTextStyle as d } from "../../label/labelStyle.js";
|
|
7
|
+
import { normalizeCssArray as f } from "../../util/format.js";
|
|
8
|
+
import { calcBandWidth as p } from "../../coord/axisBand.js";
|
|
9
|
+
import { getAxisRawValue as m } from "../../coord/axisHelper.js";
|
|
10
|
+
import h from "../axis/AxisBuilder.js";
|
|
11
|
+
//#region node_modules/echarts/lib/component/axisPointer/viewHelper.js
|
|
12
|
+
function g(e) {
|
|
13
|
+
var t = e.get("type"), n = e.getModel(t + "Style"), r;
|
|
14
|
+
return t === "line" ? (r = n.getLineStyle(), r.fill = null) : t === "shadow" && (r = n.getAreaStyle(), r.stroke = null), r;
|
|
15
|
+
}
|
|
16
|
+
function _(e, t, n, r, i) {
|
|
17
|
+
var a = y(n.get("value"), t.axis, t.ecModel, n.get("seriesDataIndices"), {
|
|
18
|
+
precision: n.get(["label", "precision"]),
|
|
19
|
+
formatter: n.get(["label", "formatter"])
|
|
20
|
+
}), o = n.getModel("label"), s = f(o.get("padding") || 0), c = o.getFont(), u = l(a, c), p = i.position, m = u.width + s[1] + s[3], h = u.height + s[0] + s[2], g = i.align;
|
|
21
|
+
g === "right" && (p[0] -= m), g === "center" && (p[0] -= m / 2);
|
|
22
|
+
var _ = i.verticalAlign;
|
|
23
|
+
_ === "bottom" && (p[1] -= h), _ === "middle" && (p[1] -= h / 2), v(p, m, h, r);
|
|
24
|
+
var b = o.get("backgroundColor");
|
|
25
|
+
(!b || b === "auto") && (b = t.get([
|
|
26
|
+
"axisLine",
|
|
27
|
+
"lineStyle",
|
|
28
|
+
"color"
|
|
29
|
+
])), e.label = {
|
|
30
|
+
x: p[0],
|
|
31
|
+
y: p[1],
|
|
32
|
+
style: d(o, {
|
|
33
|
+
text: a,
|
|
34
|
+
font: c,
|
|
35
|
+
fill: o.getTextColor(),
|
|
36
|
+
padding: s,
|
|
37
|
+
backgroundColor: b
|
|
38
|
+
}),
|
|
39
|
+
z2: 10
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function v(e, t, n, r) {
|
|
43
|
+
var i = r.getWidth(), a = r.getHeight();
|
|
44
|
+
e[0] = Math.min(e[0] + t, i) - t, e[1] = Math.min(e[1] + n, a) - n, e[0] = Math.max(e[0], 0), e[1] = Math.max(e[1], 0);
|
|
45
|
+
}
|
|
46
|
+
function y(r, i, a, o, s) {
|
|
47
|
+
r = i.scale.parse(r);
|
|
48
|
+
var c = i.scale.getLabel({ value: r }, { precision: s.precision }), l = s.formatter;
|
|
49
|
+
if (l) {
|
|
50
|
+
var u = {
|
|
51
|
+
value: m(i, { value: r }),
|
|
52
|
+
axisDimension: i.dim,
|
|
53
|
+
axisIndex: i.index,
|
|
54
|
+
seriesData: []
|
|
55
|
+
};
|
|
56
|
+
e(o, function(e) {
|
|
57
|
+
var t = a.getSeriesByIndex(e.seriesIndex), n = e.dataIndexInside, r = t && t.getDataParams(n);
|
|
58
|
+
r && u.seriesData.push(r);
|
|
59
|
+
}), n(l) ? c = l.replace("{value}", c) : t(l) && (c = l(u));
|
|
60
|
+
}
|
|
61
|
+
return c;
|
|
62
|
+
}
|
|
63
|
+
function b(e, t, n) {
|
|
64
|
+
var r = o();
|
|
65
|
+
return s(r, r, n.rotation), c(r, r, n.position), u([e.dataToCoord(t), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], r);
|
|
66
|
+
}
|
|
67
|
+
function x(e, t, n, r, i, a) {
|
|
68
|
+
var o = h.innerTextLayout(n.rotation, 0, n.labelDirection);
|
|
69
|
+
n.labelMargin = i.get(["label", "margin"]), _(t, r, i, a, {
|
|
70
|
+
position: b(r.axis, e, n),
|
|
71
|
+
align: o.textAlign,
|
|
72
|
+
verticalAlign: o.textVerticalAlign
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function S(e, t, n) {
|
|
76
|
+
return n ||= 0, {
|
|
77
|
+
x1: e[n],
|
|
78
|
+
y1: e[1 - n],
|
|
79
|
+
x2: t[n],
|
|
80
|
+
y2: t[1 - n]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function C(e, t, n) {
|
|
84
|
+
return n ||= 0, {
|
|
85
|
+
x: e[n],
|
|
86
|
+
y: e[1 - n],
|
|
87
|
+
width: t[n],
|
|
88
|
+
height: t[1 - n]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function w(e, t, n) {
|
|
92
|
+
return p(e, {
|
|
93
|
+
fromStat: { sers: r(t, function(e) {
|
|
94
|
+
return n.getSeriesByIndex(e.seriesIndex);
|
|
95
|
+
}) },
|
|
96
|
+
min: 1
|
|
97
|
+
}).w;
|
|
98
|
+
}
|
|
99
|
+
function T(e, t, n) {
|
|
100
|
+
return [i(a(t[0], t[1]), e - n / 2), a(e + n / 2, i(t[0], t[1]))];
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { x as buildCartesianSingleLabelElOption, g as buildElStyle, w as calcAxisPointerShadowBandWidth, T as calcAxisPointerShadowEnds, b as getTransformedPosition, y as getValueLabel, S as makeLineShape, C as makeRectShape };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import e from "../../../../zrender/lib/graphic/shape/Rect.js";
|
|
2
|
+
import { normalizeCssArray as t } from "../../util/format.js";
|
|
3
|
+
//#region node_modules/echarts/lib/component/helper/listComponent.js
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
var i = t(r.get("padding")), a = r.getItemStyle(["color", "opacity"]);
|
|
6
|
+
return a.fill = r.get("backgroundColor"), new e({
|
|
7
|
+
shape: {
|
|
8
|
+
x: n.x - i[3],
|
|
9
|
+
y: n.y - i[0],
|
|
10
|
+
width: n.width + i[1] + i[3],
|
|
11
|
+
height: n.height + i[0] + i[2],
|
|
12
|
+
r: r.get("borderRadius")
|
|
13
|
+
},
|
|
14
|
+
style: a,
|
|
15
|
+
silent: !0,
|
|
16
|
+
z2: -1
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as makeBackground };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { createHashMap as e, each as t, filter as n, indexOf as r, isArray as i, isNumber as a, isString as o, map as s, merge as c } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { isNameSpecified as l } from "../../util/model.js";
|
|
3
|
+
import { __extends as u } from "../../../node_modules/tslib/tslib.es6.js";
|
|
4
|
+
import d from "../../model/Model.js";
|
|
5
|
+
import f from "../../model/Component.js";
|
|
6
|
+
import p from "../../visual/tokens.js";
|
|
7
|
+
//#region node_modules/echarts/lib/component/legend/LegendModel.js
|
|
8
|
+
var m = function(e, t) {
|
|
9
|
+
if (t === "all") return {
|
|
10
|
+
type: "all",
|
|
11
|
+
title: e.getLocaleModel().get([
|
|
12
|
+
"legend",
|
|
13
|
+
"selector",
|
|
14
|
+
"all"
|
|
15
|
+
])
|
|
16
|
+
};
|
|
17
|
+
if (t === "inverse") return {
|
|
18
|
+
type: "inverse",
|
|
19
|
+
title: e.getLocaleModel().get([
|
|
20
|
+
"legend",
|
|
21
|
+
"selector",
|
|
22
|
+
"inverse"
|
|
23
|
+
])
|
|
24
|
+
};
|
|
25
|
+
}, h = function(f) {
|
|
26
|
+
u(h, f);
|
|
27
|
+
function h() {
|
|
28
|
+
var e = f !== null && f.apply(this, arguments) || this;
|
|
29
|
+
return e.type = h.type, e.layoutMode = {
|
|
30
|
+
type: "box",
|
|
31
|
+
ignoreSize: !0
|
|
32
|
+
}, e;
|
|
33
|
+
}
|
|
34
|
+
return h.prototype.init = function(e, t, n) {
|
|
35
|
+
this.mergeDefaultAndTheme(e, n), e.selected = e.selected || {}, this._updateSelector(e);
|
|
36
|
+
}, h.prototype.mergeOption = function(e, t) {
|
|
37
|
+
f.prototype.mergeOption.call(this, e, t), this._updateSelector(e);
|
|
38
|
+
}, h.prototype._updateSelector = function(e) {
|
|
39
|
+
var n = e.selector, r = this.ecModel;
|
|
40
|
+
n === !0 && (n = e.selector = ["all", "inverse"]), i(n) && t(n, function(e, t) {
|
|
41
|
+
o(e) && (e = { type: e }), n[t] = c(e, m(r, e.type));
|
|
42
|
+
});
|
|
43
|
+
}, h.prototype.optionUpdated = function() {
|
|
44
|
+
this._updateData(this.ecModel);
|
|
45
|
+
var e = this._data;
|
|
46
|
+
if (e[0] && this.get("selectedMode") === "single") {
|
|
47
|
+
for (var t = !1, n = 0; n < e.length; n++) {
|
|
48
|
+
var r = e[n].get("name");
|
|
49
|
+
if (this.isSelected(r)) {
|
|
50
|
+
this.select(r), t = !0;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
!t && this.select(e[0].get("name"));
|
|
55
|
+
}
|
|
56
|
+
}, h.prototype._updateData = function(t) {
|
|
57
|
+
var r = [], i = [];
|
|
58
|
+
t.eachRawSeries(function(e) {
|
|
59
|
+
var n = e.name;
|
|
60
|
+
i.push(n);
|
|
61
|
+
var a;
|
|
62
|
+
if (e.legendVisualProvider) {
|
|
63
|
+
var o = e.legendVisualProvider.getAllNames();
|
|
64
|
+
t.isSeriesFiltered(e) || (i = i.concat(o)), o.length ? r = r.concat(o) : a = !0;
|
|
65
|
+
} else a = !0;
|
|
66
|
+
a && l(e) && r.push(e.name);
|
|
67
|
+
}), this._availableNames = i;
|
|
68
|
+
var c = this.get("data") || r, u = e(), f = s(c, function(e) {
|
|
69
|
+
return (o(e) || a(e)) && (e = { name: e }), u.get(e.name) ? null : (u.set(e.name, !0), new d(e, this, this.ecModel));
|
|
70
|
+
}, this);
|
|
71
|
+
this._data = n(f, function(e) {
|
|
72
|
+
return !!e;
|
|
73
|
+
});
|
|
74
|
+
}, h.prototype.getData = function() {
|
|
75
|
+
return this._data;
|
|
76
|
+
}, h.prototype.select = function(e) {
|
|
77
|
+
var n = this.option.selected;
|
|
78
|
+
if (this.get("selectedMode") === "single") {
|
|
79
|
+
var r = this._data;
|
|
80
|
+
t(r, function(e) {
|
|
81
|
+
n[e.get("name")] = !1;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
n[e] = !0;
|
|
85
|
+
}, h.prototype.unSelect = function(e) {
|
|
86
|
+
this.get("selectedMode") !== "single" && (this.option.selected[e] = !1);
|
|
87
|
+
}, h.prototype.toggleSelected = function(e) {
|
|
88
|
+
var t = this.option.selected;
|
|
89
|
+
t.hasOwnProperty(e) || (t[e] = !0), this[t[e] ? "unSelect" : "select"](e);
|
|
90
|
+
}, h.prototype.allSelect = function() {
|
|
91
|
+
var e = this._data, n = this.option.selected;
|
|
92
|
+
t(e, function(e) {
|
|
93
|
+
n[e.get("name", !0)] = !0;
|
|
94
|
+
});
|
|
95
|
+
}, h.prototype.inverseSelect = function() {
|
|
96
|
+
var e = this._data, n = this.option.selected;
|
|
97
|
+
t(e, function(e) {
|
|
98
|
+
var t = e.get("name", !0);
|
|
99
|
+
n.hasOwnProperty(t) || (n[t] = !0), n[t] = !n[t];
|
|
100
|
+
});
|
|
101
|
+
}, h.prototype.isSelected = function(e) {
|
|
102
|
+
var t = this.option.selected;
|
|
103
|
+
return !(t.hasOwnProperty(e) && !t[e]) && r(this._availableNames, e) >= 0;
|
|
104
|
+
}, h.prototype.getOrient = function() {
|
|
105
|
+
return this.get("orient") === "vertical" ? {
|
|
106
|
+
index: 1,
|
|
107
|
+
name: "vertical"
|
|
108
|
+
} : {
|
|
109
|
+
index: 0,
|
|
110
|
+
name: "horizontal"
|
|
111
|
+
};
|
|
112
|
+
}, h.type = "legend.plain", h.dependencies = ["series"], h.defaultOption = {
|
|
113
|
+
z: 4,
|
|
114
|
+
show: !0,
|
|
115
|
+
orient: "horizontal",
|
|
116
|
+
left: "center",
|
|
117
|
+
bottom: p.size.m,
|
|
118
|
+
align: "auto",
|
|
119
|
+
backgroundColor: p.color.transparent,
|
|
120
|
+
borderColor: p.color.border,
|
|
121
|
+
borderRadius: 0,
|
|
122
|
+
borderWidth: 0,
|
|
123
|
+
padding: 5,
|
|
124
|
+
itemGap: 8,
|
|
125
|
+
itemWidth: 25,
|
|
126
|
+
itemHeight: 14,
|
|
127
|
+
symbolRotate: "inherit",
|
|
128
|
+
symbolKeepAspect: !0,
|
|
129
|
+
inactiveColor: p.color.disabled,
|
|
130
|
+
inactiveBorderColor: p.color.disabled,
|
|
131
|
+
inactiveBorderWidth: "auto",
|
|
132
|
+
itemStyle: {
|
|
133
|
+
color: "inherit",
|
|
134
|
+
opacity: "inherit",
|
|
135
|
+
borderColor: "inherit",
|
|
136
|
+
borderWidth: "auto",
|
|
137
|
+
borderCap: "inherit",
|
|
138
|
+
borderJoin: "inherit",
|
|
139
|
+
borderDashOffset: "inherit",
|
|
140
|
+
borderMiterLimit: "inherit"
|
|
141
|
+
},
|
|
142
|
+
lineStyle: {
|
|
143
|
+
width: "auto",
|
|
144
|
+
color: "inherit",
|
|
145
|
+
inactiveColor: p.color.disabled,
|
|
146
|
+
inactiveWidth: 2,
|
|
147
|
+
opacity: "inherit",
|
|
148
|
+
type: "inherit",
|
|
149
|
+
cap: "inherit",
|
|
150
|
+
join: "inherit",
|
|
151
|
+
dashOffset: "inherit",
|
|
152
|
+
miterLimit: "inherit"
|
|
153
|
+
},
|
|
154
|
+
textStyle: { color: p.color.secondary },
|
|
155
|
+
selectedMode: !0,
|
|
156
|
+
selector: !1,
|
|
157
|
+
selectorLabel: {
|
|
158
|
+
show: !0,
|
|
159
|
+
borderRadius: 10,
|
|
160
|
+
padding: [
|
|
161
|
+
3,
|
|
162
|
+
5,
|
|
163
|
+
3,
|
|
164
|
+
5
|
|
165
|
+
],
|
|
166
|
+
fontSize: 12,
|
|
167
|
+
fontFamily: "sans-serif",
|
|
168
|
+
color: p.color.tertiary,
|
|
169
|
+
borderWidth: 1,
|
|
170
|
+
borderColor: p.color.border
|
|
171
|
+
},
|
|
172
|
+
emphasis: { selectorLabel: {
|
|
173
|
+
show: !0,
|
|
174
|
+
color: p.color.quaternary
|
|
175
|
+
} },
|
|
176
|
+
selectorPosition: "auto",
|
|
177
|
+
selectorItemGap: 7,
|
|
178
|
+
selectorButtonGap: 10,
|
|
179
|
+
tooltip: { show: !1 },
|
|
180
|
+
triggerEvent: !1
|
|
181
|
+
}, h;
|
|
182
|
+
}(f);
|
|
183
|
+
//#endregion
|
|
184
|
+
export { h as default };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { createHashMap as e, curry as t, defaults as n, each as r, extend as i, isFunction as a, isString as o } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { __extends as s } from "../../../node_modules/tslib/tslib.es6.js";
|
|
3
|
+
import { parse as c, stringify as l } from "../../../../zrender/lib/tool/color.js";
|
|
4
|
+
import u from "../../../../zrender/lib/graphic/Group.js";
|
|
5
|
+
import d from "../../../../zrender/lib/graphic/shape/Rect.js";
|
|
6
|
+
import f from "../../../../zrender/lib/graphic/Text.js";
|
|
7
|
+
import { getECData as p } from "../../util/innerStore.js";
|
|
8
|
+
import { setTooltipConfig as m } from "../../util/graphic.js";
|
|
9
|
+
import { enableHoverEmphasis as h } from "../../util/states.js";
|
|
10
|
+
import { createTextStyle as g, setLabelStyle as _ } from "../../label/labelStyle.js";
|
|
11
|
+
import { box as v, createBoxLayoutReference as y, getLayoutRect as b } from "../../util/layout.js";
|
|
12
|
+
import x from "../../visual/tokens.js";
|
|
13
|
+
import S from "../../view/Component.js";
|
|
14
|
+
import { createSymbol as C } from "../../util/symbol.js";
|
|
15
|
+
import { createOrUpdatePatternFromDecal as w } from "../../util/decal.js";
|
|
16
|
+
import { makeBackground as T } from "../helper/listComponent.js";
|
|
17
|
+
//#region node_modules/echarts/lib/component/legend/LegendView.js
|
|
18
|
+
var E = t, D = r, O = u, k = function(t) {
|
|
19
|
+
s(r, t);
|
|
20
|
+
function r() {
|
|
21
|
+
var e = t !== null && t.apply(this, arguments) || this;
|
|
22
|
+
return e.type = r.type, e.newlineDisabled = !1, e;
|
|
23
|
+
}
|
|
24
|
+
return r.prototype.init = function() {
|
|
25
|
+
this.group.add(this._contentGroup = new O()), this.group.add(this._selectorGroup = new O()), this._isFirstRender = !0;
|
|
26
|
+
}, r.prototype.getContentGroup = function() {
|
|
27
|
+
return this._contentGroup;
|
|
28
|
+
}, r.prototype.getSelectorGroup = function() {
|
|
29
|
+
return this._selectorGroup;
|
|
30
|
+
}, r.prototype.render = function(e, t, r) {
|
|
31
|
+
var i = this._isFirstRender;
|
|
32
|
+
if (this._isFirstRender = !1, this.resetInner(), e.get("show", !0)) {
|
|
33
|
+
var a = e.get("align"), o = e.get("orient");
|
|
34
|
+
(!a || a === "auto") && (a = e.get("left") === "right" && o === "vertical" ? "right" : "left");
|
|
35
|
+
var s = e.get("selector", !0), c = e.get("selectorPosition", !0);
|
|
36
|
+
s && (!c || c === "auto") && (c = o === "horizontal" ? "end" : "start"), this.renderInner(a, e, t, r, s, o, c);
|
|
37
|
+
var l = y(e, r).refContainer, u = e.getBoxLayoutParams(), d = e.get("padding"), f = b(u, l, d), p = this.layoutInner(e, a, f, i, s, c), m = b(n({
|
|
38
|
+
width: p.width,
|
|
39
|
+
height: p.height
|
|
40
|
+
}, u), l, d);
|
|
41
|
+
this.group.x = m.x - p.x, this.group.y = m.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = T(p, e));
|
|
42
|
+
}
|
|
43
|
+
}, r.prototype.resetInner = function() {
|
|
44
|
+
this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
|
|
45
|
+
}, r.prototype.renderInner = function(t, n, r, a, o, s, u) {
|
|
46
|
+
var d = this.getContentGroup(), f = e(), m = n.get("selectedMode"), h = n.get("triggerEvent"), g = [];
|
|
47
|
+
r.eachRawSeries(function(e) {
|
|
48
|
+
!e.get("legendHoverLink") && g.push(e.id);
|
|
49
|
+
}), D(n.getData(), function(e, o) {
|
|
50
|
+
var s = this, u = e.get("name");
|
|
51
|
+
if (!this.newlineDisabled && (u === "" || u === "\n")) {
|
|
52
|
+
var _ = new O();
|
|
53
|
+
_.newline = !0, d.add(_);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
var v = r.getSeriesByName(u)[0];
|
|
57
|
+
if (!f.get(u)) {
|
|
58
|
+
if (v) {
|
|
59
|
+
var y = v.getData(), b = y.getVisual("legendLineStyle") || {}, x = y.getVisual("legendIcon"), S = y.getVisual("style"), C = this._createItem(v, u, o, e, n, t, b, S, x, m, a);
|
|
60
|
+
C.on("click", E(M, u, null, a, g)).on("mouseover", E(N, v.name, null, a, g)).on("mouseout", E(P, v.name, null, a, g)), r.ssr && C.eachChild(function(e) {
|
|
61
|
+
var t = p(e);
|
|
62
|
+
t.seriesIndex = v.seriesIndex, t.dataIndex = o, t.ssrType = "legend";
|
|
63
|
+
}), h && C.eachChild(function(e) {
|
|
64
|
+
s.packEventData(e, n, v, o, u);
|
|
65
|
+
}), f.set(u, !0);
|
|
66
|
+
} else r.eachRawSeries(function(s) {
|
|
67
|
+
var d = this;
|
|
68
|
+
if (!f.get(u) && s.legendVisualProvider) {
|
|
69
|
+
var _ = s.legendVisualProvider;
|
|
70
|
+
if (!_.containName(u)) return;
|
|
71
|
+
var v = _.indexOfName(u), y = _.getItemVisual(v, "style"), b = _.getItemVisual(v, "legendIcon"), x = c(y.fill);
|
|
72
|
+
x && x[3] === 0 && (x[3] = .2, y = i(i({}, y), { fill: l(x, "rgba") }));
|
|
73
|
+
var S = this._createItem(s, u, o, e, n, t, {}, y, b, m, a);
|
|
74
|
+
S.on("click", E(M, null, u, a, g)).on("mouseover", E(N, null, u, a, g)).on("mouseout", E(P, null, u, a, g)), r.ssr && S.eachChild(function(e) {
|
|
75
|
+
var t = p(e);
|
|
76
|
+
t.seriesIndex = s.seriesIndex, t.dataIndex = o, t.ssrType = "legend";
|
|
77
|
+
}), h && S.eachChild(function(e) {
|
|
78
|
+
d.packEventData(e, n, s, o, u);
|
|
79
|
+
}), f.set(u, !0);
|
|
80
|
+
}
|
|
81
|
+
}, this);
|
|
82
|
+
process.env.NODE_ENV !== "production" && (f.get(u) || console.warn(u + " series not exists. Legend data should be same with series name or data name."));
|
|
83
|
+
}
|
|
84
|
+
}, this), o && this._createSelector(o, n, a, s, u);
|
|
85
|
+
}, r.prototype.packEventData = function(e, t, n, r, i) {
|
|
86
|
+
var a = {
|
|
87
|
+
componentType: "legend",
|
|
88
|
+
componentIndex: t.componentIndex,
|
|
89
|
+
dataIndex: r,
|
|
90
|
+
value: i,
|
|
91
|
+
seriesIndex: n.seriesIndex
|
|
92
|
+
};
|
|
93
|
+
p(e).eventData = a;
|
|
94
|
+
}, r.prototype._createSelector = function(e, t, n, r, i) {
|
|
95
|
+
var a = this.getSelectorGroup();
|
|
96
|
+
D(e, function(e) {
|
|
97
|
+
var r = e.type, i = new f({
|
|
98
|
+
style: {
|
|
99
|
+
x: 0,
|
|
100
|
+
y: 0,
|
|
101
|
+
align: "center",
|
|
102
|
+
verticalAlign: "middle"
|
|
103
|
+
},
|
|
104
|
+
onclick: function() {
|
|
105
|
+
n.dispatchAction({
|
|
106
|
+
type: r === "all" ? "legendAllSelect" : "legendInverseSelect",
|
|
107
|
+
legendId: t.id
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
a.add(i), _(i, {
|
|
112
|
+
normal: t.getModel("selectorLabel"),
|
|
113
|
+
emphasis: t.getModel(["emphasis", "selectorLabel"])
|
|
114
|
+
}, { defaultText: e.title }), h(i);
|
|
115
|
+
});
|
|
116
|
+
}, r.prototype._createItem = function(e, t, n, r, i, s, c, l, u, p, _) {
|
|
117
|
+
var v = e.visualDrawType, y = i.get("itemWidth"), b = i.get("itemHeight"), x = i.isSelected(t), S = r.get("symbolRotate"), C = r.get("symbolKeepAspect"), w = r.get("icon");
|
|
118
|
+
u = w || u || "roundRect";
|
|
119
|
+
var T = A(u, r, c, l, v, x, _), E = new O(), D = r.getModel("textStyle");
|
|
120
|
+
if (a(e.getLegendIcon) && (!w || w === "inherit")) E.add(e.getLegendIcon({
|
|
121
|
+
itemWidth: y,
|
|
122
|
+
itemHeight: b,
|
|
123
|
+
icon: u,
|
|
124
|
+
iconRotate: S,
|
|
125
|
+
itemStyle: T.itemStyle,
|
|
126
|
+
lineStyle: T.lineStyle,
|
|
127
|
+
symbolKeepAspect: C
|
|
128
|
+
}));
|
|
129
|
+
else {
|
|
130
|
+
var k = w === "inherit" && e.getData().getVisual("symbol") ? S === "inherit" ? e.getData().getVisual("symbolRotate") : S : 0;
|
|
131
|
+
E.add(j({
|
|
132
|
+
itemWidth: y,
|
|
133
|
+
itemHeight: b,
|
|
134
|
+
icon: u,
|
|
135
|
+
iconRotate: k,
|
|
136
|
+
itemStyle: T.itemStyle,
|
|
137
|
+
lineStyle: T.lineStyle,
|
|
138
|
+
symbolKeepAspect: C
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
var M = s === "left" ? y + 5 : -5, N = s, P = i.get("formatter"), F = t;
|
|
142
|
+
o(P) && P ? F = P.replace("{name}", t ?? "") : a(P) && (F = P(t));
|
|
143
|
+
var I = x ? D.getTextColor() : r.get("inactiveColor");
|
|
144
|
+
E.add(new f({ style: g(D, {
|
|
145
|
+
text: F,
|
|
146
|
+
x: M,
|
|
147
|
+
y: b / 2,
|
|
148
|
+
fill: I,
|
|
149
|
+
align: N,
|
|
150
|
+
verticalAlign: "middle"
|
|
151
|
+
}, { inheritColor: I }) }));
|
|
152
|
+
var L = new d({
|
|
153
|
+
shape: E.getBoundingRect(),
|
|
154
|
+
style: { fill: "transparent" }
|
|
155
|
+
}), R = r.getModel("tooltip");
|
|
156
|
+
return R.get("show") && m({
|
|
157
|
+
el: L,
|
|
158
|
+
componentModel: i,
|
|
159
|
+
itemName: t,
|
|
160
|
+
itemTooltipOption: R.option
|
|
161
|
+
}), E.add(L), E.eachChild(function(e) {
|
|
162
|
+
e.silent = !0;
|
|
163
|
+
}), L.silent = !p, this.getContentGroup().add(E), h(E), E.__legendDataIndex = n, E;
|
|
164
|
+
}, r.prototype.layoutInner = function(e, t, n, r, i, a) {
|
|
165
|
+
var o = this.getContentGroup(), s = this.getSelectorGroup();
|
|
166
|
+
v(e.get("orient"), o, e.get("itemGap"), n.width, n.height);
|
|
167
|
+
var c = o.getBoundingRect(), l = [-c.x, -c.y];
|
|
168
|
+
if (s.markRedraw(), o.markRedraw(), i) {
|
|
169
|
+
v("horizontal", s, e.get("selectorItemGap", !0));
|
|
170
|
+
var u = s.getBoundingRect(), d = [-u.x, -u.y], f = e.get("selectorButtonGap", !0), p = e.getOrient().index, m = p === 0 ? "width" : "height", h = p === 0 ? "height" : "width", g = p === 0 ? "y" : "x";
|
|
171
|
+
a === "end" ? d[p] += c[m] + f : l[p] += u[m] + f, d[1 - p] += c[h] / 2 - u[h] / 2, s.x = d[0], s.y = d[1], o.x = l[0], o.y = l[1];
|
|
172
|
+
var _ = {
|
|
173
|
+
x: 0,
|
|
174
|
+
y: 0
|
|
175
|
+
};
|
|
176
|
+
return _[m] = c[m] + f + u[m], _[h] = Math.max(c[h], u[h]), _[g] = Math.min(0, u[g] + d[1 - p]), _;
|
|
177
|
+
} else return o.x = l[0], o.y = l[1], this.group.getBoundingRect();
|
|
178
|
+
}, r.prototype.remove = function() {
|
|
179
|
+
this.getContentGroup().removeAll(), this._isFirstRender = !0;
|
|
180
|
+
}, r.type = "legend.plain", r;
|
|
181
|
+
}(S);
|
|
182
|
+
function A(e, t, n, r, i, a, o) {
|
|
183
|
+
function s(e, t) {
|
|
184
|
+
e.lineWidth === "auto" && (e.lineWidth = t.lineWidth > 0 ? 2 : 0), D(e, function(n, r) {
|
|
185
|
+
e[r] === "inherit" && (e[r] = t[r]);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
var c = t.getModel("itemStyle"), l = c.getItemStyle(), u = e.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", d = c.getShallow("decal");
|
|
189
|
+
l.decal = !d || d === "inherit" ? r.decal : w(d, o), l.fill === "inherit" && (l.fill = r[i]), l.stroke === "inherit" && (l.stroke = r[u]), l.opacity === "inherit" && (l.opacity = (i === "fill" ? r : n).opacity), s(l, r);
|
|
190
|
+
var f = t.getModel("lineStyle"), p = f.getLineStyle();
|
|
191
|
+
if (s(p, n), l.fill === "auto" && (l.fill = r.fill), l.stroke === "auto" && (l.stroke = r.fill), p.stroke === "auto" && (p.stroke = r.fill), !a) {
|
|
192
|
+
var m = t.get("inactiveBorderWidth"), h = l[u];
|
|
193
|
+
l.lineWidth = m === "auto" ? r.lineWidth > 0 && h ? 2 : 0 : l.lineWidth, l.fill = t.get("inactiveColor"), l.stroke = t.get("inactiveBorderColor"), p.stroke = f.get("inactiveColor"), p.lineWidth = f.get("inactiveWidth");
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
itemStyle: l,
|
|
197
|
+
lineStyle: p
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function j(e) {
|
|
201
|
+
var t = e.icon || "roundRect", n = C(t, 0, 0, e.itemWidth, e.itemHeight, e.itemStyle.fill, e.symbolKeepAspect);
|
|
202
|
+
return n.setStyle(e.itemStyle), n.rotation = (e.iconRotate || 0) * Math.PI / 180, n.setOrigin([e.itemWidth / 2, e.itemHeight / 2]), t.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = x.color.neutral00, n.style.lineWidth = 2), n;
|
|
203
|
+
}
|
|
204
|
+
function M(e, t, n, r) {
|
|
205
|
+
P(e, t, n, r), n.dispatchAction({
|
|
206
|
+
type: "legendToggleSelect",
|
|
207
|
+
name: e ?? t
|
|
208
|
+
}), N(e, t, n, r);
|
|
209
|
+
}
|
|
210
|
+
function N(e, t, n, r) {
|
|
211
|
+
n.usingTHL() || n.dispatchAction({
|
|
212
|
+
type: "highlight",
|
|
213
|
+
seriesName: e,
|
|
214
|
+
name: t,
|
|
215
|
+
excludeSeriesId: r
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function P(e, t, n, r) {
|
|
219
|
+
n.usingTHL() || n.dispatchAction({
|
|
220
|
+
type: "downplay",
|
|
221
|
+
seriesName: e,
|
|
222
|
+
name: t,
|
|
223
|
+
excludeSeriesId: r
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
export { k as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import { inheritDefaultOption as t } from "../../util/component.js";
|
|
3
|
+
import { getLayoutParams as n, mergeLayoutParam as r } from "../../util/layout.js";
|
|
4
|
+
import i from "../../visual/tokens.js";
|
|
5
|
+
import a from "./LegendModel.js";
|
|
6
|
+
//#region node_modules/echarts/lib/component/legend/ScrollableLegendModel.js
|
|
7
|
+
var o = function(r) {
|
|
8
|
+
e(o, r);
|
|
9
|
+
function o() {
|
|
10
|
+
var e = r !== null && r.apply(this, arguments) || this;
|
|
11
|
+
return e.type = o.type, e;
|
|
12
|
+
}
|
|
13
|
+
return o.prototype.setScrollDataIndex = function(e) {
|
|
14
|
+
this.option.scrollDataIndex = e;
|
|
15
|
+
}, o.prototype.init = function(e, t, i) {
|
|
16
|
+
var a = n(e);
|
|
17
|
+
r.prototype.init.call(this, e, t, i), s(this, e, a);
|
|
18
|
+
}, o.prototype.mergeOption = function(e, t) {
|
|
19
|
+
r.prototype.mergeOption.call(this, e, t), s(this, this.option, e);
|
|
20
|
+
}, o.type = "legend.scroll", o.defaultOption = t(a.defaultOption, {
|
|
21
|
+
scrollDataIndex: 0,
|
|
22
|
+
pageButtonItemGap: 5,
|
|
23
|
+
pageButtonGap: null,
|
|
24
|
+
pageButtonPosition: "end",
|
|
25
|
+
pageFormatter: "{current}/{total}",
|
|
26
|
+
pageIcons: {
|
|
27
|
+
horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
|
|
28
|
+
vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
|
|
29
|
+
},
|
|
30
|
+
pageIconColor: i.color.accent50,
|
|
31
|
+
pageIconInactiveColor: i.color.accent10,
|
|
32
|
+
pageIconSize: 15,
|
|
33
|
+
pageTextStyle: { color: i.color.tertiary },
|
|
34
|
+
animationDurationUpdate: 800
|
|
35
|
+
}), o;
|
|
36
|
+
}(a);
|
|
37
|
+
function s(e, t, n) {
|
|
38
|
+
var i = e.getOrient(), a = [1, 1];
|
|
39
|
+
a[i.index] = 0, r(t, n, {
|
|
40
|
+
type: "box",
|
|
41
|
+
ignoreSize: !!a
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { o as default };
|