@sheetxl/studio-mui 1.0.4 → 1.0.6
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/browser/esm/{N5L4wQxRGEOH_wbp.mjs → 6wAcMpoIZS1ffzqR.mjs} +3 -3
- package/browser/esm/{DHmh3sMFGq4sRPhh.mjs → AVMBYVWPe170RO8d.mjs} +20 -20
- package/browser/esm/{D_r8MdiauI15ds00.mjs → B2k09pbNHOie-ZPU.mjs} +5 -5
- package/browser/esm/B5hj7BR72rs3Xx2-.mjs +40 -0
- package/browser/esm/{jDqohhLNEI6wqjo7.mjs → BK0H9A2QjD4YqPxq.mjs} +2 -2
- package/browser/esm/{CHfzSl32Bs6LVY3G.mjs → BMtR4PaoNnEhVh2U.mjs} +243 -245
- package/browser/esm/{DZngQvRDu3Qh7_uy.mjs → BVQX7HEZNPIvf0Bg.mjs} +1 -1
- package/browser/esm/BZWyHJnsP5yHfByl.mjs +461 -0
- package/browser/esm/{n1z1c9np4M3gMGCX.mjs → BaYDGaXi_5fNEPo1.mjs} +1 -1
- package/browser/esm/{B4vVBfkY4Oq6M196.mjs → BgOevzKxdIm3FqSz.mjs} +4 -4
- package/browser/esm/{BH1Qj4pv8pPWZVhO.mjs → BgvcXlX-fe99mlfa.mjs} +1 -1
- package/browser/esm/{BDSYU5nx_6eGxAa4.mjs → BmJRmCarQ2Y_DhcS.mjs} +6 -6
- package/browser/esm/{Cf6bsmEPyPpiNtxU.mjs → BnIfAdE8Qnu8RF3t.mjs} +1 -1
- package/browser/esm/{B130jd-PqNgY2pV8.mjs → Bu4IunF89gqzLc6A.mjs} +2 -2
- package/browser/esm/{B4EWee1CcAHS5vAA.mjs → BvvD5BVF5uSL-2Ow.mjs} +2 -2
- package/browser/esm/{CzWXYarhfF4mF8fj.mjs → Bzr0CzpORAOD9X-l.mjs} +1 -1
- package/browser/esm/{CEvJVwoVP9nscIcl.mjs → C-lKdgOAbn4Ycu7e.mjs} +2 -2
- package/browser/esm/{CFiyY-_XmW7G0_9y.mjs → C211u9yUXa4149g9.mjs} +1 -1
- package/browser/esm/{DoJ8N6FhUY0kYz9u.mjs → C7RPgX_8hKN1Umxm.mjs} +2 -2
- package/browser/esm/{DqP1sKmMsG0tKwmV.mjs → C9cBnewCaYFf2JV6.mjs} +21 -22
- package/browser/esm/{Cx1r__xbzz-5zZgw.mjs → CA42_0vpQwF292tA.mjs} +1 -1
- package/browser/esm/{D1WSqegx9Zbjc-cL.mjs → CAbY1N8X3Iryy2XC.mjs} +4 -4
- package/browser/esm/{k0bdGBFIHCTGANHW.mjs → CD6iCHysAki3ui3u.mjs} +4 -4
- package/browser/esm/{DVQZtsBbf_Fsh-B6.mjs → CFUur1yDoVOJMuo5.mjs} +1 -1
- package/browser/esm/{npsX_Rztx4_7rCGP.mjs → CHb2gapathcPfhdM.mjs} +5 -5
- package/browser/esm/{94_olh2OyEbGAcNw.mjs → CIZh3NmE8QG5ZkiA.mjs} +2 -2
- package/browser/esm/{BBNFlngSL8Y3242O.mjs → CImvd-NxbJGZOozE.mjs} +1 -1
- package/browser/esm/{Me9wSTkBepRyMDHH.mjs → CO-AxUDR6qjjgpyK.mjs} +2 -2
- package/browser/esm/CQ1ArTuEvBmc7W5I.mjs +695 -0
- package/browser/esm/{uV_YgeJoyPa9SdGV.mjs → CVNzlTdizLlhU05M.mjs} +2 -2
- package/browser/esm/{D2YXkXpEcP-NqHMv.mjs → CXwkm9x8MkCxPz74.mjs} +1 -1
- package/browser/esm/{WQaRUnIjMCkaRwsb.mjs → CZIV7UuyM5VGNrJT.mjs} +4 -4
- package/browser/esm/{BQTUWwRUxgqg4s6Y.mjs → CdK1lF_PdSw6YfAo.mjs} +1 -1
- package/browser/esm/{DoYGmNZ_X3Kvxx3K.mjs → CpgoYQ3P-S7njA7p.mjs} +2 -2
- package/browser/esm/{ph1FP1S-yYM0I269.mjs → CqEyDFDlQ75w1c41.mjs} +2 -2
- package/browser/esm/{BYUokd7Q6y5Xw36U.mjs → CqIX3rp_vI2S2KbN.mjs} +2 -2
- package/browser/esm/{NSuxs1P3kFsoLIMa.mjs → Csmz2j1S5pk-J0B3.mjs} +2 -2
- package/browser/esm/{B0q0gHDAexrBB16B.mjs → CsuFocZfRucugR3q.mjs} +1153 -922
- package/browser/esm/{SHaQophNZjobC_4f.mjs → Cw6wZyiZkwn9DPZn.mjs} +193 -105
- package/browser/esm/{m5mPoZGqgwOCQQOs.mjs → D91G6sYfKgwC24dQ.mjs} +1 -1
- package/browser/esm/{B1SDDlETvGUJ2Ipu.mjs → DF_ssRdRHuBueJgX.mjs} +89 -102
- package/browser/esm/{CWgz8hWLf3OzuMyZ.mjs → DJaMl_5NGyq62zwW.mjs} +1 -1
- package/browser/esm/DLixDE7fzzurotzQ.mjs +826 -0
- package/browser/esm/{dlNcqumPfehZG2ai.mjs → DM86XhEF4qmUnjuK.mjs} +4 -4
- package/browser/esm/{BrFq6SNq-qx1PYZO.mjs → DNXDqUO4_S_N8sSC.mjs} +2 -2
- package/browser/esm/{BMIfZN_dgjS_p-pF.mjs → DfrMUwmPoZFEFJFk.mjs} +1 -1
- package/browser/esm/{BESsacbR41SalUJv.mjs → Dn3ur1I_S9SlR8vu.mjs} +1 -1
- package/browser/esm/{CbCTAkfOjIThF31A.mjs → IUt6EgxYCpZe9iCH.mjs} +2 -2
- package/browser/esm/{a7OD-X4Jjp810Y6v.mjs → JNoXh3IYri5h1W3Y.mjs} +1 -1
- package/browser/esm/{1JW5qOuAMlejsOrm.mjs → LZ2X5C1kjiwUCDGz.mjs} +2 -2
- package/browser/esm/{DlZoddGNGipM3S72.mjs → MSkt-6o2ZLEiAbDl.mjs} +1 -1
- package/browser/esm/{MR6LXUjaCV0DShNi.mjs → bQOt-2VGBciMnvp_.mjs} +3 -3
- package/browser/esm/{CbC8ObddTe-7ix6F.mjs → drMcpHj_xCQ0KxuA.mjs} +4 -4
- package/browser/esm/{DGz8aGpEm8yfccoW.mjs → g-ScvvLFu66BzoGI.mjs} +2 -2
- package/browser/esm/index.mjs +299 -299
- package/browser/esm/{dikVMLRWr5g6T0E7.mjs → j6NYTR7qK3Ra-ctk.mjs} +2 -2
- package/browser/esm/qSdXw8S3Pv-_PPNl.mjs +210 -0
- package/browser/esm/{Bz6OaRkDOpj807bi.mjs → r8gxfS-mY5qhTMtJ.mjs} +2 -2
- package/browser/esm/{DVXQrjSOGoB23arZ.mjs → ro5VSIHWH1Nehr75.mjs} +1 -1
- package/browser/esm/tfUleloRF2hBRjjZ.mjs +996 -0
- package/browser/esm/vTlYAw0bvWP8B4jg.mjs +103 -0
- package/browser/esm/{D8RzgRnl0S1-W_Tx.mjs → vzJavAz2onbnB0zm.mjs} +1183 -1204
- package/browser/esm/{wwSpRKFXL9eeyQND.mjs → xaG6CESboBdgd5SL.mjs} +3 -3
- package/browser/esm/{B0ymykpoTxxHQosi.mjs → ze358yTiZmVH9_vX.mjs} +6 -4
- package/licenses/dependencies.txt +33 -33
- package/node/esm/5WNL9ztJdLI0VLJ7.mjs +997 -0
- package/node/esm/{B_7rer9pnurpMB9J.mjs → 8aFKkKyEL5n7sJAn.mjs} +12 -12
- package/node/esm/{DGieA81teTm8uNPr.mjs → 9Yzu2QTWzvPBNvc4.mjs} +1 -1
- package/node/esm/{DF5w_ZBWiRtITKLQ.mjs → BDGax8JuzpXDLe1U.mjs} +1 -1
- package/node/esm/{BedAzhQqTjs4BBb4.mjs → BMuPM5U4Q2kQVYTt.mjs} +251 -253
- package/node/esm/B_XE-SYyFRwWgVyQ.mjs +2070 -0
- package/node/esm/{C4esZkRHnb4HEK3k.mjs → Bap-XMVZ0X80-MNV.mjs} +2 -2
- package/node/esm/{DHrxhle3aK3XU-Jz.mjs → BghhH54dXAqciBpw.mjs} +2 -2
- package/node/esm/{Diu9L9DJzZCMtFb4.mjs → Bgsi1G5RDBa4Rnmh.mjs} +1 -1
- package/node/esm/{mHNl4j2rIZTqcQqb.mjs → Bj6wKB1N--BJ0A7u.mjs} +1 -1
- package/node/esm/{BBRSP-QRw-F0qQdJ.mjs → Bp6DyaGr7Ah4mCbj.mjs} +2 -2
- package/node/esm/BxIw0JqQD7Ibk44S.mjs +103 -0
- package/node/esm/{BRICG2VkglJJKy0X.mjs → C6J3DXYnvgXi5m4u.mjs} +1 -1
- package/node/esm/{Cr94rxP9x4CWSBhF.mjs → CAXzH3lCFKI5mhsY.mjs} +2 -2
- package/node/esm/CBpG1x4pS6pNfRR1.mjs +461 -0
- package/node/esm/{qYIPGp0bxwW5i6Tn.mjs → CDx7cgKCqLflEubV.mjs} +1 -1
- package/node/esm/{vTyr2di6cTC3sA1F.mjs → CFL1BiUsTE9X1-c8.mjs} +24 -24
- package/node/esm/{BRpSVGr1A8w4AG_c.mjs → CHBfOuyPAMiTojvS.mjs} +97 -110
- package/node/esm/{B1CcqB7Ue-EPkdE-.mjs → CJIgRvLMiUJG79DB.mjs} +1 -1
- package/node/esm/{Bwtmjq_jln0eMEMe.mjs → CcbjmWOlODDY8gGF.mjs} +1 -1
- package/node/esm/CdrSmZ9WDzkEGAXL.mjs +695 -0
- package/node/esm/{MNdDR5PA6J1YEtyL.mjs → Ck0jN6hnefC5Hbsk.mjs} +22 -22
- package/node/esm/{D13aAzbfNwj50sqn.mjs → CkGQNbOwGQPWEcUf.mjs} +2 -2
- package/node/esm/{4mAgDExCti1oMAez.mjs → D283LXrMqi3exI_l.mjs} +1 -1
- package/node/esm/DH0tw27cVxmy7-AI.mjs +40 -0
- package/node/esm/{CBes_pLI-7rJsre4.mjs → DJ4lhPXDGigmgQ-y.mjs} +2 -2
- package/node/esm/{CJszsuCXRBPNuT1A.mjs → DUZYSELfaHMSnDU2.mjs} +1 -1
- package/node/esm/{Bm31UyWMCsJ7z4wJ.mjs → DZYzjxDF58TKD0xV.mjs} +2 -2
- package/node/esm/{Bz0uw5YbQGvhlPhZ.mjs → Debl1EJrMSlRwGcN.mjs} +2 -2
- package/node/esm/{D2eYMCx5eAEJsfP6.mjs → Dga-nEOi0B5TjgH6.mjs} +148 -148
- package/node/esm/{BSZ0bAJn4ODpGusx.mjs → Diszdr1X5yDuuIzT.mjs} +1 -1
- package/node/esm/{suDXa2UiBKJB4nsR.mjs → Dms4poPA6WOC4jyK.mjs} +1 -1
- package/node/esm/{pm_LpeNYjo6Aahu3.mjs → DnjxhVMqfBhfsNHj.mjs} +14 -14
- package/node/esm/{D__UzirlxQlq32Rm.mjs → DsoWGkhZNfvhmpK-.mjs} +2 -2
- package/node/esm/DyKgKDqbquskgXEA.mjs +828 -0
- package/node/esm/{DlSfkSNLCwzofCfS.mjs → DzZb-LzjScchWCpk.mjs} +66 -67
- package/node/esm/{C1y7Z0K9Ougef8dU.mjs → MvXs13X1leYt7rBb.mjs} +2 -2
- package/node/esm/{DXQFo_r4CCCvIubP.mjs → SBp59gHxCkFpvNwi.mjs} +1 -1
- package/node/esm/{n5-pWzwq4pDS4adG.mjs → iJrkLXWLGxVhCmtE.mjs} +1 -1
- package/node/esm/index.mjs +3294 -3031
- package/node/esm/{B7_-3nxcN-ZSDQVT.mjs → l0liY9jxGCFXsxNX.mjs} +1 -1
- package/node/esm/{DvlZnGlon5gwQBxU.mjs → mhPcr4NaFejGRG5p.mjs} +1 -1
- package/node/esm/{9e9_OZYxc0ATDkNI.mjs → vfgV7wwOvzh9iYjc.mjs} +1 -1
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +4 -6
- package/resources/locales/de/ui.msg.json +164 -3
- package/resources/locales/en/groups.cmd.json +4 -6
- package/resources/locales/en/ui.msg.json +164 -3
- package/types/src/anomalies/AnomaliesCommands.d.ts +1 -1
- package/types/src/chart/ChartDetailsPanel.d.ts +34 -0
- package/types/src/chart/ChartDetailsTaskPane.d.ts +9 -0
- package/types/src/chart/ChartFormatPanel.d.ts +12 -14
- package/types/src/chart/command/ChartColorsCommandButton.d.ts +54 -0
- package/types/src/chart/command/ChartStyleCommandButton.d.ts +64 -0
- package/types/src/chart/command/InsertChartCommandButton.d.ts +15 -0
- package/types/src/chart/command/index.d.ts +2 -0
- package/types/src/chart/format/ChartElementFormat.d.ts +54 -0
- package/types/src/chart/pane/ChartPaneModel.d.ts +134 -0
- package/types/src/chart/pane/ChartPaneRow.d.ts +77 -0
- package/types/src/color/ColorSetSwatch.d.ts +34 -0
- package/types/src/color/index.d.ts +1 -0
- package/types/src/command/NumberFormatQuickButtons.d.ts +1 -1
- package/types/src/format/FillPanel.d.ts +1 -3
- package/types/src/format/FormatPanelParts.d.ts +2 -2
- package/types/src/format/FormatPlugin.d.ts +2 -2
- package/types/src/format/FormatTaskPane.d.ts +4 -10
- package/types/src/format/LinePanel.d.ts +0 -2
- package/types/src/format/editor/FormatEditor.d.ts +36 -0
- package/types/src/format/editor/FormatField.d.ts +97 -0
- package/types/src/format/editor/FormatFields.d.ts +20 -0
- package/types/src/format/editor/index.d.ts +4 -0
- package/types/src/format/index.d.ts +1 -0
- package/types/src/format/useFormatSelection.d.ts +0 -2
- package/types/src/index.d.ts +1 -1
- package/types/src/shape/ShapeFormatPanel.d.ts +3 -7
- package/types/src/workbook/DefaultRenderers.d.ts +7 -1
- package/browser/esm/39iN4gKrFnhPhM1Z.mjs +0 -517
- package/browser/esm/BWXXi0teArfwa70E.mjs +0 -72
- package/browser/esm/J519wp1_d0QjzPfN.mjs +0 -516
- package/node/esm/Bc2iZ6Qs3kHdsECK.mjs +0 -1831
- package/node/esm/BvKg2K2J7Us2czkC.mjs +0 -519
- package/node/esm/CwQPIQaC6CcVGkD2.mjs +0 -73
- package/node/esm/CyQekcyEfM7Engbk.mjs +0 -516
- package/types/src/studio/StudioSplitPane.d.ts +0 -60
|
@@ -0,0 +1,997 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.6
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { t as e } from "./BxIw0JqQD7Ibk44S.mjs";
|
|
8
|
+
import { r as t } from "./CBpG1x4pS6pNfRR1.mjs";
|
|
9
|
+
import { TaskPaneKey as a } from "@sheetxl/react";
|
|
10
|
+
import { DynamicIcon as r, useCommands as s, useTranslator as i } from "@sheetxl/utils-react";
|
|
11
|
+
import { memo as n, useEffect as o, useReducer as l, useState as c } from "react";
|
|
12
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
13
|
+
import { IconButton as h, Tooltip as p } from "@mui/material";
|
|
14
|
+
var u = "fillLine", d = "text", g = "labels", y = "marker", b = "label", f = "options", k = /* @__PURE__ */ new Map(), x = (e, t, a, r, s) => ({
|
|
15
|
+
type: "flag",
|
|
16
|
+
key: e,
|
|
17
|
+
label: t,
|
|
18
|
+
get: a,
|
|
19
|
+
set: r,
|
|
20
|
+
...s
|
|
21
|
+
}), S = (e, t, a) => {
|
|
22
|
+
const r = a?.key ?? "", s = [];
|
|
23
|
+
return a?.lineOnly || s.push({
|
|
24
|
+
type: "fill",
|
|
25
|
+
key: `${r}fill`,
|
|
26
|
+
label: e("shape.pane.fill"),
|
|
27
|
+
heading: a?.heading,
|
|
28
|
+
style: t
|
|
29
|
+
}), s.push({
|
|
30
|
+
type: "line",
|
|
31
|
+
key: `${r}line`,
|
|
32
|
+
label: e("shape.pane.line"),
|
|
33
|
+
heading: a?.lineOnly ? a?.heading : void 0,
|
|
34
|
+
style: t
|
|
35
|
+
}), s;
|
|
36
|
+
}, w = (e, t, a) => {
|
|
37
|
+
if (!t) return [];
|
|
38
|
+
const r = [];
|
|
39
|
+
return a?.textOnly || r.push({
|
|
40
|
+
key: u,
|
|
41
|
+
label: e(a?.lineOnly ? "format.tab.line" : "format.tab.fillLine"),
|
|
42
|
+
fields: () => S(e, t, a)
|
|
43
|
+
}), t.isITextBoxStyle && r.push({
|
|
44
|
+
key: d,
|
|
45
|
+
label: e("format.tab.text"),
|
|
46
|
+
fields: () => [{
|
|
47
|
+
type: "font",
|
|
48
|
+
key: "font",
|
|
49
|
+
label: e("chart.pane.text"),
|
|
50
|
+
font: t.getFont()
|
|
51
|
+
}]
|
|
52
|
+
}), r;
|
|
53
|
+
}, T = (e, t) => ((e, t, a) => a().length > 0 ? [{
|
|
54
|
+
key: e,
|
|
55
|
+
label: t,
|
|
56
|
+
fields: a
|
|
57
|
+
}] : [])(f, e("format.tab.options"), t), v = (e) => ({
|
|
58
|
+
top: e("chart.pane.side.top"),
|
|
59
|
+
bottom: e("chart.pane.side.bottom"),
|
|
60
|
+
left: e("chart.pane.side.left"),
|
|
61
|
+
right: e("chart.pane.side.right")
|
|
62
|
+
}), U = [
|
|
63
|
+
"top",
|
|
64
|
+
"bottom",
|
|
65
|
+
"left",
|
|
66
|
+
"right",
|
|
67
|
+
"corner"
|
|
68
|
+
], M = [
|
|
69
|
+
"center",
|
|
70
|
+
"insideEnd",
|
|
71
|
+
"insideBase",
|
|
72
|
+
"outsideEnd",
|
|
73
|
+
"left",
|
|
74
|
+
"right",
|
|
75
|
+
"top",
|
|
76
|
+
"bottom",
|
|
77
|
+
"bestFit"
|
|
78
|
+
], B = [
|
|
79
|
+
"linear",
|
|
80
|
+
"exponential",
|
|
81
|
+
"logarithmic",
|
|
82
|
+
"polynomial",
|
|
83
|
+
"power",
|
|
84
|
+
"movingAverage"
|
|
85
|
+
], L = [
|
|
86
|
+
"fixedValue",
|
|
87
|
+
"percent",
|
|
88
|
+
"stDev",
|
|
89
|
+
"stError"
|
|
90
|
+
], C = [
|
|
91
|
+
"both",
|
|
92
|
+
"plusValues",
|
|
93
|
+
"minusValues"
|
|
94
|
+
], A = [
|
|
95
|
+
"automatic",
|
|
96
|
+
"none",
|
|
97
|
+
"square",
|
|
98
|
+
"diamond",
|
|
99
|
+
"triangle",
|
|
100
|
+
"x",
|
|
101
|
+
"star",
|
|
102
|
+
"dot",
|
|
103
|
+
"dash",
|
|
104
|
+
"circle",
|
|
105
|
+
"plus"
|
|
106
|
+
], O = [
|
|
107
|
+
"none",
|
|
108
|
+
"inside",
|
|
109
|
+
"outside",
|
|
110
|
+
"cross"
|
|
111
|
+
], F = [
|
|
112
|
+
"nextToAxis",
|
|
113
|
+
"high",
|
|
114
|
+
"low",
|
|
115
|
+
"none"
|
|
116
|
+
], P = [
|
|
117
|
+
"none",
|
|
118
|
+
"hundreds",
|
|
119
|
+
"thousands",
|
|
120
|
+
"tenThousands",
|
|
121
|
+
"hundredThousands",
|
|
122
|
+
"millions",
|
|
123
|
+
"tenMillions",
|
|
124
|
+
"hundredMillions",
|
|
125
|
+
"billions",
|
|
126
|
+
"trillions",
|
|
127
|
+
"custom"
|
|
128
|
+
], E = ["linear", "logarithmic"], D = [
|
|
129
|
+
"days",
|
|
130
|
+
"months",
|
|
131
|
+
"years"
|
|
132
|
+
], j = [
|
|
133
|
+
"automatic",
|
|
134
|
+
"textAxis",
|
|
135
|
+
"dateAxis"
|
|
136
|
+
], I = [
|
|
137
|
+
", ",
|
|
138
|
+
"; ",
|
|
139
|
+
". ",
|
|
140
|
+
"\n",
|
|
141
|
+
" "
|
|
142
|
+
], N = [
|
|
143
|
+
"center",
|
|
144
|
+
"insideEnd",
|
|
145
|
+
"insideBase",
|
|
146
|
+
"outsideEnd"
|
|
147
|
+
], V = [
|
|
148
|
+
"center",
|
|
149
|
+
"insideEnd",
|
|
150
|
+
"insideBase"
|
|
151
|
+
], z = [
|
|
152
|
+
"center",
|
|
153
|
+
"left",
|
|
154
|
+
"right",
|
|
155
|
+
"top",
|
|
156
|
+
"bottom"
|
|
157
|
+
], $ = [
|
|
158
|
+
"center",
|
|
159
|
+
"insideEnd",
|
|
160
|
+
"outsideEnd",
|
|
161
|
+
"bestFit"
|
|
162
|
+
], q = [
|
|
163
|
+
"standard",
|
|
164
|
+
"stacked",
|
|
165
|
+
"percentStacked"
|
|
166
|
+
], K = (e, t, a, r) => {
|
|
167
|
+
const s = a(), i = [{
|
|
168
|
+
type: "choice",
|
|
169
|
+
key: "direction",
|
|
170
|
+
label: e("chart.format.labels.direction"),
|
|
171
|
+
options: t ? [
|
|
172
|
+
"auto",
|
|
173
|
+
"angle",
|
|
174
|
+
"vertical"
|
|
175
|
+
] : ["angle", "vertical"],
|
|
176
|
+
labels: {
|
|
177
|
+
auto: e("chart.format.labels.direction.auto"),
|
|
178
|
+
angle: e("chart.format.labels.direction.angle"),
|
|
179
|
+
vertical: e("chart.format.labels.direction.vertical")
|
|
180
|
+
},
|
|
181
|
+
get: () => "number" == typeof s ? "angle" : s,
|
|
182
|
+
set: (e) => {
|
|
183
|
+
r("angle" === e ? 0 : e);
|
|
184
|
+
}
|
|
185
|
+
}];
|
|
186
|
+
return "number" == typeof s && i.push({
|
|
187
|
+
type: "number",
|
|
188
|
+
key: "angle",
|
|
189
|
+
label: e("chart.format.labels.angle"),
|
|
190
|
+
min: -90,
|
|
191
|
+
max: 90,
|
|
192
|
+
get: () => s,
|
|
193
|
+
set: (e) => {
|
|
194
|
+
null !== e && r(e);
|
|
195
|
+
}
|
|
196
|
+
}), i;
|
|
197
|
+
}, R = (e) => /^(line|xyscatter|radar)/.test(e) && "radarFilled" !== e, W = (e, t) => ({
|
|
198
|
+
key: y,
|
|
199
|
+
label: e("chart.format.tab.marker"),
|
|
200
|
+
fields: () => ((e, t) => [
|
|
201
|
+
{
|
|
202
|
+
type: "choice",
|
|
203
|
+
key: "symbol",
|
|
204
|
+
label: e("chart.pane.marker.symbol"),
|
|
205
|
+
options: A,
|
|
206
|
+
labels: {
|
|
207
|
+
automatic: e("chart.pane.marker.automatic"),
|
|
208
|
+
none: e("chart.pane.marker.none"),
|
|
209
|
+
square: e("chart.pane.marker.square"),
|
|
210
|
+
diamond: e("chart.pane.marker.diamond"),
|
|
211
|
+
triangle: e("chart.pane.marker.triangle"),
|
|
212
|
+
x: e("chart.pane.marker.x"),
|
|
213
|
+
star: e("chart.pane.marker.star"),
|
|
214
|
+
dot: e("chart.pane.marker.dot"),
|
|
215
|
+
dash: e("chart.pane.marker.dash"),
|
|
216
|
+
circle: e("chart.pane.marker.circle"),
|
|
217
|
+
plus: e("chart.pane.marker.plus")
|
|
218
|
+
},
|
|
219
|
+
get: () => t.getSymbol(),
|
|
220
|
+
set: (e) => {
|
|
221
|
+
t.setSymbol(e);
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
type: "number",
|
|
226
|
+
key: "size",
|
|
227
|
+
label: e("chart.pane.marker.size"),
|
|
228
|
+
min: 2,
|
|
229
|
+
max: 72,
|
|
230
|
+
get: () => t.getSize(),
|
|
231
|
+
set: (e) => {
|
|
232
|
+
null !== e && t.setSize(e);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
...S(e, t.getStyle(), { key: "marker." })
|
|
236
|
+
])(e, t)
|
|
237
|
+
}), H = (e, t, a) => {
|
|
238
|
+
const r = t.isIDataLabels ? t : null, s = [
|
|
239
|
+
x("value", e("chart.pane.labels.value"), () => t.getShowValue(), (e) => {
|
|
240
|
+
t.setShowValue(e);
|
|
241
|
+
}),
|
|
242
|
+
x("category", e("chart.pane.labels.category"), () => t.getShowCategoryName(), (e) => {
|
|
243
|
+
t.setShowCategoryName(e);
|
|
244
|
+
}),
|
|
245
|
+
x("series", e("chart.pane.labels.series"), () => t.getShowSeriesName(), (e) => {
|
|
246
|
+
t.setShowSeriesName(e);
|
|
247
|
+
})
|
|
248
|
+
];
|
|
249
|
+
if ((/^(pie|doughnut|3DPie|combo)/.test(a) || /OfPie$/.test(a) || t.getShowPercentage()) && s.push(x("percentage", e("chart.pane.labels.percentage"), () => t.getShowPercentage(), (e) => {
|
|
250
|
+
t.setShowPercentage(e);
|
|
251
|
+
})), r && /^bubble/.test(a) && s.push(x("bubbleSize", e("chart.format.labels.bubbleSize"), () => r.getShowBubbleSize(), (e) => {
|
|
252
|
+
r.setShowBubbleSize(e);
|
|
253
|
+
})), s.push(x("legendKey", e("chart.pane.labels.legendKey"), () => t.getShowLegendKey(), (e) => {
|
|
254
|
+
t.setShowLegendKey(e);
|
|
255
|
+
})), r) {
|
|
256
|
+
s.push({
|
|
257
|
+
type: "formula",
|
|
258
|
+
key: "fromCells",
|
|
259
|
+
label: e("chart.format.labels.fromCells"),
|
|
260
|
+
get: () => r.getValueFromCellsFormula() ?? "",
|
|
261
|
+
set: (e) => {
|
|
262
|
+
r.setValueFromCells(e.trim().replace(/^=/, "") || null);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
const t = r.getSeparator();
|
|
266
|
+
s.push({
|
|
267
|
+
type: "choice",
|
|
268
|
+
key: "separator",
|
|
269
|
+
label: e("chart.format.labels.separator"),
|
|
270
|
+
options: I.includes(t) ? I : [t, ...I],
|
|
271
|
+
labels: {
|
|
272
|
+
", ": e("chart.format.labels.separator.comma"),
|
|
273
|
+
"; ": e("chart.format.labels.separator.semicolon"),
|
|
274
|
+
". ": e("chart.format.labels.separator.period"),
|
|
275
|
+
"\n": e("chart.format.labels.separator.newLine"),
|
|
276
|
+
" ": e("chart.format.labels.separator.space")
|
|
277
|
+
},
|
|
278
|
+
get: () => t,
|
|
279
|
+
set: (e) => {
|
|
280
|
+
r.setSeparator(e);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
const i = t.getPosition(), n = ((e) => /OfPie$/.test(e) || /^(pie|3DPie)/.test(e) ? $ : /^(3D|area|doughnut|radar|surface)/.test(e) ? [] : /^(column|bar)Stacked/.test(e) ? V : /^(column|bar)/.test(e) ? N : /^(line|stock|xyscatter|bubble)/.test(e) ? z : M)(a);
|
|
285
|
+
return n.length > 0 && s.push({
|
|
286
|
+
type: "choice",
|
|
287
|
+
key: "position",
|
|
288
|
+
label: e("chart.pane.position"),
|
|
289
|
+
options: n.includes(i) ? n : [i, ...n],
|
|
290
|
+
labels: {
|
|
291
|
+
...v(e),
|
|
292
|
+
center: e("chart.pane.labels.center"),
|
|
293
|
+
insideEnd: e("chart.pane.labels.insideEnd"),
|
|
294
|
+
insideBase: e("chart.pane.labels.insideBase"),
|
|
295
|
+
outsideEnd: e("chart.pane.labels.outsideEnd"),
|
|
296
|
+
bestFit: e("chart.pane.labels.bestFit")
|
|
297
|
+
},
|
|
298
|
+
get: () => i,
|
|
299
|
+
set: (e) => {
|
|
300
|
+
t.setPosition(e);
|
|
301
|
+
}
|
|
302
|
+
}), r && s.push(...K(e, !1, () => r.getTextOrientation(), (e) => {
|
|
303
|
+
"auto" !== e && r.setTextOrientation(e);
|
|
304
|
+
})), s.push({
|
|
305
|
+
type: "text",
|
|
306
|
+
key: "numberFormat",
|
|
307
|
+
label: e("chart.pane.numberFormat"),
|
|
308
|
+
heading: e("chart.format.labels.number"),
|
|
309
|
+
get: () => t.getNumberFormat() ?? "",
|
|
310
|
+
set: (e) => {
|
|
311
|
+
t.setNumberFormat(e || null);
|
|
312
|
+
}
|
|
313
|
+
}), r && s.push(x("linked", e("chart.format.labels.linked"), () => r.getLinkNumberFormat(), (e) => {
|
|
314
|
+
r.setLinkNumberFormat(e);
|
|
315
|
+
})), s;
|
|
316
|
+
}, G = (e, { t }) => w(t, e.getStyle(), { lineOnly: !0 }), J = (e, { t }) => [...w(t, e.getStyle?.()), ...T(t, () => [x("overlay", t("chart.pane.overlay"), () => e.getOverlay(), (t) => {
|
|
317
|
+
e.setOverlay(t);
|
|
318
|
+
})])], Q = !1;
|
|
319
|
+
function X() {
|
|
320
|
+
if (Q) return;
|
|
321
|
+
Q = !0;
|
|
322
|
+
const e = (e, t) => {
|
|
323
|
+
k.has(e) || k.set(e, t);
|
|
324
|
+
};
|
|
325
|
+
e("chartArea", (e, { t }) => [...w(t, e.getStyle()), ...T(t, () => [x("roundedCorners", t("chart.pane.roundedCorners"), () => e.getRoundedCorners(), (t) => {
|
|
326
|
+
e.setRoundedCorners(t);
|
|
327
|
+
})])]), e("plotArea", (e, { t }) => w(t, e.getStyle())), e("title", J), e("axisTitle", J), e("legend", (e, { t }) => [...w(t, e.getStyle?.()), ...T(t, () => [{
|
|
328
|
+
type: "choice",
|
|
329
|
+
key: "position",
|
|
330
|
+
label: t("chart.pane.position"),
|
|
331
|
+
options: U,
|
|
332
|
+
labels: {
|
|
333
|
+
...v(t),
|
|
334
|
+
corner: t("chart.pane.side.corner")
|
|
335
|
+
},
|
|
336
|
+
get: () => e.getPosition(),
|
|
337
|
+
set: (t) => {
|
|
338
|
+
e.setPosition(t);
|
|
339
|
+
}
|
|
340
|
+
}, x("overlay", t("chart.pane.overlay"), () => e.getOverlay(), (t) => {
|
|
341
|
+
e.setOverlay(t);
|
|
342
|
+
})])]), e("legendEntry", (e, { t }) => w(t, e.getStyle(), { textOnly: !0 })), e("dataTable", (e, { t }) => [...w(t, e.getStyle?.()), ...T(t, () => [
|
|
343
|
+
x("legendKey", t("chart.pane.labels.legendKey"), () => e.getShowLegendKey(), (t) => {
|
|
344
|
+
e.setShowLegendKey(t);
|
|
345
|
+
}),
|
|
346
|
+
x("horizontal", t("chart.pane.table.horizontal"), () => e.getShowHorizontalBorder(), (t) => {
|
|
347
|
+
e.setShowHorizontalBorder(t);
|
|
348
|
+
}),
|
|
349
|
+
x("vertical", t("chart.pane.table.vertical"), () => e.getShowVerticalBorder(), (t) => {
|
|
350
|
+
e.setShowVerticalBorder(t);
|
|
351
|
+
}),
|
|
352
|
+
x("outline", t("chart.pane.table.outline"), () => e.getShowOutlineBorder(), (t) => {
|
|
353
|
+
e.setShowOutlineBorder(t);
|
|
354
|
+
})
|
|
355
|
+
])]), e("axis", (e, { t }) => [
|
|
356
|
+
...w(t, e.getStyle?.()).filter((e) => e.key !== d),
|
|
357
|
+
{
|
|
358
|
+
key: g,
|
|
359
|
+
label: t("chart.format.tab.labels"),
|
|
360
|
+
fields: () => ((e, t) => {
|
|
361
|
+
const a = t.getKind(), r = [{
|
|
362
|
+
type: "choice",
|
|
363
|
+
key: "tickLabelPosition",
|
|
364
|
+
label: e("chart.format.labels.position"),
|
|
365
|
+
options: F,
|
|
366
|
+
labels: {
|
|
367
|
+
nextToAxis: e("chart.format.labels.position.nextToAxis"),
|
|
368
|
+
high: e("chart.format.labels.position.high"),
|
|
369
|
+
low: e("chart.format.labels.position.low"),
|
|
370
|
+
none: e("chart.format.labels.position.none")
|
|
371
|
+
},
|
|
372
|
+
get: () => t.getTickLabelPosition(),
|
|
373
|
+
set: (e) => {
|
|
374
|
+
t.setTickLabelPosition(e);
|
|
375
|
+
}
|
|
376
|
+
}];
|
|
377
|
+
if ("category" !== a && "date" !== a || r.push({
|
|
378
|
+
type: "number",
|
|
379
|
+
key: "offset",
|
|
380
|
+
label: e("chart.format.labels.offset"),
|
|
381
|
+
min: 0,
|
|
382
|
+
max: 1e3,
|
|
383
|
+
get: () => t.getOffset() ?? 100,
|
|
384
|
+
set: (e) => {
|
|
385
|
+
null !== e && t.setOffset(e);
|
|
386
|
+
}
|
|
387
|
+
}), "category" === a && r.push({
|
|
388
|
+
type: "number",
|
|
389
|
+
key: "tickLabelSpacing",
|
|
390
|
+
label: e("chart.format.labels.interval"),
|
|
391
|
+
min: 1,
|
|
392
|
+
max: 1e6,
|
|
393
|
+
auto: e("chart.format.auto"),
|
|
394
|
+
get: () => t.getTickLabelSpacing(),
|
|
395
|
+
set: (e) => {
|
|
396
|
+
t.setTickLabelSpacing(e);
|
|
397
|
+
}
|
|
398
|
+
}), "category" === a && r.push(x("multiLevel", e("chart.format.axis.multiLevel"), () => t.getMultiLevel(), (e) => {
|
|
399
|
+
t.setMultiLevel(e);
|
|
400
|
+
})), r.push(...K(e, !0, () => t.getTextOrientation(), (e) => {
|
|
401
|
+
t.setTextOrientation(e);
|
|
402
|
+
})), "series" !== a && r.push({
|
|
403
|
+
type: "text",
|
|
404
|
+
key: "numberFormat",
|
|
405
|
+
label: e("chart.pane.numberFormat"),
|
|
406
|
+
heading: e("chart.format.labels.number"),
|
|
407
|
+
get: () => t.getNumberFormat() ?? "",
|
|
408
|
+
set: (e) => {
|
|
409
|
+
e ? t.setNumberFormat(e) : t.setLinkNumberFormat(!0);
|
|
410
|
+
}
|
|
411
|
+
}, x("linked", e("chart.format.labels.linked"), () => t.getLinkNumberFormat(), (e) => {
|
|
412
|
+
t.setLinkNumberFormat(e);
|
|
413
|
+
})), "value" === a) {
|
|
414
|
+
const a = t.getDisplayUnit();
|
|
415
|
+
r.push({
|
|
416
|
+
type: "choice",
|
|
417
|
+
key: "displayUnit",
|
|
418
|
+
label: e("chart.format.axis.displayUnits"),
|
|
419
|
+
options: P,
|
|
420
|
+
labels: {
|
|
421
|
+
none: e("chart.format.axis.displayUnit.none"),
|
|
422
|
+
hundreds: e("chart.format.axis.displayUnit.hundreds"),
|
|
423
|
+
thousands: e("chart.format.axis.displayUnit.thousands"),
|
|
424
|
+
tenThousands: e("chart.format.axis.displayUnit.tenThousands"),
|
|
425
|
+
hundredThousands: e("chart.format.axis.displayUnit.hundredThousands"),
|
|
426
|
+
millions: e("chart.format.axis.displayUnit.millions"),
|
|
427
|
+
tenMillions: e("chart.format.axis.displayUnit.tenMillions"),
|
|
428
|
+
hundredMillions: e("chart.format.axis.displayUnit.hundredMillions"),
|
|
429
|
+
billions: e("chart.format.axis.displayUnit.billions"),
|
|
430
|
+
trillions: e("chart.format.axis.displayUnit.trillions"),
|
|
431
|
+
custom: e("chart.format.axis.displayUnit.custom")
|
|
432
|
+
},
|
|
433
|
+
get: () => a,
|
|
434
|
+
set: (e) => {
|
|
435
|
+
t.setDisplayUnit(e);
|
|
436
|
+
}
|
|
437
|
+
}), "custom" === a && r.push({
|
|
438
|
+
type: "number",
|
|
439
|
+
key: "customDisplayUnit",
|
|
440
|
+
label: e("chart.format.axis.customDisplayUnit"),
|
|
441
|
+
min: 1,
|
|
442
|
+
max: 0x38d7ea4c68000,
|
|
443
|
+
decimals: !0,
|
|
444
|
+
get: () => t.getCustomDisplayUnit(),
|
|
445
|
+
set: (e) => {
|
|
446
|
+
null !== e && t.setCustomDisplayUnit(e);
|
|
447
|
+
}
|
|
448
|
+
}), "none" !== a && r.push(x("showDisplayUnitLabel", e("chart.format.axis.showDisplayUnitLabel"), () => t.getShowDisplayUnitLabel(), (e) => {
|
|
449
|
+
t.setShowDisplayUnitLabel(e);
|
|
450
|
+
}));
|
|
451
|
+
}
|
|
452
|
+
return r.push({
|
|
453
|
+
type: "font",
|
|
454
|
+
key: "font",
|
|
455
|
+
label: e("chart.pane.text"),
|
|
456
|
+
font: t.getStyle().getFont()
|
|
457
|
+
}), r;
|
|
458
|
+
})(t, e)
|
|
459
|
+
},
|
|
460
|
+
...T(t, () => ((e, t) => {
|
|
461
|
+
const a = t.getKind(), r = [], s = e("chart.format.auto"), i = {
|
|
462
|
+
days: e("chart.format.axis.timeUnit.days"),
|
|
463
|
+
months: e("chart.format.axis.timeUnit.months"),
|
|
464
|
+
years: e("chart.format.axis.timeUnit.years")
|
|
465
|
+
};
|
|
466
|
+
if ("category" !== a && "date" !== a || r.push({
|
|
467
|
+
type: "choice",
|
|
468
|
+
key: "categoryType",
|
|
469
|
+
label: e("chart.format.axis.type"),
|
|
470
|
+
options: j,
|
|
471
|
+
labels: {
|
|
472
|
+
automatic: e("chart.format.axis.type.automatic"),
|
|
473
|
+
textAxis: e("chart.format.axis.type.textAxis"),
|
|
474
|
+
dateAxis: e("chart.format.axis.type.dateAxis")
|
|
475
|
+
},
|
|
476
|
+
get: () => t.getCategoryType(),
|
|
477
|
+
set: (e) => {
|
|
478
|
+
t.setCategoryType(e);
|
|
479
|
+
}
|
|
480
|
+
}), "value" === a && r.push({
|
|
481
|
+
type: "number",
|
|
482
|
+
key: "minimum",
|
|
483
|
+
label: e("chart.pane.minimum"),
|
|
484
|
+
heading: e("chart.format.axis.bounds"),
|
|
485
|
+
row: "bounds",
|
|
486
|
+
min: -0x38d7ea4c68000,
|
|
487
|
+
max: 0x38d7ea4c68000,
|
|
488
|
+
decimals: !0,
|
|
489
|
+
auto: s,
|
|
490
|
+
get: () => t.isMinimumAuto() ? null : t.getMinimum(),
|
|
491
|
+
set: (e) => {
|
|
492
|
+
t.setMinimum(e ?? "auto");
|
|
493
|
+
}
|
|
494
|
+
}, {
|
|
495
|
+
type: "number",
|
|
496
|
+
key: "maximum",
|
|
497
|
+
label: e("chart.pane.maximum"),
|
|
498
|
+
row: "bounds",
|
|
499
|
+
min: -0x38d7ea4c68000,
|
|
500
|
+
max: 0x38d7ea4c68000,
|
|
501
|
+
decimals: !0,
|
|
502
|
+
auto: s,
|
|
503
|
+
get: () => t.isMaximumAuto() ? null : t.getMaximum(),
|
|
504
|
+
set: (e) => {
|
|
505
|
+
t.setMaximum(e ?? "auto");
|
|
506
|
+
}
|
|
507
|
+
}, {
|
|
508
|
+
type: "number",
|
|
509
|
+
key: "majorUnit",
|
|
510
|
+
label: e("chart.format.axis.major"),
|
|
511
|
+
heading: e("chart.format.axis.units"),
|
|
512
|
+
row: "units",
|
|
513
|
+
min: 0,
|
|
514
|
+
max: 0x38d7ea4c68000,
|
|
515
|
+
decimals: !0,
|
|
516
|
+
auto: s,
|
|
517
|
+
get: () => t.isMajorUnitAuto() ? null : t.getMajorUnit(),
|
|
518
|
+
set: (e) => {
|
|
519
|
+
t.setMajorUnit(e ?? "auto");
|
|
520
|
+
}
|
|
521
|
+
}, {
|
|
522
|
+
type: "number",
|
|
523
|
+
key: "minorUnit",
|
|
524
|
+
label: e("chart.format.axis.minor"),
|
|
525
|
+
row: "units",
|
|
526
|
+
min: 0,
|
|
527
|
+
max: 0x38d7ea4c68000,
|
|
528
|
+
decimals: !0,
|
|
529
|
+
auto: s,
|
|
530
|
+
get: () => t.isMinorUnitAuto() ? null : t.getMinorUnit(),
|
|
531
|
+
set: (e) => {
|
|
532
|
+
t.setMinorUnit(e ?? "auto");
|
|
533
|
+
}
|
|
534
|
+
}), "date" === a && r.push({
|
|
535
|
+
type: "number",
|
|
536
|
+
key: "majorUnit",
|
|
537
|
+
label: e("chart.format.axis.major"),
|
|
538
|
+
heading: e("chart.format.axis.units"),
|
|
539
|
+
row: "major",
|
|
540
|
+
min: 1,
|
|
541
|
+
max: 1e6,
|
|
542
|
+
auto: s,
|
|
543
|
+
get: () => t.isMajorUnitAuto() ? null : t.getMajorUnit(),
|
|
544
|
+
set: (e) => {
|
|
545
|
+
t.setMajorUnit(e ?? "auto");
|
|
546
|
+
}
|
|
547
|
+
}, {
|
|
548
|
+
type: "choice",
|
|
549
|
+
key: "majorTimeUnit",
|
|
550
|
+
label: e("chart.format.axis.majorIn"),
|
|
551
|
+
row: "major",
|
|
552
|
+
options: D,
|
|
553
|
+
labels: i,
|
|
554
|
+
get: () => t.getMajorTimeUnitScale() ?? "days",
|
|
555
|
+
set: (e) => {
|
|
556
|
+
t.setMajorTimeUnitScale(e);
|
|
557
|
+
}
|
|
558
|
+
}, {
|
|
559
|
+
type: "number",
|
|
560
|
+
key: "minorUnit",
|
|
561
|
+
label: e("chart.format.axis.minor"),
|
|
562
|
+
row: "minor",
|
|
563
|
+
min: 1,
|
|
564
|
+
max: 1e6,
|
|
565
|
+
auto: s,
|
|
566
|
+
get: () => t.isMinorUnitAuto() ? null : t.getMinorUnit(),
|
|
567
|
+
set: (e) => {
|
|
568
|
+
t.setMinorUnit(e ?? "auto");
|
|
569
|
+
}
|
|
570
|
+
}, {
|
|
571
|
+
type: "choice",
|
|
572
|
+
key: "minorTimeUnit",
|
|
573
|
+
label: e("chart.format.axis.minorIn"),
|
|
574
|
+
row: "minor",
|
|
575
|
+
options: D,
|
|
576
|
+
labels: i,
|
|
577
|
+
get: () => t.getMinorTimeUnitScale() ?? "days",
|
|
578
|
+
set: (e) => {
|
|
579
|
+
t.setMinorTimeUnitScale(e);
|
|
580
|
+
}
|
|
581
|
+
}, {
|
|
582
|
+
type: "choice",
|
|
583
|
+
key: "baseTimeUnit",
|
|
584
|
+
label: e("chart.format.axis.base"),
|
|
585
|
+
options: D,
|
|
586
|
+
labels: i,
|
|
587
|
+
get: () => t.getBaseTimeUnit() ?? "days",
|
|
588
|
+
set: (e) => {
|
|
589
|
+
t.setBaseTimeUnit(e);
|
|
590
|
+
}
|
|
591
|
+
}), "series" !== a) {
|
|
592
|
+
const s = t.getCrosses(), i = "date" === a ? ["automatic", "maximum"] : [
|
|
593
|
+
"automatic",
|
|
594
|
+
"maximum",
|
|
595
|
+
"minimum",
|
|
596
|
+
"custom"
|
|
597
|
+
];
|
|
598
|
+
r.push({
|
|
599
|
+
type: "choice",
|
|
600
|
+
key: "crosses",
|
|
601
|
+
label: e("chart.format.axis.crosses"),
|
|
602
|
+
options: i.includes(s) ? i : [s, ...i],
|
|
603
|
+
labels: {
|
|
604
|
+
automatic: e("chart.format.axis.crosses.automatic"),
|
|
605
|
+
maximum: e("chart.format.axis.crosses.maximum"),
|
|
606
|
+
minimum: e("chart.format.axis.crosses.minimum"),
|
|
607
|
+
custom: e("chart.format.axis.crosses.custom")
|
|
608
|
+
},
|
|
609
|
+
get: () => s,
|
|
610
|
+
set: (e) => {
|
|
611
|
+
t.setCrosses(e);
|
|
612
|
+
}
|
|
613
|
+
}), "custom" === s && "value" === a ? r.push({
|
|
614
|
+
type: "number",
|
|
615
|
+
key: "crossesAt",
|
|
616
|
+
label: e("chart.format.axis.crossesAt"),
|
|
617
|
+
min: -0x38d7ea4c68000,
|
|
618
|
+
max: 0x38d7ea4c68000,
|
|
619
|
+
decimals: !0,
|
|
620
|
+
get: () => t.getCrossesAt() ?? 0,
|
|
621
|
+
set: (e) => {
|
|
622
|
+
null !== e && t.setCrossesAt(e);
|
|
623
|
+
}
|
|
624
|
+
}) : "custom" === s && "category" === a && r.push({
|
|
625
|
+
type: "number",
|
|
626
|
+
key: "crossesAt",
|
|
627
|
+
label: e("chart.format.axis.crossesAtCategory"),
|
|
628
|
+
min: 1,
|
|
629
|
+
max: 1e6,
|
|
630
|
+
get: () => t.getCrossesAt() ?? 1,
|
|
631
|
+
set: (e) => {
|
|
632
|
+
null !== e && t.setCrossesAt(e);
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
if ("category" !== a && "date" !== a || r.push({
|
|
637
|
+
type: "choice",
|
|
638
|
+
key: "between",
|
|
639
|
+
label: e("chart.format.axis.position"),
|
|
640
|
+
options: ["onTicks", "between"],
|
|
641
|
+
labels: {
|
|
642
|
+
onTicks: e("chart.format.axis.position.onTicks"),
|
|
643
|
+
between: e("chart.format.axis.position.between")
|
|
644
|
+
},
|
|
645
|
+
get: () => t.getIsBetweenCategories() ? "between" : "onTicks",
|
|
646
|
+
set: (e) => {
|
|
647
|
+
t.setIsBetweenCategories("between" === e);
|
|
648
|
+
}
|
|
649
|
+
}), "value" === a) {
|
|
650
|
+
const a = t.getScaleType();
|
|
651
|
+
r.push({
|
|
652
|
+
type: "choice",
|
|
653
|
+
key: "scaleType",
|
|
654
|
+
label: e("chart.format.axis.scale"),
|
|
655
|
+
options: E,
|
|
656
|
+
labels: {
|
|
657
|
+
linear: e("chart.format.axis.scale.linear"),
|
|
658
|
+
logarithmic: e("chart.format.axis.scale.logarithmic")
|
|
659
|
+
},
|
|
660
|
+
get: () => a,
|
|
661
|
+
set: (e) => {
|
|
662
|
+
t.setScaleType(e);
|
|
663
|
+
}
|
|
664
|
+
}), "logarithmic" === a && r.push({
|
|
665
|
+
type: "number",
|
|
666
|
+
key: "logBase",
|
|
667
|
+
label: e("chart.format.axis.logBase"),
|
|
668
|
+
min: 2,
|
|
669
|
+
max: 1e3,
|
|
670
|
+
decimals: !0,
|
|
671
|
+
get: () => t.getLogBase(),
|
|
672
|
+
set: (e) => {
|
|
673
|
+
null !== e && t.setLogBase(e);
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
r.push(x("reverse", e("chart.pane.reverse"), () => t.getReversePlotOrder(), (e) => {
|
|
678
|
+
t.setReversePlotOrder(e);
|
|
679
|
+
}));
|
|
680
|
+
const n = {
|
|
681
|
+
none: e("chart.format.axis.tick.none"),
|
|
682
|
+
inside: e("chart.format.axis.tick.inside"),
|
|
683
|
+
outside: e("chart.format.axis.tick.outside"),
|
|
684
|
+
cross: e("chart.format.axis.tick.cross")
|
|
685
|
+
};
|
|
686
|
+
return r.push({
|
|
687
|
+
type: "choice",
|
|
688
|
+
key: "majorTickMark",
|
|
689
|
+
label: e("chart.format.axis.majorTick"),
|
|
690
|
+
heading: e("chart.format.axis.tickMarks"),
|
|
691
|
+
row: "ticks",
|
|
692
|
+
options: O,
|
|
693
|
+
labels: n,
|
|
694
|
+
get: () => t.getMajorTickMark(),
|
|
695
|
+
set: (e) => {
|
|
696
|
+
t.setMajorTickMark(e);
|
|
697
|
+
}
|
|
698
|
+
}, {
|
|
699
|
+
type: "choice",
|
|
700
|
+
key: "minorTickMark",
|
|
701
|
+
label: e("chart.format.axis.minorTick"),
|
|
702
|
+
row: "ticks",
|
|
703
|
+
options: O,
|
|
704
|
+
labels: n,
|
|
705
|
+
get: () => t.getMinorTickMark(),
|
|
706
|
+
set: (e) => {
|
|
707
|
+
t.setMinorTickMark(e);
|
|
708
|
+
}
|
|
709
|
+
}), "category" === a && r.push({
|
|
710
|
+
type: "number",
|
|
711
|
+
key: "tickMarkSpacing",
|
|
712
|
+
label: e("chart.format.axis.tickMarkSpacing"),
|
|
713
|
+
min: 1,
|
|
714
|
+
max: 1e6,
|
|
715
|
+
auto: s,
|
|
716
|
+
get: () => t.getTickMarkSpacing(),
|
|
717
|
+
set: (e) => {
|
|
718
|
+
t.setTickMarkSpacing(e);
|
|
719
|
+
}
|
|
720
|
+
}), r;
|
|
721
|
+
})(t, e))
|
|
722
|
+
]), e("gridlines", (e, { t }) => w(t, e.getStyle?.(), { lineOnly: !0 })), e("series", (e, { chart: t, t: a }) => {
|
|
723
|
+
const r = e.getChartType(), s = w(a, e.getStyle(), { lineOnly: R(r) });
|
|
724
|
+
return R(r) && s.push(W(a, e.getMarker())), s.push(...T(a, () => {
|
|
725
|
+
const s = ((e, t, a) => {
|
|
726
|
+
const r = e.getSeries(), s = (e.getGroups().find((e) => e.getSeries().includes(t))?.getSeries() ?? []).filter((e) => e !== t).map((e) => e.getName() ?? a("chart.pane.seriesDefault", { index: r.indexOf(e) + 1 }));
|
|
727
|
+
return s.length > 0 ? a("chart.pane.sharedWith", { names: s.join(", ") }) : void 0;
|
|
728
|
+
})(t, e, a), i = [], n = t.getChartType() === r ? ((e) => {
|
|
729
|
+
const t = /^(column|bar|lineMarkers|line|area)(Clustered|Stacked100|Stacked)?$/.exec(e);
|
|
730
|
+
return t ? {
|
|
731
|
+
base: t[1],
|
|
732
|
+
stacking: "Stacked100" === t[2] ? "percentStacked" : "Stacked" === t[2] ? "stacked" : "standard"
|
|
733
|
+
} : null;
|
|
734
|
+
})(r) : null;
|
|
735
|
+
if (n) {
|
|
736
|
+
const e = /^(column|bar)$/.test(n.base);
|
|
737
|
+
i.push({
|
|
738
|
+
type: "choice",
|
|
739
|
+
key: "stacking",
|
|
740
|
+
label: a("chart.format.series.stacking"),
|
|
741
|
+
shared: s,
|
|
742
|
+
options: q,
|
|
743
|
+
labels: {
|
|
744
|
+
standard: a(e ? "chart.format.series.stacking.clustered" : "chart.format.series.stacking.standard"),
|
|
745
|
+
stacked: a("chart.format.series.stacking.stacked"),
|
|
746
|
+
percentStacked: a("chart.format.series.stacking.percentStacked")
|
|
747
|
+
},
|
|
748
|
+
get: () => n.stacking,
|
|
749
|
+
set: (e) => {
|
|
750
|
+
t.setChartType(((e, t) => "stacked" === t ? `${e}Stacked` : "percentStacked" === t ? `${e}Stacked100` : /^(column|bar)$/.test(e) ? `${e}Clustered` : e)(n.base, e));
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
return null !== e.getOverlap() && i.push({
|
|
755
|
+
type: "number",
|
|
756
|
+
key: "overlap",
|
|
757
|
+
label: a("chart.pane.overlap"),
|
|
758
|
+
row: "gap",
|
|
759
|
+
shared: s,
|
|
760
|
+
min: -100,
|
|
761
|
+
max: 100,
|
|
762
|
+
get: () => e.getOverlap() ?? 0,
|
|
763
|
+
set: (t) => {
|
|
764
|
+
null !== t && e.setOverlap(t);
|
|
765
|
+
}
|
|
766
|
+
}), null !== e.getGapWidth() && i.push({
|
|
767
|
+
type: "number",
|
|
768
|
+
key: "gapWidth",
|
|
769
|
+
label: a("chart.pane.gapWidth"),
|
|
770
|
+
row: "gap",
|
|
771
|
+
shared: s,
|
|
772
|
+
min: 0,
|
|
773
|
+
max: 500,
|
|
774
|
+
get: () => e.getGapWidth() ?? 0,
|
|
775
|
+
set: (t) => {
|
|
776
|
+
null !== t && e.setGapWidth(t);
|
|
777
|
+
}
|
|
778
|
+
}), /^(line|xyscatter)/.test(r) && i.push(x("smooth", a("chart.pane.smooth"), () => e.getSmooth(), (t) => {
|
|
779
|
+
e.setSmooth(t);
|
|
780
|
+
})), i;
|
|
781
|
+
})), s;
|
|
782
|
+
}), e("point", (e, { t }) => {
|
|
783
|
+
const a = e.getParent().getChartType();
|
|
784
|
+
if (/^waterfall/.test(a)) return T(t, () => [x("isTotal", t("chart.pane.isTotal"), () => e.getIsTotal(), (t) => {
|
|
785
|
+
e.setIsTotal(t);
|
|
786
|
+
})]);
|
|
787
|
+
const r = w(t, e.getStyle(), { lineOnly: R(a) });
|
|
788
|
+
R(a) && r.push(W(t, e.getMarker()));
|
|
789
|
+
const s = e.getDataLabel();
|
|
790
|
+
return r.push({
|
|
791
|
+
key: b,
|
|
792
|
+
label: t("chart.format.tab.label"),
|
|
793
|
+
fields: () => [
|
|
794
|
+
x("hasLabel", t("chart.format.showLabel"), () => e.getHasDataLabel(), (t) => {
|
|
795
|
+
e.setHasDataLabel(t);
|
|
796
|
+
}),
|
|
797
|
+
{
|
|
798
|
+
type: "text",
|
|
799
|
+
key: "text",
|
|
800
|
+
label: t("chart.pane.titleText"),
|
|
801
|
+
get: () => s.getText() ?? "",
|
|
802
|
+
set: (e) => {
|
|
803
|
+
s.setText(e || null);
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
...H(t, s, a),
|
|
807
|
+
...(s.getStyle?.())?.isITextBoxStyle ? [{
|
|
808
|
+
type: "font",
|
|
809
|
+
key: "label.font",
|
|
810
|
+
label: t("chart.pane.text"),
|
|
811
|
+
font: s.getStyle().getFont()
|
|
812
|
+
}] : [],
|
|
813
|
+
...s.getStyle?.() ? S(t, s.getStyle(), { key: "label." }) : []
|
|
814
|
+
]
|
|
815
|
+
}), r.push(...T(t, () => {
|
|
816
|
+
const r = [];
|
|
817
|
+
return (/^(pie|doughnut|3DPie)/.test(a) || /OfPie$/.test(a)) && r.push({
|
|
818
|
+
type: "number",
|
|
819
|
+
key: "explosion",
|
|
820
|
+
label: t("chart.pane.explosion"),
|
|
821
|
+
min: 0,
|
|
822
|
+
max: 400,
|
|
823
|
+
get: () => e.getExplosion(),
|
|
824
|
+
set: (t) => {
|
|
825
|
+
null !== t && e.setExplosion(t);
|
|
826
|
+
}
|
|
827
|
+
}), /^(column|bar|bubble)/.test(a) && r.push(x("invertIfNegative", t("chart.pane.invertIfNegative"), () => e.getInvertIfNegative(), (t) => {
|
|
828
|
+
e.setInvertIfNegative(t);
|
|
829
|
+
})), r;
|
|
830
|
+
})), r;
|
|
831
|
+
}), e("dataLabels", (e, { chart: t, t: a }) => {
|
|
832
|
+
const r = e.getParent(), s = "series" === r?.getElementType() ? r.getChartType() : t.getChartType();
|
|
833
|
+
return [...w(a, e.getStyle?.()), ...T(a, () => H(a, e, s))];
|
|
834
|
+
}), e("trendline", (e, { t }) => [...w(t, e.getStyle?.(), { lineOnly: !0 }), ...T(t, () => [
|
|
835
|
+
{
|
|
836
|
+
type: "choice",
|
|
837
|
+
key: "type",
|
|
838
|
+
label: t("chart.pane.trendline.type"),
|
|
839
|
+
options: B,
|
|
840
|
+
labels: {
|
|
841
|
+
linear: t("chart.pane.trendline.linear"),
|
|
842
|
+
exponential: t("chart.pane.trendline.exponential"),
|
|
843
|
+
logarithmic: t("chart.pane.trendline.logarithmic"),
|
|
844
|
+
polynomial: t("chart.pane.trendline.polynomial"),
|
|
845
|
+
power: t("chart.pane.trendline.power"),
|
|
846
|
+
movingAverage: t("chart.pane.trendline.movingAverage")
|
|
847
|
+
},
|
|
848
|
+
get: () => e.getType(),
|
|
849
|
+
set: (t) => {
|
|
850
|
+
e.setType(t);
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
x("equation", t("chart.pane.trendline.equation"), () => e.getShowEquation(), (t) => {
|
|
854
|
+
e.setShowEquation(t);
|
|
855
|
+
}),
|
|
856
|
+
x("rSquared", t("chart.pane.trendline.rSquared"), () => e.getShowRSquared(), (t) => {
|
|
857
|
+
e.setShowRSquared(t);
|
|
858
|
+
}),
|
|
859
|
+
{
|
|
860
|
+
type: "number",
|
|
861
|
+
key: "forward",
|
|
862
|
+
label: t("chart.pane.trendline.forward"),
|
|
863
|
+
row: "periods",
|
|
864
|
+
min: 0,
|
|
865
|
+
max: 1e6,
|
|
866
|
+
decimals: !0,
|
|
867
|
+
get: () => e.getForwardPeriod(),
|
|
868
|
+
set: (t) => {
|
|
869
|
+
null !== t && e.setForwardPeriod(t);
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
type: "number",
|
|
874
|
+
key: "backward",
|
|
875
|
+
label: t("chart.pane.trendline.backward"),
|
|
876
|
+
row: "periods",
|
|
877
|
+
min: 0,
|
|
878
|
+
max: 1e6,
|
|
879
|
+
decimals: !0,
|
|
880
|
+
get: () => e.getBackwardPeriod(),
|
|
881
|
+
set: (t) => {
|
|
882
|
+
null !== t && e.setBackwardPeriod(t);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
])]), e("trendlineLabel", (e, { t }) => w(t, e.getStyle?.())), e("errorBars", (e, { t }) => [...w(t, e.getStyle?.(), { lineOnly: !0 }), ...T(t, () => {
|
|
886
|
+
const a = [{
|
|
887
|
+
type: "choice",
|
|
888
|
+
key: "type",
|
|
889
|
+
label: t("chart.pane.errorBars.type"),
|
|
890
|
+
options: L,
|
|
891
|
+
labels: {
|
|
892
|
+
fixedValue: t("chart.pane.errorBars.fixedValue"),
|
|
893
|
+
percent: t("chart.pane.errorBars.percent"),
|
|
894
|
+
stDev: t("chart.pane.errorBars.stDev"),
|
|
895
|
+
stError: t("chart.pane.errorBars.stError")
|
|
896
|
+
},
|
|
897
|
+
get: () => "custom" === e.getType() ? "fixedValue" : e.getType(),
|
|
898
|
+
set: (t) => {
|
|
899
|
+
e.setType(t);
|
|
900
|
+
}
|
|
901
|
+
}];
|
|
902
|
+
return null !== e.getAmount() && a.push({
|
|
903
|
+
type: "number",
|
|
904
|
+
key: "amount",
|
|
905
|
+
label: t("chart.pane.errorBars.amount"),
|
|
906
|
+
min: 0,
|
|
907
|
+
max: 0x38d7ea4c68000,
|
|
908
|
+
decimals: !0,
|
|
909
|
+
get: () => e.getAmount() ?? 0,
|
|
910
|
+
set: (t) => {
|
|
911
|
+
null !== t && e.setAmount(t);
|
|
912
|
+
}
|
|
913
|
+
}), a.push({
|
|
914
|
+
type: "choice",
|
|
915
|
+
key: "include",
|
|
916
|
+
label: t("chart.pane.errorBars.direction"),
|
|
917
|
+
options: C,
|
|
918
|
+
labels: {
|
|
919
|
+
both: t("chart.pane.errorBars.both"),
|
|
920
|
+
plusValues: t("chart.pane.errorBars.plus"),
|
|
921
|
+
minusValues: t("chart.pane.errorBars.minus")
|
|
922
|
+
},
|
|
923
|
+
get: () => e.getInclude(),
|
|
924
|
+
set: (t) => {
|
|
925
|
+
e.setInclude(t);
|
|
926
|
+
}
|
|
927
|
+
}, x("cap", t("chart.pane.errorBars.cap"), () => e.getEndStyleCap(), (t) => {
|
|
928
|
+
e.setEndStyleCap(t);
|
|
929
|
+
})), a;
|
|
930
|
+
})]), e("upDownBars", (e, { t }) => [{
|
|
931
|
+
key: "upBars",
|
|
932
|
+
label: t("chart.pane.upBars"),
|
|
933
|
+
fields: () => S(t, e.getUpBarsStyle(), { key: "up." })
|
|
934
|
+
}, {
|
|
935
|
+
key: "downBars",
|
|
936
|
+
label: t("chart.pane.downBars"),
|
|
937
|
+
fields: () => S(t, e.getDownBarsStyle(), { key: "down." })
|
|
938
|
+
}]), e("hiLoLines", G), e("dropLines", G), e("seriesLines", G);
|
|
939
|
+
}
|
|
940
|
+
var Y = /* @__PURE__ */ new WeakSet(), Z = n((n) => {
|
|
941
|
+
const { movable: u, sheet: d, args: g } = n, f = i(), x = u.getContent();
|
|
942
|
+
X();
|
|
943
|
+
const [, S] = l((e) => e + 1, 0);
|
|
944
|
+
o(() => x.addListeners({ onAnyChange: S }), [x]);
|
|
945
|
+
const T = d.getView().getChartElementSelection();
|
|
946
|
+
o(() => T.addListeners({ onChange: S }), [T]);
|
|
947
|
+
const v = T.getChart() === x ? T.getActive() : null, { target: U, tab: M } = ((e, a, r) => {
|
|
948
|
+
let s, i = a ?? e.getChartArea();
|
|
949
|
+
const n = i.getElementType(), o = i.getParent();
|
|
950
|
+
"marker" === n && o ? (i = o, s = y) : "dataLabel" === n && "point" === o?.getElementType() && (i = o, s = b);
|
|
951
|
+
const l = k.get(i.getElementType());
|
|
952
|
+
return {
|
|
953
|
+
element: i,
|
|
954
|
+
tab: s,
|
|
955
|
+
target: {
|
|
956
|
+
id: `${e.getId()}:${i.getPath()}`,
|
|
957
|
+
title: t(r, i),
|
|
958
|
+
disabled: e.isReadOnly(),
|
|
959
|
+
tabs: l ? l(i, {
|
|
960
|
+
chart: e,
|
|
961
|
+
t: r
|
|
962
|
+
}) : w(r, i.getStyle?.())
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
})(x, v, f), [B, L] = c(null);
|
|
966
|
+
o(() => {
|
|
967
|
+
M && L({ tab: M });
|
|
968
|
+
}, [v, M]), o(() => {
|
|
969
|
+
g?.tab && !Y.has(g) && (Y.add(g), L({ tab: g.tab }));
|
|
970
|
+
}, [g]);
|
|
971
|
+
const [C] = s([a.ChartDetails]), A = C?.getLabel(), O = C?.getIcon(), F = C ? m(p, {
|
|
972
|
+
title: A,
|
|
973
|
+
children: m("span", { children: m(h, {
|
|
974
|
+
size: "small",
|
|
975
|
+
"data-chart-details": !0,
|
|
976
|
+
"aria-label": A,
|
|
977
|
+
disabled: C.disabled(),
|
|
978
|
+
onClick: () => {
|
|
979
|
+
C.execute();
|
|
980
|
+
},
|
|
981
|
+
sx: { borderRadius: 1 },
|
|
982
|
+
children: "string" == typeof O ? m(r, {
|
|
983
|
+
iconKey: O,
|
|
984
|
+
size: 18,
|
|
985
|
+
ariaHidden: !0
|
|
986
|
+
}) : O
|
|
987
|
+
}) })
|
|
988
|
+
}) : null;
|
|
989
|
+
return m(e, {
|
|
990
|
+
target: U,
|
|
991
|
+
sheet: d,
|
|
992
|
+
request: B,
|
|
993
|
+
actions: F
|
|
994
|
+
});
|
|
995
|
+
});
|
|
996
|
+
Z.displayName = "ChartFormatPanel";
|
|
997
|
+
export { Z as ChartFormatPanel };
|