@orangelogic/design-system 2.69.0 → 2.70.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/library/chunks/AxisLabelRadial.BTpA5dYy.js +11 -0
- package/library/chunks/BaseColumnSeries.hIO71GLG.js +304 -0
- package/library/chunks/CandlestickSeries.w9C0GR9v.js +362 -0
- package/library/chunks/Circle.tOnnO-F-.js +17 -0
- package/library/chunks/ColumnSeries.Ckz75x1M.js +54 -0
- package/library/chunks/EditableAxisLabel.CCMTJT7K.js +445 -0
- package/library/chunks/EditableLabel.DPmicdjK.js +119 -0
- package/library/chunks/Gradient.BrDBLm8v.js +40 -0
- package/library/chunks/LinearGradient.CxfXxvMw.js +37 -0
- package/library/chunks/MonotoneXTension.CJMEHHj3.js +139 -0
- package/library/chunks/Picture.BNASYM-P.js +49 -0
- package/library/chunks/Polygon.Dr-GV2hn.js +70 -0
- package/library/chunks/ProgressPie.4mPA6xqm.js +234 -0
- package/library/chunks/RadialLabel.HfsGiN4x.js +88 -0
- package/library/chunks/Scrollbar.Bgg-RhjP.js +118 -0
- package/library/chunks/Slice.Dm56LTKj.js +120 -0
- package/library/chunks/Slider.FKJwoPq2.js +19 -0
- package/library/chunks/SpriteResizer.-qJDgug8.js +446 -0
- package/library/chunks/Triangle.BECgi7mc.js +21 -0
- package/library/chunks/ZoomTools.cgwuIB0e.js +199 -0
- package/library/chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js +8 -0
- package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
- package/library/chunks/{_commonjsHelpers.ByX85dGu.js → _commonjsHelpers.DQNKXVTB.js} +2 -2
- package/library/chunks/accessors.BHk36ecy.js +11 -0
- package/library/chunks/am-chart.oZVBmpnn.js +18435 -0
- package/library/chunks/{animation.DfUHRQry.js → animation.DU8t6mrk.js} +1 -1
- package/library/chunks/{button.SoX-7UYy.js → button.CAAJPQFu.js} +3 -3
- package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
- package/library/chunks/cardinal.BCA_LB0u.js +64 -0
- package/library/chunks/{color-swatch-group.Dx1fbSJx.js → color-swatch-group.CKHyWM8K.js} +6 -6
- package/library/chunks/{color-swatch.B7XXHxx1.js → color-swatch.BkpPCXd6.js} +2 -2
- package/library/chunks/colorPicker.C4w_vDjh.js +527 -0
- package/library/chunks/{confirm-popover.327ATuQH.js → confirm-popover.ZD74yDWw.js} +3 -3
- package/library/chunks/{content-builder.Bxi6k2LA.js → content-builder.B4Tqoc6M.js} +40 -34
- package/library/chunks/{cropper.BraEEykE.js → cropper.CQB3_qqG.js} +6937 -6935
- package/library/chunks/{dialog.eN3RUbwx.js → dialog.qSV5AjOE.js} +2 -2
- package/library/chunks/{dom.CZrJ64Dm.js → dom.BQVKDNd8.js} +1 -1
- package/library/chunks/{dot-pagination.Bek4w4zz.js → dot-pagination.BN_0ljfc.js} +2 -2
- package/library/chunks/exporting.BdjsEGF8.js +1407 -0
- package/library/chunks/{file-on-demand.BiC4cymk.js → file-on-demand.CXE4zf0J.js} +448 -386
- package/library/chunks/flow.D0FqdfOy.js +1594 -0
- package/library/chunks/{folder-select.DVEFgexx.js → folder-select.CPALQK22.js} +4 -4
- package/library/chunks/{form.CO12-VK0.js → form.DgwYWi0O.js} +1 -1
- package/library/chunks/gantt.DfUM7Gvb.js +2459 -0
- package/library/chunks/{header.Da5yvwdy.js → header.DXZ_5gLY.js} +2 -2
- package/library/chunks/hierarchy.5kfBCoGt.js +3561 -0
- package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
- package/library/chunks/{i18n.BMRLOAZR.js → i18n.C0iakJkV.js} +19 -11
- package/library/chunks/{iframe.BJizUE1A.js → iframe.BlzVfeBc.js} +2 -2
- package/library/chunks/{image.bndP5q2c.js → image.B3WjaCXP.js} +2 -2
- package/library/chunks/index.BkoLctE9.js +533 -0
- package/library/chunks/index.CZJTjkLp.js +142 -0
- package/library/chunks/{index.Bhnf0N8Q.js → index.CmVKj_wl.js} +7 -7
- package/library/chunks/index.DU0XUO4k.js +176 -0
- package/library/chunks/index.DcjJFMlq.js +1520 -0
- package/library/chunks/isObjectLike.z36Fu426.js +34 -0
- package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
- package/library/chunks/json.BjaT7cyo.js +119 -0
- package/library/chunks/{list-editor.Du1h2Ms0.js → list-editor.CIAAFPco.js} +251 -222
- package/library/chunks/map.DbgNAGxD.js +3037 -0
- package/library/chunks/markerjs2.esm.B_9kjmye.js +1912 -0
- package/library/chunks/{option.Ce_wlnZj.js → option.ByVbmxUQ.js} +2 -2
- package/library/chunks/{pagination.DXu-mFAk.js → pagination.DPQn2fKX.js} +4 -4
- package/library/chunks/pdfmake.Bs7cMDH0.js +41224 -0
- package/library/chunks/percent.DO4FjAdu.js +902 -0
- package/library/chunks/{purify.es.BGaRrCfO.js → purify.es.BIuh5IAZ.js} +115 -115
- package/library/chunks/radar.Dd5fJVMg.js +789 -0
- package/library/chunks/{responsive.DgQTIrna.js → responsive.DL-wBD4P.js} +1 -1
- package/library/chunks/sliceGrouper.DA3aeuJ-.js +93 -0
- package/library/chunks/stock.BfI5MUyK.js +12684 -0
- package/library/chunks/{string.Cp_XNbnV.js → string.B_rEG27K.js} +1 -1
- package/library/chunks/{tab-group.B2pW__9H.js → tab-group.1h51o_Ly.js} +4 -4
- package/library/chunks/{table.5eWm9FfN.js → table.wVHv1Xze.js} +348 -327
- package/library/chunks/timeline.BxMLjB5J.js +837 -0
- package/library/chunks/timer.B39XOBYL.js +123 -0
- package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
- package/library/chunks/transform.BuqENXeT.js +50 -0
- package/library/chunks/{tree.Zls5YZ8z.js → tree.Bx0IGsWm.js} +2 -2
- package/library/chunks/venn.CxFupTb9.js +966 -0
- package/library/chunks/vfs_fonts.VJpdcrR6.js +9 -0
- package/library/chunks/watch.BCJD77bD.js +547 -0
- package/library/chunks/wc.ThQubbN2.js +255 -0
- package/library/chunks/xlsx.v-qkA-dg.js +25118 -0
- package/library/chunks/xy.q6e68du3.js +333 -0
- package/library/components/alert.js +2 -2
- package/library/components/am-chart.d.ts +3 -0
- package/library/components/am-chart.js +11 -0
- package/library/components/animated-image.js +1 -1
- package/library/components/animation.js +2 -2
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +7 -7
- package/library/components/atoms.js +166 -162
- package/library/components/avatar.js +1 -1
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb-item.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +4 -4
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +4 -4
- package/library/components/color-swatch-group.js +7 -7
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/cropper.js +1 -1
- package/library/components/details.js +3 -2
- package/library/components/dialog.js +3 -3
- package/library/components/divider.js +1 -1
- package/library/components/dot-pagination.js +3 -3
- package/library/components/drawer.js +3 -3
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +32 -30
- package/library/components/e-chart.d.ts +3 -0
- package/library/components/e-chart.js +47908 -0
- package/library/components/element-clamp.js +3 -3
- package/library/components/file-on-demand.js +10 -10
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +2 -2
- package/library/components/grid-item.js +1 -1
- package/library/components/header.js +3 -3
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +1 -1
- package/library/components/icon.js +1 -1
- package/library/components/iframe.js +3 -3
- package/library/components/image-comparer.js +2 -2
- package/library/components/image.js +3 -3
- package/library/components/include.js +1 -1
- package/library/components/input.js +3 -3
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +11 -8
- package/library/components/markdown.js +2 -2
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +1 -1
- package/library/components/option.js +3 -3
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/qr-code.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +2 -2
- package/library/components/radio.js +1 -1
- package/library/components/range.js +3 -3
- package/library/components/rating.js +2 -2
- package/library/components/relative-time.js +1 -1
- package/library/components/resize-observer.js +1 -1
- package/library/components/select.js +4 -4
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +2 -2
- package/library/components/stepper.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +5 -5
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +1 -1
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +2 -2
- package/library/components/tooltip.js +2 -2
- package/library/components/tree-item.js +3 -3
- package/library/components/tree.js +3 -3
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +27684 -27970
- package/library/components/video.js +1107 -1110
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/am-chart/am-chart.d.ts +45 -0
- package/library/packages/atoms/src/components/am-chart/am-chart.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/am-chart/am-chart.utils.d.ts +23 -0
- package/library/packages/atoms/src/components/e-chart/e-chart-controller.d.ts +30 -0
- package/library/packages/atoms/src/components/e-chart/e-chart.d.ts +38 -0
- package/library/packages/atoms/src/components/e-chart/e-chart.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/table/table.d.ts +21 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
- package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
- package/library/packages/atoms/src/index.d.ts +2 -0
- package/library/packages/events/src/cx-chart-plan-change.d.ts +10 -0
- package/library/packages/events/src/cx-dashboard-filter-change.d.ts +6 -0
- package/library/packages/events/src/cx-dashboard-table-load-more.d.ts +9 -0
- package/library/packages/events/src/cx-e-chart-drill-down.d.ts +16 -0
- package/library/packages/events/src/events.d.ts +4 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/list-editor/list-editor.d.ts +7 -0
- package/library/packages/molecules/src/stat-card/stat-card.d.ts +81 -0
- package/library/packages/molecules/src/stat-card/stat-card.styles.d.ts +2 -0
- package/library/packages/molecules/src/storybook/storybook.d.ts +1 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.d.ts +88 -0
- package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-builder.styles.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/components/chart-plan-builder/chart-plan-schema.d.ts +100 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -2
- package/library/packages/organisms/src/dashboard-filter/dashboard-filter.d.ts +83 -0
- package/library/packages/organisms/src/dashboard-filter/dashboard-filter.styles.d.ts +2 -0
- package/library/packages/organisms/src/dashboard-table/dashboard-table.d.ts +45 -0
- package/library/packages/organisms/src/dashboard-table/dashboard-table.styles.d.ts +2 -0
- package/library/packages/organisms/src/index.d.ts +3 -0
- package/library/packages/services/src/api/endpoints.d.ts +3 -0
- package/library/packages/types/src/am-chart.d.ts +22 -0
- package/library/packages/types/src/content-builder.d.ts +1 -0
- package/library/packages/types/src/stat-card.d.ts +19 -0
- package/library/packages/types/src/table.d.ts +4 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +8 -0
- package/library/react-web-component.d.ts +280 -4
- package/library/utils.js +8 -8
- package/package.json +1 -1
- package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
- package/library/chunks/identity.ByMq8VxU.js +0 -6
- package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
- package/library/chunks/watch.q1sEjPWL.js +0 -501
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
import { S as $, a as ee } from "./Slice.Dm56LTKj.js";
|
|
2
|
+
import { aU as I, L as Y, T as D, aV as te, m as L, e as v, aq as S, aj as R, j as A, h as C, a as _, D as se, H as X, au as U, C as ie, q as b, G as k, r as G, K as ne, t as q, aW as J, av as Q } from "./am-chart.oZVBmpnn.js";
|
|
3
|
+
import { A as ae } from "./AxisLabelRadial.BTpA5dYy.js";
|
|
4
|
+
import { B as Z } from "./BaseColumnSeries.hIO71GLG.js";
|
|
5
|
+
import { P as K } from "./Polygon.Dr-GV2hn.js";
|
|
6
|
+
class V extends I {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments), this.labels = this.addDisposer(new Y(D.new({}), () => te._new(this._root, {
|
|
9
|
+
themeTags: L(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
10
|
+
}, [this.labels.template]))), this.axisFills = this.addDisposer(new Y(D.new({}), () => $._new(this._root, {
|
|
11
|
+
themeTags: L(this.axisFills.template.get("themeTags", ["fill"]), this.get("themeTags", []))
|
|
12
|
+
}, [this.axisFills.template]))), this.pointPostion = [], this.pointDistance = [], this._normalizedPoints = [];
|
|
13
|
+
}
|
|
14
|
+
_afterNew() {
|
|
15
|
+
this._settings.themeTags = L(this._settings.themeTags, ["renderer", "circular"]), super._afterNew(), this.setPrivateRaw("letter", "X"), this.setRaw("position", "absolute");
|
|
16
|
+
}
|
|
17
|
+
_beforeChanged() {
|
|
18
|
+
super._beforeChanged(), this.isDirty("points") && this._updateLayout(), this.isDirty("yRenderer") && this.get("yRenderer").set("xRenderer", this);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @ignore
|
|
22
|
+
*/
|
|
23
|
+
processAxis() {
|
|
24
|
+
super.processAxis(), this.axis.labelsContainer.set("isMeasured", !1);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @ignore
|
|
28
|
+
*/
|
|
29
|
+
_updateLayout() {
|
|
30
|
+
const e = this.chart;
|
|
31
|
+
if (e) {
|
|
32
|
+
const t = this.get("points");
|
|
33
|
+
if (t) {
|
|
34
|
+
let s = 1 / 0, a = 1 / 0, i = -1 / 0, r = -1 / 0, o = 0, n = t[0];
|
|
35
|
+
v(t, (x, d) => {
|
|
36
|
+
s = Math.min(s, x.x), a = Math.min(a, x.y), i = Math.max(i, x.x), r = Math.max(r, x.y), o += Math.hypot(x.x - n.x, x.y - n.y), this.pointDistance[d] = o, n = x;
|
|
37
|
+
}), v(t, (x, d) => {
|
|
38
|
+
this.pointPostion[d] = this.pointDistance[d] / o;
|
|
39
|
+
});
|
|
40
|
+
let l = this.get("yRenderer").get("axisLength", 0), h = i - s + 2 * l, c = r - a + 2 * l, g = (s + i) / 2, m = (a + r) / 2, f = e.innerWidth(), u = e.innerHeight(), y = f / h, F = u / c, p = Math.min(y, F);
|
|
41
|
+
this.getPrivate("autoScale", !0) || (p = 1), this.axis.setPrivateRaw("width", h * p), this.axis.setPrivateRaw("height", c * p), this.setPrivateRaw("centerX", g), this.setPrivateRaw("centerY", m), this.setPrivateRaw("scale", p), this.setPrivateRaw("axisLength", o), this.set("draw", (x) => {
|
|
42
|
+
x.moveTo((t[0].x - g) * p, (t[0].y - m) * p), v(t, (d) => {
|
|
43
|
+
x.lineTo((d.x - g) * p, (d.y - m) * p);
|
|
44
|
+
});
|
|
45
|
+
}), n = t[0], this._normalizedPoints = [], v(t, (x) => {
|
|
46
|
+
let d = Math.hypot(x.x - n.x, x.y - n.y);
|
|
47
|
+
for (let T = 1; T < d; T++) {
|
|
48
|
+
let M = (n.x + (x.x - n.x) * T / d - g) * p, N = (n.y + (x.y - n.y) * T / d - m) * p;
|
|
49
|
+
const B = this._normalizedPoints[this._normalizedPoints.length - 1];
|
|
50
|
+
B && Math.hypot(M - B.x, N - B.y) < 0.5 || this._normalizedPoints.push({ x: M, y: N });
|
|
51
|
+
}
|
|
52
|
+
n = x;
|
|
53
|
+
}), this.axis.markDirtySize();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @ignore
|
|
59
|
+
*/
|
|
60
|
+
updateGrid(e, t, s) {
|
|
61
|
+
if (e) {
|
|
62
|
+
t == null && (t = 0);
|
|
63
|
+
let a = e.get("location", 0.5);
|
|
64
|
+
s != null && s != t && (t = t + (s - t) * a), this.toggleVisibility(e, t, 0, 1);
|
|
65
|
+
const i = this.positionToPoint(t, 0), r = this.positionToPoint(t, 1);
|
|
66
|
+
e.set("draw", (o) => {
|
|
67
|
+
o.moveTo(i.x, i.y), o.lineTo(r.x, r.y);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Converts relative position to angle.
|
|
73
|
+
*
|
|
74
|
+
* @param position Position
|
|
75
|
+
* @return Angle
|
|
76
|
+
*/
|
|
77
|
+
positionToAngle(e) {
|
|
78
|
+
e = this.toGlobalPosition(e);
|
|
79
|
+
let t = this.get("points"), s = this.getPrivate("axisLength", 0), a = 0;
|
|
80
|
+
if (t) {
|
|
81
|
+
let i = 0, r = t[0];
|
|
82
|
+
S(t, (o) => {
|
|
83
|
+
let n = Math.hypot(o.x - r.x, o.y - r.y);
|
|
84
|
+
return i += n, i > e * s ? (a = R(r, o) + 90, !1) : (r = o, !0);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return a;
|
|
88
|
+
}
|
|
89
|
+
getPoints(e, t, s, a) {
|
|
90
|
+
let i = this.get("yRenderer"), r = [];
|
|
91
|
+
if (e > s && ([e, s] = [s, e]), t > a && ([t, a] = [a, t]), i) {
|
|
92
|
+
let o = this.positionToIndex(e), n = this.positionToIndex(s);
|
|
93
|
+
r.push(this.positionToPoint(e, t));
|
|
94
|
+
for (let l = o; l <= n + 1; l++) {
|
|
95
|
+
let h = this.indexToPosition(l);
|
|
96
|
+
h > e && h < s && r.push(this.positionToPoint(h, t));
|
|
97
|
+
}
|
|
98
|
+
if (r.push(this.positionToPoint(s, t)), a != t) {
|
|
99
|
+
r.push(this.positionToPoint(s, a));
|
|
100
|
+
for (let l = n + 1; l >= o; l--) {
|
|
101
|
+
let h = this.indexToPosition(l);
|
|
102
|
+
h > e && h < s && r.push(this.positionToPoint(h, a));
|
|
103
|
+
}
|
|
104
|
+
r.push(this.positionToPoint(e, a)), r.push(r[0]);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return r;
|
|
108
|
+
}
|
|
109
|
+
// do not delete
|
|
110
|
+
_handleOpposite() {
|
|
111
|
+
}
|
|
112
|
+
positionToIndex(e) {
|
|
113
|
+
let t = this.get("points"), s = this.getPrivate("axisLength", 0), a = 0;
|
|
114
|
+
if (e = this.toGlobalPosition(e), t && t.length > 1) {
|
|
115
|
+
let i = 0, r = t[0];
|
|
116
|
+
if (e <= 0)
|
|
117
|
+
a = 0;
|
|
118
|
+
else if (e >= 1)
|
|
119
|
+
a = t.length - 1;
|
|
120
|
+
else {
|
|
121
|
+
let o = 0;
|
|
122
|
+
S(t, (n) => {
|
|
123
|
+
let l = Math.hypot(n.x - r.x, n.y - r.y);
|
|
124
|
+
return i += l, i >= e * s ? (a = o, !1) : (r = n, o++, !0);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return a;
|
|
129
|
+
}
|
|
130
|
+
indexToPosition(e) {
|
|
131
|
+
let t = this.get("points"), s = this.getPrivate("axisLength", 0), a = 0;
|
|
132
|
+
if (t && t.length > 1) {
|
|
133
|
+
let i = 0, r = t[0], o = 0;
|
|
134
|
+
S(t, (n) => {
|
|
135
|
+
if (a = i / s, o == e)
|
|
136
|
+
return !1;
|
|
137
|
+
let l = Math.hypot(n.x - r.x, n.y - r.y);
|
|
138
|
+
return i += l, r = n, o++, !0;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return this.toAxisPosition(a);
|
|
142
|
+
}
|
|
143
|
+
pointToPosition(e) {
|
|
144
|
+
let t = 1 / 0, s = 0, a = this._normalizedPoints[0], i = 0;
|
|
145
|
+
v(this._normalizedPoints, (h, c) => {
|
|
146
|
+
let g = Math.hypot(h.x - e.x, h.y - e.y);
|
|
147
|
+
g < t && (t = g, s = c, i = R(e, h) - R(a, h)), a = h;
|
|
148
|
+
});
|
|
149
|
+
const r = this.get("yRenderer"), o = this.getPrivate("scale", 1), n = this.get("yRenderer"), l = -t / (r.get("axisLength", 0) * o) * A(i) + n.get("axisLocation", 0);
|
|
150
|
+
return { x: s / this._normalizedPoints.length, y: l };
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Converts relative position to an X/Y coordinate.
|
|
154
|
+
*
|
|
155
|
+
* @param position Position
|
|
156
|
+
* @return Point
|
|
157
|
+
*/
|
|
158
|
+
positionToPoint(e, t, s) {
|
|
159
|
+
t == null && (t = 0);
|
|
160
|
+
const a = this.get("yRenderer");
|
|
161
|
+
s || (e = this.toGlobalPosition(e)), t = a.toGlobalPosition(t), t -= a.get("axisLocation", 0);
|
|
162
|
+
let i = this.get("points"), r = this.getPrivate("axisLength", 0), o = this.getPrivate("scale", 1), n = { x: 0, y: 0 }, l = 0;
|
|
163
|
+
if (i && i.length > 1) {
|
|
164
|
+
let p = 0, x = i[0];
|
|
165
|
+
if (e <= 0)
|
|
166
|
+
l = R(i[0], i[1]) + 90, n = i[0];
|
|
167
|
+
else if (e >= 1) {
|
|
168
|
+
const d = i.length;
|
|
169
|
+
l = R(i[d - 2], i[d - 1]) + 90, n = i[d - 1];
|
|
170
|
+
} else
|
|
171
|
+
S(i, (d) => {
|
|
172
|
+
let T = Math.hypot(d.x - x.x, d.y - x.y);
|
|
173
|
+
if (p += T, p >= e * r) {
|
|
174
|
+
let M = (p - T) / r, N = (e * r - M * r) / T;
|
|
175
|
+
return n = { x: x.x + (d.x - x.x) * N, y: x.y + (d.y - x.y) * N }, l = R(x, d) + 90, !1;
|
|
176
|
+
}
|
|
177
|
+
return x = d, !0;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
let h = this.getPrivate("centerX", 0), c = this.getPrivate("centerY", 0), g = (n.x - h) * o, m = (n.y - c) * o;
|
|
181
|
+
t == null && (t = 0);
|
|
182
|
+
let u = -a.get("axisLength", 0) * t * o, y = g + C(l) * u, F = m + A(l) * u;
|
|
183
|
+
return { x: y, y: F };
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @ignore
|
|
187
|
+
*/
|
|
188
|
+
updateLabel(e, t, s, a) {
|
|
189
|
+
if (e) {
|
|
190
|
+
t == null && (t = 0);
|
|
191
|
+
let i = 0.5;
|
|
192
|
+
a != null && a > 1 ? i = e.get("multiLocation", i) : i = e.get("location", i), s != null && s != t && (t = t + (s - t) * i);
|
|
193
|
+
const r = this.positionToAngle(t), o = this.get("yRenderer"), n = o.axis, l = this.positionToPoint(t, n.get("start", 0) + o.get("axisLocation", 0));
|
|
194
|
+
e.setAll({
|
|
195
|
+
x: l.x,
|
|
196
|
+
y: l.y
|
|
197
|
+
}), this.get("rotateLabels", !0) && e.set("rotation", r - 90), this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @ignore
|
|
202
|
+
*/
|
|
203
|
+
updateTick(e, t, s, a) {
|
|
204
|
+
if (e) {
|
|
205
|
+
t == null && (t = 0);
|
|
206
|
+
let i = 0.5;
|
|
207
|
+
a != null && a > 1 ? i = e.get("multiLocation", i) : i = e.get("location", i), s != null && s != t && (t = t + (s - t) * i);
|
|
208
|
+
let r = e.get("length", 0);
|
|
209
|
+
e.get("inside") && (r *= -1);
|
|
210
|
+
let n = this.positionToAngle(t);
|
|
211
|
+
this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1));
|
|
212
|
+
const h = this.get("yRenderer").axis, c = this.positionToPoint(t, h.get("start"));
|
|
213
|
+
e.set("draw", (g) => {
|
|
214
|
+
g.moveTo(c.x, c.y), g.lineTo(c.x - r * C(n), c.y - r * A(n));
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* @ignore
|
|
220
|
+
*/
|
|
221
|
+
updateBullet(e, t, s) {
|
|
222
|
+
if (e) {
|
|
223
|
+
const a = e.get("sprite");
|
|
224
|
+
if (a) {
|
|
225
|
+
t == null && (t = 0);
|
|
226
|
+
let i = e.get("location", 0.5);
|
|
227
|
+
s != null && s != t && (t = t + (s - t) * i);
|
|
228
|
+
const o = this.get("yRenderer").axis, n = this.positionToPoint(t, o.get("start"));
|
|
229
|
+
a.setAll({ x: n.x, y: n.y }), this.toggleVisibility(a, t, 0, 1);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* @ignore
|
|
235
|
+
*/
|
|
236
|
+
updateFill(e, t, s) {
|
|
237
|
+
if (e) {
|
|
238
|
+
t == null && (t = 0), s == null && (s = 1);
|
|
239
|
+
const i = this.get("yRenderer").axis, r = this.getPoints(t, i.get("start", 0), s, i.get("end", 1));
|
|
240
|
+
e.set("draw", (o) => {
|
|
241
|
+
o.moveTo(r[0].x, r[0].y), v(r, (n) => {
|
|
242
|
+
o.lineTo(n.x, n.y);
|
|
243
|
+
}), o.closePath();
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Returns axis length in pixels.
|
|
249
|
+
*
|
|
250
|
+
* @return Length
|
|
251
|
+
*/
|
|
252
|
+
axisLength() {
|
|
253
|
+
return this.getPrivate("axisLength", 0);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @ignore
|
|
257
|
+
*/
|
|
258
|
+
positionTooltip(e, t) {
|
|
259
|
+
const s = this.get("yRenderer"), a = s.axis.get("start", 0), i = s.axis.get("end", 1), r = this.positionToPoint(t, s.get("axisLocation", 0.5) * (i - a) + a);
|
|
260
|
+
this._positionTooltip(e, r);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @ignore
|
|
264
|
+
*/
|
|
265
|
+
updateTooltipBounds(e) {
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
V.className = "AxisRendererCurveX";
|
|
269
|
+
V.classNames = I.classNames.concat([V.className]);
|
|
270
|
+
class z extends I {
|
|
271
|
+
constructor() {
|
|
272
|
+
super(...arguments), this._fillGenerator = ee(), this.labels = this.addDisposer(new Y(D.new({}), () => ae._new(this._root, {
|
|
273
|
+
themeTags: L(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
274
|
+
}, [this.labels.template])));
|
|
275
|
+
}
|
|
276
|
+
_afterNew() {
|
|
277
|
+
this._settings.themeTags = L(this._settings.themeTags, ["renderer", "radial"]), super._afterNew(), this.setPrivate("letter", "Y"), this.setRaw("position", "absolute");
|
|
278
|
+
}
|
|
279
|
+
_changed() {
|
|
280
|
+
super._changed(), this.isDirty("axisLength") && this.updateLayout();
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @ignore
|
|
284
|
+
*/
|
|
285
|
+
processAxis() {
|
|
286
|
+
super.processAxis();
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* @ignore
|
|
290
|
+
*/
|
|
291
|
+
updateLayout() {
|
|
292
|
+
const e = this.chart;
|
|
293
|
+
if (e) {
|
|
294
|
+
const t = this.positionToPoint(0, 0), s = this.positionToPoint(1, 0);
|
|
295
|
+
this.set("draw", (a) => {
|
|
296
|
+
a.moveTo(t.x, t.y), a.lineTo(s.x, s.y);
|
|
297
|
+
}), this.axis.markDirtySize(), e._updateMasks();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* @ignore
|
|
302
|
+
*/
|
|
303
|
+
updateGrid(e, t, s) {
|
|
304
|
+
if (e) {
|
|
305
|
+
_(t) || (t = 0);
|
|
306
|
+
let a = e.get("location", 0.5);
|
|
307
|
+
_(s) && s != t && (t = t + (s - t) * a), this.toggleVisibility(e, t, 0, 1);
|
|
308
|
+
let i = this.get("xRenderer");
|
|
309
|
+
if (i) {
|
|
310
|
+
const r = i.get("points");
|
|
311
|
+
r && e.set("draw", (o) => {
|
|
312
|
+
let n;
|
|
313
|
+
v(r, (l, h) => {
|
|
314
|
+
let c = i.pointPostion[h], g = this.positionToPoint(t, c, !0);
|
|
315
|
+
h == 0 ? o.moveTo(g.x, g.y) : n && Math.hypot(n.x - g.x, n.y - g.y) < 0.5 || (o.lineTo(g.x, g.y), n = g);
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// do not delete
|
|
322
|
+
_handleOpposite() {
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Converts relative position to X/Y point.
|
|
326
|
+
*
|
|
327
|
+
* @param position Position
|
|
328
|
+
* @return Point
|
|
329
|
+
*/
|
|
330
|
+
positionToPoint(e, t, s) {
|
|
331
|
+
t == null && (t = 0);
|
|
332
|
+
const a = this.get("xRenderer");
|
|
333
|
+
return a ? a.positionToPoint(t, e, s) : { x: 0, y: 0 };
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* @ignore
|
|
337
|
+
*/
|
|
338
|
+
updateLabel(e, t, s, a) {
|
|
339
|
+
if (e) {
|
|
340
|
+
_(t) || (t = 0);
|
|
341
|
+
let i = 0.5;
|
|
342
|
+
_(a) && a > 1 ? i = e.get("multiLocation", i) : i = e.get("location", i), _(s) && s != t && (t = t + (s - t) * i);
|
|
343
|
+
const r = this.positionToPoint(t, 0), o = this.get("xRenderer");
|
|
344
|
+
if (o) {
|
|
345
|
+
let n = 0;
|
|
346
|
+
o && (n = o.positionToAngle(0) - 90), e.setAll({
|
|
347
|
+
x: r.x,
|
|
348
|
+
y: r.y
|
|
349
|
+
}), this.get("rotateLabels", !0) && e.set("rotation", n);
|
|
350
|
+
}
|
|
351
|
+
this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1));
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* @ignore
|
|
356
|
+
*/
|
|
357
|
+
updateTick(e, t, s, a) {
|
|
358
|
+
if (e) {
|
|
359
|
+
_(t) || (t = 0);
|
|
360
|
+
let i = 0.5;
|
|
361
|
+
_(a) && a > 1 ? i = e.get("multiLocation", i) : i = e.get("location", i), _(s) && s != t && (t = t + (s - t) * i);
|
|
362
|
+
const r = this.positionToPoint(t, 0), o = this.get("xRenderer");
|
|
363
|
+
if (o) {
|
|
364
|
+
let n = 0;
|
|
365
|
+
o && (n = o.positionToAngle(0) - 90);
|
|
366
|
+
let l = e.get("length", 0);
|
|
367
|
+
e.get("inside") && (l *= -1), e.set("draw", (c) => {
|
|
368
|
+
c.moveTo(r.x, r.y), c.lineTo(r.x + l * C(n), r.y + l * A(n));
|
|
369
|
+
}), this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1));
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* @ignore
|
|
375
|
+
*/
|
|
376
|
+
updateBullet(e, t, s) {
|
|
377
|
+
if (e) {
|
|
378
|
+
const a = e.get("sprite");
|
|
379
|
+
if (a) {
|
|
380
|
+
_(t) || (t = 0);
|
|
381
|
+
let i = e.get("location", 0.5);
|
|
382
|
+
_(s) && s != t && (t = t + (s - t) * i);
|
|
383
|
+
const r = this.positionToPoint(t);
|
|
384
|
+
a.setAll({ x: r.x, y: r.y }), this.toggleVisibility(a, t, 0, 1);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
getPoints(e, t, s, a) {
|
|
389
|
+
var i;
|
|
390
|
+
return (i = this.get("xRenderer")) === null || i === void 0 ? void 0 : i.getPoints(e, t, s, a);
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* @ignore
|
|
394
|
+
*/
|
|
395
|
+
updateFill(e, t, s) {
|
|
396
|
+
if (e) {
|
|
397
|
+
t == null && (t = 0), s == null && (s = 1);
|
|
398
|
+
const a = this.getPoints(0, t, 1, s);
|
|
399
|
+
a && e.set("draw", (i) => {
|
|
400
|
+
i.moveTo(a[0].x, a[0].y), v(a, (r) => {
|
|
401
|
+
i.lineTo(r.x, r.y);
|
|
402
|
+
}), i.closePath();
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Returns axis length in pixels.
|
|
408
|
+
*
|
|
409
|
+
* @return Length
|
|
410
|
+
*/
|
|
411
|
+
axisLength() {
|
|
412
|
+
return this.get("axisLength", 60);
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* @ignore
|
|
416
|
+
*/
|
|
417
|
+
updateTooltipBounds(e) {
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Converts relative position to pixels.
|
|
421
|
+
*
|
|
422
|
+
* @param position Position
|
|
423
|
+
* @return Pixels
|
|
424
|
+
*/
|
|
425
|
+
positionToCoordinate(e) {
|
|
426
|
+
return this._inversed ? (e = Math.min(this._end, e), (this._end - e) * this._axisLength) : (e = Math.max(this._start, e), (e - this._start) * this._axisLength);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* @ignore
|
|
430
|
+
*/
|
|
431
|
+
positionTooltip(e, t) {
|
|
432
|
+
const s = this.get("xRenderer");
|
|
433
|
+
if (s) {
|
|
434
|
+
const a = this.positionToPoint(t, s.axis.get("start", 0));
|
|
435
|
+
this._positionTooltip(e, a);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
z.className = "AxisRendererCurveY";
|
|
440
|
+
z.classNames = I.classNames.concat([z.className]);
|
|
441
|
+
class re extends se {
|
|
442
|
+
setupDefaultRules() {
|
|
443
|
+
super.setupDefaultRules();
|
|
444
|
+
const e = this.rule.bind(this);
|
|
445
|
+
e("SpiralChart").setAll({
|
|
446
|
+
levelCount: 3,
|
|
447
|
+
endAngle: 0,
|
|
448
|
+
startAngle: -90,
|
|
449
|
+
yAxisRadius: X(60),
|
|
450
|
+
innerRadius: X(20)
|
|
451
|
+
}), e("SerpentineChart").setAll({
|
|
452
|
+
levelCount: 3,
|
|
453
|
+
orientation: "vertical",
|
|
454
|
+
startLocation: 0,
|
|
455
|
+
endLocation: 1
|
|
456
|
+
}), e("CurveColumnSeries").setAll({
|
|
457
|
+
clustered: !0
|
|
458
|
+
}), e("Slice", ["curve", "column", "series"]).setAll({
|
|
459
|
+
width: X(50),
|
|
460
|
+
height: X(50)
|
|
461
|
+
}), e("AxisRendererCurveY").setAll({
|
|
462
|
+
minGridDistance: 20,
|
|
463
|
+
inversed: !1,
|
|
464
|
+
cellStartLocation: 0,
|
|
465
|
+
cellEndLocation: 1,
|
|
466
|
+
rotateLabels: !1,
|
|
467
|
+
axisLocation: 0.5,
|
|
468
|
+
axisLength: 60
|
|
469
|
+
}), e("AxisRendererCurveX").setAll({
|
|
470
|
+
minGridDistance: 100,
|
|
471
|
+
inversed: !1,
|
|
472
|
+
cellStartLocation: 0,
|
|
473
|
+
cellEndLocation: 1,
|
|
474
|
+
rotateLabels: !1
|
|
475
|
+
}), e("RadialLabel", ["circular"]).setAll({
|
|
476
|
+
textType: "circular",
|
|
477
|
+
paddingTop: 1,
|
|
478
|
+
paddingRight: 0,
|
|
479
|
+
paddingBottom: 1,
|
|
480
|
+
paddingLeft: 0,
|
|
481
|
+
centerX: 0,
|
|
482
|
+
centerY: 0,
|
|
483
|
+
radius: 8
|
|
484
|
+
}), e("AxisLabelRadial", ["category"]).setAll({
|
|
485
|
+
text: "{category}",
|
|
486
|
+
populateText: !0
|
|
487
|
+
}), e("RadialLabel", ["radial"]).setAll({
|
|
488
|
+
textType: "regular",
|
|
489
|
+
centerX: 0,
|
|
490
|
+
textAlign: "right"
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
class w extends U {
|
|
495
|
+
constructor() {
|
|
496
|
+
super(...arguments), this.curveContainer = this.plotContainer.children.push(ie.new(this._root, { x: b, y: b }));
|
|
497
|
+
}
|
|
498
|
+
_afterNew() {
|
|
499
|
+
this._defaultThemes.push(re.new(this._root)), super._afterNew();
|
|
500
|
+
const e = this.curveContainer, t = this.gridContainer, s = this.topGridContainer, a = this.seriesContainer, i = this.bulletsContainer;
|
|
501
|
+
e.children.pushAll([t, a, s, i]), a.set("mask", k.new(this._root, {})), t.set("mask", k.new(this._root, {})), this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
|
|
502
|
+
this._updateMasks();
|
|
503
|
+
}));
|
|
504
|
+
}
|
|
505
|
+
_maskGrid() {
|
|
506
|
+
}
|
|
507
|
+
_addCursor(e) {
|
|
508
|
+
this.curveContainer.children.push(e);
|
|
509
|
+
}
|
|
510
|
+
// do not delete
|
|
511
|
+
_updateMasks() {
|
|
512
|
+
this.xAxes.each((e) => {
|
|
513
|
+
e.get("renderer")._updateLayout();
|
|
514
|
+
}), this._updateMask(this.seriesContainer), this._updateMask(this.gridContainer), this.series.each((e) => {
|
|
515
|
+
e.get("maskBullets") ? this._updateMask(e.bulletsContainer) : e.bulletsContainer.set("mask", void 0);
|
|
516
|
+
}), this.yAxes.each((e) => {
|
|
517
|
+
e.markDirtySize();
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* @ignore
|
|
522
|
+
*/
|
|
523
|
+
_updateMask(e) {
|
|
524
|
+
const t = e.get("mask");
|
|
525
|
+
if (t) {
|
|
526
|
+
const s = this.xAxes.getIndex(0), a = this.yAxes.getIndex(0);
|
|
527
|
+
if (s && a) {
|
|
528
|
+
const r = s.get("renderer").getPoints(s.get("start", 0), a.get("start", 0), s.get("end", 1), a.get("end", 1));
|
|
529
|
+
t.set("draw", (o) => {
|
|
530
|
+
o.moveTo(r[0].x, r[0].y);
|
|
531
|
+
for (let n = 1; n < r.length; n++)
|
|
532
|
+
o.lineTo(r[n].x, r[n].y);
|
|
533
|
+
o.closePath();
|
|
534
|
+
}), s.markDirtySize();
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* @ignore
|
|
540
|
+
*/
|
|
541
|
+
processAxis(e) {
|
|
542
|
+
this.curveContainer.children.unshift(e);
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* @ignore
|
|
546
|
+
*/
|
|
547
|
+
inPlot(e) {
|
|
548
|
+
return !0;
|
|
549
|
+
}
|
|
550
|
+
_tooltipToLocal(e) {
|
|
551
|
+
return this.curveContainer._display.toLocal(e);
|
|
552
|
+
}
|
|
553
|
+
_handlePinch() {
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
w.className = "CurveChart";
|
|
557
|
+
w.classNames = U.classNames.concat([w.className]);
|
|
558
|
+
class O extends w {
|
|
559
|
+
_prepareChildren() {
|
|
560
|
+
super._prepareChildren(), (this.isDirty("levelCount") || this.isDirty("orientation")) && this._updateMasks();
|
|
561
|
+
}
|
|
562
|
+
_updateMasks() {
|
|
563
|
+
const e = this.get("levelCount", 1) - 1;
|
|
564
|
+
let t = this.plotContainer.innerWidth(), s = this.plotContainer.innerHeight(), a = [], i;
|
|
565
|
+
if (this.get("orientation") == "vertical") {
|
|
566
|
+
i = Math.min(s / (e + 1) / 2, t / 3), s = Math.min(i * (e + 1) * 2, s);
|
|
567
|
+
const r = this.get("startLocation", 0), o = this.get("endLocation", 1);
|
|
568
|
+
for (let n = 0; n <= e; n++)
|
|
569
|
+
if (n % 2 === 0) {
|
|
570
|
+
n === 0 ? a.push({ x: -t / 2 + (t - i * 2) * r, y: -s / 2 + s / (e + 1) * n }) : a.push({ x: -t / 2 + i, y: -s / 2 + s / (e + 1) * n }), n === e ? a.push({ x: t / 2 - i - (t - i * 2) * (1 - o), y: -s / 2 + s / (e + 1) * n }) : a.push({ x: t / 2 - 2 * i, y: -s / 2 + s / (e + 1) * n });
|
|
571
|
+
let l = { x: t / 2 - 2 * i, y: -s / 2 + s / (e + 1) * (n + 0.5) };
|
|
572
|
+
if (n < e)
|
|
573
|
+
for (let h = 1; h < 50; h++) {
|
|
574
|
+
let c = -90 + h / 50 * 180;
|
|
575
|
+
a.push({ x: l.x + i * C(c), y: l.y + i * A(c) });
|
|
576
|
+
}
|
|
577
|
+
} else {
|
|
578
|
+
a.push({ x: t / 2 - 2 * i, y: -s / 2 + s / (e + 1) * n }), n === e ? a.push({ x: -t / 2 + (t - i * 2) * (1 - o), y: -s / 2 + s / (e + 1) * n }) : a.push({ x: -t / 2 + i, y: -s / 2 + s / (e + 1) * n });
|
|
579
|
+
let l = { x: -t / 2 + i, y: -s / 2 + s / (e + 1) * (n + 0.5) };
|
|
580
|
+
if (n < e)
|
|
581
|
+
for (let h = 1; h < 50; h++) {
|
|
582
|
+
let c = -90 - h / 50 * 180;
|
|
583
|
+
a.push({ x: l.x + i * C(c), y: l.y + i * A(c) });
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
} else {
|
|
587
|
+
i = Math.min(t / (e + 1) / 2, s / 3), t = Math.min(i * (e + 1) * 2, t);
|
|
588
|
+
const r = this.get("startLocation", 0), o = this.get("endLocation", 1);
|
|
589
|
+
for (let n = 0; n <= e; n++)
|
|
590
|
+
if (n % 2 === 0) {
|
|
591
|
+
n === 0 ? a.push({ y: -s / 2 + (s - i * 2) * r, x: -t / 2 + t / (e + 1) * n }) : a.push({ y: -s / 2 + i, x: -t / 2 + t / (e + 1) * n }), n === e ? a.push({ y: s / 2 - i - (s - i * 2) * (1 - o), x: -t / 2 + t / (e + 1) * n }) : a.push({ y: s / 2 - 2 * i, x: -t / 2 + t / (e + 1) * n });
|
|
592
|
+
let l = { y: s / 2 - 2 * i, x: -t / 2 + t / (e + 1) * (n + 0.5) };
|
|
593
|
+
if (n < e)
|
|
594
|
+
for (let h = 1; h < 50; h++) {
|
|
595
|
+
let c = -90 + h / 50 * 180;
|
|
596
|
+
a.push({ y: l.y + i * C(c), x: l.x + i * A(c) });
|
|
597
|
+
}
|
|
598
|
+
} else {
|
|
599
|
+
a.push({ y: s / 2 - 2 * i, x: -t / 2 + t / (e + 1) * n }), n === e ? a.push({ y: -s / 2 + (s - i * 2) * (1 - o), x: -t / 2 + t / (e + 1) * n }) : a.push({ y: -s / 2 + i, x: -t / 2 + t / (e + 1) * n });
|
|
600
|
+
let l = { y: -s / 2 + i, x: -t / 2 + t / (e + 1) * (n + 0.5) };
|
|
601
|
+
if (n < e)
|
|
602
|
+
for (let h = 1; h < 50; h++) {
|
|
603
|
+
let c = -90 - h / 50 * 180;
|
|
604
|
+
a.push({ y: l.y + i * C(c), x: l.x + i * A(c) });
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
this.yAxes.each((r) => {
|
|
609
|
+
r.get("renderer").set("axisLength", G(this.get("yAxisRadius", b), 2 * i)), r.markDirtySize();
|
|
610
|
+
}), this.xAxes.each((r) => {
|
|
611
|
+
const o = r.get("renderer");
|
|
612
|
+
o.setPrivate("autoScale", !1), o.set("points", a);
|
|
613
|
+
}), super._updateMasks();
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
O.className = "SerpentineChart";
|
|
617
|
+
O.classNames = w.classNames.concat([O.className]);
|
|
618
|
+
class H extends w {
|
|
619
|
+
_prepareChildren() {
|
|
620
|
+
super._prepareChildren(), this.isDirty("levelCount") && this._updateMasks();
|
|
621
|
+
}
|
|
622
|
+
_updateMasks() {
|
|
623
|
+
let e = this.plotContainer.innerWidth(), t = this.plotContainer.innerHeight(), s = Math.min(e, t) / 2, a = G(this.get("innerRadius", 0), s), i = (s - a) / this.get("levelCount", 1), r = G(this.get("yAxisRadius", b), i);
|
|
624
|
+
const o = ne(0, 0, s, s, a, 20, i, this.get("startAngle", 0), this.get("endAngle", 360));
|
|
625
|
+
this.yAxes.each((n) => {
|
|
626
|
+
n.get("renderer").set("axisLength", r), n.markDirtySize();
|
|
627
|
+
}), this.xAxes.each((n) => {
|
|
628
|
+
const l = n.get("renderer");
|
|
629
|
+
l.setPrivate("autoScale", !1), l.set("points", o);
|
|
630
|
+
}), super._updateMasks();
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
H.className = "SpiralChart";
|
|
634
|
+
H.classNames = w.classNames.concat([H.className]);
|
|
635
|
+
class W extends Z {
|
|
636
|
+
constructor() {
|
|
637
|
+
super(...arguments), this.columns = this.addDisposer(new Y(D.new({}), () => K._new(this._root, {
|
|
638
|
+
position: "absolute",
|
|
639
|
+
themeTags: L(this.columns.template.get("themeTags", []), ["curve", "series", "column"])
|
|
640
|
+
}, [this.columns.template])));
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* @ignore
|
|
644
|
+
*/
|
|
645
|
+
makeColumn(e, t) {
|
|
646
|
+
const s = this.mainContainer.children.push(t.make());
|
|
647
|
+
return s._setDataItem(e), t.push(s), s;
|
|
648
|
+
}
|
|
649
|
+
_afterNew() {
|
|
650
|
+
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", k.new(this._root, {}));
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* @ignore
|
|
654
|
+
*/
|
|
655
|
+
getPoint(e, t) {
|
|
656
|
+
return this.get("xAxis").get("renderer").positionToPoint(e, t);
|
|
657
|
+
}
|
|
658
|
+
_updateSeriesGraphics(e, t, s, a, i, r) {
|
|
659
|
+
t.setPrivate("visible", !0), e.setRaw("left", s), e.setRaw("right", a), e.setRaw("top", i), e.setRaw("bottom", r);
|
|
660
|
+
const n = this.get("xAxis").get("renderer"), l = this.get("yAxis"), h = l.get("start", 0), c = l.get("end", 1);
|
|
661
|
+
i = q(i, h, c), r = q(r, h, c);
|
|
662
|
+
const g = n.getPoints(s, i, a, r);
|
|
663
|
+
t.set("points", g);
|
|
664
|
+
}
|
|
665
|
+
_shouldInclude(e) {
|
|
666
|
+
const t = this.get("xAxis");
|
|
667
|
+
return !(e < t.get("start", 0) || e > t.get("end", 1));
|
|
668
|
+
}
|
|
669
|
+
_shouldShowBullet(e, t) {
|
|
670
|
+
const s = this.get("xAxis");
|
|
671
|
+
return e < s.get("start", 0) || e > s.get("end", 1) ? !1 : this._showBullets;
|
|
672
|
+
}
|
|
673
|
+
_positionBullet(e) {
|
|
674
|
+
let t = e.get("sprite");
|
|
675
|
+
if (t) {
|
|
676
|
+
const s = t.dataItem, a = s.get("locationX", 0.5), i = s.get("locationY", 0.5), r = e.get("locationX", a), o = e.get("locationY", i), n = s.component, l = n.get("xAxis"), h = n.get("yAxis");
|
|
677
|
+
let c = 0, g = n.get("vcx", 1), m = n.get("vcy", 1);
|
|
678
|
+
if (this.get("openValueXField")) {
|
|
679
|
+
const u = l.getDataItemPositionX(s, n._xOpenField, a, g), y = l.getDataItemPositionX(s, n._xField, a, g);
|
|
680
|
+
c = u + (y - u) * r;
|
|
681
|
+
} else
|
|
682
|
+
c = l.getDataItemPositionX(s, n._xField, r, g);
|
|
683
|
+
let f = 0;
|
|
684
|
+
if (this.get("openValueYField")) {
|
|
685
|
+
const u = h.getDataItemPositionY(s, n._yOpenField, i, m), y = h.getDataItemPositionY(s, n._yField, i, m);
|
|
686
|
+
f = u + (y - u) * o;
|
|
687
|
+
} else
|
|
688
|
+
f = h.getDataItemPositionY(s, n._yField, o, m);
|
|
689
|
+
if (n._shouldShowBullet(c, f)) {
|
|
690
|
+
t.setPrivate("visible", !0);
|
|
691
|
+
const u = n.getPoint(c, f);
|
|
692
|
+
t.setAll({
|
|
693
|
+
x: u.x,
|
|
694
|
+
y: u.y
|
|
695
|
+
});
|
|
696
|
+
} else
|
|
697
|
+
t.setPrivate("visible", !1);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
_handleMaskBullets() {
|
|
701
|
+
}
|
|
702
|
+
_updateChildren() {
|
|
703
|
+
super._updateChildren(), this.get("maskBullets") || this.bulletsContainer.remove("mask");
|
|
704
|
+
}
|
|
705
|
+
_processAxisRange(e) {
|
|
706
|
+
super._processAxisRange(e), e.columns = new Y(D.new({}), () => K._new(this._root, {
|
|
707
|
+
position: "absolute",
|
|
708
|
+
themeTags: L(e.columns.template.get("themeTags", []), ["curves", "series", "column"])
|
|
709
|
+
}, [this.columns.template, e.columns.template]));
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
W.className = "CurveColumnSeries";
|
|
713
|
+
W.classNames = Z.classNames.concat([W.className]);
|
|
714
|
+
class E extends J {
|
|
715
|
+
_afterNew() {
|
|
716
|
+
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", k.new(this._root, {}));
|
|
717
|
+
}
|
|
718
|
+
_handleMaskBullets() {
|
|
719
|
+
}
|
|
720
|
+
_updateChildren() {
|
|
721
|
+
super._updateChildren(), this.get("maskBullets") || this.bulletsContainer.remove("mask");
|
|
722
|
+
}
|
|
723
|
+
getPoint(e, t) {
|
|
724
|
+
return this.get("xAxis").get("renderer").positionToPoint(e, t);
|
|
725
|
+
}
|
|
726
|
+
_shouldInclude(e) {
|
|
727
|
+
const t = this.get("xAxis");
|
|
728
|
+
return !(e < t.get("start", 0) || e > t.get("end", 1));
|
|
729
|
+
}
|
|
730
|
+
_shouldShowBullet(e, t) {
|
|
731
|
+
const s = this.get("xAxis");
|
|
732
|
+
return e < s.get("start", 0) || e > s.get("end", 1) ? !1 : this._showBullets;
|
|
733
|
+
}
|
|
734
|
+
_positionBullet(e) {
|
|
735
|
+
let t = e.get("sprite");
|
|
736
|
+
if (t) {
|
|
737
|
+
const s = t.dataItem, a = s.get("locationX", 0.5), i = s.get("locationY", 0.5), r = e.get("locationX", a), o = e.get("locationY", i), n = s.component, l = n.get("xAxis"), h = n.get("yAxis");
|
|
738
|
+
let c = 0, g = n.get("vcx", 1), m = n.get("vcy", 1);
|
|
739
|
+
if (this.get("openValueXField")) {
|
|
740
|
+
const u = l.getDataItemPositionX(s, n._xOpenField, a, g), y = l.getDataItemPositionX(s, n._xField, a, g);
|
|
741
|
+
c = u + (y - u) * r;
|
|
742
|
+
} else
|
|
743
|
+
c = l.getDataItemPositionX(s, n._xField, r, g);
|
|
744
|
+
let f = 0;
|
|
745
|
+
if (this.get("openValueYField")) {
|
|
746
|
+
const u = h.getDataItemPositionY(s, n._yOpenField, i, m), y = h.getDataItemPositionY(s, n._yField, i, m);
|
|
747
|
+
f = u + (y - u) * o;
|
|
748
|
+
} else
|
|
749
|
+
f = h.getDataItemPositionY(s, n._yField, o, m);
|
|
750
|
+
if (n._shouldShowBullet(c, f)) {
|
|
751
|
+
t.setPrivate("visible", !0);
|
|
752
|
+
const u = n.getPoint(c, f);
|
|
753
|
+
t.setAll({
|
|
754
|
+
x: u.x,
|
|
755
|
+
y: u.y
|
|
756
|
+
});
|
|
757
|
+
} else
|
|
758
|
+
t.setPrivate("visible", !1);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
E.className = "CurveLineSeries";
|
|
763
|
+
E.classNames = J.classNames.concat([E.className]);
|
|
764
|
+
class j extends Q {
|
|
765
|
+
_afterNew() {
|
|
766
|
+
this._settings.themeTags = L(this._settings.themeTags, ["curve", "cursor"]), super._afterNew();
|
|
767
|
+
}
|
|
768
|
+
_handleXLine() {
|
|
769
|
+
}
|
|
770
|
+
_handleYLine() {
|
|
771
|
+
}
|
|
772
|
+
_getPosition(e) {
|
|
773
|
+
return this.get("xAxis").get("renderer").pointToPosition(e);
|
|
774
|
+
}
|
|
775
|
+
_getPoint(e, t) {
|
|
776
|
+
return this.get("xAxis").get("renderer").positionToPoint(e, t);
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* @ignore
|
|
780
|
+
*/
|
|
781
|
+
updateLayout() {
|
|
782
|
+
}
|
|
783
|
+
_updateLines(e, t) {
|
|
784
|
+
this._tooltipX || this._drawXLine(e, t), this._tooltipY || this._drawYLine(e, t);
|
|
785
|
+
}
|
|
786
|
+
_drawXLine(e, t) {
|
|
787
|
+
const s = this.get("xAxis"), a = this.get("yAxis"), i = s.get("renderer"), r = i.toAxisPosition(this.getPrivate("positionX", 0)), o = i.positionToPoint(r, a.get("start", 0)), n = i.positionToPoint(r, a.get("end", 1));
|
|
788
|
+
this.lineX.set("draw", (l) => {
|
|
789
|
+
l.moveTo(o.x, o.y), l.lineTo(n.x, n.y);
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
_drawYLine(e, t) {
|
|
793
|
+
const s = this.get("xAxis"), a = this.get("yAxis"), i = a.get("renderer"), r = 1 - i.toAxisPosition(this.getPrivate("positionY", 0)), o = i.getPoints(s.get("start", 0), r, s.get("end", 1), r);
|
|
794
|
+
o && (r > a.get("start", 0) && r < a.get("end", 1) ? this.lineY.set("draw", (n) => {
|
|
795
|
+
o.length > 0 && (n.moveTo(o[0].x, o[0].y), v(o, (l) => {
|
|
796
|
+
n.lineTo(l.x, l.y);
|
|
797
|
+
}));
|
|
798
|
+
}) : this.lineY.set("draw", (n) => {
|
|
799
|
+
n.clear();
|
|
800
|
+
}));
|
|
801
|
+
}
|
|
802
|
+
_updateXLine(e) {
|
|
803
|
+
let t = e.get("pointTo");
|
|
804
|
+
t && this._drawXLine(t.x, t.y);
|
|
805
|
+
}
|
|
806
|
+
_updateYLine(e) {
|
|
807
|
+
let t = e.get("pointTo");
|
|
808
|
+
t && this._drawYLine(t.x, t.y);
|
|
809
|
+
}
|
|
810
|
+
_inPlot() {
|
|
811
|
+
return this.chart, !0;
|
|
812
|
+
}
|
|
813
|
+
_updateSelection() {
|
|
814
|
+
this.selection.set("draw", (e) => {
|
|
815
|
+
const t = this.get("behavior");
|
|
816
|
+
let s = this.get("xAxis"), a = this.get("yAxis"), i = s.toAxisPosition(this.getPrivate("downPositionX", 0)), r = a.toAxisPosition(this.getPrivate("downPositionY", 0)), o = s.toAxisPosition(this.getPrivate("positionX", 0)), n = a.toAxisPosition(this.getPrivate("positionY", 0));
|
|
817
|
+
t == "zoomX" || t == "selectX" ? (r = a.get("start", 0), n = a.get("end", 1)) : (t == "zoomY" || t == "selectY") && (i = s.get("start", 0), o = s.get("end", 1));
|
|
818
|
+
const l = s.get("renderer").getPoints(i, r, o, n);
|
|
819
|
+
e.moveTo(l[0].x, l[0].y), v(l, (h) => {
|
|
820
|
+
e.lineTo(h.x, h.y);
|
|
821
|
+
}), e.closePath();
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
j.className = "CurveCursor";
|
|
826
|
+
j.classNames = Q.classNames.concat([j.className]);
|
|
827
|
+
export {
|
|
828
|
+
V as AxisRendererCurveX,
|
|
829
|
+
z as AxisRendererCurveY,
|
|
830
|
+
w as CurveChart,
|
|
831
|
+
W as CurveColumnSeries,
|
|
832
|
+
j as CurveCursor,
|
|
833
|
+
E as CurveLineSeries,
|
|
834
|
+
re as DefaultTheme,
|
|
835
|
+
O as SerpentineChart,
|
|
836
|
+
H as SpiralChart
|
|
837
|
+
};
|