@hybridcore/ui 1.5.89 → 1.6.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/dist/{AccordionDetails-DhriPVPP.js → AccordionSummary-DgAwVTk8.js} +81 -82
- package/dist/{Add-CMz4N2zT.js → Add-DJLrrVHm.js} +52 -51
- package/dist/AnimatedTheme-jnasw6rT.js +11305 -0
- package/dist/AxisRenderer-DTyLLA6c.js +3579 -0
- package/dist/AxisRendererY-C_ItLPNV.js +445 -0
- package/dist/Box-p6OtTUEo.js +30 -0
- package/dist/Bullet-DVczI2TD.js +41 -0
- package/dist/Button-CcsPEIDh.js +35 -0
- package/dist/{Button-eqWvpDuh.js → Button-CvE2gnly.js} +138 -124
- package/dist/{ButtonBase-DsX-jMQJ.js → ButtonBase-2bPw77UP.js} +5 -5
- package/dist/{CardContent-DsYqqPeJ.js → CardContent-CSHh-ZlM.js} +4 -4
- package/dist/CategoryAxis-CwnfaGc8.js +458 -0
- package/dist/{Checkbox-CrU2hpWB.js → Checkbox-CWRMFTBp.js} +12 -11
- package/dist/Circle-Cy5s-pVc.js +27 -0
- package/dist/ColorSet-C7vpNXhM.js +2957 -0
- package/dist/{ColumnSeries-BTcqshjB.js → ColumnSeries-CjgdJ2QL.js} +129 -126
- package/dist/DataProcessor-CHDO51q4.js +83 -0
- package/dist/DateAxis-YX3QNIB-.js +569 -0
- package/dist/{Delete-86TO0fMo.js → Delete-CW0UZv1m.js} +1 -1
- package/dist/{DialogContent-CqTojymQ.js → DialogContent-B3nbEbuv.js} +10 -11
- package/dist/FormControl-BLbrq4C7.js +1636 -0
- package/dist/{FormControlLabel-BrdX4R71.js → FormControlLabel-C8SPv14J.js} +8 -8
- package/dist/Hierarchy-Bihj0S61.js +925 -0
- package/dist/{IconButton-DJ-31-Fd.js → IconButton-CHwRQF-g.js} +20 -19
- package/dist/IconPlus-yPkff_Vj.js +19 -0
- package/dist/{InputAdornment-B7qEA4kN.js → InputAdornment-DLxWUE6H.js} +6 -6
- package/dist/Legend-Dp_MKfS4.js +178 -0
- package/dist/LineSeries-Uiv5o56b.js +472 -0
- package/dist/{List-DOD5kSk3.js → List-tqElle9C.js} +4 -4
- package/dist/{ListItem-r8PbsvCz.js → ListItem-CfjsIg4B.js} +9 -8
- package/dist/{MenuItem-C6qlUyV3.js → MenuItem-xZx_w7zA.js} +14 -13
- package/dist/{Modal-CkcFEpHa.js → Modal-DhPpOoGB.js} +292 -277
- package/dist/{Paper-CjqLScHA.js → Paper-2B03OBmZ.js} +47 -41
- package/dist/PieSeries-B2fW3z0s.js +693 -0
- package/dist/RoundedRectangle-CWLi2PXn.js +34 -0
- package/dist/Scrollbar-D86MJyr2.js +171 -0
- package/dist/{Select-t3ewnSdf.js → Select-BgYwkZgI.js} +2066 -1633
- package/dist/Slice-B19rbYDZ.js +261 -0
- package/dist/{Source-BESIjd9X.js → Source-BSZST_GH.js} +2472 -2445
- package/dist/{Text-Cl1H4b0h.js → Text-ChJRuaD8.js} +398 -397
- package/dist/{TextField-BQ8a50fA.js → TextField-1yCesIbH.js} +23 -25
- package/dist/Tick-2bcLyHpF.js +162 -0
- package/dist/{Typography-D1t7XuLN.js → Typography-CxbneZy_.js} +11 -11
- package/dist/Vector-BmuhQO4p.js +3606 -0
- package/dist/Vector-DfTqQEln.js +1735 -0
- package/dist/WKT-2wsDT-nq.js +2310 -0
- package/dist/XYCursor-C8WktvKM.js +362 -0
- package/dist/ZoomableContainer-DYyqwaMb.js +220 -0
- package/dist/_commonjsHelpers-BVfed4GL.js +28 -0
- package/dist/capitalize-ciszXJ7R.js +9 -0
- package/dist/components/access/helpers.js +1 -1
- package/dist/components/access/index.js +1 -1
- package/dist/components/card/index.js +6 -6
- package/dist/components/card/styled.js +1 -1
- package/dist/components/charts/_common/utils.js +20 -0
- package/dist/components/charts/candlestick/logic.js +170 -140
- package/dist/components/charts/chart-wrapper/helpers.js +27 -0
- package/dist/components/charts/chart-wrapper/index.js +44 -0
- package/dist/components/charts/chart-wrapper/logic.js +47 -0
- package/dist/components/charts/chart-wrapper/styled.js +44 -0
- package/dist/components/charts/column-line-mix/index.js +10 -0
- package/dist/components/charts/column-line-mix/logic.js +162 -0
- package/dist/components/charts/column-line-mix/styled.js +12 -0
- package/dist/components/charts/drill-down-treemap/index.js +10 -0
- package/dist/components/charts/drill-down-treemap/logic.js +391 -0
- package/dist/components/charts/drill-down-treemap/styled.js +12 -0
- package/dist/components/charts/drill-down-voronoi-treemap/index.js +10 -0
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +1527 -0
- package/dist/components/charts/drill-down-voronoi-treemap/styled.js +12 -0
- package/dist/components/charts/heatmap/index.js +10 -0
- package/dist/components/charts/heatmap/logic.js +361 -0
- package/dist/components/charts/heatmap/styled.js +12 -0
- package/dist/components/charts/highlighting-line-data/logic.js +89 -256
- package/dist/components/charts/line/index.js +10 -0
- package/dist/components/charts/line/logic.js +148 -0
- package/dist/components/charts/line/styled.js +12 -0
- package/dist/components/charts/logaritmic-scale/index.js +10 -0
- package/dist/components/charts/logaritmic-scale/logic.js +119 -0
- package/dist/components/charts/logaritmic-scale/styled.js +12 -0
- package/dist/components/charts/multiple-value-axes/index.js +10 -0
- package/dist/components/charts/multiple-value-axes/logic.js +191 -0
- package/dist/components/charts/multiple-value-axes/styled.js +12 -0
- package/dist/components/charts/nested-pie/index.js +10 -0
- package/dist/components/charts/nested-pie/logic.js +110 -0
- package/dist/components/charts/nested-pie/styled.js +12 -0
- package/dist/components/charts/packed-circles/index.js +10 -0
- package/dist/components/charts/packed-circles/logic.js +423 -0
- package/dist/components/charts/packed-circles/styled.js +12 -0
- package/dist/components/charts/pie-chart/index.js +10 -0
- package/dist/components/charts/pie-chart/logic.js +70 -0
- package/dist/components/charts/pie-chart/styled.js +12 -0
- package/dist/components/charts/stacked-area-radar/index.js +10 -0
- package/dist/components/charts/stacked-area-radar/logic.js +868 -0
- package/dist/components/charts/stacked-area-radar/styled.js +12 -0
- package/dist/components/charts/stacked-column-chart/index.js +10 -0
- package/dist/components/charts/stacked-column-chart/logic.js +148 -0
- package/dist/components/charts/stacked-column-chart/styled.js +12 -0
- package/dist/components/charts/xy-chart/index.js +10 -0
- package/dist/components/charts/xy-chart/logic.js +170 -0
- package/dist/components/charts/xy-chart/styled.js +12 -0
- package/dist/components/collapsible-card/index.js +58 -32
- package/dist/components/collapsible-card/logic.js +20 -0
- package/dist/components/collapsible-card/styled.js +52 -0
- package/dist/components/confirm/dialog.js +3 -3
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +7 -7
- package/dist/components/context-menu/index.js +153 -253
- package/dist/components/data-map/components/controls/index.js +12 -0
- package/dist/components/data-map/components/controls/styled.js +34 -0
- package/dist/components/data-map/index.js +51 -0
- package/dist/components/data-map/logic.js +108 -0
- package/dist/components/data-map/styled.js +32 -0
- package/dist/components/data-security-selectors/security-level/index.js +5 -5
- package/dist/components/date-picker-with-custom-range/index.js +9 -0
- package/dist/components/date-picker-with-custom-range/logic.js +66 -0
- package/dist/components/date-picker-with-custom-range/styled.js +43 -0
- package/dist/components/divider/index.js +18 -0
- package/dist/components/divider/logic.js +13 -0
- package/dist/components/divider/styled.js +14 -0
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +1 -1
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/index.js +7 -8
- package/dist/components/geometry-picker/kml/index.js +1 -1
- package/dist/components/geometry-picker/map/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +65 -62
- package/dist/components/geometry-picker/map/style.js +1 -1
- package/dist/components/heat-map/components/controls/index.js +12 -0
- package/dist/components/heat-map/components/controls/styled.js +34 -0
- package/dist/components/heat-map/components/legend/index.js +26 -0
- package/dist/components/heat-map/components/legend/styled.js +14 -0
- package/dist/components/heat-map/index.js +37 -0
- package/dist/components/heat-map/logic.js +1945 -0
- package/dist/components/heat-map/styled.js +32 -0
- package/dist/components/icon-button/index.js +22 -15
- package/dist/components/icon-button/logic.js +15 -0
- package/dist/components/icon-button/styled.js +22 -10
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8 -7
- package/dist/components/instance-form/components/variable/index.js +8 -8
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/instance-hierarchy-table/styled.js +1 -1
- package/dist/components/instance-variable-list/index.js +34 -29
- package/dist/components/instance-variable-list/styled.js +21 -21
- package/dist/components/instance-variable-list/variable.js +44 -74
- package/dist/components/linear-indicator/index.js +10 -67
- package/dist/components/linear-indicator/logic.js +47 -0
- package/dist/components/linear-indicator/styled.js +39 -40
- package/dist/components/map/helpers/kml.js +1 -1
- package/dist/components/map/helpers/mapbox.js +14 -14
- package/dist/components/map/helpers/ol.js +23 -19
- package/dist/components/map/helpers/wkt.js +26 -1314
- package/dist/components/map/index.js +1 -1
- package/dist/components/map/logic.js +113 -101
- package/dist/components/map/styled.js +39 -31
- package/dist/components/metric-card/MetricChart.js +50 -498
- package/dist/components/metric-card/index.js +94 -115
- package/dist/components/metric-card/logic.js +70 -131
- package/dist/components/object-profile-card/components/avatar/index.js +44 -0
- package/dist/components/object-profile-card/components/avatar/logic.js +19 -0
- package/dist/components/object-profile-card/components/avatar/styled.js +41 -0
- package/dist/components/object-profile-card/index.js +90 -0
- package/dist/components/object-profile-card/logic.js +33 -0
- package/dist/components/object-profile-card/styled.js +48 -0
- package/dist/components/paginated-list/index.js +93 -89
- package/dist/components/paginated-list/logic.js +51 -40
- package/dist/components/paginated-list/styled.js +25 -21
- package/dist/components/property-mapping/index.js +2 -2
- package/dist/components/prr-map/components/controls/index.js +12 -0
- package/dist/components/prr-map/components/controls/styled.js +34 -0
- package/dist/components/prr-map/components/legend/index.js +36 -0
- package/dist/components/prr-map/components/legend/styled.js +21 -0
- package/dist/components/prr-map/index.js +38 -0
- package/dist/components/prr-map/logic.js +104 -0
- package/dist/components/prr-map/styled.js +32 -0
- package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
- package/dist/components/range-selector/components/date-range/index.js +4282 -7
- package/dist/components/range-selector/index.js +1 -1
- package/dist/components/raster-grid-map/components/controls/index.js +12 -0
- package/dist/components/raster-grid-map/components/controls/styled.js +34 -0
- package/dist/components/raster-grid-map/components/legend/index.js +14 -0
- package/dist/components/raster-grid-map/components/legend/styled.js +21 -0
- package/dist/components/raster-grid-map/helpers.js +190 -0
- package/dist/components/raster-grid-map/index.js +38 -0
- package/dist/components/raster-grid-map/logic.js +172 -0
- package/dist/components/raster-grid-map/styled.js +32 -0
- package/dist/components/search-input/index.js +62 -140
- package/dist/components/search-input/logic.js +43 -0
- package/dist/components/search-input/styled.js +33 -0
- package/dist/components/simple-pivot-table/index.js +66 -0
- package/dist/components/simple-pivot-table/logic.js +51 -0
- package/dist/components/simple-pivot-table/styled.js +45 -0
- package/dist/components/static-text/index.js +18 -0
- package/dist/components/static-text/logic.js +13 -0
- package/dist/components/static-text/styled.js +45 -0
- package/dist/components/tabs/index.js +56 -2160
- package/dist/components/tabs/logic.js +36 -0
- package/dist/components/tabs/styled.js +94 -16
- package/dist/components/tabs/tab-panel.js +11 -10
- package/dist/components/template-filters/components/tab-panel/index.js +1 -1
- package/dist/components/template-form/components/property-list/index.js +7 -7
- package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
- package/dist/components/template-form/components/property-list/property-list-form.js +9 -9
- package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
- package/dist/components/template-form/index.js +5 -5
- package/dist/components/template-property-filters/property.js +5 -5
- package/dist/components/timeline/index.js +61 -0
- package/dist/components/timeline/logic.js +40 -0
- package/dist/components/timeline/styled.js +48 -0
- package/dist/components/tree-select/index.js +5 -5
- package/dist/components/treeview-filter/item-label/index.js +3 -3
- package/dist/constant-BiOGvlZc.js +21 -0
- package/dist/createReactComponent-C7L-DMHj.js +60 -0
- package/dist/{createSvgIcon-DLPYMuH1.js → createSvgIcon-BjpIhJ30.js} +30 -32
- package/dist/{createSvgIcon-OuwzpcaC.js → createSvgIcon-DrtgaibK.js} +5 -5
- package/dist/{createTheme-CNnKNxwL.js → createTheme-DYxDnE9u.js} +226 -285
- package/dist/{dialog-BE4D6swf.js → dialog-DcwXug9J.js} +6 -6
- package/dist/{helpers-DaCoWmi2.js → helpers-B4UL9NMD.js} +3 -3
- package/dist/index-BMS1Otro.js +183 -0
- package/dist/index-C__OZmYy.js +663 -0
- package/dist/{index-CGNxsLVm.js → index-CcdvNlgr.js} +7 -7
- package/dist/{index-JrtqxUdI.js → index-kCJ_Zvl8.js} +5 -5
- package/dist/index-syTc6m_V.js +1934 -0
- package/dist/index.es-CHNMhaMi.js +2067 -0
- package/dist/index.esm-BLLrbTzY.js +318 -0
- package/dist/{listItemTextClasses-CNjn41Of.js → listItemTextClasses-C3lndiXO.js} +2 -2
- package/dist/main.d.ts +1226 -358
- package/dist/main.js +141 -443
- package/dist/{has-DNclCIDV.js → math-Bvt2Ubuz.js} +220 -222
- package/dist/ol-yOE-NV0X.js +7465 -0
- package/dist/path-CNVruS--.js +84 -0
- package/dist/{property-list-form-C5hcK2y2.js → property-list-form-zZQfpR0X.js} +13 -13
- package/dist/styled-eZwjUruw.js +12 -0
- package/dist/useId-B4-oF9Mq.js +34 -0
- package/dist/useMobilePicker-BLg3Blg8.js +7589 -0
- package/dist/useThemeProps-BzzHcQyd.js +58 -0
- package/dist/{utils-CsOZUsQj.js → utils-BDNynJcd.js} +2 -2
- package/package.json +42 -9
- package/dist/AxisRendererY-kADUad00.js +0 -18370
- package/dist/Box-B1AVyJ_s.js +0 -71
- package/dist/DateAxis-CMum47iz.js +0 -924
- package/dist/Input-CoIrGZAh.js +0 -326
- package/dist/InputLabel-CBuAYyuT.js +0 -1367
- package/dist/LineSeries-CfcpoYla.js +0 -549
- package/dist/OutlinedInput-B-iZoc9l.js +0 -450
- package/dist/Tabs-Cn42Z5QI.js +0 -789
- package/dist/components/collapsible-card/style.js +0 -49
- package/dist/components/profile-card/index.js +0 -80
- package/dist/components/profile-card/logic.js +0 -33
- package/dist/components/profile-card/styled.js +0 -43
- package/dist/components/tabs/appleTabs.style.js +0 -55
- package/dist/createStyled-BGx1I94c.js +0 -352
- package/dist/createTheme-CyC5HawC.js +0 -879
- package/dist/exactProp-cjT0t_Pt.js +0 -36
- package/dist/extendSxProp-FEpqY5_S.js +0 -30
- package/dist/index-DMSHuq6l.js +0 -688
- package/dist/index-SpeaLUQD.js +0 -10963
- package/dist/ol-lGwSyEIV.js +0 -15050
- package/dist/ownerDocument-CUrv0DIK.js +0 -6
- package/dist/ownerWindow-niciwP7I.js +0 -7
- package/dist/styled-B8ugzvji.js +0 -12
- package/dist/useId-BHG98T5I.js +0 -26
- package/dist/useTheme-C15Eq8KG.js +0 -18
- package/dist/useTheme-D-uii9iX.js +0 -10
- package/dist/useThemeProps-DRP1dikX.js +0 -95
|
@@ -0,0 +1,868 @@
|
|
|
1
|
+
import { k as W, l as $, x as c, m as h, s as g, a as me, n as ae, C as Ae, G as J, o as re, q as pe, t as L, y as C, j as ne, z as le, R as xe, A as ve, T as H } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as ye, useTheme as be } from "@mui/material";
|
|
3
|
+
import Pe from "dayjs";
|
|
4
|
+
import U from "lodash";
|
|
5
|
+
import { useId as Re, useRef as _e, useEffect as we } from "react";
|
|
6
|
+
import { colorSetFromPalette as Te } from "../_common/utils.js";
|
|
7
|
+
import { m as M, x as R, b as K, f as m, p as w, a as N, P as Ce, c as Y } from "../../../ColorSet-C7vpNXhM.js";
|
|
8
|
+
import { a as E, X as ue, V as Le } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
9
|
+
import { R as de, S as Me, a as I } from "../../../Slice-B19rbYDZ.js";
|
|
10
|
+
import { X as he } from "../../../XYCursor-C8WktvKM.js";
|
|
11
|
+
import { C as oe } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
12
|
+
import { L as ge } from "../../../LineSeries-Uiv5o56b.js";
|
|
13
|
+
import { L as De } from "../../../Legend-Dp_MKfS4.js";
|
|
14
|
+
class O extends de {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), Object.defineProperty(this, "_tickPoints", {
|
|
17
|
+
enumerable: !0,
|
|
18
|
+
configurable: !0,
|
|
19
|
+
writable: !0,
|
|
20
|
+
value: []
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
Object.defineProperty(O, "className", {
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
configurable: !0,
|
|
27
|
+
writable: !0,
|
|
28
|
+
value: "AxisLabelRadial"
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(O, "classNames", {
|
|
31
|
+
enumerable: !0,
|
|
32
|
+
configurable: !0,
|
|
33
|
+
writable: !0,
|
|
34
|
+
value: de.classNames.concat([O.className])
|
|
35
|
+
});
|
|
36
|
+
class j extends E {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments), Object.defineProperty(this, "labels", {
|
|
39
|
+
enumerable: !0,
|
|
40
|
+
configurable: !0,
|
|
41
|
+
writable: !0,
|
|
42
|
+
value: this.addDisposer(new W($.new({}), () => O._new(this._root, {
|
|
43
|
+
themeTags: M(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
44
|
+
}, [this.labels.template])))
|
|
45
|
+
}), Object.defineProperty(this, "axisFills", {
|
|
46
|
+
enumerable: !0,
|
|
47
|
+
configurable: !0,
|
|
48
|
+
writable: !0,
|
|
49
|
+
value: this.addDisposer(new W($.new({}), () => Me._new(this._root, {
|
|
50
|
+
themeTags: M(this.axisFills.template.get("themeTags", ["fill"]), this.get("themeTags", []))
|
|
51
|
+
}, [this.axisFills.template])))
|
|
52
|
+
}), Object.defineProperty(this, "_fillGenerator", {
|
|
53
|
+
enumerable: !0,
|
|
54
|
+
configurable: !0,
|
|
55
|
+
writable: !0,
|
|
56
|
+
value: I()
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
_afterNew() {
|
|
60
|
+
this._settings.themeTags = M(this._settings.themeTags, ["renderer", "circular"]), super._afterNew(), this.setPrivateRaw("letter", "X"), this.setRaw("position", "absolute");
|
|
61
|
+
}
|
|
62
|
+
_changed() {
|
|
63
|
+
super._changed(), (this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) && this.updateLayout();
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @ignore
|
|
67
|
+
*/
|
|
68
|
+
processAxis() {
|
|
69
|
+
super.processAxis(), this.axis.labelsContainer.set("isMeasured", !1);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @ignore
|
|
73
|
+
*/
|
|
74
|
+
updateLayout() {
|
|
75
|
+
const e = this.chart;
|
|
76
|
+
if (e) {
|
|
77
|
+
const t = e.getPrivate("radius", 0);
|
|
78
|
+
let s = R(this.get("radius", K), t);
|
|
79
|
+
s < 0 && (s = t + s), this.setPrivate("radius", s);
|
|
80
|
+
let i = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t) * e.getPrivate("irModifyer", 1);
|
|
81
|
+
i < 0 && (i = s + i), this.setPrivate("innerRadius", i);
|
|
82
|
+
let a = this.get("startAngle", e.get("startAngle", -90)), r = this.get("endAngle", e.get("endAngle", 270));
|
|
83
|
+
this.setPrivate("startAngle", a), this.setPrivate("endAngle", r), this.set("draw", (n) => {
|
|
84
|
+
const l = this.positionToPoint(0);
|
|
85
|
+
n.moveTo(l.x, l.y), a > r && ([a, r] = [r, a]), n.arc(0, 0, s, a * c, r * c);
|
|
86
|
+
}), this.axis.markDirtySize();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @ignore
|
|
91
|
+
*/
|
|
92
|
+
updateGrid(e, t, s) {
|
|
93
|
+
if (e) {
|
|
94
|
+
t == null && (t = 0);
|
|
95
|
+
let i = e.get("location", 0.5);
|
|
96
|
+
s != null && s != t && (t = t + (s - t) * i);
|
|
97
|
+
let a = this.getPrivate("radius", 0), r = this.getPrivate("innerRadius", 0), n = this.positionToAngle(t);
|
|
98
|
+
this.toggleVisibility(e, t, 0, 1), a != null && e.set("draw", (l) => {
|
|
99
|
+
l.moveTo(r * h(n), r * g(n)), l.lineTo(a * h(n), a * g(n));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Converts relative position to angle.
|
|
105
|
+
*
|
|
106
|
+
* @param position Position
|
|
107
|
+
* @return Angle
|
|
108
|
+
*/
|
|
109
|
+
positionToAngle(e) {
|
|
110
|
+
const t = this.axis, s = this.getPrivate("startAngle", 0), i = this.getPrivate("endAngle", 360), a = t.get("start", 0), r = t.get("end", 1);
|
|
111
|
+
let n = (i - s) / (r - a), l;
|
|
112
|
+
return this.get("inversed") ? l = s + (r - e) * n : l = s + (e - a) * n, l;
|
|
113
|
+
}
|
|
114
|
+
// do not delete
|
|
115
|
+
_handleOpposite() {
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Converts relative position to an X/Y coordinate.
|
|
119
|
+
*
|
|
120
|
+
* @param position Position
|
|
121
|
+
* @return Point
|
|
122
|
+
*/
|
|
123
|
+
positionToPoint(e) {
|
|
124
|
+
const t = this.getPrivate("radius", 0), s = this.positionToAngle(e);
|
|
125
|
+
return { x: t * h(s), y: t * g(s) };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @ignore
|
|
129
|
+
*/
|
|
130
|
+
updateLabel(e, t, s, i) {
|
|
131
|
+
if (e) {
|
|
132
|
+
t == null && (t = 0);
|
|
133
|
+
let a = 0.5;
|
|
134
|
+
i != null && i > 1 ? a = e.get("multiLocation", a) : a = e.get("location", a), s != null && s != t && (t = t + (s - t) * a);
|
|
135
|
+
const r = this.getPrivate("radius", 0), n = this.getPrivate("innerRadius", 0), l = this.positionToAngle(t);
|
|
136
|
+
e.setPrivate("radius", r), e.setPrivate("innerRadius", n), e.set("labelAngle", l), this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @ignore
|
|
141
|
+
*/
|
|
142
|
+
fillDrawMethod(e, t, s) {
|
|
143
|
+
e.set("draw", (i) => {
|
|
144
|
+
t == null && (t = this.getPrivate("startAngle", 0)), s == null && (s = this.getPrivate("endAngle", 0));
|
|
145
|
+
const a = this.getPrivate("innerRadius", 0), r = this.getPrivate("radius", 0);
|
|
146
|
+
this._fillGenerator.context(i), this._fillGenerator({ innerRadius: a, outerRadius: r, startAngle: (t + 90) * c, endAngle: (s + 90) * c });
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @ignore
|
|
151
|
+
*/
|
|
152
|
+
updateTick(e, t, s, i) {
|
|
153
|
+
if (e) {
|
|
154
|
+
t == null && (t = 0);
|
|
155
|
+
let a = 0.5;
|
|
156
|
+
i != null && i > 1 ? a = e.get("multiLocation", a) : a = e.get("location", a), s != null && s != t && (t = t + (s - t) * a);
|
|
157
|
+
let r = e.get("length", 0);
|
|
158
|
+
e.get("inside") && (r *= -1);
|
|
159
|
+
let l = this.getPrivate("radius", 0), u = this.positionToAngle(t);
|
|
160
|
+
this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1)), l != null && e.set("draw", (o) => {
|
|
161
|
+
o.moveTo(l * h(u), l * g(u)), l += r, o.lineTo(l * h(u), l * g(u));
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* @ignore
|
|
167
|
+
*/
|
|
168
|
+
updateBullet(e, t, s) {
|
|
169
|
+
if (e) {
|
|
170
|
+
const i = e.get("sprite");
|
|
171
|
+
if (i) {
|
|
172
|
+
t == null && (t = 0);
|
|
173
|
+
let a = e.get("location", 0.5);
|
|
174
|
+
s != null && s != t && (t = t + (s - t) * a);
|
|
175
|
+
let r = this.getPrivate("radius", 0), n = this.positionToAngle(t);
|
|
176
|
+
this.toggleVisibility(i, t, 0, 1), i.setAll({ rotation: n, x: r * h(n), y: r * g(n) });
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @ignore
|
|
182
|
+
*/
|
|
183
|
+
updateFill(e, t, s) {
|
|
184
|
+
if (e) {
|
|
185
|
+
t == null && (t = 0), s == null && (s = 1);
|
|
186
|
+
let i = this.fitAngle(this.positionToAngle(t)), a = this.fitAngle(this.positionToAngle(s));
|
|
187
|
+
e.setAll({ startAngle: i, arc: a - i }), e._setSoft("innerRadius", this.getPrivate("innerRadius")), e._setSoft("radius", this.getPrivate("radius"));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* @ignore
|
|
192
|
+
*/
|
|
193
|
+
fitAngle(e) {
|
|
194
|
+
const t = this.getPrivate("startAngle", 0), s = this.getPrivate("endAngle", 0), i = Math.min(t, s), a = Math.max(t, s);
|
|
195
|
+
return e < i && (e = i), e > a && (e = a), e;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Returns axis length in pixels.
|
|
199
|
+
*
|
|
200
|
+
* @return Length
|
|
201
|
+
*/
|
|
202
|
+
axisLength() {
|
|
203
|
+
return Math.abs(this.getPrivate("radius", 0) * Math.PI * 2 * (this.getPrivate("endAngle", 360) - this.getPrivate("startAngle", 0)) / 360);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* @ignore
|
|
207
|
+
*/
|
|
208
|
+
positionTooltip(e, t) {
|
|
209
|
+
let s = this.getPrivate("radius", 0);
|
|
210
|
+
const i = this.positionToAngle(t);
|
|
211
|
+
this._positionTooltip(e, { x: s * h(i), y: s * g(i) });
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @ignore
|
|
215
|
+
*/
|
|
216
|
+
updateTooltipBounds(e) {
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
Object.defineProperty(j, "className", {
|
|
220
|
+
enumerable: !0,
|
|
221
|
+
configurable: !0,
|
|
222
|
+
writable: !0,
|
|
223
|
+
value: "AxisRendererCircular"
|
|
224
|
+
});
|
|
225
|
+
Object.defineProperty(j, "classNames", {
|
|
226
|
+
enumerable: !0,
|
|
227
|
+
configurable: !0,
|
|
228
|
+
writable: !0,
|
|
229
|
+
value: E.classNames.concat([j.className])
|
|
230
|
+
});
|
|
231
|
+
class G extends E {
|
|
232
|
+
constructor() {
|
|
233
|
+
super(...arguments), Object.defineProperty(this, "_fillGenerator", {
|
|
234
|
+
enumerable: !0,
|
|
235
|
+
configurable: !0,
|
|
236
|
+
writable: !0,
|
|
237
|
+
value: I()
|
|
238
|
+
}), Object.defineProperty(this, "labels", {
|
|
239
|
+
enumerable: !0,
|
|
240
|
+
configurable: !0,
|
|
241
|
+
writable: !0,
|
|
242
|
+
value: this.addDisposer(new W($.new({}), () => O._new(this._root, {
|
|
243
|
+
themeTags: M(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
244
|
+
}, [this.labels.template])))
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
_afterNew() {
|
|
248
|
+
this._settings.themeTags = M(this._settings.themeTags, ["renderer", "radial"]), super._afterNew(), this.setPrivate("letter", "Y"), this.setRaw("position", "absolute");
|
|
249
|
+
}
|
|
250
|
+
_changed() {
|
|
251
|
+
super._changed(), (this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) && this.updateLayout();
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* @ignore
|
|
255
|
+
*/
|
|
256
|
+
processAxis() {
|
|
257
|
+
super.processAxis();
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* @ignore
|
|
261
|
+
*/
|
|
262
|
+
updateLayout() {
|
|
263
|
+
const e = this.chart;
|
|
264
|
+
if (e) {
|
|
265
|
+
const t = e.getPrivate("radius", 0);
|
|
266
|
+
let s = R(this.get("radius", K), t), i = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t) * e.getPrivate("irModifyer", 1);
|
|
267
|
+
i < 0 && (i = s + i), this.setPrivate("radius", s), this.setPrivate("innerRadius", i);
|
|
268
|
+
let a = this.get("startAngle", e.get("startAngle", -90)), r = this.get("endAngle", e.get("endAngle", 270));
|
|
269
|
+
this.setPrivate("startAngle", a), this.setPrivate("endAngle", r);
|
|
270
|
+
const n = this.get("axisAngle", 0);
|
|
271
|
+
this.set("draw", (l) => {
|
|
272
|
+
l.moveTo(i * h(n), i * g(n)), l.lineTo(s * h(n), s * g(n));
|
|
273
|
+
}), this.axis.markDirtySize();
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* @ignore
|
|
278
|
+
*/
|
|
279
|
+
updateGrid(e, t, s) {
|
|
280
|
+
if (e) {
|
|
281
|
+
m(t) || (t = 0);
|
|
282
|
+
let i = e.get("location", 0.5);
|
|
283
|
+
m(s) && s != t && (t = t + (s - t) * i);
|
|
284
|
+
let a = this.positionToCoordinate(t) + this.getPrivate("innerRadius", 0);
|
|
285
|
+
this.toggleVisibility(e, t, 0, 1), m(a) && e.set("draw", (r) => {
|
|
286
|
+
let n = this.getPrivate("startAngle", 0) * c, l = this.getPrivate("endAngle", 0) * c;
|
|
287
|
+
r.arc(0, 0, Math.max(0, a), Math.min(n, l), Math.max(n, l));
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
// do not delete
|
|
292
|
+
_handleOpposite() {
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Converts relative position to X/Y point.
|
|
296
|
+
*
|
|
297
|
+
* @param position Position
|
|
298
|
+
* @return Point
|
|
299
|
+
*/
|
|
300
|
+
positionToPoint(e) {
|
|
301
|
+
const t = this.getPrivate("innerRadius", 0), s = this.positionToCoordinate(e) + t, i = this.get("axisAngle", 0);
|
|
302
|
+
return { x: s * h(i), y: s * g(i) };
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* @ignore
|
|
306
|
+
*/
|
|
307
|
+
updateLabel(e, t, s, i) {
|
|
308
|
+
if (e) {
|
|
309
|
+
m(t) || (t = 0);
|
|
310
|
+
let a = 0.5;
|
|
311
|
+
m(i) && i > 1 ? a = e.get("multiLocation", a) : a = e.get("location", a), m(s) && s != t && (t = t + (s - t) * a);
|
|
312
|
+
const r = this.positionToPoint(t);
|
|
313
|
+
let n = Math.hypot(r.x, r.y);
|
|
314
|
+
e.setPrivate("radius", n), e.setPrivate("innerRadius", n), e.set("labelAngle", this.get("axisAngle")), this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1));
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
fillDrawMethod(e, t, s) {
|
|
318
|
+
e.set("draw", (i) => {
|
|
319
|
+
t = Math.max(0, t), s = Math.max(0, s), this._fillGenerator.context(i);
|
|
320
|
+
let a = (this.getPrivate("startAngle", 0) + 90) * c, r = (this.getPrivate("endAngle", 0) + 90) * c;
|
|
321
|
+
r < a && ([a, r] = [r, a]), this._fillGenerator({ innerRadius: t, outerRadius: s, startAngle: a, endAngle: r });
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* @ignore
|
|
326
|
+
*/
|
|
327
|
+
updateTick(e, t, s, i) {
|
|
328
|
+
if (e) {
|
|
329
|
+
m(t) || (t = 0);
|
|
330
|
+
let a = 0.5;
|
|
331
|
+
m(i) && i > 1 ? a = e.get("multiLocation", a) : a = e.get("location", a), m(s) && s != t && (t = t + (s - t) * a);
|
|
332
|
+
const r = this.positionToPoint(t);
|
|
333
|
+
e.set("x", r.x), e.set("y", r.y);
|
|
334
|
+
let n = e.get("length", 0);
|
|
335
|
+
e.get("inside") && (n *= -1);
|
|
336
|
+
const u = this.get("axisAngle", 0) + 90;
|
|
337
|
+
e.set("draw", (o) => {
|
|
338
|
+
o.moveTo(0, 0), o.lineTo(n * h(u), n * g(u));
|
|
339
|
+
}), this.toggleVisibility(e, t, e.get("minPosition", 0), e.get("maxPosition", 1));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* @ignore
|
|
344
|
+
*/
|
|
345
|
+
updateBullet(e, t, s) {
|
|
346
|
+
if (e) {
|
|
347
|
+
const i = e.get("sprite");
|
|
348
|
+
if (i) {
|
|
349
|
+
m(t) || (t = 0);
|
|
350
|
+
let a = e.get("location", 0.5);
|
|
351
|
+
m(s) && s != t && (t = t + (s - t) * a);
|
|
352
|
+
const r = this.positionToPoint(t);
|
|
353
|
+
i.setAll({ x: r.x, y: r.y }), this.toggleVisibility(i, t, 0, 1);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* @ignore
|
|
359
|
+
*/
|
|
360
|
+
updateFill(e, t, s) {
|
|
361
|
+
if (e) {
|
|
362
|
+
m(t) || (t = 0), m(s) || (s = 1);
|
|
363
|
+
const i = this.getPrivate("innerRadius", 0);
|
|
364
|
+
let a = this.positionToCoordinate(t) + i, r = this.positionToCoordinate(s) + i;
|
|
365
|
+
this.fillDrawMethod(e, a, r);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Returns axis length in pixels.
|
|
370
|
+
*
|
|
371
|
+
* @return Length
|
|
372
|
+
*/
|
|
373
|
+
axisLength() {
|
|
374
|
+
return this.getPrivate("radius", 0) - this.getPrivate("innerRadius", 0);
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* @ignore
|
|
378
|
+
*/
|
|
379
|
+
updateTooltipBounds(e) {
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Converts relative position to pixels.
|
|
383
|
+
*
|
|
384
|
+
* @param position Position
|
|
385
|
+
* @return Pixels
|
|
386
|
+
*/
|
|
387
|
+
positionToCoordinate(e) {
|
|
388
|
+
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);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* @ignore
|
|
392
|
+
*/
|
|
393
|
+
positionTooltip(e, t) {
|
|
394
|
+
let s = this.getPrivate("innerRadius", 0) + this.positionToCoordinate(t);
|
|
395
|
+
const i = this.get("axisAngle", 0);
|
|
396
|
+
this._positionTooltip(e, { x: s * h(i), y: s * g(i) });
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
Object.defineProperty(G, "className", {
|
|
400
|
+
enumerable: !0,
|
|
401
|
+
configurable: !0,
|
|
402
|
+
writable: !0,
|
|
403
|
+
value: "AxisRendererRadial"
|
|
404
|
+
});
|
|
405
|
+
Object.defineProperty(G, "classNames", {
|
|
406
|
+
enumerable: !0,
|
|
407
|
+
configurable: !0,
|
|
408
|
+
writable: !0,
|
|
409
|
+
value: E.classNames.concat([G.className])
|
|
410
|
+
});
|
|
411
|
+
class Ye extends me {
|
|
412
|
+
setupDefaultRules() {
|
|
413
|
+
super.setupDefaultRules();
|
|
414
|
+
const e = this.rule.bind(this), t = this._root.interfaceColors;
|
|
415
|
+
e("RadarChart").setAll({
|
|
416
|
+
radius: w(80),
|
|
417
|
+
innerRadius: 0,
|
|
418
|
+
startAngle: -90,
|
|
419
|
+
endAngle: 270
|
|
420
|
+
}), e("RadarColumnSeries").setAll({
|
|
421
|
+
clustered: !0
|
|
422
|
+
}), e("Slice", ["radar", "column", "series"]).setAll({
|
|
423
|
+
width: w(80),
|
|
424
|
+
height: w(80)
|
|
425
|
+
}), e("RadarLineSeries").setAll({
|
|
426
|
+
connectEnds: !0
|
|
427
|
+
}), e("SmoothedRadarLineSeries").setAll({
|
|
428
|
+
tension: 0.5
|
|
429
|
+
}), e("AxisRendererRadial").setAll({
|
|
430
|
+
minGridDistance: 40,
|
|
431
|
+
axisAngle: -90,
|
|
432
|
+
inversed: !1,
|
|
433
|
+
cellStartLocation: 0,
|
|
434
|
+
cellEndLocation: 1
|
|
435
|
+
}), e("AxisRendererCircular").setAll({
|
|
436
|
+
minGridDistance: 100,
|
|
437
|
+
inversed: !1,
|
|
438
|
+
cellStartLocation: 0,
|
|
439
|
+
cellEndLocation: 1
|
|
440
|
+
}), e("RadialLabel", ["circular"]).setAll({
|
|
441
|
+
textType: "circular",
|
|
442
|
+
paddingTop: 1,
|
|
443
|
+
paddingRight: 0,
|
|
444
|
+
paddingBottom: 1,
|
|
445
|
+
paddingLeft: 0,
|
|
446
|
+
centerX: 0,
|
|
447
|
+
centerY: 0,
|
|
448
|
+
radius: 8
|
|
449
|
+
}), e("AxisLabelRadial", ["category"]).setAll({
|
|
450
|
+
text: "{category}",
|
|
451
|
+
populateText: !0
|
|
452
|
+
}), e("RadialLabel", ["radial"]).setAll({
|
|
453
|
+
textType: "regular",
|
|
454
|
+
centerX: 0,
|
|
455
|
+
textAlign: "right"
|
|
456
|
+
}), e("RadarChart", ["gauge"]).setAll({
|
|
457
|
+
startAngle: 180,
|
|
458
|
+
endAngle: 360,
|
|
459
|
+
innerRadius: w(90)
|
|
460
|
+
}), e("ClockHand").setAll({
|
|
461
|
+
topWidth: 1,
|
|
462
|
+
bottomWidth: 10,
|
|
463
|
+
radius: w(90),
|
|
464
|
+
pinRadius: 10
|
|
465
|
+
});
|
|
466
|
+
{
|
|
467
|
+
const s = e("Graphics", ["clock", "hand"]);
|
|
468
|
+
s.setAll({
|
|
469
|
+
fillOpacity: 1
|
|
470
|
+
}), ae(s, "fill", t, "alternativeBackground");
|
|
471
|
+
}
|
|
472
|
+
{
|
|
473
|
+
const s = e("Graphics", ["clock", "pin"]);
|
|
474
|
+
s.setAll({
|
|
475
|
+
fillOpacity: 1
|
|
476
|
+
}), ae(s, "fill", t, "alternativeBackground");
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
class k extends ue {
|
|
481
|
+
constructor() {
|
|
482
|
+
super(...arguments), Object.defineProperty(this, "radarContainer", {
|
|
483
|
+
enumerable: !0,
|
|
484
|
+
configurable: !0,
|
|
485
|
+
writable: !0,
|
|
486
|
+
value: this.plotContainer.children.push(Ae.new(this._root, { x: N, y: N }))
|
|
487
|
+
}), Object.defineProperty(this, "_arcGenerator", {
|
|
488
|
+
enumerable: !0,
|
|
489
|
+
configurable: !0,
|
|
490
|
+
writable: !0,
|
|
491
|
+
value: I()
|
|
492
|
+
}), Object.defineProperty(this, "_maxRadius", {
|
|
493
|
+
enumerable: !0,
|
|
494
|
+
configurable: !0,
|
|
495
|
+
writable: !0,
|
|
496
|
+
value: 1
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
_afterNew() {
|
|
500
|
+
this._defaultThemes.push(Ye.new(this._root)), super._afterNew();
|
|
501
|
+
const e = this.radarContainer, t = this.gridContainer, s = this.topGridContainer, i = this.seriesContainer, a = this.bulletsContainer;
|
|
502
|
+
e.children.pushAll([t, i, s, a]), i.set("mask", J.new(this._root, {})), t.set("mask", J.new(this._root, {})), this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
|
|
503
|
+
this._updateRadius();
|
|
504
|
+
}));
|
|
505
|
+
}
|
|
506
|
+
_maskGrid() {
|
|
507
|
+
}
|
|
508
|
+
_prepareChildren() {
|
|
509
|
+
if (super._prepareChildren(), this._sizeDirty || this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) {
|
|
510
|
+
const e = this.chartContainer, t = e.innerWidth(), s = e.innerHeight(), i = this.get("startAngle", 0), a = this.get("endAngle", 0), r = this.get("innerRadius");
|
|
511
|
+
let n = re(0, 0, i, a, 1);
|
|
512
|
+
const l = t / (n.right - n.left), u = s / (n.bottom - n.top);
|
|
513
|
+
let o = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
514
|
+
if (r instanceof Ce) {
|
|
515
|
+
let f = r.value, T = Math.min(l, u);
|
|
516
|
+
f = Math.max(T * f, T - Math.min(s, t)) / T, o = re(0, 0, i, a, f), this.setPrivateRaw("irModifyer", f / r.value);
|
|
517
|
+
}
|
|
518
|
+
n = pe([n, o]), this._maxRadius = Math.max(0, Math.min(l, u));
|
|
519
|
+
const y = R(this.get("radius", 0), this._maxRadius);
|
|
520
|
+
this.radarContainer.setAll({
|
|
521
|
+
dy: -y * (n.bottom + n.top) / 2,
|
|
522
|
+
dx: -y * (n.right + n.left) / 2
|
|
523
|
+
}), this._updateRadius();
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
_addCursor(e) {
|
|
527
|
+
this.radarContainer.children.push(e);
|
|
528
|
+
}
|
|
529
|
+
// do not delete
|
|
530
|
+
_updateRadius() {
|
|
531
|
+
const e = R(this.get("radius", w(80)), this._maxRadius);
|
|
532
|
+
this.setPrivateRaw("radius", e);
|
|
533
|
+
let t = R(this.get("innerRadius", 0), e);
|
|
534
|
+
t < 0 && (t = e + t), this.setPrivateRaw("innerRadius", t), this.xAxes.each((i) => {
|
|
535
|
+
i.get("renderer").updateLayout();
|
|
536
|
+
}), this.yAxes.each((i) => {
|
|
537
|
+
i.get("renderer").updateLayout();
|
|
538
|
+
}), this._updateMask(this.seriesContainer, t, e), this._updateMask(this.gridContainer, t, e), this.series.each((i) => {
|
|
539
|
+
i.get("maskBullets") ? this._updateMask(i.bulletsContainer, t, e) : i.bulletsContainer.remove("mask");
|
|
540
|
+
});
|
|
541
|
+
const s = this.get("cursor");
|
|
542
|
+
s && s.updateLayout();
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* @ignore
|
|
546
|
+
*/
|
|
547
|
+
_updateMask(e, t, s) {
|
|
548
|
+
const i = e.get("mask");
|
|
549
|
+
i && i.set("draw", (a) => {
|
|
550
|
+
this._arcGenerator.context(a), this._arcGenerator({ innerRadius: t, outerRadius: s + 0.5, startAngle: (this.get("startAngle", 0) + 90) * c, endAngle: (this.get("endAngle", 0) + 90) * c });
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* @ignore
|
|
555
|
+
*/
|
|
556
|
+
processAxis(e) {
|
|
557
|
+
this.radarContainer.children.push(e);
|
|
558
|
+
}
|
|
559
|
+
_processSeries(e) {
|
|
560
|
+
super._processSeries(e), this._updateRadius();
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* @ignore
|
|
564
|
+
*/
|
|
565
|
+
inPlot(e, t, s) {
|
|
566
|
+
const i = Math.hypot(e.x, e.y), a = L(Math.atan2(e.y, e.x) * C);
|
|
567
|
+
let r = L(this.get("startAngle", 0)), n = L(this.get("endAngle", 0)), l = !1;
|
|
568
|
+
return r < n && r < a && a < n && (l = !0), r > n && (a > r && (l = !0), a < n && (l = !0)), r == n && (l = !0), l ? (t == null && (t = this.getPrivate("radius", 0)), s == null && (s = this.getPrivate("innerRadius", 0)), s > t && ([s, t] = [t, s]), i <= t + 0.5 && i >= s - 0.5) : !1;
|
|
569
|
+
}
|
|
570
|
+
_tooltipToLocal(e) {
|
|
571
|
+
return this.radarContainer._display.toLocal(e);
|
|
572
|
+
}
|
|
573
|
+
_handlePinch() {
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
Object.defineProperty(k, "className", {
|
|
577
|
+
enumerable: !0,
|
|
578
|
+
configurable: !0,
|
|
579
|
+
writable: !0,
|
|
580
|
+
value: "RadarChart"
|
|
581
|
+
});
|
|
582
|
+
Object.defineProperty(k, "classNames", {
|
|
583
|
+
enumerable: !0,
|
|
584
|
+
configurable: !0,
|
|
585
|
+
writable: !0,
|
|
586
|
+
value: ue.classNames.concat([k.className])
|
|
587
|
+
});
|
|
588
|
+
class B extends he {
|
|
589
|
+
constructor() {
|
|
590
|
+
super(...arguments), Object.defineProperty(this, "_fillGenerator", {
|
|
591
|
+
enumerable: !0,
|
|
592
|
+
configurable: !0,
|
|
593
|
+
writable: !0,
|
|
594
|
+
value: I()
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
_afterNew() {
|
|
598
|
+
this._settings.themeTags = M(this._settings.themeTags, ["radar", "cursor"]), super._afterNew();
|
|
599
|
+
}
|
|
600
|
+
_handleXLine() {
|
|
601
|
+
}
|
|
602
|
+
_handleYLine() {
|
|
603
|
+
}
|
|
604
|
+
_getPosition(e) {
|
|
605
|
+
const t = Math.hypot(e.x, e.y);
|
|
606
|
+
let s = L(Math.atan2(e.y, e.x) * C);
|
|
607
|
+
const i = this.getPrivate("innerRadius");
|
|
608
|
+
let a = L(this.getPrivate("startAngle")), r = L(this.getPrivate("endAngle"));
|
|
609
|
+
(r < a || r == a) && (s < a && (s += 360), r = r + 360);
|
|
610
|
+
let n = (s - a) / (r - a);
|
|
611
|
+
return n < 0 && (n = 1 + n), n < 3e-3 && (n = 0), n > 0.997 && (n = 1), { x: n, y: (t - i) / (this.getPrivate("radius") - i) };
|
|
612
|
+
}
|
|
613
|
+
_getPoint(e, t) {
|
|
614
|
+
const s = this.getPrivate("innerRadius"), i = this.getPrivate("startAngle"), a = this.getPrivate("endAngle"), r = this.getPrivate("radius"), n = i + e * (a - i), l = s + (r - s) * t;
|
|
615
|
+
return { x: l * h(n), y: l * g(n) };
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* @ignore
|
|
619
|
+
*/
|
|
620
|
+
updateLayout() {
|
|
621
|
+
const e = this.chart;
|
|
622
|
+
if (e) {
|
|
623
|
+
const t = e.getPrivate("radius", 0);
|
|
624
|
+
this.setPrivate("radius", R(this.get("radius", K), t));
|
|
625
|
+
let s = R(this.get("innerRadius", e.getPrivate("innerRadius", 0)), t);
|
|
626
|
+
s < 0 && (s = t + s), this.setPrivate("innerRadius", s);
|
|
627
|
+
let i = this.get("startAngle", e.get("startAngle", -90)), a = this.get("endAngle", e.get("endAngle", 270));
|
|
628
|
+
this.setPrivate("startAngle", i), this.setPrivate("endAngle", a);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
_updateLines(e, t) {
|
|
632
|
+
this._tooltipX || this._drawXLine(e, t), this._tooltipY || this._drawYLine(e, t);
|
|
633
|
+
}
|
|
634
|
+
_drawXLine(e, t) {
|
|
635
|
+
const s = this.getPrivate("innerRadius"), i = this.getPrivate("radius"), a = Math.atan2(t, e);
|
|
636
|
+
this.lineX.set("draw", (r) => {
|
|
637
|
+
r.moveTo(s * Math.cos(a), s * Math.sin(a)), r.lineTo(i * Math.cos(a), i * Math.sin(a));
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
_drawYLine(e, t) {
|
|
641
|
+
const s = Math.hypot(e, t);
|
|
642
|
+
this.lineY.set("draw", (i) => {
|
|
643
|
+
i.arc(0, 0, s, this.getPrivate("startAngle", 0) * c, this.getPrivate("endAngle", 0) * c);
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
_updateXLine(e) {
|
|
647
|
+
let t = e.get("pointTo");
|
|
648
|
+
t && (t = this._display.toLocal(t), this._drawXLine(t.x, t.y));
|
|
649
|
+
}
|
|
650
|
+
_updateYLine(e) {
|
|
651
|
+
let t = e.get("pointTo");
|
|
652
|
+
t && (t = this._display.toLocal(t), this._drawYLine(t.x, t.y));
|
|
653
|
+
}
|
|
654
|
+
_inPlot(e) {
|
|
655
|
+
const t = this.chart;
|
|
656
|
+
return t ? t.inPlot(e, this.getPrivate("radius"), this.getPrivate("innerRadius")) : !1;
|
|
657
|
+
}
|
|
658
|
+
_updateSelection(e) {
|
|
659
|
+
this.selection.set("draw", (t) => {
|
|
660
|
+
const s = this.get("behavior"), i = this._downPoint, a = this.getPrivate("startAngle"), r = this.getPrivate("endAngle");
|
|
661
|
+
let n = this.getPrivate("radius"), l = this.getPrivate("innerRadius");
|
|
662
|
+
n < l && ([n, l] = [l, n]);
|
|
663
|
+
let u = a, o = r, y = n, f = l;
|
|
664
|
+
i && (s == "zoomXY" || s == "selectXY" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C, f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y)) : s == "zoomX" || s == "selectX" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C) : (s == "zoomY" || s == "selectY") && (f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y))), f = ne(f, l, n), y = ne(y, l, n), u = le(u, a, r), o = le(o, a, r), u == o && (o = u + 360), u *= c, o *= c, this._fillGenerator.context(t), this._fillGenerator({ innerRadius: f, outerRadius: y, startAngle: u + Math.PI / 2, endAngle: o + Math.PI / 2 });
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
Object.defineProperty(B, "className", {
|
|
669
|
+
enumerable: !0,
|
|
670
|
+
configurable: !0,
|
|
671
|
+
writable: !0,
|
|
672
|
+
value: "RadarCursor"
|
|
673
|
+
});
|
|
674
|
+
Object.defineProperty(B, "classNames", {
|
|
675
|
+
enumerable: !0,
|
|
676
|
+
configurable: !0,
|
|
677
|
+
writable: !0,
|
|
678
|
+
value: he.classNames.concat([B.className])
|
|
679
|
+
});
|
|
680
|
+
class F extends ge {
|
|
681
|
+
_afterNew() {
|
|
682
|
+
super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", J.new(this._root, {}));
|
|
683
|
+
}
|
|
684
|
+
_handleMaskBullets() {
|
|
685
|
+
}
|
|
686
|
+
getPoint(e, t) {
|
|
687
|
+
const s = this.get("yAxis"), i = this.get("xAxis"), a = s.get("renderer"), r = a.positionToCoordinate(t) + a.getPrivate("innerRadius", 0), l = i.get("renderer").positionToAngle(e);
|
|
688
|
+
return { x: r * h(l), y: r * g(l) };
|
|
689
|
+
}
|
|
690
|
+
_endLine(e, t) {
|
|
691
|
+
this.get("connectEnds") && t && e.push(t);
|
|
692
|
+
}
|
|
693
|
+
_shouldInclude(e) {
|
|
694
|
+
const t = this.get("xAxis");
|
|
695
|
+
return !(e < t.get("start") || e > t.get("end"));
|
|
696
|
+
}
|
|
697
|
+
_shouldShowBullet(e, t) {
|
|
698
|
+
const s = this.get("xAxis");
|
|
699
|
+
return e < s.get("start") || e > s.get("end") ? !1 : this._showBullets;
|
|
700
|
+
}
|
|
701
|
+
_positionBullet(e) {
|
|
702
|
+
let t = e.get("sprite");
|
|
703
|
+
if (t) {
|
|
704
|
+
let s = t.dataItem, i = e.get("locationX", s.get("locationX", 0.5)), a = e.get("locationY", s.get("locationY", 0.5)), r = this.get("xAxis"), n = this.get("yAxis");
|
|
705
|
+
const l = r.getDataItemPositionX(s, this._xField, i, this.get("vcx", 1)), u = n.getDataItemPositionY(s, this._yField, a, this.get("vcy", 1));
|
|
706
|
+
let o = this.getPoint(l, u);
|
|
707
|
+
this._shouldShowBullet(l, u) ? (t.setPrivate("visible", !0), t.set("x", o.x), t.set("y", o.y)) : t.setPrivate("visible", !1);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
Object.defineProperty(F, "className", {
|
|
712
|
+
enumerable: !0,
|
|
713
|
+
configurable: !0,
|
|
714
|
+
writable: !0,
|
|
715
|
+
value: "RadarLineSeries"
|
|
716
|
+
});
|
|
717
|
+
Object.defineProperty(F, "classNames", {
|
|
718
|
+
enumerable: !0,
|
|
719
|
+
configurable: !0,
|
|
720
|
+
writable: !0,
|
|
721
|
+
value: ge.classNames.concat([F.className])
|
|
722
|
+
});
|
|
723
|
+
const Ue = (_) => {
|
|
724
|
+
const e = ye({ props: _, name: "HCStackedAreaRadar" }), {
|
|
725
|
+
dimensions: t,
|
|
726
|
+
values: s,
|
|
727
|
+
data: i,
|
|
728
|
+
initDelay: a = 0,
|
|
729
|
+
baseInterval: r,
|
|
730
|
+
colors: n,
|
|
731
|
+
sx: l,
|
|
732
|
+
...u
|
|
733
|
+
} = e, o = be(), f = `hc-stacked-area-radar-${Re().replace(/:/g, "")}`, T = _e(null);
|
|
734
|
+
we(() => {
|
|
735
|
+
let V;
|
|
736
|
+
return V = setTimeout(() => {
|
|
737
|
+
var se, ie;
|
|
738
|
+
const d = xe.new(f);
|
|
739
|
+
T.current = d, d.setThemes([ve.new(d)]), d.interfaceColors.setAll({
|
|
740
|
+
text: Y(o.palette.text.primary),
|
|
741
|
+
grid: Y(o.palette.divider),
|
|
742
|
+
stroke: Y(o.palette.divider)
|
|
743
|
+
});
|
|
744
|
+
const b = d.container.children.push(
|
|
745
|
+
k.new(d, {
|
|
746
|
+
panX: !1,
|
|
747
|
+
panY: !1,
|
|
748
|
+
wheelX: "none",
|
|
749
|
+
wheelY: "none",
|
|
750
|
+
innerRadius: w(40),
|
|
751
|
+
radius: w(70),
|
|
752
|
+
arrangeTooltips: !1
|
|
753
|
+
})
|
|
754
|
+
);
|
|
755
|
+
if (b.set("colors", Te(d, n)), b.get("colors", {}).set("step", 2), b.set(
|
|
756
|
+
"cursor",
|
|
757
|
+
B.new(d, { behavior: "zoomX" })
|
|
758
|
+
).lineY.set("visible", !1), t.length < 2) {
|
|
759
|
+
console.error("StackedAreaRadar requires at least 2 dimensions");
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
if (s.length < 1) {
|
|
763
|
+
console.error("StackedAreaRadar requires at least 1 value");
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
const x = t[0], fe = t[1];
|
|
767
|
+
let v = [];
|
|
768
|
+
const z = U.groupBy(i, fe.value);
|
|
769
|
+
Object.keys(z).forEach((A) => {
|
|
770
|
+
z[A].forEach((P) => {
|
|
771
|
+
const p = P[x.value], q = U.findIndex(v, { [x.value]: p });
|
|
772
|
+
q === -1 ? v.push({
|
|
773
|
+
[x.value]: p,
|
|
774
|
+
[A]: P[s[0].dataFieldName]
|
|
775
|
+
}) : v[q] = {
|
|
776
|
+
...v[q],
|
|
777
|
+
[A]: P[s[0].dataFieldName]
|
|
778
|
+
};
|
|
779
|
+
});
|
|
780
|
+
});
|
|
781
|
+
const S = j.new(d, {
|
|
782
|
+
minGridDistance: 30
|
|
783
|
+
});
|
|
784
|
+
S.labels.template.setAll({
|
|
785
|
+
textType: "radial",
|
|
786
|
+
radius: 10,
|
|
787
|
+
paddingTop: 0,
|
|
788
|
+
paddingBottom: 0,
|
|
789
|
+
centerY: N,
|
|
790
|
+
fontSize: "0.8em"
|
|
791
|
+
}), S.grid.template.setAll({
|
|
792
|
+
location: 0.5,
|
|
793
|
+
strokeDasharray: [2, 2]
|
|
794
|
+
});
|
|
795
|
+
let D;
|
|
796
|
+
if (x.type === "date") {
|
|
797
|
+
const A = (r == null ? void 0 : r.timeUnit) || "day";
|
|
798
|
+
let P = "DD/MM/YYYY";
|
|
799
|
+
A === "month" ? P = "MM YYYY" : A === "year" && (P = "YYYY"), D = b.xAxes.push(
|
|
800
|
+
oe.new(d, {
|
|
801
|
+
maxDeviation: 0,
|
|
802
|
+
categoryField: x.value,
|
|
803
|
+
renderer: S,
|
|
804
|
+
tooltip: H.new(d, {})
|
|
805
|
+
})
|
|
806
|
+
), v = U.orderBy(v, [x.value]), v = v.map((p) => ({
|
|
807
|
+
...p,
|
|
808
|
+
[x.value]: Pe(p[x.value]).format(P)
|
|
809
|
+
}));
|
|
810
|
+
} else
|
|
811
|
+
D = b.xAxes.push(
|
|
812
|
+
oe.new(d, {
|
|
813
|
+
maxDeviation: 0,
|
|
814
|
+
categoryField: x.value,
|
|
815
|
+
renderer: S,
|
|
816
|
+
tooltip: H.new(d, {})
|
|
817
|
+
})
|
|
818
|
+
);
|
|
819
|
+
const Q = G.new(d, {
|
|
820
|
+
minGridDistance: 30
|
|
821
|
+
}), Z = b.yAxes.push(
|
|
822
|
+
Le.new(d, { renderer: Q })
|
|
823
|
+
);
|
|
824
|
+
Q.grid.template.setAll({ strokeDasharray: [2, 2] }), (se = D.get("renderer")) == null || se.grid.template.setAll({
|
|
825
|
+
stroke: Y(o.palette.divider),
|
|
826
|
+
strokeOpacity: 1
|
|
827
|
+
}), (ie = Z.get("renderer")) == null || ie.grid.template.setAll({
|
|
828
|
+
stroke: Y(o.palette.divider),
|
|
829
|
+
strokeOpacity: 1
|
|
830
|
+
});
|
|
831
|
+
const ee = [];
|
|
832
|
+
let X = "";
|
|
833
|
+
const te = Object.keys(z);
|
|
834
|
+
te.forEach((A, P) => {
|
|
835
|
+
X.length > 0 && (X += `
|
|
836
|
+
`), X += `${A}: {${A}}`;
|
|
837
|
+
const p = b.series.push(
|
|
838
|
+
F.new(d, {
|
|
839
|
+
name: A,
|
|
840
|
+
xAxis: D,
|
|
841
|
+
yAxis: Z,
|
|
842
|
+
valueYField: A,
|
|
843
|
+
categoryXField: x.value,
|
|
844
|
+
...P === te.length - 1 && {
|
|
845
|
+
stacked: !0,
|
|
846
|
+
tooltip: H.new(d, { labelText: X })
|
|
847
|
+
}
|
|
848
|
+
})
|
|
849
|
+
);
|
|
850
|
+
p.strokes.template.setAll({ strokeOpacity: 0 }), p.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), p.data.setAll(v), p.appear(1e3), ee.push(p);
|
|
851
|
+
}), b.radarContainer.children.push(
|
|
852
|
+
De.new(d, {
|
|
853
|
+
width: 150,
|
|
854
|
+
centerX: N,
|
|
855
|
+
centerY: N
|
|
856
|
+
})
|
|
857
|
+
).data.setAll(ee), D.data.setAll(v), b.appear(1e3, 100);
|
|
858
|
+
}, a), () => {
|
|
859
|
+
var d;
|
|
860
|
+
V && clearTimeout(V), (d = T.current) == null || d.dispose(), T.current = null;
|
|
861
|
+
};
|
|
862
|
+
}, [i, t, s, o.palette.mode, n]);
|
|
863
|
+
const ce = { ...e };
|
|
864
|
+
return { chartId: f, ownerState: ce, sx: l, other: u };
|
|
865
|
+
};
|
|
866
|
+
export {
|
|
867
|
+
Ue as useStackedAreaRadarLogic
|
|
868
|
+
};
|