@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,789 @@
|
|
|
1
|
+
import { S as X, a as S } from "./Slice.Dm56LTKj.js";
|
|
2
|
+
import { aU as Y, L as M, T as b, m as p, r as m, x as z, o as A, h as u, j as f, a as _, C as W, G as L, H as v, P as Q, D as at, am as H, au as Z, q as O, b1 as K, b2 as nt, p as C, b5 as w, av as $, b6 as j, t as q, aW as tt } from "./am-chart.oZVBmpnn.js";
|
|
3
|
+
import { A as et } from "./AxisLabelRadial.BTpA5dYy.js";
|
|
4
|
+
import { B as st } from "./BaseColumnSeries.hIO71GLG.js";
|
|
5
|
+
import { p as rt, c as lt } from "./cardinal.BCA_LB0u.js";
|
|
6
|
+
function U() {
|
|
7
|
+
}
|
|
8
|
+
function it(c, t) {
|
|
9
|
+
this._context = c, this._k = (1 - t) / 6;
|
|
10
|
+
}
|
|
11
|
+
it.prototype = {
|
|
12
|
+
areaStart: U,
|
|
13
|
+
areaEnd: U,
|
|
14
|
+
lineStart: function() {
|
|
15
|
+
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
|
|
16
|
+
},
|
|
17
|
+
lineEnd: function() {
|
|
18
|
+
switch (this._point) {
|
|
19
|
+
case 1: {
|
|
20
|
+
this._context.moveTo(this._x3, this._y3), this._context.closePath();
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
case 2: {
|
|
24
|
+
this._context.lineTo(this._x3, this._y3), this._context.closePath();
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
case 3: {
|
|
28
|
+
this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
point: function(c, t) {
|
|
34
|
+
switch (c = +c, t = +t, this._point) {
|
|
35
|
+
case 0:
|
|
36
|
+
this._point = 1, this._x3 = c, this._y3 = t;
|
|
37
|
+
break;
|
|
38
|
+
case 1:
|
|
39
|
+
this._point = 2, this._context.moveTo(this._x4 = c, this._y4 = t);
|
|
40
|
+
break;
|
|
41
|
+
case 2:
|
|
42
|
+
this._point = 3, this._x5 = c, this._y5 = t;
|
|
43
|
+
break;
|
|
44
|
+
default:
|
|
45
|
+
rt(this, c, t);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = c, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const J = function c(t) {
|
|
52
|
+
function e(s) {
|
|
53
|
+
return new it(s, t);
|
|
54
|
+
}
|
|
55
|
+
return e.tension = function(s) {
|
|
56
|
+
return c(+s);
|
|
57
|
+
}, e;
|
|
58
|
+
}(0);
|
|
59
|
+
class k extends Y {
|
|
60
|
+
constructor() {
|
|
61
|
+
super(...arguments), this.labels = this.addDisposer(new M(b.new({}), () => et._new(this._root, {
|
|
62
|
+
themeTags: p(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
63
|
+
}, [this.labels.template]))), this.axisFills = this.addDisposer(new M(b.new({}), () => X._new(this._root, {
|
|
64
|
+
themeTags: p(this.axisFills.template.get("themeTags", ["fill"]), this.get("themeTags", []))
|
|
65
|
+
}, [this.axisFills.template]))), this._fillGenerator = S();
|
|
66
|
+
}
|
|
67
|
+
_afterNew() {
|
|
68
|
+
this._settings.themeTags = p(this._settings.themeTags, ["renderer", "circular"]), super._afterNew(), this.setPrivateRaw("letter", "X"), this.setRaw("position", "absolute");
|
|
69
|
+
}
|
|
70
|
+
_changed() {
|
|
71
|
+
super._changed(), (this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) && this.updateLayout();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @ignore
|
|
75
|
+
*/
|
|
76
|
+
processAxis() {
|
|
77
|
+
super.processAxis(), this.axis.labelsContainer.set("isMeasured", !1);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @ignore
|
|
81
|
+
*/
|
|
82
|
+
updateLayout() {
|
|
83
|
+
const t = this.chart;
|
|
84
|
+
if (t) {
|
|
85
|
+
const e = t.getPrivate("radius", 0);
|
|
86
|
+
let s = m(this.get("radius", z), e);
|
|
87
|
+
s < 0 && (s = e + s), this.setPrivate("radius", s);
|
|
88
|
+
let i = m(this.get("innerRadius", t.getPrivate("innerRadius", 0)), e) * t.getPrivate("irModifyer", 1);
|
|
89
|
+
i < 0 && (i = s + i), this.setPrivate("innerRadius", i);
|
|
90
|
+
let a = this.get("startAngle", t.get("startAngle", -90)), n = this.get("endAngle", t.get("endAngle", 270));
|
|
91
|
+
this.setPrivate("startAngle", a), this.setPrivate("endAngle", n), this.set("draw", (r) => {
|
|
92
|
+
const l = this.positionToPoint(0);
|
|
93
|
+
r.moveTo(l.x, l.y), a > n && ([a, n] = [n, a]), r.arc(0, 0, s, a * A, n * A);
|
|
94
|
+
}), this.axis.markDirtySize();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @ignore
|
|
99
|
+
*/
|
|
100
|
+
updateGrid(t, e, s) {
|
|
101
|
+
if (t) {
|
|
102
|
+
e == null && (e = 0);
|
|
103
|
+
let i = t.get("location", 0.5);
|
|
104
|
+
s != null && s != e && (e = e + (s - e) * i);
|
|
105
|
+
let a = this.getPrivate("radius", 0), n = this.getPrivate("innerRadius", 0), r = this.positionToAngle(e);
|
|
106
|
+
this.toggleVisibility(t, e, 0, 1), a != null && t.set("draw", (l) => {
|
|
107
|
+
l.moveTo(n * u(r), n * f(r)), l.lineTo(a * u(r), a * f(r));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Converts relative position to angle.
|
|
113
|
+
*
|
|
114
|
+
* @param position Position
|
|
115
|
+
* @return Angle
|
|
116
|
+
*/
|
|
117
|
+
positionToAngle(t) {
|
|
118
|
+
const e = this.axis, s = this.getPrivate("startAngle", 0), i = this.getPrivate("endAngle", 360), a = e.get("start", 0), n = e.get("end", 1);
|
|
119
|
+
let r = (i - s) / (n - a), l;
|
|
120
|
+
return this.get("inversed") ? l = s + (n - t) * r : l = s + (t - a) * r, l;
|
|
121
|
+
}
|
|
122
|
+
// do not delete
|
|
123
|
+
_handleOpposite() {
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Converts relative position to an X/Y coordinate.
|
|
127
|
+
*
|
|
128
|
+
* @param position Position
|
|
129
|
+
* @return Point
|
|
130
|
+
*/
|
|
131
|
+
positionToPoint(t) {
|
|
132
|
+
const e = this.getPrivate("radius", 0), s = this.positionToAngle(t);
|
|
133
|
+
return { x: e * u(s), y: e * f(s) };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @ignore
|
|
137
|
+
*/
|
|
138
|
+
updateLabel(t, e, s, i) {
|
|
139
|
+
if (t) {
|
|
140
|
+
e == null && (e = 0);
|
|
141
|
+
let a = 0.5;
|
|
142
|
+
i != null && i > 1 ? a = t.get("multiLocation", a) : a = t.get("location", a), s != null && s != e && (e = e + (s - e) * a);
|
|
143
|
+
const n = this.getPrivate("radius", 0), r = this.getPrivate("innerRadius", 0), l = this.positionToAngle(e);
|
|
144
|
+
t.setPrivate("radius", n), t.setPrivate("innerRadius", r), t.set("labelAngle", l), this.toggleVisibility(t, e, t.get("minPosition", 0), t.get("maxPosition", 1));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @ignore
|
|
149
|
+
*/
|
|
150
|
+
fillDrawMethod(t, e, s) {
|
|
151
|
+
t.set("draw", (i) => {
|
|
152
|
+
e == null && (e = this.getPrivate("startAngle", 0)), s == null && (s = this.getPrivate("endAngle", 0));
|
|
153
|
+
const a = this.getPrivate("innerRadius", 0), n = this.getPrivate("radius", 0);
|
|
154
|
+
this._fillGenerator.context(i), this._fillGenerator({ innerRadius: a, outerRadius: n, startAngle: (e + 90) * A, endAngle: (s + 90) * A });
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @ignore
|
|
159
|
+
*/
|
|
160
|
+
updateTick(t, e, s, i) {
|
|
161
|
+
if (t) {
|
|
162
|
+
e == null && (e = 0);
|
|
163
|
+
let a = 0.5;
|
|
164
|
+
i != null && i > 1 ? a = t.get("multiLocation", a) : a = t.get("location", a), s != null && s != e && (e = e + (s - e) * a);
|
|
165
|
+
let n = t.get("length", 0);
|
|
166
|
+
t.get("inside") && (n *= -1);
|
|
167
|
+
let l = this.getPrivate("radius", 0), o = this.positionToAngle(e);
|
|
168
|
+
this.toggleVisibility(t, e, t.get("minPosition", 0), t.get("maxPosition", 1)), l != null && t.set("draw", (h) => {
|
|
169
|
+
h.moveTo(l * u(o), l * f(o)), l += n, h.lineTo(l * u(o), l * f(o));
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @ignore
|
|
175
|
+
*/
|
|
176
|
+
updateBullet(t, e, s) {
|
|
177
|
+
if (t) {
|
|
178
|
+
const i = t.get("sprite");
|
|
179
|
+
if (i) {
|
|
180
|
+
e == null && (e = 0);
|
|
181
|
+
let a = t.get("location", 0.5);
|
|
182
|
+
s != null && s != e && (e = e + (s - e) * a);
|
|
183
|
+
let n = this.getPrivate("radius", 0), r = this.positionToAngle(e);
|
|
184
|
+
this.toggleVisibility(i, e, 0, 1), i.setAll({ rotation: r, x: n * u(r), y: n * f(r) });
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* @ignore
|
|
190
|
+
*/
|
|
191
|
+
updateFill(t, e, s) {
|
|
192
|
+
if (t) {
|
|
193
|
+
e == null && (e = 0), s == null && (s = 1);
|
|
194
|
+
let i = this.fitAngle(this.positionToAngle(e)), a = this.fitAngle(this.positionToAngle(s));
|
|
195
|
+
t.setAll({ startAngle: i, arc: a - i }), t._setSoft("innerRadius", this.getPrivate("innerRadius")), t._setSoft("radius", this.getPrivate("radius"));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* @ignore
|
|
200
|
+
*/
|
|
201
|
+
fitAngle(t) {
|
|
202
|
+
const e = this.getPrivate("startAngle", 0), s = this.getPrivate("endAngle", 0), i = Math.min(e, s), a = Math.max(e, s);
|
|
203
|
+
return t < i && (t = i), t > a && (t = a), t;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Returns axis length in pixels.
|
|
207
|
+
*
|
|
208
|
+
* @return Length
|
|
209
|
+
*/
|
|
210
|
+
axisLength() {
|
|
211
|
+
return Math.abs(this.getPrivate("radius", 0) * Math.PI * 2 * (this.getPrivate("endAngle", 360) - this.getPrivate("startAngle", 0)) / 360);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @ignore
|
|
215
|
+
*/
|
|
216
|
+
positionTooltip(t, e) {
|
|
217
|
+
let s = this.getPrivate("radius", 0);
|
|
218
|
+
const i = this.positionToAngle(e);
|
|
219
|
+
this._positionTooltip(t, { x: s * u(i), y: s * f(i) });
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* @ignore
|
|
223
|
+
*/
|
|
224
|
+
updateTooltipBounds(t) {
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
k.className = "AxisRendererCircular";
|
|
228
|
+
k.classNames = Y.classNames.concat([k.className]);
|
|
229
|
+
class G extends Y {
|
|
230
|
+
constructor() {
|
|
231
|
+
super(...arguments), this._fillGenerator = S(), this.labels = this.addDisposer(new M(b.new({}), () => et._new(this._root, {
|
|
232
|
+
themeTags: p(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
233
|
+
}, [this.labels.template])));
|
|
234
|
+
}
|
|
235
|
+
_afterNew() {
|
|
236
|
+
this._settings.themeTags = p(this._settings.themeTags, ["renderer", "radial"]), super._afterNew(), this.setPrivate("letter", "Y"), this.setRaw("position", "absolute");
|
|
237
|
+
}
|
|
238
|
+
_changed() {
|
|
239
|
+
super._changed(), (this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) && this.updateLayout();
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @ignore
|
|
243
|
+
*/
|
|
244
|
+
processAxis() {
|
|
245
|
+
super.processAxis();
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @ignore
|
|
249
|
+
*/
|
|
250
|
+
updateLayout() {
|
|
251
|
+
const t = this.chart;
|
|
252
|
+
if (t) {
|
|
253
|
+
const e = t.getPrivate("radius", 0);
|
|
254
|
+
let s = m(this.get("radius", z), e), i = m(this.get("innerRadius", t.getPrivate("innerRadius", 0)), e) * t.getPrivate("irModifyer", 1);
|
|
255
|
+
i < 0 && (i = s + i), this.setPrivate("radius", s), this.setPrivate("innerRadius", i);
|
|
256
|
+
let a = this.get("startAngle", t.get("startAngle", -90)), n = this.get("endAngle", t.get("endAngle", 270));
|
|
257
|
+
this.setPrivate("startAngle", a), this.setPrivate("endAngle", n);
|
|
258
|
+
const r = this.get("axisAngle", 0);
|
|
259
|
+
this.set("draw", (l) => {
|
|
260
|
+
l.moveTo(i * u(r), i * f(r)), l.lineTo(s * u(r), s * f(r));
|
|
261
|
+
}), this.axis.markDirtySize();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @ignore
|
|
266
|
+
*/
|
|
267
|
+
updateGrid(t, e, s) {
|
|
268
|
+
if (t) {
|
|
269
|
+
_(e) || (e = 0);
|
|
270
|
+
let i = t.get("location", 0.5);
|
|
271
|
+
_(s) && s != e && (e = e + (s - e) * i);
|
|
272
|
+
let a = this.positionToCoordinate(e) + this.getPrivate("innerRadius", 0);
|
|
273
|
+
this.toggleVisibility(t, e, 0, 1), _(a) && t.set("draw", (n) => {
|
|
274
|
+
let r = this.getPrivate("startAngle", 0) * A, l = this.getPrivate("endAngle", 0) * A;
|
|
275
|
+
n.arc(0, 0, Math.max(0, a), Math.min(r, l), Math.max(r, l));
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
// do not delete
|
|
280
|
+
_handleOpposite() {
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Converts relative position to X/Y point.
|
|
284
|
+
*
|
|
285
|
+
* @param position Position
|
|
286
|
+
* @return Point
|
|
287
|
+
*/
|
|
288
|
+
positionToPoint(t) {
|
|
289
|
+
const e = this.getPrivate("innerRadius", 0), s = this.positionToCoordinate(t) + e, i = this.get("axisAngle", 0);
|
|
290
|
+
return { x: s * u(i), y: s * f(i) };
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @ignore
|
|
294
|
+
*/
|
|
295
|
+
updateLabel(t, e, s, i) {
|
|
296
|
+
if (t) {
|
|
297
|
+
_(e) || (e = 0);
|
|
298
|
+
let a = 0.5;
|
|
299
|
+
_(i) && i > 1 ? a = t.get("multiLocation", a) : a = t.get("location", a), _(s) && s != e && (e = e + (s - e) * a);
|
|
300
|
+
const n = this.positionToPoint(e);
|
|
301
|
+
let r = Math.hypot(n.x, n.y);
|
|
302
|
+
t.setPrivate("radius", r), t.setPrivate("innerRadius", r), t.set("labelAngle", this.get("axisAngle")), this.toggleVisibility(t, e, t.get("minPosition", 0), t.get("maxPosition", 1));
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
fillDrawMethod(t, e, s) {
|
|
306
|
+
t.set("draw", (i) => {
|
|
307
|
+
e = Math.max(0, e), s = Math.max(0, s), this._fillGenerator.context(i);
|
|
308
|
+
let a = (this.getPrivate("startAngle", 0) + 90) * A, n = (this.getPrivate("endAngle", 0) + 90) * A;
|
|
309
|
+
n < a && ([a, n] = [n, a]), this._fillGenerator({ innerRadius: e, outerRadius: s, startAngle: a, endAngle: n });
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* @ignore
|
|
314
|
+
*/
|
|
315
|
+
updateTick(t, e, s, i) {
|
|
316
|
+
if (t) {
|
|
317
|
+
_(e) || (e = 0);
|
|
318
|
+
let a = 0.5;
|
|
319
|
+
_(i) && i > 1 ? a = t.get("multiLocation", a) : a = t.get("location", a), _(s) && s != e && (e = e + (s - e) * a);
|
|
320
|
+
const n = this.positionToPoint(e);
|
|
321
|
+
t.set("x", n.x), t.set("y", n.y);
|
|
322
|
+
let r = t.get("length", 0);
|
|
323
|
+
t.get("inside") && (r *= -1);
|
|
324
|
+
const o = this.get("axisAngle", 0) + 90;
|
|
325
|
+
t.set("draw", (h) => {
|
|
326
|
+
h.moveTo(0, 0), h.lineTo(r * u(o), r * f(o));
|
|
327
|
+
}), this.toggleVisibility(t, e, t.get("minPosition", 0), t.get("maxPosition", 1));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* @ignore
|
|
332
|
+
*/
|
|
333
|
+
updateBullet(t, e, s) {
|
|
334
|
+
if (t) {
|
|
335
|
+
const i = t.get("sprite");
|
|
336
|
+
if (i) {
|
|
337
|
+
_(e) || (e = 0);
|
|
338
|
+
let a = t.get("location", 0.5);
|
|
339
|
+
_(s) && s != e && (e = e + (s - e) * a);
|
|
340
|
+
const n = this.positionToPoint(e);
|
|
341
|
+
i.setAll({ x: n.x, y: n.y }), this.toggleVisibility(i, e, 0, 1);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* @ignore
|
|
347
|
+
*/
|
|
348
|
+
updateFill(t, e, s) {
|
|
349
|
+
if (t) {
|
|
350
|
+
_(e) || (e = 0), _(s) || (s = 1);
|
|
351
|
+
const i = this.getPrivate("innerRadius", 0);
|
|
352
|
+
let a = this.positionToCoordinate(e) + i, n = this.positionToCoordinate(s) + i;
|
|
353
|
+
this.fillDrawMethod(t, a, n);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Returns axis length in pixels.
|
|
358
|
+
*
|
|
359
|
+
* @return Length
|
|
360
|
+
*/
|
|
361
|
+
axisLength() {
|
|
362
|
+
return this.getPrivate("radius", 0) - this.getPrivate("innerRadius", 0);
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* @ignore
|
|
366
|
+
*/
|
|
367
|
+
updateTooltipBounds(t) {
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Converts relative position to pixels.
|
|
371
|
+
*
|
|
372
|
+
* @param position Position
|
|
373
|
+
* @return Pixels
|
|
374
|
+
*/
|
|
375
|
+
positionToCoordinate(t) {
|
|
376
|
+
return this._inversed ? (t = Math.min(this._end, t), (this._end - t) * this._axisLength) : (t = Math.max(this._start, t), (t - this._start) * this._axisLength);
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* @ignore
|
|
380
|
+
*/
|
|
381
|
+
positionTooltip(t, e) {
|
|
382
|
+
let s = this.getPrivate("innerRadius", 0) + this.positionToCoordinate(e);
|
|
383
|
+
const i = this.get("axisAngle", 0);
|
|
384
|
+
this._positionTooltip(t, { x: s * u(i), y: s * f(i) });
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
G.className = "AxisRendererRadial";
|
|
388
|
+
G.classNames = Y.classNames.concat([G.className]);
|
|
389
|
+
class B extends W {
|
|
390
|
+
constructor() {
|
|
391
|
+
super(...arguments), this.hand = this.children.push(L.new(this._root, { themeTags: ["hand"] })), this.pin = this.children.push(L.new(this._root, { themeTags: ["pin"] }));
|
|
392
|
+
}
|
|
393
|
+
_afterNew() {
|
|
394
|
+
this._settings.themeTags = p(this._settings.themeTags, ["clock"]), super._afterNew(), this.set("width", v(1)), this.adapters.add("x", () => 0), this.adapters.add("y", () => 0), this.pin.set("draw", (t, e) => {
|
|
395
|
+
const s = e.parent;
|
|
396
|
+
if (s) {
|
|
397
|
+
const i = s.dataItem;
|
|
398
|
+
if (i) {
|
|
399
|
+
const a = i.component;
|
|
400
|
+
if (a) {
|
|
401
|
+
const n = a.chart;
|
|
402
|
+
if (n) {
|
|
403
|
+
const r = n.getPrivate("radius", 0);
|
|
404
|
+
let l = m(s.get("pinRadius", 0), r);
|
|
405
|
+
l < 0 && (l = r + l), t.moveTo(l, 0), t.arc(0, 0, l, 0, 360);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}), this.hand.set("draw", (t, e) => {
|
|
411
|
+
const s = e.parent;
|
|
412
|
+
if (s) {
|
|
413
|
+
let i = s.parent;
|
|
414
|
+
i && i.set("width", v(1));
|
|
415
|
+
const a = s.dataItem;
|
|
416
|
+
if (a) {
|
|
417
|
+
const n = a.component;
|
|
418
|
+
if (n) {
|
|
419
|
+
const r = n.chart;
|
|
420
|
+
if (r) {
|
|
421
|
+
const l = s.get("bottomWidth", 10) / 2, o = s.get("topWidth", 0) / 2, h = r.getPrivate("radius", 0);
|
|
422
|
+
let d = m(s.get("radius", 0), h);
|
|
423
|
+
d < 0 && (d = h + d);
|
|
424
|
+
let g = s.get("innerRadius", 0);
|
|
425
|
+
g instanceof Q ? g = m(g, h) : g < 0 && g < 0 && (g = d + g), t.moveTo(g, -l), t.lineTo(d, -o), t.lineTo(d, o), t.lineTo(g, l), t.lineTo(g, -l);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
_prepareChildren() {
|
|
433
|
+
super._prepareChildren(), this.hand._markDirtyKey("fill"), this.pin._markDirtyKey("fill");
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
B.className = "ClockHand";
|
|
437
|
+
B.classNames = W.classNames.concat([B.className]);
|
|
438
|
+
class ot extends at {
|
|
439
|
+
setupDefaultRules() {
|
|
440
|
+
super.setupDefaultRules();
|
|
441
|
+
const t = this.rule.bind(this), e = this._root.interfaceColors;
|
|
442
|
+
t("RadarChart").setAll({
|
|
443
|
+
radius: v(80),
|
|
444
|
+
innerRadius: 0,
|
|
445
|
+
startAngle: -90,
|
|
446
|
+
endAngle: 270
|
|
447
|
+
}), t("RadarColumnSeries").setAll({
|
|
448
|
+
clustered: !0
|
|
449
|
+
}), t("Slice", ["radar", "column", "series"]).setAll({
|
|
450
|
+
width: v(80),
|
|
451
|
+
height: v(80)
|
|
452
|
+
}), t("RadarLineSeries").setAll({
|
|
453
|
+
connectEnds: !0
|
|
454
|
+
}), t("SmoothedRadarLineSeries").setAll({
|
|
455
|
+
tension: 0.5
|
|
456
|
+
}), t("AxisRendererRadial").setAll({
|
|
457
|
+
minGridDistance: 40,
|
|
458
|
+
axisAngle: -90,
|
|
459
|
+
inversed: !1,
|
|
460
|
+
cellStartLocation: 0,
|
|
461
|
+
cellEndLocation: 1
|
|
462
|
+
}), t("AxisRendererCircular").setAll({
|
|
463
|
+
minGridDistance: 100,
|
|
464
|
+
inversed: !1,
|
|
465
|
+
cellStartLocation: 0,
|
|
466
|
+
cellEndLocation: 1
|
|
467
|
+
}), t("RadialLabel", ["circular"]).setAll({
|
|
468
|
+
textType: "circular",
|
|
469
|
+
paddingTop: 1,
|
|
470
|
+
paddingRight: 0,
|
|
471
|
+
paddingBottom: 1,
|
|
472
|
+
paddingLeft: 0,
|
|
473
|
+
centerX: 0,
|
|
474
|
+
centerY: 0,
|
|
475
|
+
radius: 8
|
|
476
|
+
}), t("AxisLabelRadial", ["category"]).setAll({
|
|
477
|
+
text: "{category}",
|
|
478
|
+
populateText: !0
|
|
479
|
+
}), t("RadialLabel", ["radial"]).setAll({
|
|
480
|
+
textType: "regular",
|
|
481
|
+
centerX: 0,
|
|
482
|
+
textAlign: "right"
|
|
483
|
+
}), t("RadarChart", ["gauge"]).setAll({
|
|
484
|
+
startAngle: 180,
|
|
485
|
+
endAngle: 360,
|
|
486
|
+
innerRadius: v(90)
|
|
487
|
+
}), t("ClockHand").setAll({
|
|
488
|
+
topWidth: 1,
|
|
489
|
+
bottomWidth: 10,
|
|
490
|
+
radius: v(90),
|
|
491
|
+
pinRadius: 10
|
|
492
|
+
});
|
|
493
|
+
{
|
|
494
|
+
const s = t("Graphics", ["clock", "hand"]);
|
|
495
|
+
s.setAll({
|
|
496
|
+
fillOpacity: 1
|
|
497
|
+
}), H(s, "fill", e, "alternativeBackground");
|
|
498
|
+
}
|
|
499
|
+
{
|
|
500
|
+
const s = t("Graphics", ["clock", "pin"]);
|
|
501
|
+
s.setAll({
|
|
502
|
+
fillOpacity: 1
|
|
503
|
+
}), H(s, "fill", e, "alternativeBackground");
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
class I extends Z {
|
|
508
|
+
constructor() {
|
|
509
|
+
super(...arguments), this.radarContainer = this.plotContainer.children.push(W.new(this._root, { x: O, y: O })), this._arcGenerator = S(), this._maxRadius = 1;
|
|
510
|
+
}
|
|
511
|
+
_afterNew() {
|
|
512
|
+
this._defaultThemes.push(ot.new(this._root)), super._afterNew();
|
|
513
|
+
const t = this.radarContainer, e = this.gridContainer, s = this.topGridContainer, i = this.seriesContainer, a = this.bulletsContainer;
|
|
514
|
+
t.children.pushAll([e, i, s, a]), i.set("mask", L.new(this._root, {})), e.set("mask", L.new(this._root, {})), this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
|
|
515
|
+
this._updateRadius();
|
|
516
|
+
}));
|
|
517
|
+
}
|
|
518
|
+
_maskGrid() {
|
|
519
|
+
}
|
|
520
|
+
_prepareChildren() {
|
|
521
|
+
if (super._prepareChildren(), this._sizeDirty || this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) {
|
|
522
|
+
const t = this.chartContainer, e = t.innerWidth(), s = t.innerHeight(), i = this.get("startAngle", 0), a = this.get("endAngle", 0), n = this.get("innerRadius");
|
|
523
|
+
let r = K(0, 0, i, a, 1);
|
|
524
|
+
const l = e / (r.right - r.left), o = s / (r.bottom - r.top);
|
|
525
|
+
let h = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
526
|
+
if (n instanceof Q) {
|
|
527
|
+
let g = n.value, x = Math.min(l, o);
|
|
528
|
+
g = Math.max(x * g, x - Math.min(s, e)) / x, h = K(0, 0, i, a, g), this.setPrivateRaw("irModifyer", g / n.value);
|
|
529
|
+
}
|
|
530
|
+
r = nt([r, h]), this._maxRadius = Math.max(0, Math.min(l, o));
|
|
531
|
+
const d = m(this.get("radius", 0), this._maxRadius);
|
|
532
|
+
this.radarContainer.setAll({
|
|
533
|
+
dy: -d * (r.bottom + r.top) / 2,
|
|
534
|
+
dx: -d * (r.right + r.left) / 2
|
|
535
|
+
}), this._updateRadius();
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
_addCursor(t) {
|
|
539
|
+
this.radarContainer.children.push(t);
|
|
540
|
+
}
|
|
541
|
+
// do not delete
|
|
542
|
+
_updateRadius() {
|
|
543
|
+
const t = m(this.get("radius", v(80)), this._maxRadius);
|
|
544
|
+
this.setPrivateRaw("radius", t);
|
|
545
|
+
let e = m(this.get("innerRadius", 0), t);
|
|
546
|
+
e < 0 && (e = t + e), this.setPrivateRaw("innerRadius", e), this.xAxes.each((i) => {
|
|
547
|
+
i.get("renderer").updateLayout();
|
|
548
|
+
}), this.yAxes.each((i) => {
|
|
549
|
+
i.get("renderer").updateLayout();
|
|
550
|
+
}), this._updateMask(this.seriesContainer, e, t), this._updateMask(this.gridContainer, e, t), this.series.each((i) => {
|
|
551
|
+
i.get("maskBullets") ? this._updateMask(i.bulletsContainer, e, t) : i.bulletsContainer.remove("mask");
|
|
552
|
+
});
|
|
553
|
+
const s = this.get("cursor");
|
|
554
|
+
s && s.updateLayout();
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* @ignore
|
|
558
|
+
*/
|
|
559
|
+
_updateMask(t, e, s) {
|
|
560
|
+
const i = t.get("mask");
|
|
561
|
+
i && i.set("draw", (a) => {
|
|
562
|
+
this._arcGenerator.context(a), this._arcGenerator({ innerRadius: e, outerRadius: s + 0.5, startAngle: (this.get("startAngle", 0) + 90) * A, endAngle: (this.get("endAngle", 0) + 90) * A });
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* @ignore
|
|
567
|
+
*/
|
|
568
|
+
processAxis(t) {
|
|
569
|
+
this.radarContainer.children.push(t);
|
|
570
|
+
}
|
|
571
|
+
_processSeries(t) {
|
|
572
|
+
super._processSeries(t), this._updateRadius();
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* @ignore
|
|
576
|
+
*/
|
|
577
|
+
inPlot(t, e, s) {
|
|
578
|
+
const i = Math.hypot(t.x, t.y), a = C(Math.atan2(t.y, t.x) * w);
|
|
579
|
+
let n = C(this.get("startAngle", 0)), r = C(this.get("endAngle", 0)), l = !1;
|
|
580
|
+
return n < r && n < a && a < r && (l = !0), n > r && (a > n && (l = !0), a < r && (l = !0)), n == r && (l = !0), l ? (e == null && (e = this.getPrivate("radius", 0)), s == null && (s = this.getPrivate("innerRadius", 0)), s > e && ([s, e] = [e, s]), i <= e + 0.5 && i >= s - 0.5) : !1;
|
|
581
|
+
}
|
|
582
|
+
_tooltipToLocal(t) {
|
|
583
|
+
return this.radarContainer._display.toLocal(t);
|
|
584
|
+
}
|
|
585
|
+
_handlePinch() {
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
I.className = "RadarChart";
|
|
589
|
+
I.classNames = Z.classNames.concat([I.className]);
|
|
590
|
+
class E extends st {
|
|
591
|
+
constructor() {
|
|
592
|
+
super(...arguments), this.columns = this.addDisposer(new M(b.new({}), () => X._new(this._root, {
|
|
593
|
+
position: "absolute",
|
|
594
|
+
themeTags: p(this.columns.template.get("themeTags", []), ["radar", "series", "column"])
|
|
595
|
+
}, [this.columns.template])));
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* @ignore
|
|
599
|
+
*/
|
|
600
|
+
makeColumn(t, e) {
|
|
601
|
+
const s = this.mainContainer.children.push(e.make());
|
|
602
|
+
return s._setDataItem(t), e.push(s), s;
|
|
603
|
+
}
|
|
604
|
+
_afterNew() {
|
|
605
|
+
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", L.new(this._root, {}));
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* @ignore
|
|
609
|
+
*/
|
|
610
|
+
getPoint(t, e) {
|
|
611
|
+
const s = this.get("yAxis"), i = this.get("xAxis"), a = i.get("renderer"), n = s.get("renderer").positionToCoordinate(e) + a.getPrivate("innerRadius", 0), l = i.get("renderer").positionToAngle(t);
|
|
612
|
+
return { x: n * u(l), y: n * f(l) };
|
|
613
|
+
}
|
|
614
|
+
_updateSeriesGraphics(t, e, s, i, a, n) {
|
|
615
|
+
e.setPrivate("visible", !0);
|
|
616
|
+
const r = this.get("xAxis"), l = this.get("yAxis"), o = r.get("renderer"), h = l.get("renderer"), d = h.getPrivate("innerRadius", 0), g = o.fitAngle(o.positionToAngle(s)), x = o.fitAngle(o.positionToAngle(i));
|
|
617
|
+
let R = h.positionToCoordinate(n) + d, y = h.positionToCoordinate(a) + d;
|
|
618
|
+
const N = e;
|
|
619
|
+
t.setRaw("startAngle", g), t.setRaw("endAngle", x), t.setRaw("innerRadius", R), t.setRaw("radius", y);
|
|
620
|
+
let P = 0, T = 360;
|
|
621
|
+
l == this.get("baseAxis") ? (P = h.getPrivate("startAngle", 0), T = h.getPrivate("endAngle", 360)) : (P = o.getPrivate("startAngle", 0), T = o.getPrivate("endAngle", 360)), P > T && ([P, T] = [T, P]), (x <= P || g >= T || y <= d && R <= d) && N.setPrivate("visible", !1), N.setAll({ innerRadius: R, radius: y, startAngle: g, arc: x - g });
|
|
622
|
+
}
|
|
623
|
+
_shouldInclude(t) {
|
|
624
|
+
const e = this.get("xAxis");
|
|
625
|
+
return !(t < e.get("start") || t > e.get("end"));
|
|
626
|
+
}
|
|
627
|
+
_shouldShowBullet(t, e) {
|
|
628
|
+
const s = this.get("xAxis");
|
|
629
|
+
return t < s.get("start") || t > s.get("end") ? !1 : this._showBullets;
|
|
630
|
+
}
|
|
631
|
+
_positionBullet(t) {
|
|
632
|
+
let e = t.get("sprite");
|
|
633
|
+
if (e) {
|
|
634
|
+
const s = e.dataItem, i = t.get("locationX", s.get("locationX", 0.5)), a = t.get("locationY", s.get("locationY", 0.5)), n = s.component, r = n.get("xAxis"), l = n.get("yAxis"), o = r.getDataItemPositionX(s, n._xField, i, n.get("vcx", 1)), h = l.getDataItemPositionY(s, n._yField, a, n.get("vcy", 1)), d = s.get("startAngle", 0), g = s.get("endAngle", 0), x = s.get("radius", 0), R = s.get("innerRadius", 0);
|
|
635
|
+
if (n._shouldShowBullet(o, h)) {
|
|
636
|
+
e.setPrivate("visible", !0);
|
|
637
|
+
const y = d + (g - d) * i, N = R + (x - R) * a;
|
|
638
|
+
e.set("x", u(y) * N), e.set("y", f(y) * N);
|
|
639
|
+
} else
|
|
640
|
+
e.setPrivate("visible", !1);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
_handleMaskBullets() {
|
|
644
|
+
}
|
|
645
|
+
_processAxisRange(t) {
|
|
646
|
+
super._processAxisRange(t), t.columns = new M(b.new({}), () => X._new(this._root, {
|
|
647
|
+
position: "absolute",
|
|
648
|
+
themeTags: p(t.columns.template.get("themeTags", []), ["radar", "series", "column"])
|
|
649
|
+
}, [this.columns.template, t.columns.template]));
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
E.className = "RadarColumnSeries";
|
|
653
|
+
E.classNames = st.classNames.concat([E.className]);
|
|
654
|
+
class F extends $ {
|
|
655
|
+
constructor() {
|
|
656
|
+
super(...arguments), this._fillGenerator = S();
|
|
657
|
+
}
|
|
658
|
+
_afterNew() {
|
|
659
|
+
this._settings.themeTags = p(this._settings.themeTags, ["radar", "cursor"]), super._afterNew();
|
|
660
|
+
}
|
|
661
|
+
_handleXLine() {
|
|
662
|
+
}
|
|
663
|
+
_handleYLine() {
|
|
664
|
+
}
|
|
665
|
+
_getPosition(t) {
|
|
666
|
+
const e = Math.hypot(t.x, t.y);
|
|
667
|
+
let s = C(Math.atan2(t.y, t.x) * w);
|
|
668
|
+
const i = this.getPrivate("innerRadius");
|
|
669
|
+
let a = C(this.getPrivate("startAngle")), n = C(this.getPrivate("endAngle"));
|
|
670
|
+
(n < a || n == a) && (s < a && (s += 360), n = n + 360);
|
|
671
|
+
let r = (s - a) / (n - a);
|
|
672
|
+
return r < 0 && (r = 1 + r), r < 3e-3 && (r = 0), r > 0.997 && (r = 1), { x: r, y: (e - i) / (this.getPrivate("radius") - i) };
|
|
673
|
+
}
|
|
674
|
+
_getPoint(t, e) {
|
|
675
|
+
const s = this.getPrivate("innerRadius"), i = this.getPrivate("startAngle"), a = this.getPrivate("endAngle"), n = this.getPrivate("radius"), r = i + t * (a - i), l = s + (n - s) * e;
|
|
676
|
+
return { x: l * u(r), y: l * f(r) };
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* @ignore
|
|
680
|
+
*/
|
|
681
|
+
updateLayout() {
|
|
682
|
+
const t = this.chart;
|
|
683
|
+
if (t) {
|
|
684
|
+
const e = t.getPrivate("radius", 0);
|
|
685
|
+
this.setPrivate("radius", m(this.get("radius", z), e));
|
|
686
|
+
let s = m(this.get("innerRadius", t.getPrivate("innerRadius", 0)), e);
|
|
687
|
+
s < 0 && (s = e + s), this.setPrivate("innerRadius", s);
|
|
688
|
+
let i = this.get("startAngle", t.get("startAngle", -90)), a = this.get("endAngle", t.get("endAngle", 270));
|
|
689
|
+
this.setPrivate("startAngle", i), this.setPrivate("endAngle", a);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
_updateLines(t, e) {
|
|
693
|
+
this._tooltipX || this._drawXLine(t, e), this._tooltipY || this._drawYLine(t, e);
|
|
694
|
+
}
|
|
695
|
+
_drawXLine(t, e) {
|
|
696
|
+
const s = this.getPrivate("innerRadius"), i = this.getPrivate("radius"), a = Math.atan2(e, t);
|
|
697
|
+
this.lineX.set("draw", (n) => {
|
|
698
|
+
n.moveTo(s * Math.cos(a), s * Math.sin(a)), n.lineTo(i * Math.cos(a), i * Math.sin(a));
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
_drawYLine(t, e) {
|
|
702
|
+
const s = Math.hypot(t, e);
|
|
703
|
+
this.lineY.set("draw", (i) => {
|
|
704
|
+
i.arc(0, 0, s, this.getPrivate("startAngle", 0) * A, this.getPrivate("endAngle", 0) * A);
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
_updateXLine(t) {
|
|
708
|
+
let e = t.get("pointTo");
|
|
709
|
+
e && (e = this._display.toLocal(e), this._drawXLine(e.x, e.y));
|
|
710
|
+
}
|
|
711
|
+
_updateYLine(t) {
|
|
712
|
+
let e = t.get("pointTo");
|
|
713
|
+
e && (e = this._display.toLocal(e), this._drawYLine(e.x, e.y));
|
|
714
|
+
}
|
|
715
|
+
_inPlot(t) {
|
|
716
|
+
const e = this.chart;
|
|
717
|
+
return e ? e.inPlot(t, this.getPrivate("radius"), this.getPrivate("innerRadius")) : !1;
|
|
718
|
+
}
|
|
719
|
+
_updateSelection(t) {
|
|
720
|
+
this.selection.set("draw", (e) => {
|
|
721
|
+
const s = this.get("behavior"), i = this._downPoint, a = this.getPrivate("startAngle"), n = this.getPrivate("endAngle");
|
|
722
|
+
let r = this.getPrivate("radius"), l = this.getPrivate("innerRadius");
|
|
723
|
+
r < l && ([r, l] = [l, r]);
|
|
724
|
+
let o = a, h = n, d = r, g = l;
|
|
725
|
+
i && (s == "zoomXY" || s == "selectXY" ? (o = Math.atan2(i.y, i.x) * w, h = Math.atan2(t.y, t.x) * w, g = Math.hypot(i.x, i.y), d = Math.hypot(t.x, t.y)) : s == "zoomX" || s == "selectX" ? (o = Math.atan2(i.y, i.x) * w, h = Math.atan2(t.y, t.x) * w) : (s == "zoomY" || s == "selectY") && (g = Math.hypot(i.x, i.y), d = Math.hypot(t.x, t.y))), g = q(g, l, r), d = q(d, l, r), o = j(o, a, n), h = j(h, a, n), o == h && (h = o + 360), o *= A, h *= A, this._fillGenerator.context(e), this._fillGenerator({ innerRadius: g, outerRadius: d, startAngle: o + Math.PI / 2, endAngle: h + Math.PI / 2 });
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
F.className = "RadarCursor";
|
|
730
|
+
F.classNames = $.classNames.concat([F.className]);
|
|
731
|
+
class D extends tt {
|
|
732
|
+
_afterNew() {
|
|
733
|
+
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", L.new(this._root, {}));
|
|
734
|
+
}
|
|
735
|
+
_handleMaskBullets() {
|
|
736
|
+
}
|
|
737
|
+
getPoint(t, e) {
|
|
738
|
+
const s = this.get("yAxis"), i = this.get("xAxis"), a = s.get("renderer"), n = a.positionToCoordinate(e) + a.getPrivate("innerRadius", 0), l = i.get("renderer").positionToAngle(t);
|
|
739
|
+
return { x: n * u(l), y: n * f(l) };
|
|
740
|
+
}
|
|
741
|
+
_endLine(t, e) {
|
|
742
|
+
this.get("connectEnds") && e && t.push(e);
|
|
743
|
+
}
|
|
744
|
+
_shouldInclude(t) {
|
|
745
|
+
const e = this.get("xAxis");
|
|
746
|
+
return !(t < e.get("start") || t > e.get("end"));
|
|
747
|
+
}
|
|
748
|
+
_shouldShowBullet(t, e) {
|
|
749
|
+
const s = this.get("xAxis");
|
|
750
|
+
return t < s.get("start") || t > s.get("end") ? !1 : this._showBullets;
|
|
751
|
+
}
|
|
752
|
+
_positionBullet(t) {
|
|
753
|
+
let e = t.get("sprite");
|
|
754
|
+
if (e) {
|
|
755
|
+
let s = e.dataItem, i = t.get("locationX", s.get("locationX", 0.5)), a = t.get("locationY", s.get("locationY", 0.5)), n = this.get("xAxis"), r = this.get("yAxis");
|
|
756
|
+
const l = n.getDataItemPositionX(s, this._xField, i, this.get("vcx", 1)), o = r.getDataItemPositionY(s, this._yField, a, this.get("vcy", 1));
|
|
757
|
+
let h = this.getPoint(l, o);
|
|
758
|
+
this._shouldShowBullet(l, o) ? (e.setPrivate("visible", !0), e.set("x", h.x), e.set("y", h.y)) : e.setPrivate("visible", !1);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
D.className = "RadarLineSeries";
|
|
763
|
+
D.classNames = tt.classNames.concat([D.className]);
|
|
764
|
+
class V extends D {
|
|
765
|
+
_afterNew() {
|
|
766
|
+
this._setDefault("curveFactory", J.tension(this.get("tension", 0))), super._afterNew();
|
|
767
|
+
}
|
|
768
|
+
_prepareChildren() {
|
|
769
|
+
if (super._prepareChildren(), this.isDirty("connectEnds") && (this.get("connectEnds") ? this.setRaw("curveFactory", J.tension(this.get("tension", 0))) : this.setRaw("curveFactory", lt.tension(this.get("tension", 0)))), this.isDirty("tension")) {
|
|
770
|
+
let t = this.get("curveFactory");
|
|
771
|
+
t && t.tension(this.get("tension", 0));
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
_endLine(t, e) {
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
V.className = "SmoothedRadarLineSeries";
|
|
778
|
+
V.classNames = D.classNames.concat([V.className]);
|
|
779
|
+
export {
|
|
780
|
+
k as AxisRendererCircular,
|
|
781
|
+
G as AxisRendererRadial,
|
|
782
|
+
B as ClockHand,
|
|
783
|
+
ot as DefaultTheme,
|
|
784
|
+
I as RadarChart,
|
|
785
|
+
E as RadarColumnSeries,
|
|
786
|
+
F as RadarCursor,
|
|
787
|
+
D as RadarLineSeries,
|
|
788
|
+
V as SmoothedRadarLineSeries
|
|
789
|
+
};
|