@techie_doubts/tui.chart.2026 4.6.1

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 (284) hide show
  1. package/README.md +165 -0
  2. package/dist/esm/animator.d.ts +32 -0
  3. package/dist/esm/animator.js +102 -0
  4. package/dist/esm/brushes/axis.d.ts +3 -0
  5. package/dist/esm/brushes/axis.js +21 -0
  6. package/dist/esm/brushes/basic.d.ts +9 -0
  7. package/dist/esm/brushes/basic.js +95 -0
  8. package/dist/esm/brushes/boxPlot.d.ts +2 -0
  9. package/dist/esm/brushes/boxPlot.js +22 -0
  10. package/dist/esm/brushes/circleLegend.d.ts +2 -0
  11. package/dist/esm/brushes/circleLegend.js +26 -0
  12. package/dist/esm/brushes/dataLabel.d.ts +6 -0
  13. package/dist/esm/brushes/dataLabel.js +176 -0
  14. package/dist/esm/brushes/exportMenu.d.ts +2 -0
  15. package/dist/esm/brushes/exportMenu.js +55 -0
  16. package/dist/esm/brushes/gauge.d.ts +2 -0
  17. package/dist/esm/brushes/gauge.js +39 -0
  18. package/dist/esm/brushes/label.d.ts +34 -0
  19. package/dist/esm/brushes/label.js +165 -0
  20. package/dist/esm/brushes/legend.d.ts +7 -0
  21. package/dist/esm/brushes/legend.js +162 -0
  22. package/dist/esm/brushes/lineSeries.d.ts +5 -0
  23. package/dist/esm/brushes/lineSeries.js +41 -0
  24. package/dist/esm/brushes/polygon.d.ts +2 -0
  25. package/dist/esm/brushes/polygon.js +24 -0
  26. package/dist/esm/brushes/resetButton.d.ts +3 -0
  27. package/dist/esm/brushes/resetButton.js +112 -0
  28. package/dist/esm/brushes/scatterSeries.d.ts +2 -0
  29. package/dist/esm/brushes/scatterSeries.js +125 -0
  30. package/dist/esm/brushes/sector.d.ts +2 -0
  31. package/dist/esm/brushes/sector.js +54 -0
  32. package/dist/esm/brushes/spectrumLegend.d.ts +14 -0
  33. package/dist/esm/brushes/spectrumLegend.js +199 -0
  34. package/dist/esm/charts/areaChart.d.ts +254 -0
  35. package/dist/esm/charts/areaChart.js +358 -0
  36. package/dist/esm/charts/barChart.d.ts +203 -0
  37. package/dist/esm/charts/barChart.js +300 -0
  38. package/dist/esm/charts/boxPlotChart.d.ts +209 -0
  39. package/dist/esm/charts/boxPlotChart.js +288 -0
  40. package/dist/esm/charts/bubbleChart.d.ts +188 -0
  41. package/dist/esm/charts/bubbleChart.js +263 -0
  42. package/dist/esm/charts/bulletChart.d.ts +199 -0
  43. package/dist/esm/charts/bulletChart.js +278 -0
  44. package/dist/esm/charts/chart.d.ts +133 -0
  45. package/dist/esm/charts/chart.js +484 -0
  46. package/dist/esm/charts/columnChart.d.ts +205 -0
  47. package/dist/esm/charts/columnChart.js +299 -0
  48. package/dist/esm/charts/columnLineChart.d.ts +271 -0
  49. package/dist/esm/charts/columnLineChart.js +386 -0
  50. package/dist/esm/charts/gaugeChart.d.ts +191 -0
  51. package/dist/esm/charts/gaugeChart.js +279 -0
  52. package/dist/esm/charts/heatmapChart.d.ts +199 -0
  53. package/dist/esm/charts/heatmapChart.js +292 -0
  54. package/dist/esm/charts/lineAreaChart.d.ts +271 -0
  55. package/dist/esm/charts/lineAreaChart.js +374 -0
  56. package/dist/esm/charts/lineChart.d.ts +253 -0
  57. package/dist/esm/charts/lineChart.js +360 -0
  58. package/dist/esm/charts/lineScatterChart.d.ts +200 -0
  59. package/dist/esm/charts/lineScatterChart.js +285 -0
  60. package/dist/esm/charts/nestedPieChart.d.ts +192 -0
  61. package/dist/esm/charts/nestedPieChart.js +268 -0
  62. package/dist/esm/charts/pieChart.d.ts +156 -0
  63. package/dist/esm/charts/pieChart.js +224 -0
  64. package/dist/esm/charts/radarChart.d.ts +169 -0
  65. package/dist/esm/charts/radarChart.js +240 -0
  66. package/dist/esm/charts/radialBarChart.d.ts +172 -0
  67. package/dist/esm/charts/radialBarChart.js +251 -0
  68. package/dist/esm/charts/scatterChart.d.ts +184 -0
  69. package/dist/esm/charts/scatterChart.js +279 -0
  70. package/dist/esm/charts/treemapChart.d.ts +166 -0
  71. package/dist/esm/charts/treemapChart.js +239 -0
  72. package/dist/esm/component/areaSeries.d.ts +96 -0
  73. package/dist/esm/component/areaSeries.js +474 -0
  74. package/dist/esm/component/axis.d.ts +40 -0
  75. package/dist/esm/component/axis.js +176 -0
  76. package/dist/esm/component/axisTitle.d.ts +25 -0
  77. package/dist/esm/component/axisTitle.js +67 -0
  78. package/dist/esm/component/axisUsingCenterY.d.ts +32 -0
  79. package/dist/esm/component/axisUsingCenterY.js +175 -0
  80. package/dist/esm/component/backButton.d.ts +13 -0
  81. package/dist/esm/component/backButton.js +26 -0
  82. package/dist/esm/component/background.d.ts +10 -0
  83. package/dist/esm/component/background.js +15 -0
  84. package/dist/esm/component/boxPlotSeries.d.ts +126 -0
  85. package/dist/esm/component/boxPlotSeries.js +410 -0
  86. package/dist/esm/component/boxSeries.d.ts +211 -0
  87. package/dist/esm/component/boxSeries.js +603 -0
  88. package/dist/esm/component/boxStackSeries.d.ts +62 -0
  89. package/dist/esm/component/boxStackSeries.js +447 -0
  90. package/dist/esm/component/bubbleSeries.d.ts +35 -0
  91. package/dist/esm/component/bubbleSeries.js +174 -0
  92. package/dist/esm/component/bulletSeries.d.ts +89 -0
  93. package/dist/esm/component/bulletSeries.js +392 -0
  94. package/dist/esm/component/circleLegend.d.ts +10 -0
  95. package/dist/esm/component/circleLegend.js +37 -0
  96. package/dist/esm/component/component.d.ts +64 -0
  97. package/dist/esm/component/component.js +170 -0
  98. package/dist/esm/component/componentManager.d.ts +23 -0
  99. package/dist/esm/component/componentManager.js +45 -0
  100. package/dist/esm/component/dataLabels.d.ts +23 -0
  101. package/dist/esm/component/dataLabels.js +134 -0
  102. package/dist/esm/component/exportMenu.d.ts +38 -0
  103. package/dist/esm/component/exportMenu.js +147 -0
  104. package/dist/esm/component/gaugeSeries.d.ts +160 -0
  105. package/dist/esm/component/gaugeSeries.js +447 -0
  106. package/dist/esm/component/heatmapSeries.d.ts +64 -0
  107. package/dist/esm/component/heatmapSeries.js +152 -0
  108. package/dist/esm/component/hoveredSeries.d.ts +27 -0
  109. package/dist/esm/component/hoveredSeries.js +95 -0
  110. package/dist/esm/component/legend.d.ts +26 -0
  111. package/dist/esm/component/legend.js +149 -0
  112. package/dist/esm/component/lineSeries.d.ts +69 -0
  113. package/dist/esm/component/lineSeries.js +319 -0
  114. package/dist/esm/component/noDataText.d.ts +9 -0
  115. package/dist/esm/component/noDataText.js +31 -0
  116. package/dist/esm/component/pieSeries.d.ts +137 -0
  117. package/dist/esm/component/pieSeries.js +390 -0
  118. package/dist/esm/component/plot.d.ts +37 -0
  119. package/dist/esm/component/plot.js +163 -0
  120. package/dist/esm/component/radarSeries.d.ts +85 -0
  121. package/dist/esm/component/radarSeries.js +222 -0
  122. package/dist/esm/component/radialAxis.d.ts +26 -0
  123. package/dist/esm/component/radialAxis.js +210 -0
  124. package/dist/esm/component/radialBarSeries.d.ts +111 -0
  125. package/dist/esm/component/radialBarSeries.js +349 -0
  126. package/dist/esm/component/radialPlot.d.ts +55 -0
  127. package/dist/esm/component/radialPlot.js +188 -0
  128. package/dist/esm/component/rangeSelection.d.ts +61 -0
  129. package/dist/esm/component/rangeSelection.js +150 -0
  130. package/dist/esm/component/resetButton.d.ts +13 -0
  131. package/dist/esm/component/resetButton.js +26 -0
  132. package/dist/esm/component/scatterSeries.d.ts +34 -0
  133. package/dist/esm/component/scatterSeries.js +159 -0
  134. package/dist/esm/component/selectedSeries.d.ts +26 -0
  135. package/dist/esm/component/selectedSeries.js +109 -0
  136. package/dist/esm/component/spectrumLegend.d.ts +15 -0
  137. package/dist/esm/component/spectrumLegend.js +76 -0
  138. package/dist/esm/component/title.d.ts +12 -0
  139. package/dist/esm/component/title.js +53 -0
  140. package/dist/esm/component/tooltip.d.ts +41 -0
  141. package/dist/esm/component/tooltip.js +131 -0
  142. package/dist/esm/component/treemapSeries.d.ts +57 -0
  143. package/dist/esm/component/treemapSeries.js +191 -0
  144. package/dist/esm/component/zeroAxis.d.ts +9 -0
  145. package/dist/esm/component/zeroAxis.js +49 -0
  146. package/dist/esm/eventEmitter.d.ts +8 -0
  147. package/dist/esm/eventEmitter.js +15 -0
  148. package/dist/esm/helpers/arrayUtil.d.ts +10 -0
  149. package/dist/esm/helpers/arrayUtil.js +54 -0
  150. package/dist/esm/helpers/axes.d.ts +67 -0
  151. package/dist/esm/helpers/axes.js +345 -0
  152. package/dist/esm/helpers/boxSeries.d.ts +5 -0
  153. package/dist/esm/helpers/boxSeries.js +71 -0
  154. package/dist/esm/helpers/calculator.d.ts +19 -0
  155. package/dist/esm/helpers/calculator.js +153 -0
  156. package/dist/esm/helpers/color.d.ts +153 -0
  157. package/dist/esm/helpers/color.js +218 -0
  158. package/dist/esm/helpers/colorSpectrum.d.ts +5 -0
  159. package/dist/esm/helpers/colorSpectrum.js +17 -0
  160. package/dist/esm/helpers/coordinate.d.ts +9 -0
  161. package/dist/esm/helpers/coordinate.js +51 -0
  162. package/dist/esm/helpers/dataLabels.d.ts +36 -0
  163. package/dist/esm/helpers/dataLabels.js +405 -0
  164. package/dist/esm/helpers/dom.d.ts +2 -0
  165. package/dist/esm/helpers/dom.js +8 -0
  166. package/dist/esm/helpers/downloader.d.ts +7 -0
  167. package/dist/esm/helpers/downloader.js +287 -0
  168. package/dist/esm/helpers/formatDate.d.ts +16 -0
  169. package/dist/esm/helpers/formatDate.js +140 -0
  170. package/dist/esm/helpers/geometric.d.ts +3 -0
  171. package/dist/esm/helpers/geometric.js +35 -0
  172. package/dist/esm/helpers/googleAnalytics.d.ts +1 -0
  173. package/dist/esm/helpers/googleAnalytics.js +39 -0
  174. package/dist/esm/helpers/htmlSanitizer.d.ts +1 -0
  175. package/dist/esm/helpers/htmlSanitizer.js +86 -0
  176. package/dist/esm/helpers/legend.d.ts +9 -0
  177. package/dist/esm/helpers/legend.js +47 -0
  178. package/dist/esm/helpers/pieSeries.d.ts +15 -0
  179. package/dist/esm/helpers/pieSeries.js +72 -0
  180. package/dist/esm/helpers/plot.d.ts +2 -0
  181. package/dist/esm/helpers/plot.js +4 -0
  182. package/dist/esm/helpers/radarSeries.d.ts +1 -0
  183. package/dist/esm/helpers/radarSeries.js +7 -0
  184. package/dist/esm/helpers/range.d.ts +6 -0
  185. package/dist/esm/helpers/range.js +16 -0
  186. package/dist/esm/helpers/responders.d.ts +37 -0
  187. package/dist/esm/helpers/responders.js +197 -0
  188. package/dist/esm/helpers/sector.d.ts +55 -0
  189. package/dist/esm/helpers/sector.js +117 -0
  190. package/dist/esm/helpers/squarifier.d.ts +8 -0
  191. package/dist/esm/helpers/squarifier.js +110 -0
  192. package/dist/esm/helpers/style.d.ts +14 -0
  193. package/dist/esm/helpers/style.js +48 -0
  194. package/dist/esm/helpers/theme.d.ts +58 -0
  195. package/dist/esm/helpers/theme.js +557 -0
  196. package/dist/esm/helpers/tooltip.d.ts +2 -0
  197. package/dist/esm/helpers/tooltip.js +18 -0
  198. package/dist/esm/helpers/tooltipTemplate.d.ts +21 -0
  199. package/dist/esm/helpers/tooltipTemplate.js +147 -0
  200. package/dist/esm/helpers/utils.d.ts +42 -0
  201. package/dist/esm/helpers/utils.js +268 -0
  202. package/dist/esm/helpers/validation.d.ts +6 -0
  203. package/dist/esm/helpers/validation.js +16 -0
  204. package/dist/esm/index.d.ts +40 -0
  205. package/dist/esm/index.js +75 -0
  206. package/dist/esm/message.d.ts +11 -0
  207. package/dist/esm/message.js +11 -0
  208. package/dist/esm/painter.d.ts +27 -0
  209. package/dist/esm/painter.js +88 -0
  210. package/dist/esm/responderDetectors.d.ts +6 -0
  211. package/dist/esm/responderDetectors.js +124 -0
  212. package/dist/esm/scale/coordinateScaleCalculator.d.ts +24 -0
  213. package/dist/esm/scale/coordinateScaleCalculator.js +174 -0
  214. package/dist/esm/scale/datetimeScaleCalculator.d.ts +20 -0
  215. package/dist/esm/scale/datetimeScaleCalculator.js +59 -0
  216. package/dist/esm/store/axes.d.ts +30 -0
  217. package/dist/esm/store/axes.js +282 -0
  218. package/dist/esm/store/category.d.ts +4 -0
  219. package/dist/esm/store/category.js +73 -0
  220. package/dist/esm/store/colorValueScale.d.ts +3 -0
  221. package/dist/esm/store/colorValueScale.js +56 -0
  222. package/dist/esm/store/dataRange.d.ts +4 -0
  223. package/dist/esm/store/dataRange.js +170 -0
  224. package/dist/esm/store/gaugeAxes.d.ts +4 -0
  225. package/dist/esm/store/gaugeAxes.js +175 -0
  226. package/dist/esm/store/heatmapAxes.d.ts +3 -0
  227. package/dist/esm/store/heatmapAxes.js +98 -0
  228. package/dist/esm/store/heatmapSeriesData.d.ts +3 -0
  229. package/dist/esm/store/heatmapSeriesData.js +34 -0
  230. package/dist/esm/store/layout.d.ts +12 -0
  231. package/dist/esm/store/layout.js +487 -0
  232. package/dist/esm/store/legend.d.ts +3 -0
  233. package/dist/esm/store/legend.js +435 -0
  234. package/dist/esm/store/nestedPieSeriesData.d.ts +3 -0
  235. package/dist/esm/store/nestedPieSeriesData.js +49 -0
  236. package/dist/esm/store/options.d.ts +3 -0
  237. package/dist/esm/store/options.js +62 -0
  238. package/dist/esm/store/plot.d.ts +3 -0
  239. package/dist/esm/store/plot.js +102 -0
  240. package/dist/esm/store/radialAxes.d.ts +8 -0
  241. package/dist/esm/store/radialAxes.js +199 -0
  242. package/dist/esm/store/reactive.d.ts +11 -0
  243. package/dist/esm/store/reactive.js +196 -0
  244. package/dist/esm/store/root.d.ts +3 -0
  245. package/dist/esm/store/root.js +46 -0
  246. package/dist/esm/store/scale.d.ts +3 -0
  247. package/dist/esm/store/scale.js +102 -0
  248. package/dist/esm/store/seriesData.d.ts +3 -0
  249. package/dist/esm/store/seriesData.js +299 -0
  250. package/dist/esm/store/stackSeriesData.d.ts +8 -0
  251. package/dist/esm/store/stackSeriesData.js +192 -0
  252. package/dist/esm/store/store.d.ts +20 -0
  253. package/dist/esm/store/store.js +112 -0
  254. package/dist/esm/store/theme.d.ts +3 -0
  255. package/dist/esm/store/theme.js +139 -0
  256. package/dist/esm/store/treemapSeriesData.d.ts +4 -0
  257. package/dist/esm/store/treemapSeriesData.js +93 -0
  258. package/dist/td-chart.css +127 -0
  259. package/dist/td-chart.js +41463 -0
  260. package/dist/td-chart.min.css +6 -0
  261. package/dist/td-chart.min.js +9 -0
  262. package/package.json +112 -0
  263. package/types/brushes.d.ts +30 -0
  264. package/types/charts.d.ts +152 -0
  265. package/types/components/axis.d.ts +71 -0
  266. package/types/components/circleLegend.d.ts +9 -0
  267. package/types/components/dataLabels.d.ts +119 -0
  268. package/types/components/exportMenu.d.ts +14 -0
  269. package/types/components/legend.d.ts +27 -0
  270. package/types/components/plot.d.ts +8 -0
  271. package/types/components/radialAxis.d.ts +22 -0
  272. package/types/components/radialPlot.d.ts +11 -0
  273. package/types/components/rangeSelection.d.ts +3 -0
  274. package/types/components/resetButton.d.ts +13 -0
  275. package/types/components/series.d.ts +386 -0
  276. package/types/components/spectrumLegend.d.ts +25 -0
  277. package/types/components/tooltip.d.ts +58 -0
  278. package/types/components/zoom.d.ts +3 -0
  279. package/types/eventEmitter.d.ts +12 -0
  280. package/types/index.d.ts +615 -0
  281. package/types/options.d.ts +833 -0
  282. package/types/resizeObserver.d.ts +54 -0
  283. package/types/store/store.d.ts +564 -0
  284. package/types/theme.d.ts +670 -0
