@rowsncolumns/charts 28.1.17 → 28.1.19

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.
Files changed (90) hide show
  1. package/Readme.md +18 -1
  2. package/dist/cjs/basic-chart/basic-chart.d.ts +1 -1
  3. package/dist/cjs/basic-chart/basic-chart.d.ts.map +1 -1
  4. package/dist/cjs/basic-chart/basic-chart.js +371 -242
  5. package/dist/cjs/basic-chart/helpers.d.ts +7 -3
  6. package/dist/cjs/basic-chart/helpers.d.ts.map +1 -1
  7. package/dist/cjs/basic-chart/helpers.js +30 -4
  8. package/dist/cjs/basic-chart/index.d.ts +7 -0
  9. package/dist/cjs/basic-chart/index.d.ts.map +1 -1
  10. package/dist/cjs/basic-chart/index.js +19 -2
  11. package/dist/cjs/components/editors/chart-editor.d.ts +7 -1
  12. package/dist/cjs/components/editors/chart-editor.d.ts.map +1 -1
  13. package/dist/cjs/components/editors/chart-editor.js +24 -14
  14. package/dist/cjs/components/editors/fields/axis-options-fields.d.ts +6 -3
  15. package/dist/cjs/components/editors/fields/axis-options-fields.d.ts.map +1 -1
  16. package/dist/cjs/components/editors/fields/axis-options-fields.js +69 -7
  17. package/dist/cjs/components/editors/fields/chart-elements-fields.d.ts +15 -0
  18. package/dist/cjs/components/editors/fields/chart-elements-fields.d.ts.map +1 -0
  19. package/dist/cjs/components/editors/fields/chart-elements-fields.js +23 -0
  20. package/dist/cjs/components/editors/fields/series-format-fields.d.ts.map +1 -1
  21. package/dist/cjs/components/editors/fields/series-format-fields.js +16 -2
  22. package/dist/cjs/config.d.ts +10 -0
  23. package/dist/cjs/config.d.ts.map +1 -1
  24. package/dist/cjs/config.js +45 -10
  25. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  26. package/dist/cjs/types.d.ts +10 -0
  27. package/dist/cjs/types.d.ts.map +1 -1
  28. package/dist/cjs/utils/chart-lines.d.ts +36 -0
  29. package/dist/cjs/utils/chart-lines.d.ts.map +1 -0
  30. package/dist/cjs/utils/chart-lines.js +111 -0
  31. package/dist/cjs/utils/data-table.d.ts +31 -0
  32. package/dist/cjs/utils/data-table.d.ts.map +1 -0
  33. package/dist/cjs/utils/data-table.js +61 -0
  34. package/dist/cjs/utils/echarts-gl-loader.d.ts +6 -0
  35. package/dist/cjs/utils/echarts-gl-loader.d.ts.map +1 -1
  36. package/dist/cjs/utils/echarts-gl-loader.js +42 -1
  37. package/dist/cjs/utils/excel-axis-scale.d.ts +35 -0
  38. package/dist/cjs/utils/excel-axis-scale.d.ts.map +1 -0
  39. package/dist/cjs/utils/excel-axis-scale.js +210 -0
  40. package/dist/cjs/utils/overrides.d.ts +24 -3
  41. package/dist/cjs/utils/overrides.d.ts.map +1 -1
  42. package/dist/cjs/utils/overrides.js +119 -14
  43. package/dist/cjs/utils/three-d.d.ts +12 -1
  44. package/dist/cjs/utils/three-d.d.ts.map +1 -1
  45. package/dist/cjs/utils/three-d.js +4 -1
  46. package/dist/esm/basic-chart/basic-chart.d.ts +1 -1
  47. package/dist/esm/basic-chart/basic-chart.d.ts.map +1 -1
  48. package/dist/esm/basic-chart/basic-chart.js +237 -73
  49. package/dist/esm/basic-chart/helpers.d.ts +7 -3
  50. package/dist/esm/basic-chart/helpers.d.ts.map +1 -1
  51. package/dist/esm/basic-chart/helpers.js +26 -3
  52. package/dist/esm/basic-chart/index.d.ts +7 -0
  53. package/dist/esm/basic-chart/index.d.ts.map +1 -1
  54. package/dist/esm/basic-chart/index.js +15 -1
  55. package/dist/esm/components/editors/chart-editor.d.ts +7 -1
  56. package/dist/esm/components/editors/chart-editor.d.ts.map +1 -1
  57. package/dist/esm/components/editors/chart-editor.js +16 -4
  58. package/dist/esm/components/editors/fields/axis-options-fields.d.ts +6 -3
  59. package/dist/esm/components/editors/fields/axis-options-fields.d.ts.map +1 -1
  60. package/dist/esm/components/editors/fields/axis-options-fields.js +56 -5
  61. package/dist/esm/components/editors/fields/chart-elements-fields.d.ts +15 -0
  62. package/dist/esm/components/editors/fields/chart-elements-fields.d.ts.map +1 -0
  63. package/dist/esm/components/editors/fields/chart-elements-fields.js +17 -0
  64. package/dist/esm/components/editors/fields/series-format-fields.d.ts.map +1 -1
  65. package/dist/esm/components/editors/fields/series-format-fields.js +9 -1
  66. package/dist/esm/config.d.ts +10 -0
  67. package/dist/esm/config.d.ts.map +1 -1
  68. package/dist/esm/config.js +20 -0
  69. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  70. package/dist/esm/types.d.ts +10 -0
  71. package/dist/esm/types.d.ts.map +1 -1
  72. package/dist/esm/utils/chart-lines.d.ts +36 -0
  73. package/dist/esm/utils/chart-lines.d.ts.map +1 -0
  74. package/dist/esm/utils/chart-lines.js +121 -0
  75. package/dist/esm/utils/data-table.d.ts +31 -0
  76. package/dist/esm/utils/data-table.d.ts.map +1 -0
  77. package/dist/esm/utils/data-table.js +48 -0
  78. package/dist/esm/utils/echarts-gl-loader.d.ts +6 -0
  79. package/dist/esm/utils/echarts-gl-loader.d.ts.map +1 -1
  80. package/dist/esm/utils/echarts-gl-loader.js +40 -0
  81. package/dist/esm/utils/excel-axis-scale.d.ts +35 -0
  82. package/dist/esm/utils/excel-axis-scale.d.ts.map +1 -0
  83. package/dist/esm/utils/excel-axis-scale.js +122 -0
  84. package/dist/esm/utils/overrides.d.ts +24 -3
  85. package/dist/esm/utils/overrides.d.ts.map +1 -1
  86. package/dist/esm/utils/overrides.js +111 -10
  87. package/dist/esm/utils/three-d.d.ts +12 -1
  88. package/dist/esm/utils/three-d.d.ts.map +1 -1
  89. package/dist/esm/utils/three-d.js +4 -1
  90. package/package.json +7 -7
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.valueAxisExtentValues = exports.excelAutoAxisScale = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var MAX_INTERVALS = 10;
6
+ var niceSteps = function (span) {
7
+ var exponent = Math.floor(Math.log10(span / MAX_INTERVALS));
8
+ var steps = [];
9
+ for (var e = exponent - 1; e <= exponent + 2; e++) {
10
+ var base = Math.pow(10, e);
11
+ steps.push(base, 2 * base, 5 * base);
12
+ }
13
+ return steps;
14
+ };
15
+ /** Floating-point safe multiple of `step` (`0.1 * 3` would print 0.30000000000000004). */
16
+ var multiple = function (k, step) { return Number((k * step).toPrecision(12)); };
17
+ var excelAutoAxisScale = function (values, fixed) {
18
+ var e_1, _a, e_2, _b;
19
+ if (fixed === void 0) { fixed = {}; }
20
+ var dataMin = Infinity;
21
+ var dataMax = -Infinity;
22
+ try {
23
+ for (var values_1 = tslib_1.__values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {
24
+ var v = values_1_1.value;
25
+ if (!Number.isFinite(v))
26
+ continue;
27
+ if (v < dataMin)
28
+ dataMin = v;
29
+ if (v > dataMax)
30
+ dataMax = v;
31
+ }
32
+ }
33
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
34
+ finally {
35
+ try {
36
+ if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);
37
+ }
38
+ finally { if (e_1) throw e_1.error; }
39
+ }
40
+ if (!Number.isFinite(dataMin))
41
+ return undefined;
42
+ if (dataMin === dataMax) {
43
+ // One distinct value: Excel spans 0..value (or value..0).
44
+ if (dataMin > 0)
45
+ dataMin = 0;
46
+ else if (dataMax < 0)
47
+ dataMax = 0;
48
+ else
49
+ dataMax = 1;
50
+ }
51
+ var fixedMin = typeof fixed.min === "number" ? fixed.min : undefined;
52
+ var fixedMax = typeof fixed.max === "number" ? fixed.max : undefined;
53
+ var lo;
54
+ if (fixedMin !== undefined)
55
+ lo = fixedMin;
56
+ else if (dataMin >= 0)
57
+ lo = (dataMax - dataMin) / dataMax > 1 / 6 ? 0 : dataMin - (dataMax - dataMin) / 2;
58
+ else if (dataMax <= 0)
59
+ lo = dataMin - 0.05 * (0 - dataMin);
60
+ else
61
+ lo = dataMin - 0.05 * (dataMax - dataMin);
62
+ var hi;
63
+ if (fixedMax !== undefined)
64
+ hi = fixedMax;
65
+ else if (dataMax <= 0)
66
+ hi = (dataMax - dataMin) / -dataMin > 1 / 6 ? 0 : dataMax + (dataMax - dataMin) / 2;
67
+ else
68
+ hi = dataMax + 0.05 * (dataMax - lo);
69
+ if (!(hi > lo))
70
+ return undefined;
71
+ var pick = function (step) {
72
+ var min = fixedMin !== undefined ? fixedMin : multiple(Math.floor(lo / step), step);
73
+ var max = fixedMax !== undefined ? fixedMax : multiple(Math.ceil(hi / step), step);
74
+ return { min: min, max: max, interval: step };
75
+ };
76
+ if (typeof fixed.majorUnit === "number" && fixed.majorUnit > 0) {
77
+ return pick(fixed.majorUnit);
78
+ }
79
+ try {
80
+ for (var _c = tslib_1.__values(niceSteps(hi - lo)), _d = _c.next(); !_d.done; _d = _c.next()) {
81
+ var step = _d.value;
82
+ var scale = pick(step);
83
+ if ((scale.max - scale.min) / step <= MAX_INTERVALS + 1e-9)
84
+ return scale;
85
+ }
86
+ }
87
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
88
+ finally {
89
+ try {
90
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
91
+ }
92
+ finally { if (e_2) throw e_2.error; }
93
+ }
94
+ return undefined;
95
+ };
96
+ exports.excelAutoAxisScale = excelAutoAxisScale;
97
+ var pointValue = function (item) {
98
+ var raw = item !== null && typeof item === "object" && "value" in item
99
+ ? item.value
100
+ : item;
101
+ if (Array.isArray(raw))
102
+ return undefined;
103
+ var n = typeof raw === "number" ? raw : raw == null || raw === "" ? NaN : Number(raw);
104
+ return Number.isFinite(n) ? n : undefined;
105
+ };
106
+ /**
107
+ * The values a cartesian value axis has to fit: every point of the bar / line
108
+ * series plotted against `axisIndex`, with stacked series summed per category
109
+ * (positives and negatives apart, as Excel stacks them).
110
+ */
111
+ var valueAxisExtentValues = function (series, axisIndex, axisKey) {
112
+ var e_3, _a, e_4, _b, e_5, _c, e_6, _d;
113
+ var _e, _f, _g;
114
+ if (axisKey === void 0) { axisKey = "yAxisIndex"; }
115
+ var values = [];
116
+ var stacks = new Map();
117
+ var _loop_1 = function (s) {
118
+ var e_7, _l;
119
+ if (!s || (s.type !== "bar" && s.type !== "line"))
120
+ return "continue";
121
+ // High-low / drop lines and up/down bars only span the plotted values.
122
+ if (String((_e = s.id) !== null && _e !== void 0 ? _e : "").startsWith("rnc-chart-lines-"))
123
+ return "continue";
124
+ if (((_f = s[axisKey]) !== null && _f !== void 0 ? _f : 0) !== axisIndex || !Array.isArray(s.data))
125
+ return "continue";
126
+ if (s.stack === undefined) {
127
+ try {
128
+ for (var _m = (e_7 = void 0, tslib_1.__values(s.data)), _o = _m.next(); !_o.done; _o = _m.next()) {
129
+ var item = _o.value;
130
+ var v = pointValue(item);
131
+ if (v !== undefined)
132
+ values.push(v);
133
+ }
134
+ }
135
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
136
+ finally {
137
+ try {
138
+ if (_o && !_o.done && (_l = _m.return)) _l.call(_m);
139
+ }
140
+ finally { if (e_7) throw e_7.error; }
141
+ }
142
+ return "continue";
143
+ }
144
+ var stack = (_g = stacks.get(s.stack)) !== null && _g !== void 0 ? _g : { pos: [], neg: [] };
145
+ stacks.set(s.stack, stack);
146
+ s.data.forEach(function (item, i) {
147
+ var _a;
148
+ var v = pointValue(item);
149
+ if (v === undefined)
150
+ return;
151
+ var side = v >= 0 ? stack.pos : stack.neg;
152
+ side[i] = ((_a = side[i]) !== null && _a !== void 0 ? _a : 0) + v;
153
+ });
154
+ };
155
+ try {
156
+ for (var series_1 = tslib_1.__values(series), series_1_1 = series_1.next(); !series_1_1.done; series_1_1 = series_1.next()) {
157
+ var s = series_1_1.value;
158
+ _loop_1(s);
159
+ }
160
+ }
161
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
162
+ finally {
163
+ try {
164
+ if (series_1_1 && !series_1_1.done && (_a = series_1.return)) _a.call(series_1);
165
+ }
166
+ finally { if (e_3) throw e_3.error; }
167
+ }
168
+ try {
169
+ for (var _h = tslib_1.__values(stacks.values()), _j = _h.next(); !_j.done; _j = _h.next()) {
170
+ var _k = _j.value, pos = _k.pos, neg = _k.neg;
171
+ try {
172
+ for (var pos_1 = (e_5 = void 0, tslib_1.__values(pos)), pos_1_1 = pos_1.next(); !pos_1_1.done; pos_1_1 = pos_1.next()) {
173
+ var v = pos_1_1.value;
174
+ if (v !== undefined)
175
+ values.push(v);
176
+ }
177
+ }
178
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
179
+ finally {
180
+ try {
181
+ if (pos_1_1 && !pos_1_1.done && (_c = pos_1.return)) _c.call(pos_1);
182
+ }
183
+ finally { if (e_5) throw e_5.error; }
184
+ }
185
+ try {
186
+ for (var neg_1 = (e_6 = void 0, tslib_1.__values(neg)), neg_1_1 = neg_1.next(); !neg_1_1.done; neg_1_1 = neg_1.next()) {
187
+ var v = neg_1_1.value;
188
+ if (v !== undefined)
189
+ values.push(v);
190
+ }
191
+ }
192
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
193
+ finally {
194
+ try {
195
+ if (neg_1_1 && !neg_1_1.done && (_d = neg_1.return)) _d.call(neg_1);
196
+ }
197
+ finally { if (e_6) throw e_6.error; }
198
+ }
199
+ }
200
+ }
201
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
202
+ finally {
203
+ try {
204
+ if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
205
+ }
206
+ finally { if (e_4) throw e_4.error; }
207
+ }
208
+ return values;
209
+ };
210
+ exports.valueAxisExtentValues = valueAxisExtentValues;
@@ -7,6 +7,20 @@ import type { LegendComponentOption } from "echarts";
7
7
  * Underline / strikethrough have no canvas text decoration in echarts and