@@ -0,0 +1,139 @@
1
+ import { deepMergedCopy, omit } from "../helpers/utils";
2
+ import { getNestedPieChartAliasNames, hasNestedPieSeries, hasOuterDataLabel, hasOuterPieSeriesName, } from "../helpers/pieSeries";
3
+ import { makeAxisTitleTheme, defaultSeriesTheme, getDefaultTheme } from "../helpers/theme";
4
+ function getCommonSeriesOptions(options, series, isNestedPieChart) {
5
+ var _a, _b;
6
+ const theme = (_a = options) === null || _a === void 0 ? void 0 : _a.theme;
7
+ if (!((_b = theme) === null || _b === void 0 ? void 0 : _b.series)) {
8
+ return {};
9
+ }
10
+ const seriesNames = isNestedPieChart ? getNestedPieChartAliasNames(series) : Object.keys(series);
11
+ return seriesNames.reduce((acc, seriesName) => {
12
+ delete acc[seriesName];
13
+ return acc;
14
+ }, Object.assign({}, theme.series));
15
+ }
16
+ function getThemeAppliedSecondaryYAxis(options) {
17
+ var _a, _b, _c;
18
+ const theme = Object.assign({}, options.theme);
19
+ if (!Array.isArray(theme.yAxis)) {
20
+ return theme;
21
+ }
22
+ const axisTitleTheme = makeAxisTitleTheme((_c = (_b = (_a = options) === null || _a === void 0 ? void 0 : _a.theme) === null || _b === void 0 ? void 0 : _b.chart) === null || _c === void 0 ? void 0 : _c.fontFamily);
23
+ const yAxis = theme.yAxis.map((yAxisTheme) => deepMergedCopy({ title: Object.assign({}, axisTitleTheme) }, Object.assign({}, yAxisTheme)));
24
+ return Object.assign(Object.assign({}, theme), { yAxis });
25
+ }
26
+ function getThemeOptionsWithSeriesName(options, series, commonSeriesOptions, isNestedPieChart) {
27
+ var _a;
28
+ const theme = getThemeAppliedSecondaryYAxis(options);
29
+ if (!((_a = theme) === null || _a === void 0 ? void 0 : _a.series)) {
30
+ return Object.assign({}, theme);
31
+ }
32
+ const seriesTheme = Object.assign(Object.assign({}, theme), { series: {} });
33
+ const seriesNames = Object.keys(series);
34
+ const isComboChart = seriesNames.length > 1;
35
+ if (isNestedPieChart) {
36
+ const aliasNames = getNestedPieChartAliasNames(series);
37
+ seriesTheme.series = {
38
+ pie: aliasNames.reduce((acc, aliasName) => {
39
+ var _a;
40
+ return (Object.assign(Object.assign({}, acc), { [aliasName]: deepMergedCopy((_a = theme.series) === null || _a === void 0 ? void 0 : _a[aliasName], omit(commonSeriesOptions, 'colors')) }));
41
+ }, {}),
42
+ };
43
+ }
44
+ else if (isComboChart) {
45
+ seriesTheme.series = Object.assign({}, seriesNames.reduce((acc, seriesName) => {
46
+ var _a;
47
+ return (Object.assign(Object.assign({}, acc), { [seriesName]: deepMergedCopy((_a = theme.series) === null || _a === void 0 ? void 0 : _a[seriesName], omit(commonSeriesOptions, 'colors')) }));
48
+ }, {}));
49
+ }
50
+ else {
51
+ seriesTheme.series = {
52
+ [seriesNames[0]]: theme.series,
53
+ };
54
+ }
55
+ return seriesTheme;
56
+ }
57
+ function setColors(theme, series, commonSeriesOptions, isNestedPieChart, categories) {
58
+ var _a, _b;
59
+ let index = 0;
60
+ const commonColorsOption = [
61
+ ...(_b = (_a = commonSeriesOptions) === null || _a === void 0 ? void 0 : _a.colors, (_b !== null && _b !== void 0 ? _b : [])),
62
+ ...defaultSeriesTheme.colors,
63
+ ];
64
+ const themeNames = isNestedPieChart ? getNestedPieChartAliasNames(series) : Object.keys(series);
65
+ themeNames.forEach((name, idx) => {
66
+ var _a;
67
+ const themeSeries = series[name] || [];
68
+ const filteredSeries = themeSeries.filter((chartSeries) => chartSeries.colorByCategories);
69
+ const hasColorByCategories = filteredSeries.length > 0;
70
+ let size;
71
+ if (isNestedPieChart) {
72
+ size = series.pie[idx].data.length;
73
+ }
74
+ else if (hasColorByCategories) {
75
+ const rejectedSeries = themeSeries.filter((chartSeries) => !chartSeries.colorByCategories);
76
+ size = rejectedSeries.length + categories.length;
77
+ }
78
+ else {
79
+ size = series[name].length;
80
+ }
81
+ const target = isNestedPieChart ? theme.series.pie : theme.series;
82
+ if (!((_a = target[name]) === null || _a === void 0 ? void 0 : _a.colors)) {
83
+ target[name] = Object.assign(Object.assign({}, target[name]), { colors: commonColorsOption.slice(index, index + size) });
84
+ index += size;
85
+ }
86
+ });
87
+ }
88
+ function setPlot(theme) {
89
+ ['vertical', 'horizontal'].reduce((acc, cur) => {
90
+ if (!acc[cur]) {
91
+ acc[cur] = { lineColor: acc.lineColor };
92
+ }
93
+ return acc;
94
+ }, theme.plot);
95
+ }
96
+ function checkAnchorPieSeriesOption(options, series, alias) {
97
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
98
+ return {
99
+ hasOuterAnchor: !!series.pie && ((_d = (_c = (_b = (_a = options) === null || _a === void 0 ? void 0 : _a.series) === null || _b === void 0 ? void 0 : _b[alias]) === null || _c === void 0 ? void 0 : _c.dataLabels) === null || _d === void 0 ? void 0 : _d.anchor) === 'outer',
100
+ hasOuterAnchorPieSeriesName: !!series.pie && ((_j = (_h = (_g = (_f = (_e = options) === null || _e === void 0 ? void 0 : _e.series) === null || _f === void 0 ? void 0 : _f[alias]) === null || _g === void 0 ? void 0 : _g.dataLabels) === null || _h === void 0 ? void 0 : _h.pieSeriesName) === null || _j === void 0 ? void 0 : _j.anchor) === 'outer',
101
+ };
102
+ }
103
+ function getTheme(options, series, categories) {
104
+ var _a, _b, _c;
105
+ const isNestedPieChart = hasNestedPieSeries(series);
106
+ const commonSeriesOptions = getCommonSeriesOptions(options, series, isNestedPieChart);
107
+ let pieSeriesOuterAnchors = {
108
+ hasOuterAnchor: hasOuterDataLabel(options, series),
109
+ hasOuterAnchorPieSeriesName: hasOuterPieSeriesName(options, series),
110
+ };
111
+ if (isNestedPieChart) {
112
+ const aliasNames = getNestedPieChartAliasNames(series);
113
+ pieSeriesOuterAnchors = aliasNames.reduce((acc, cur) => (Object.assign(Object.assign({}, acc), { [cur]: checkAnchorPieSeriesOption(options, series, cur) })), {});
114
+ }
115
+ const globalFontFamily = (_c = (_b = (_a = options) === null || _a === void 0 ? void 0 : _a.theme) === null || _b === void 0 ? void 0 : _b.chart) === null || _c === void 0 ? void 0 : _c.fontFamily;
116
+ const theme = deepMergedCopy(getDefaultTheme(series, pieSeriesOuterAnchors, globalFontFamily, isNestedPieChart), getThemeOptionsWithSeriesName(options, series, commonSeriesOptions, isNestedPieChart));
117
+ if (!series.heatmap) {
118
+ setColors(theme, series, commonSeriesOptions, isNestedPieChart, categories);
119
+ }
120
+ setPlot(theme);
121
+ return theme;
122
+ }
123
+ const theme = {
124
+ name: 'theme',
125
+ state: ({ options, series, categories }) => ({
126
+ theme: getTheme(options, series, categories),
127
+ }),
128
+ action: {
129
+ initThemeState({ state, initStoreState }) {
130
+ state.theme = getTheme(state.options, initStoreState.series, initStoreState.categories);
131
+ },
132
+ },
133
+ observe: {
134
+ updateTheme() {
135
+ this.dispatch('initThemeState');
136
+ },
137
+ },
138
+ };
139
+ export default theme;
@@ -0,0 +1,4 @@
1
+ import { StoreModule } from "../../types/store/store";
2
+ export declare const TREEMAP_ROOT_ID: string;
3
+ declare const treemapSeriesData: StoreModule;
4
+ export default treemapSeriesData;
@@ -0,0 +1,93 @@
1
+ import { isNull, isUndefined, last } from "../helpers/utils";
2
+ const TREEMAP_ID_PREFIX = '__TOAST_UI_TREEMAP';
3
+ export const TREEMAP_ROOT_ID = `${TREEMAP_ID_PREFIX}_ROOT`;
4
+ function makeTreeModel(series, indexes, depth, parentId) {
5
+ var _a;
6
+ const idx = last(indexes);
7
+ const id = parentId ? `${parentId}_${idx}` : `${TREEMAP_ID_PREFIX}_${idx}`;
8
+ const { colorValue } = series;
9
+ const models = [
10
+ {
11
+ label: series.label,
12
+ hasChild: !!series.children,
13
+ id,
14
+ indexes,
15
+ parentId: parentId ? parentId : TREEMAP_ROOT_ID,
16
+ depth,
17
+ data: (_a = series.data, (_a !== null && _a !== void 0 ? _a : 0)),
18
+ colorValue,
19
+ },
20
+ ];
21
+ if (series.children) {
22
+ series.children.forEach((child, childIdx) => {
23
+ if (!isNull(child.data)) {
24
+ models.push(...makeTreeModel(child, [...indexes, childIdx], depth + 1, id));
25
+ }
26
+ });
27
+ }
28
+ return models;
29
+ }
30
+ function setParentSeriesData(treemapSeries) {
31
+ treemapSeries.forEach(({ parentId, data }) => {
32
+ if (parentId !== TREEMAP_ROOT_ID) {
33
+ treemapSeries.find(({ id }) => id === parentId).data += data;
34
+ }
35
+ });
36
+ }
37
+ function setParentColorValue(treemapSeries) {
38
+ treemapSeries.forEach((datum) => {
39
+ const { id, colorValue } = datum;
40
+ if (isUndefined(colorValue)) {
41
+ const series = treemapSeries.filter(({ parentId }) => parentId === id);
42
+ const totalColorValue = series.reduce((acc, cur) => {
43
+ return acc + (isUndefined(cur.colorValue) ? 0 : cur.colorValue);
44
+ }, 0);
45
+ datum.colorValue = totalColorValue / series.length;
46
+ }
47
+ });
48
+ }
49
+ function setRatio(treemapSeries) {
50
+ const rootTotal = treemapSeries
51
+ .filter(({ parentId }) => parentId === TREEMAP_ROOT_ID)
52
+ .reduce((acc, { data }) => acc + data, 0);
53
+ treemapSeries.forEach((series) => {
54
+ const total = series.parentId === TREEMAP_ROOT_ID
55
+ ? rootTotal
56
+ : treemapSeries.find(({ id }) => id === series.parentId).data;
57
+ series.ratio = series.data / total;
58
+ });
59
+ }
60
+ function makeTreemapSeries(series, options) {
61
+ var _a;
62
+ if (!series.treemap) {
63
+ return [];
64
+ }
65
+ const treemapSeries = series.treemap.data
66
+ .filter((datum) => !isNull(datum.data))
67
+ .map((datum, idx) => makeTreeModel(datum, [idx], 0))
68
+ .flatMap((s) => s)
69
+ .sort((a, b) => b.depth - a.depth);
70
+ setParentSeriesData(treemapSeries);
71
+ setRatio(treemapSeries);
72
+ if ((_a = options.series) === null || _a === void 0 ? void 0 : _a.useColorValue) {
73
+ setParentColorValue(treemapSeries);
74
+ }
75
+ return treemapSeries;
76
+ }
77
+ const treemapSeriesData = {
78
+ name: 'treemapSeriesData',
79
+ state: () => ({
80
+ treemapSeries: [],
81
+ }),
82
+ action: {
83
+ setTreemapSeriesData({ state }) {
84
+ state.treemapSeries = makeTreemapSeries(state.series, state.options);
85
+ },
86
+ },
87
+ observe: {
88
+ updateTreemapSeriesData() {
89
+ this.dispatch('setTreemapSeriesData');
90
+ },
91
+ },
92
+ };
93
+ export default treemapSeriesData;
@@ -0,0 +1,127 @@
1
+ /*!
2
+ * TOAST UI Chart 4th Edition
3
+ * @version 4.6.1 | Sat Feb 21 2026
4
+ * @author NHN Cloud. FE Development Lab <dl_javascript@nhn.com>
5
+ * @license MIT
6
+ */
7
+ .toastui-chart-wrapper {
8
+ position: relative;
9
+ width: 100%;
10
+ height: 100%;
11
+ }
12
+
13
+ /* export menu */
14
+
15
+ .toastui-chart-export-menu {
16
+ font-family: Arial, sans-serif;
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ background: #fff;
21
+ user-select: none;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ .toastui-chart-export-menu-title {
26
+ height: 34px;
27
+ width: 140px;
28
+ margin: 0;
29
+ padding: 10px;
30
+ box-sizing: inherit;
31
+ }
32
+
33
+ .toastui-chart-export-menu-btn-wrapper {
34
+ width: 100%;
35
+ height: 76px;
36
+ }
37
+
38
+ .toastui-chart-export-menu-btn {
39
+ width: 50%;
40
+ height: 50%;
41
+ border: none;
42
+ padding: 12px 3px;
43
+ float: left;
44
+ color: inherit;
45
+ font-family: inherit;
46
+ background: transparent;
47
+ cursor: pointer;
48
+ }
49
+
50
+ .toastui-chart-export-menu-btn:hover {
51
+ font-weight: bold;
52
+ }
53
+
54
+ .toastui-chart-export-menu-btn:nth-child(3) {
55
+ border-bottom-left-radius: inherit;
56
+ }
57
+
58
+ .toastui-chart-export-menu-btn:nth-child(4) {
59
+ border-bottom-right-radius: inherit;
60
+ }
61
+
62
+ /* tooltip */
63
+ .toastui-chart-tooltip-container {
64
+ position: absolute;
65
+ top: 0;
66
+ left: 0;
67
+ user-select: none;
68
+ pointer-events: none;
69
+ }
70
+
71
+ .toastui-chart-tooltip {
72
+ display: flex;
73
+ flex-direction: column;
74
+ box-sizing: border-box;
75
+ min-width: 150px;
76
+ }
77
+
78
+ .toastui-chart-tooltip-category {
79
+ padding: 8px 15px;
80
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
81
+ }
82
+
83
+ .toastui-chart-tooltip-series-wrapper {
84
+ display: flex;
85
+ padding: 13px 15px;
86
+ flex-direction: column;
87
+ }
88
+
89
+ .toastui-chart-tooltip-series {
90
+ display: flex;
91
+ width: 100%;
92
+ justify-content: space-between;
93
+ }
94
+
95
+ .toastui-chart-series-name {
96
+ display: flex;
97
+ align-items: center;
98
+ /* for IE */
99
+ line-height: 10px;
100
+ }
101
+
102
+ .toastui-chart-series-name .toastui-chart-icon,
103
+ .toastui-chart-tooltip-series .toastui-chart-icon {
104
+ width: 10px;
105
+ height: 10px;
106
+ margin-right: 8px;
107
+ /* for IE */
108
+ display: inline-block;
109
+ }
110
+
111
+ .toastui-chart-series-name .toastui-chart-name {
112
+ white-space: nowrap;
113
+ }
114
+
115
+ .toastui-chart-series-value {
116
+ white-space: nowrap;
117
+ margin-left: 10px;
118
+ }
119
+
120
+ .toastui-chart-tooltip-series-wrapper .toastui-chart-tooltip-title {
121
+ padding: 8px 0 5px;
122
+ }
123
+
124
+ .toastui-chart-tooltip-series-wrapper .toastui-chart-tooltip-title:first-child {
125
+ padding-top: 0;
126
+ }
127
+