8
8
  * are not drawn.
9
9
  */
10
+ /**
11
+ * `ChartTextFormat.fontSize` is in points (OOXML `sz` / 100, the editor's
12
+ * Size field); echarts draws pixels. 9 pt → 12 px, 14 pt → 18.67 px.
13
+ */
14
+ export declare const pointsToPixels: (points: number) => number;
15
+ /** An authored point size as pixels, or `fallbackPx` when none is set. */
16
+ export declare const fontSizePx: (points: unknown, fallbackPx: number) => number;
17
+ /**
18
+ * Excel's chart text defaults (Office 2013+ chart styles): the theme's body
19
+ * (minor) font, 9 pt in Text 1 at 65% (#595959 on the light theme), and a
20
+ * 14 pt regular title (RD-24).
21
+ */
22
+ export declare const CHART_TEXT_PX: number;
23
+ export declare const CHART_TITLE_PX: number;
10
24
  export declare const themedTextStyle: (fmt: any, defaults: {
11
25
  color: string;
12
26
  fontSize: number;
@@ -15,19 +29,26 @@ export declare const themedTextStyle: (fmt: any, defaults: {
15
29
  }) => {
16
30
  color: any;
17
31
  fontFamily: any;
18
- fontSize: any;
32
+ fontSize: number;
19
33
  fontWeight: "bold" | "normal";
20
34
  fontStyle: "italic" | "normal";
21
35
  };
22
36
  /** Build an echarts `textStyle` from a parsed `ChartTextFormat`. */
23
37
  export declare const textFormatToEchartsTextStyle: (fmt: any) => Record<string, any> | undefined;
24
38
  export declare const applyLegendOverrides: (legend: LegendComponentOption, opts: any) => LegendComponentOption;
39
+ /** Excel's Format Axis → Display units: the divisor and the label it shows. */
40
+ export declare const DISPLAY_UNITS: Record<string, {
41
+ divisor: number;
42
+ label: string;
43
+ }>;
25
44
  /**
26
45
  * `numberFormatPattern` is the axis' RESOLVED format (explicit pattern or
27
46
  * the linked source-cell format — see `resolveValueAxisNumberFormat`); it
28
- * becomes the tick-label formatter.
47
+ * becomes the tick-label formatter. `placement` says which side of the plot
48
+ * the axis runs along (`x` horizontal, `y` vertical) for Excel's axis
49
+ * crossing; it defaults to `x` for a category axis and `y` for a value axis.
29
50
  */
30
- export declare const applyAxisOverrides: (axis: any, opts: any, numberFormatPattern?: string, locale?: string) => any;
51
+ export declare const applyAxisOverrides: (axis: any, opts: any, numberFormatPattern?: string, locale?: string, placement?: "x" | "y") => any;
31
52
  export declare const dataLabelFormatter: (opts: any, locale?: string, joiner?: string) => (params: any) => string;
32
53
  /**
33
54
  * The data-label options one series renders with: its own
@@ -1 +1 @@
1
- {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../../utils/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAWrD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,KAAK,GAAG,EACR,UAAU;IACR,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAChC;;;;gBASG,MAAM,GACN,QAAQ;eACsC,QAAQ,GAAG,QAAQ;CACrE,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,4BAA4B,GAAI,KAAK,GAAG,oCASpD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,qBAAqB,EAC7B,MAAM,GAAG,KACR,qBA6CF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,GAAG,EACT,MAAM,GAAG,EACT,sBAAsB,MAAM,EAC5B,SAAS,MAAM,QA4BhB,CAAC;AAgBF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,GAAG,EACT,SAAS,MAAM,EAEf,eAAa,MACT,QAAQ,GAAG,WAoDhB,CAAC;AAgCF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,CAAC,EACvC,YAAY,CAAC,GAAG,IAAI,GAAG,SAAS,EAChC,QAAQ;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,KACnD,CAAC,GAAG,IAAI,GAAG,SAA6C,CAAC;AAE5D,eAAO,MAAM,sBAAsB,GACjC,MAAM,GAAG,EACT,aAAa,MAAM,EACnB,SAAS,MAAM;;;iCAlGH,GAAG;aAoHhB,CAAC"}
1
+ {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../../utils/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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,GAAG,IAAI,GAAG,SAAS,EAChC,QAAQ;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,KACnD,CAAC,GAAG,IAAI,GAAG,SAA6C,CAAC;AAE5D,eAAO,MAAM,sBAAsB,GACjC,MAAM,GAAG,EACT,aAAa,MAAM,EACnB,SAAS,MAAM;;;iCAxGH,GAAG;aA0HhB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildSeriesLabelOption = exports.resolveSeriesDataLabels = exports.dataLabelFormatter = exports.applyAxisOverrides = exports.applyLegendOverrides = exports.textFormatToEchartsTextStyle = exports.themedTextStyle = void 0;
3
+ exports.buildSeriesLabelOption = exports.resolveSeriesDataLabels = exports.dataLabelFormatter = exports.applyAxisOverrides = exports.DISPLAY_UNITS = exports.applyLegendOverrides = exports.textFormatToEchartsTextStyle = exports.themedTextStyle = exports.CHART_TITLE_PX = exports.CHART_TEXT_PX = exports.fontSizePx = exports.pointsToPixels = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var axis_number_format_1 = require("./axis-number-format");
6
6
  // Map ChartSpec.legend / dataLabels / axisOptions to ECharts option
@@ -17,14 +17,32 @@ var axis_number_format_1 = require("./axis-number-format");
17
17
  * Underline / strikethrough have no canvas text decoration in echarts and
18
18
  * are not drawn.
19
19
  */
20
+ /**
21
+ * `ChartTextFormat.fontSize` is in points (OOXML `sz` / 100, the editor's
22
+ * Size field); echarts draws pixels. 9 pt → 12 px, 14 pt → 18.67 px.
23
+ */
24
+ var pointsToPixels = function (points) {
25
+ return Math.round(((points * 4) / 3) * 100) / 100;
26
+ };
27
+ exports.pointsToPixels = pointsToPixels;
28
+ /** An authored point size as pixels, or `fallbackPx` when none is set. */
29
+ var fontSizePx = function (points, fallbackPx) {
30
+ return typeof points === "number" && points > 0 ? (0, exports.pointsToPixels)(points) : fallbackPx;
31
+ };
32
+ exports.fontSizePx = fontSizePx;
33
+ /**
34
+ * Excel's chart text defaults (Office 2013+ chart styles): the theme's body
35
+ * (minor) font, 9 pt in Text 1 at 65% (#595959 on the light theme), and a
36
+ * 14 pt regular title (RD-24).
37
+ */
38
+ exports.CHART_TEXT_PX = (0, exports.pointsToPixels)(9);
39
+ exports.CHART_TITLE_PX = (0, exports.pointsToPixels)(14);
20
40
  var themedTextStyle = function (fmt, defaults) {
21
41
  var _a, _b, _c, _d;
22
42
  return ({
23
43
  color: (_a = fmt === null || fmt === void 0 ? void 0 : fmt.color) !== null && _a !== void 0 ? _a : defaults.color,
24
44
  fontFamily: (_c = (_b = fmt === null || fmt === void 0 ? void 0 : fmt.fontFamily) !== null && _b !== void 0 ? _b : defaults.fontFamily) !== null && _c !== void 0 ? _c : "sans-serif",
25
- fontSize: typeof (fmt === null || fmt === void 0 ? void 0 : fmt.fontSize) === "number" && fmt.fontSize > 0
26
- ? fmt.fontSize
27
- : defaults.fontSize,
45
+ fontSize: (0, exports.fontSizePx)(fmt === null || fmt === void 0 ? void 0 : fmt.fontSize, defaults.fontSize),
28
46
  fontWeight: (fmt ? (fmt.bold ? "bold" : "normal") : (_d = defaults.fontWeight) !== null && _d !== void 0 ? _d : "normal"),
29
47
  fontStyle: ((fmt === null || fmt === void 0 ? void 0 : fmt.italic) ? "italic" : "normal"),
30
48
  });
@@ -39,8 +57,9 @@ var textFormatToEchartsTextStyle = function (fmt) {
39
57
  result.color = fmt.color;
40
58
  if (fmt.fontFamily)
41
59
  result.fontFamily = fmt.fontFamily;
42
- if (typeof fmt.fontSize === "number")
43
- result.fontSize = fmt.fontSize;
60
+ if (typeof fmt.fontSize === "number" && fmt.fontSize > 0) {
61
+ result.fontSize = (0, exports.pointsToPixels)(fmt.fontSize);
62
+ }
44
63
  if (fmt.bold)
45
64
  result.fontWeight = "bold";
46
65
  if (fmt.italic)
@@ -97,14 +116,40 @@ var applyLegendOverrides = function (legend, opts) {
97
116
  return next;
98
117
  };
99
118
  exports.applyLegendOverrides = applyLegendOverrides;
119
+ /** Excel's Format Axis → Display units: the divisor and the label it shows. */
120
+ exports.DISPLAY_UNITS = {
121
+ hundreds: { divisor: 1e2, label: "Hundreds" },
122
+ thousands: { divisor: 1e3, label: "Thousands" },
123
+ tenThousands: { divisor: 1e4, label: "10000" },
124
+ hundredThousands: { divisor: 1e5, label: "100000" },
125
+ millions: { divisor: 1e6, label: "Millions" },
126
+ tenMillions: { divisor: 1e7, label: "10000000" },
127
+ hundredMillions: { divisor: 1e8, label: "100000000" },
128
+ billions: { divisor: 1e9, label: "Billions" },
129
+ trillions: { divisor: 1e12, label: "Trillions" },
130
+ };
131
+ var positive = function (v) {
132
+ return typeof v === "number" && Number.isFinite(v) && v > 0;
133
+ };
100
134
  /**
101
135
  * `numberFormatPattern` is the axis' RESOLVED format (explicit pattern or
102
136
  * the linked source-cell format — see `resolveValueAxisNumberFormat`); it
103
- * becomes the tick-label formatter.
137
+ * becomes the tick-label formatter. `placement` says which side of the plot
138
+ * the axis runs along (`x` horizontal, `y` vertical) for Excel's axis
139
+ * crossing; it defaults to `x` for a category axis and `y` for a value axis.
104
140
  */
105
- var applyAxisOverrides = function (axis, opts, numberFormatPattern, locale) {
106
- var _a, _b, _c, _d, _e;
107
- var formatter = (0, axis_number_format_1.valueAxisLabelFormatter)(numberFormatPattern, locale);
141
+ var applyAxisOverrides = function (axis, opts, numberFormatPattern, locale, placement) {
142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
143
+ var units = (opts === null || opts === void 0 ? void 0 : opts.displayUnits) ? exports.DISPLAY_UNITS[opts.displayUnits] : undefined;
144
+ var baseFormatter = (0, axis_number_format_1.valueAxisLabelFormatter)(numberFormatPattern, locale);
145
+ // Display units divide the tick labels: 25,000 on a "Thousands" axis reads 25.
146
+ var formatter = units
147
+ ? function (value) {
148
+ return typeof value === "number"
149
+ ? (baseFormatter !== null && baseFormatter !== void 0 ? baseFormatter : (function (v) { return (0, axis_number_format_1.formatAxisValue)(undefined, v, locale); }))(value / units.divisor)
150
+ : String(value !== null && value !== void 0 ? value : "");
151
+ }
152
+ : baseFormatter;
108
153
  if (!opts && !formatter)
109
154
  return axis;
110
155
  var next = tslib_1.__assign({}, axis);
@@ -113,8 +158,11 @@ var applyAxisOverrides = function (axis, opts, numberFormatPattern, locale) {
113
158
  }
114
159
  if (!opts)
115
160
  return next;
116
- if (opts.logarithmic)
161
+ var isValueAxis = next.type !== "category";
162
+ if (opts.logarithmic) {
117
163
  next.type = "log";
164
+ next.logBase = positive(opts.logBase) && opts.logBase >= 2 ? opts.logBase : 10;
165
+ }
118
166
  if (opts.reverse)
119
167
  next.inverse = true;
120
168
  if (typeof opts.min === "number")
@@ -129,12 +177,62 @@ var applyAxisOverrides = function (axis, opts, numberFormatPattern, locale) {
129
177
  if (opts.showMajorGridlines === true) {
130
178
  next.splitLine = tslib_1.__assign(tslib_1.__assign({}, ((_c = next.splitLine) !== null && _c !== void 0 ? _c : {})), { show: true });
131
179
  }
180
+ // Format Axis → Units (FT-08). A value axis' major unit is the tick
181
+ // interval; minor ticks / gridlines split it by major ÷ minor (Excel's
182
+ // automatic minor unit is a fifth of the major).
183
+ if (isValueAxis && positive(opts.majorUnit) && !opts.logarithmic) {
184
+ next.interval = opts.majorUnit;
185
+ }
186
+ var minorSplit = positive(opts.majorUnit) && positive(opts.minorUnit)
187
+ ? Math.max(1, Math.round(opts.majorUnit / opts.minorUnit))
188
+ : 5;
189
+ var minorTicks = typeof opts.minorTickMark === "string" && opts.minorTickMark !== "none";
190
+ if (isValueAxis && (minorTicks || opts.showMinorGridlines)) {
191
+ next.minorTick = { show: minorTicks, splitNumber: minorSplit };
192
+ }
193
+ if (isValueAxis && opts.showMinorGridlines) {
194
+ next.minorSplitLine = { show: true, lineStyle: { color: "#F2F2F2" } };
195
+ }
196
+ // Format Axis → Tick Marks: none / inside / outside / cross.
197
+ if (opts.majorTickMark === "none") {
198
+ next.axisTick = tslib_1.__assign(tslib_1.__assign({}, ((_d = next.axisTick) !== null && _d !== void 0 ? _d : {})), { show: false });
199
+ }
200
+ else if (opts.majorTickMark === "in") {
201
+ next.axisTick = tslib_1.__assign(tslib_1.__assign({}, ((_e = next.axisTick) !== null && _e !== void 0 ? _e : {})), { show: true, inside: true });
202
+ }
203
+ else if (opts.majorTickMark === "cross") {
204
+ next.axisTick = tslib_1.__assign(tslib_1.__assign({}, ((_f = next.axisTick) !== null && _f !== void 0 ? _f : {})), { show: true, inside: false, length: 8 });
205
+ }
206
+ // Category axis "Interval between labels / tick marks": every Nth category.
207
+ if (!isValueAxis && positive(opts.tickLabelSkip)) {
208
+ next.axisLabel = tslib_1.__assign(tslib_1.__assign({}, ((_g = next.axisLabel) !== null && _g !== void 0 ? _g : {})), { interval: Math.round(opts.tickLabelSkip) - 1 });
209
+ }
210
+ if (!isValueAxis && positive(opts.tickMarkSkip)) {
211
+ next.axisTick = tslib_1.__assign(tslib_1.__assign({}, ((_h = next.axisTick) !== null && _h !== void 0 ? _h : {})), { interval: Math.round(opts.tickMarkSkip) - 1 });
212
+ }
213
+ // Where this axis crosses the perpendicular one (OOXML's `<c:crosses>` /
214
+ // `<c:crossesAt>` on this axis). echarts places an axis at the other's zero
215
+ // or at either plot edge, so a `crossesAt` other than 0 draws at the edge.
216
+ var side = placement !== null && placement !== void 0 ? placement : (isValueAxis ? "y" : "x");
217
+ if (opts.crosses === "max") {
218
+ next.position = side === "x" ? "top" : "right";
219
+ next.axisLine = tslib_1.__assign(tslib_1.__assign({}, ((_j = next.axisLine) !== null && _j !== void 0 ? _j : {})), { onZero: false });
220
+ }
221
+ else if (opts.crosses === "min" ||
222
+ (typeof opts.crossesAt === "number" && opts.crossesAt !== 0)) {
223
+ next.position = side === "x" ? "bottom" : "left";
224
+ next.axisLine = tslib_1.__assign(tslib_1.__assign({}, ((_k = next.axisLine) !== null && _k !== void 0 ? _k : {})), { onZero: false });
225
+ }
226
+ // The display-units label ("Thousands") rides with the axis title.
227
+ if (units && opts.showDisplayUnitsLabel !== false) {
228
+ next.name = next.name ? "".concat(next.name, " (").concat(units.label, ")") : units.label;
229
+ }
132
230
  // Axis label text style (tick labels) + axis title font come from
133
231
  // <c:txPr>. Without this echarts uses its default (~black on light).
134
232
  var axisTextStyle = (0, exports.textFormatToEchartsTextStyle)(opts.textFormat);
135
233
  if (axisTextStyle) {
136
- next.axisLabel = tslib_1.__assign(tslib_1.__assign({}, ((_d = next.axisLabel) !== null && _d !== void 0 ? _d : {})), axisTextStyle);
137
- next.nameTextStyle = tslib_1.__assign(tslib_1.__assign({}, ((_e = next.nameTextStyle) !== null && _e !== void 0 ? _e : {})), axisTextStyle);
234
+ next.axisLabel = tslib_1.__assign(tslib_1.__assign({}, ((_l = next.axisLabel) !== null && _l !== void 0 ? _l : {})), axisTextStyle);
235
+ next.nameTextStyle = tslib_1.__assign(tslib_1.__assign({}, ((_m = next.nameTextStyle) !== null && _m !== void 0 ? _m : {})), axisTextStyle);
138
236
  }
139
237
  return next;
140
238
  };
@@ -153,6 +251,12 @@ joiner) {
153
251
  if (joiner === void 0) { joiner = ": "; }
154
252
  return function (params) {
155
253
  var parts = [];
254
+ // Value From Cells (FT-08): the point's cell leads; resolved by the caller.
255
+ if (Array.isArray(opts.cellLabels)) {
256
+ var cell = opts.cellLabels[params.dataIndex];
257
+ if (cell !== undefined && cell !== null && cell !== "")
258
+ parts.push(String(cell));
259
+ }
156
260
  if (opts.showSeriesName && params.seriesName)
157
261
  parts.push(params.seriesName);
158
262
  if (opts.showCategoryName && params.name)
@@ -168,7 +272,8 @@ joiner) {
168
272
  !opts.showCategoryName &&
169
273
  !opts.showPercent &&
170
274
  !opts.showSeriesName &&
171
- !opts.showBubbleSize
275
+ !opts.showBubbleSize &&
276
+ !Array.isArray(opts.cellLabels)
172
277
  ? true
173
278
  : !!opts.showValue;
174
279
  // A scatter / bubble point's value is its [x, y, size] tuple: the label's
@@ -44,14 +44,25 @@ export declare const normalize3DSourceType: (sourceChartType?: string | null) =>
44
44
  export declare const is3DSpec: (spec: {
45
45
  sourceChartType?: string | null;
46
46
  } | null | undefined) => boolean;
47
+ /** Host opt-out of the WebGL pipeline (`enable3D` on the renderer / editor). */
48
+ export type ThreeDRenderOptions = {
49
+ /**
50
+ * `false` keeps every spec on its 2-D fallback: echarts-gl is never
51
+ * loaded and the Chart editor offers no echarts-gl preset. The spec's
52
+ * `sourceChartType` is untouched, so the xlsx export still writes the
53
+ * 3-D chart (rowsncolumns/spreadsheet#1187). Default `true`.
54
+ */
55
+ enable3D?: boolean;
56
+ };
47
57
  /**
48
58
  * Map a `sourceChartType` token to the echarts-gl series kind it renders
49
59
  * as, or null when the 3-D pipeline should not run:
50
60
  * - PIE_3D — echarts-gl has no pie3D, so the 2-D pie fallback stays.
51
61
  * - AREA_3D — echarts-gl has no area3D; rendered as line3D.
52
62
  * - non-3-D / unknown tokens.
63
+ * - any token when the host turned 3-D off (`enable3D: false`).
53
64
  */
54
- export declare const resolve3DRenderKind: (sourceChartType?: string | null) => ThreeDRenderKind | null;
65
+ export declare const resolve3DRenderKind: (sourceChartType?: string | null, options?: ThreeDRenderOptions) => ThreeDRenderKind | null;
55
66
  /** Excel's Contour: the surface grid seen from above, as a flat heatmap. */
56
67
  export declare const isContourSpec: (spec: {
57
68
  sourceChartType?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"three-d.d.ts","sourceRoot":"","sources":["../../../utils/three-d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,QAAA,MAAM,cAAc,8EAOV,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAI9D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,kBAAkB,MAAM,GAAG,IAAI,KAC9B,gBAAgB,GAAG,IA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-gl has no area3D; rendered as line3D.
66
66
  * - non-3-D / unknown tokens.
67
+ * - any token when the host turned 3-D off (`enable3D: false`).
67
68
  */
68
- var resolve3DRenderKind = function (sourceChartType) {
69
+ var resolve3DRenderKind = function (sourceChartType, options) {
70
+ if ((options === null || options === void 0 ? void 0 : options.enable3D) === false)
71
+ return null;
69
72
  switch ((0, exports.normalize3DSourceType)(sourceChartType)) {
70
73
  case "BAR_3D":
71
74
  return "bar3D";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  import type { EChartComponentProps } from "../types";
3
3
  export type BasicChartProps = EChartComponentProps;
4
- export declare const BasicChart: ({ width, height, chart, theme, isDarkMode, sheetId, readonly, getDomainValuesFromRange, getSeriesValuesFromRange, getFormattingFromRange, onDeleteChart, onUpdateChart, onRequestEdit, onRequestCalculate, isSelected, fieldButtons, locale, }: BasicChartProps) => React.JSX.Element;
4
+ export declare const BasicChart: ({ width, height, chart, theme, isDarkMode, sheetId, readonly, getDomainValuesFromRange, getSeriesValuesFromRange, getFormattingFromRange, onDeleteChart, onUpdateChart, onRequestEdit, onRequestCalculate, isSelected, fieldButtons, locale, enable3D, }: BasicChartProps) => React.JSX.Element;
5
5
  //# sourceMappingURL=basic-chart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"basic-chart.d.ts","sourceRoot":"","sources":["../../../basic-chart/basic-chart.tsx"],"names":[],"mappings":"AAkEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAwTrD,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAiGnD,eAAO,MAAM,UAAU,GAAI,gPAkBxB,eAAe,sBAmvHjB,CAAC"}
1
+ {"version":3,"file":"basic-chart.d.ts","sourceRoot":"","sources":["../../../basic-chart/basic-chart.tsx"],"names":[],"mappings":"AAkEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA2UrD,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAoHnD,eAAO,MAAM,UAAU,GAAI,0PAmBxB,eAAe,sBAm8HjB,CAAC"}