@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
package/README.md ADDED
@@ -0,0 +1,165 @@
1
+ # ![Toast UI Chart](https://user-images.githubusercontent.com/35218826/37320160-c4d6dec4-26b5-11e8-9a91-79bb2b882410.png)
2
+
3
+ > 🍞📈 Spread your data on TOAST UI Chart. TOAST UI Chart is Beautiful Statistical Data Visualization library
4
+
5
+ [![npm](https://img.shields.io/npm/v/@techie_doubts/tui.chart.2026.svg)](https://www.npmjs.com/package/@techie_doubts/tui.chart.2026)
6
+
7
+ ## 🚩 Table of Contents
8
+
9
+ - [Toast UI Chart](#)
10
+ - [🚩 Table of Contents](#-table-of-contents)
11
+ - [Collect statistics on the use of open source](#collect-statistics-on-the-use-of-open-source)
12
+ - [💾 Install](#-install)
13
+ - [Via Package Manager](#via-package-manager)
14
+ - [npm](#npm)
15
+ - [Via Contents Delivery Network (CDN)](#via-contents-delivery-network-cdn)
16
+ - [Download Source Files](#download-source-files)
17
+ - [🔨 Usage](#-usage)
18
+ - [HTML](#html)
19
+ - [JavaScript](#javascript)
20
+ - [Load](#load)
21
+
22
+ ## Collect statistics on the use of open source
23
+
24
+ TOAST UI Chart applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI Chart is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the following `usageStatistics` option when creating charts.
25
+
26
+ ```js
27
+ const options = {
28
+ // ...
29
+ usageStatistics: false,
30
+ };
31
+
32
+ toastui.Chart.barChart({ el, data, options });
33
+ ```
34
+
35
+ ## 💾 Install
36
+
37
+ The TOAST UI products can be installed by using the package manager or downloading the source directly.
38
+ However, we highly recommend using the package manager.
39
+
40
+ ### Via Package Manager
41
+
42
+ The TOAST UI products are registered in [npm](https://www.npmjs.com/) package manager.
43
+ Install by using the commands provided by a package manager.
44
+ When using npm, be sure [Node.js](https://nodejs.org) is installed in the environment.
45
+
46
+ #### npm
47
+
48
+ ```sh
49
+ $ npm install --save @techie_doubts/tui.chart.2026 # Latest version
50
+ $ npm install --save @techie_doubts/tui.chart.2026@<version> # Specific version
51
+ ```
52
+
53
+ ### Via Contents Delivery Network (CDN)
54
+
55
+ The TOAST UI Chart is available over a CDN.
56
+
57
+ - You can use cdn as below.
58
+
59
+ ```html
60
+ <link rel="stylesheet" href="https://uicdn.toast.com/chart/latest/td-chart.min.css" />
61
+ <script src="https://uicdn.toast.com/chart/latest/td-chart.min.js"></script>
62
+ ```
63
+
64
+ - Within the download you'll find the following directories
65
+
66
+ ```
67
+ - uicdn.toast.com/
68
+ ├─ chart/
69
+ │ ├─ latest
70
+ │ │ ├─ td-chart.js
71
+ │ │ ├─ td-chart.min.js
72
+ │ │ ├─ td-chart.css
73
+ │ │ ├─ td-chart.min.css
74
+ │ ├─ v4.0.0/
75
+ ```
76
+
77
+ ### Download Source Files
78
+
79
+ - [Download all sources for each version](https://github.com/nhn/tui.chart/releases)
80
+
81
+ ## 🔨 Usage
82
+
83
+ ### HTML
84
+
85
+ Add the container element where TOAST UI Chart will be created.
86
+
87
+ ```html
88
+ <div id="chart"></div>
89
+ ```
90
+
91
+ ### JavaScript
92
+
93
+ #### Load
94
+
95
+ The TOAST UI Chart can be used by creating an instance with the constructor function. To access the constructor function, import the module using one of the three following methods depending on your environment.
96
+
97
+ ```js
98
+ /* namespace */
99
+ const chart = toastui.Chart;
100
+
101
+ /* CommonJS in Node.js */
102
+ const chart = require('@techie_doubts/tui.chart.2026');
103
+
104
+ /* ES6 in Node.js */
105
+ import Chart from '@techie_doubts/tui.chart.2026';
106
+ import { LineChart } from '@techie_doubts/tui.chart.2026';
107
+ ```
108
+
109
+ [In Webpack 4, when importing package modules, the parts that are defined in the module field have higher priority than the parts defined in the main field](https://webpack.js.org/configuration/resolve/#resolvemainfields). To use the Webpack 4 with the `require` syntax to import `@techie_doubts/tui.chart.2026`, the ESM file defined in the `module` field will be loaded, and the file will be transpiled to be compatible with the `require` syntax. In order to use the **bundle file for UMD**, the user must personally load and use the `@techie_doubts/tui.chart.2026/dist/td-chart.js` or `@techie_doubts/tui.chart.2026/dist/td-chart.min.js`.
110
+
111
+ ```js
112
+ const Chart = require('@techie_doubts/tui.chart.2026/dist/td-chart.min.js'); // loading the bundle file for UMD
113
+ ```
114
+
115
+ Webpack 5 supports the `exports` field. The entry point can be determined by the `exports` field defined in the package. Furthermore, the necessary chart can be loaded through a sub-path, as presented below.
116
+
117
+ ```js
118
+ const Chart = require('@techie_doubts/tui.chart.2026'); // ./dist/td-chart.js
119
+
120
+ import { BarChart } from '@techie_doubts/tui.chart.2026'; // ./dist/esm/index.js
121
+
122
+ import BarChart from '@techie_doubts/tui.chart.2026/bar';
123
+ import ColumnChart from '@techie_doubts/tui.chart.2026/column';
124
+ import LineChart from '@techie_doubts/tui.chart.2026/line';
125
+ import AreaChart from '@techie_doubts/tui.chart.2026/area';
126
+ import LineAreaChart from '@techie_doubts/tui.chart.2026/lineArea';
127
+ import ColumnLineChart from '@techie_doubts/tui.chart.2026/columnLine';
128
+ import BulletChart from '@techie_doubts/tui.chart.2026/bullet';
129
+ import BoxPlotChart from '@techie_doubts/tui.chart.2026/boxPlot';
130
+ import TreemapChart from '@techie_doubts/tui.chart.2026/treemap';
131
+ import HeatmapChart from '@techie_doubts/tui.chart.2026/heatmap';
132
+ import ScatterChart from '@techie_doubts/tui.chart.2026/scatter';
133
+ import LineScatterChart from '@techie_doubts/tui.chart.2026/lineScatter';
134
+ import BubbleChart from '@techie_doubts/tui.chart.2026/bubble';
135
+ import PieChart from '@techie_doubts/tui.chart.2026/pie';
136
+ import NestedPieChart from '@techie_doubts/tui.chart.2026/nestedPie';
137
+ import RadarChart from '@techie_doubts/tui.chart.2026/radar';
138
+ ```
139
+
140
+ Constructor function needs three parameters: el, data, options
141
+
142
+ - el: Wrapper HTML element that will contain the chart as a child.
143
+ - data: Numerical data the chart will be based on.
144
+ - options: Functional options including legend, alignment, and tooltip formatter.
145
+
146
+ ```js
147
+ const el = document.getElementById('chart');
148
+ const data = {
149
+ categories: [
150
+ //...
151
+ ],
152
+ series: [
153
+ // ...
154
+ ],
155
+ };
156
+ const options = {
157
+ chart: { width: 700, height: 400 },
158
+ };
159
+
160
+ chart.barChart({ el, data, options });
161
+ // or
162
+ new BarChart({ el, data, options });
163
+ ```
164
+
165
+ Refer to [details](https://nhn.github.io/tui.chart/latest) for additional information.
@@ -0,0 +1,32 @@
1
+ import Chart from "./charts/chart";
2
+ import { Options } from "../types/store/store";
3
+ declare type Anim = {
4
+ chart: Chart<Options>;
5
+ duration: number;
6
+ requester: Chart<Options>;
7
+ onCompleted: Function;
8
+ onFrame: (delta: any) => void;
9
+ start: number | null;
10
+ completed: boolean;
11
+ current: number | null;
12
+ };
13
+ export default class Animator {
14
+ anims: Anim[];
15
+ state: string;
16
+ requestId: number | null;
17
+ firstRendering: boolean;
18
+ add({ chart, duration, requester, onCompleted, onFrame, }: {
19
+ chart: Chart<Options>;
20
+ duration: number;
21
+ requester: Chart<Options>;
22
+ onCompleted: Function;
23
+ onFrame?: (delta: number) => void;
24
+ }): void;
25
+ reset(): void;
26
+ start(): void;
27
+ runFrame(): void;
28
+ runAnims(timestamp: number): void;
29
+ next(timestamp: number): void;
30
+ cancelAnimFrame(): void;
31
+ }
32
+ export {};
@@ -0,0 +1,102 @@
1
+ import { isNull } from "./helpers/utils";
2
+ export default class Animator {
3
+ constructor() {
4
+ this.anims = [];
5
+ this.state = 'IDLE';
6
+ this.requestId = null;
7
+ this.firstRendering = true;
8
+ }
9
+ add({ chart, duration, requester, onCompleted = () => { }, onFrame = (delta) => {
10
+ if (!this.firstRendering) {
11
+ chart.update(delta);
12
+ }
13
+ if (this.firstRendering) {
14
+ chart.initUpdate(delta);
15
+ if (delta === 1) {
16
+ this.firstRendering = false;
17
+ }
18
+ }
19
+ }, }) {
20
+ if (this.anims.length) {
21
+ this.reset();
22
+ }
23
+ if (this.state === 'IDLE') {
24
+ this.anims.push({
25
+ chart,
26
+ requester,
27
+ duration,
28
+ onFrame,
29
+ onCompleted,
30
+ start: null,
31
+ current: null,
32
+ completed: false,
33
+ });
34
+ this.start();
35
+ }
36
+ }
37
+ reset() {
38
+ this.anims.forEach((anim) => {
39
+ anim.current = 1;
40
+ anim.onFrame(anim.current);
41
+ anim.completed = true;
42
+ });
43
+ this.anims = [];
44
+ this.cancelAnimFrame();
45
+ this.state = 'IDLE';
46
+ this.requestId = null;
47
+ }
48
+ start() {
49
+ if (this.anims.length) {
50
+ this.state = 'RUNNING';
51
+ this.runFrame();
52
+ }
53
+ }
54
+ runFrame() {
55
+ this.requestId = window.requestAnimationFrame((timestamp) => {
56
+ this.runAnims(timestamp);
57
+ });
58
+ }
59
+ runAnims(timestamp) {
60
+ this.next(timestamp);
61
+ if (this.anims.length) {
62
+ this.runFrame();
63
+ }
64
+ else {
65
+ this.state = 'IDLE';
66
+ this.requestId = null;
67
+ }
68
+ }
69
+ next(timestamp) {
70
+ this.anims.forEach((anim) => {
71
+ if (isNull(anim.start)) {
72
+ anim.start = timestamp;
73
+ }
74
+ Object.defineProperty(anim.chart, '___animId___', {
75
+ value: timestamp,
76
+ enumerable: false,
77
+ writable: false,
78
+ configurable: true,
79
+ });
80
+ anim.current = anim.duration ? Math.min((timestamp - anim.start) / anim.duration, 1) : 1;
81
+ anim.onFrame(anim.current);
82
+ anim.completed = anim.current === 1;
83
+ });
84
+ this.anims.forEach((anim) => {
85
+ if (anim.chart.___animId___ === timestamp) {
86
+ anim.chart.draw();
87
+ delete anim.chart.___animId___;
88
+ }
89
+ if (anim.completed) {
90
+ this.cancelAnimFrame();
91
+ anim.onCompleted();
92
+ anim.chart.eventBus.emit('animationCompleted', anim.requester);
93
+ }
94
+ });
95
+ this.anims = this.anims.filter((anim) => !anim.completed);
96
+ }
97
+ cancelAnimFrame() {
98
+ if (this.requestId) {
99
+ window.cancelAnimationFrame(this.requestId);
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,3 @@
1
+ import { TickModel } from "../../types/components/axis";
2
+ export declare const TICK_SIZE = 5;
3
+ export declare function tick(ctx: CanvasRenderingContext2D, tickModel: TickModel): void;
@@ -0,0 +1,21 @@
1
+ import { line } from "./basic";
2
+ export const TICK_SIZE = 5;
3
+ export function tick(ctx, tickModel) {
4
+ const { x, y, isYAxis, tickSize = TICK_SIZE, strokeStyle, lineWidth } = tickModel;
5
+ const lineModel = {
6
+ type: 'line',
7
+ x,
8
+ y,
9
+ x2: x,
10
+ y2: y,
11
+ strokeStyle,
12
+ lineWidth,
13
+ };
14
+ if (isYAxis) {
15
+ lineModel.x2 += tickSize;
16
+ }
17
+ else {
18
+ lineModel.y2 += tickSize;
19
+ }
20
+ line(ctx, lineModel);
21
+ }
@@ -0,0 +1,9 @@
1
+ import { ClipRectAreaModel, PathRectModel, CircleModel, RectModel } from "../../types/components/series";
2
+ import { LineModel } from "../../types/components/axis";
3
+ import { ArcModel } from "../../types/components/radialAxis";
4
+ export declare function clipRectArea(ctx: CanvasRenderingContext2D, clipRectAreaModel: ClipRectAreaModel): void;
5
+ export declare function pathRect(ctx: CanvasRenderingContext2D, pathRectModel: PathRectModel): void;
6
+ export declare function circle(ctx: CanvasRenderingContext2D, circleModel: CircleModel): void;
7
+ export declare function line(ctx: CanvasRenderingContext2D, lineModel: LineModel): void;
8
+ export declare function rect(ctx: CanvasRenderingContext2D, model: RectModel): void;
9
+ export declare function arc(ctx: CanvasRenderingContext2D, arcModel: ArcModel): void;
@@ -0,0 +1,95 @@
1
+ import { makeStyleObj, setLineDash, fillStyle, strokeWithOptions } from "../helpers/style";
2
+ import { calculateDegreeToRadian } from "../helpers/sector";
3
+ const circleStyle = {
4
+ default: {
5
+ strokeStyle: '#ffffff',
6
+ lineWidth: 2,
7
+ },
8
+ plot: {
9
+ lineWidth: 1,
10
+ strokeStyle: 'rgba(0, 0, 0, 0.05)',
11
+ },
12
+ };
13
+ const rectStyle = {
14
+ shadow: {
15
+ shadowColor: 'rgba(0, 0, 0, 0.3)',
16
+ shadowOffsetX: 2,
17
+ shadowOffsetY: 2,
18
+ shadowBlur: 6,
19
+ },
20
+ };
21
+ export function clipRectArea(ctx, clipRectAreaModel) {
22
+ const { x, y, width, height } = clipRectAreaModel;
23
+ ctx.beginPath();
24
+ ctx.rect(x, y, width, height);
25
+ ctx.clip();
26
+ }
27
+ export function pathRect(ctx, pathRectModel) {
28
+ const { x, y, width, height, radius = 0, stroke: strokeStyle = 'black', fill = '', lineWidth = 1, } = pathRectModel;
29
+ ctx.beginPath();
30
+ ctx.moveTo(x + radius, y);
31
+ ctx.lineTo(x + width - radius, y);
32
+ ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
33
+ ctx.lineTo(x + width, y + height - radius);
34
+ ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
35
+ ctx.lineTo(x + radius, y + height);
36
+ ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
37
+ ctx.lineTo(x, y + radius);
38
+ ctx.quadraticCurveTo(x, y, x + radius, y);
39
+ ctx.closePath();
40
+ if (fill) {
41
+ fillStyle(ctx, fill);
42
+ }
43
+ strokeWithOptions(ctx, { lineWidth, strokeStyle });
44
+ }
45
+ export function circle(ctx, circleModel) {
46
+ const { x, y, style, radius, color, angle = { start: 0, end: Math.PI * 2 }, borderWidth: lineWidth, borderColor: strokeStyle, } = circleModel;
47
+ ctx.beginPath();
48
+ if (style) {
49
+ const styleObj = makeStyleObj(style, circleStyle);
50
+ Object.keys(styleObj).forEach((key) => {
51
+ ctx[key] = styleObj[key];
52
+ });
53
+ }
54
+ ctx.arc(x, y, radius, angle.start, angle.end, true);
55
+ strokeWithOptions(ctx, { lineWidth, strokeStyle });
56
+ fillStyle(ctx, color);
57
+ ctx.closePath();
58
+ }
59
+ export function line(ctx, lineModel) {
60
+ const { x, y, x2, y2, strokeStyle, lineWidth, dashSegments } = lineModel;
61
+ ctx.beginPath();
62
+ if (dashSegments) {
63
+ setLineDash(ctx, dashSegments);
64
+ }
65
+ ctx.moveTo(x, y);
66
+ ctx.lineTo(x2, y2);
67
+ strokeWithOptions(ctx, { strokeStyle, lineWidth });
68
+ ctx.closePath();
69
+ }
70
+ export function rect(ctx, model) {
71
+ const { x, y, width, height, style, thickness = 0, color, borderColor = '#ffffff' } = model;
72
+ ctx.beginPath();
73
+ if (style) {
74
+ const styleObj = makeStyleObj(style, rectStyle);
75
+ Object.keys(styleObj).forEach((key) => {
76
+ ctx[key] = styleObj[key];
77
+ });
78
+ }
79
+ if (thickness) {
80
+ ctx.fillStyle = borderColor;
81
+ ctx.fillRect(x - thickness, y - thickness, width + thickness * 2, height + thickness * 2);
82
+ ctx.shadowColor = 'rgba(0, 0, 0, 0)'; // reset shadow color
83
+ }
84
+ ctx.rect(x, y, width, height);
85
+ fillStyle(ctx, color);
86
+ }
87
+ export function arc(ctx, arcModel) {
88
+ const { x, y, angle: { start, end }, borderWidth: lineWidth, borderColor: strokeStyle, drawingStartAngle, radius, clockwise = true, } = arcModel;
89
+ ctx.beginPath();
90
+ const startRadian = calculateDegreeToRadian(start, drawingStartAngle);
91
+ const endRadian = calculateDegreeToRadian(end, drawingStartAngle);
92
+ ctx.arc(x, y, radius, startRadian, endRadian, !clockwise);
93
+ strokeWithOptions(ctx, { lineWidth, strokeStyle });
94
+ ctx.closePath();
95
+ }
@@ -0,0 +1,2 @@
1
+ import { BoxPlotModel } from "../../types/components/series";
2
+ export declare function boxPlot(ctx: CanvasRenderingContext2D, model: BoxPlotModel): void;
@@ -0,0 +1,22 @@
1
+ import { line, rect } from "./basic";
2
+ export function boxPlot(ctx, model) {
3
+ const { rect: rectModel, upperWhisker, lowerWhisker, median, minimum, maximum } = model;
4
+ if (minimum) {
5
+ line(ctx, Object.assign({ type: 'line' }, minimum));
6
+ }
7
+ if (lowerWhisker) {
8
+ line(ctx, Object.assign({ type: 'line' }, lowerWhisker));
9
+ }
10
+ if (rectModel) {
11
+ rect(ctx, Object.assign({ type: 'rect' }, rectModel));
12
+ }
13
+ if (upperWhisker) {
14
+ line(ctx, Object.assign({ type: 'line' }, upperWhisker));
15
+ }
16
+ if (maximum) {
17
+ line(ctx, Object.assign({ type: 'line' }, maximum));
18
+ }
19
+ if (median) {
20
+ line(ctx, Object.assign({ type: 'line' }, median));
21
+ }
22
+ }
@@ -0,0 +1,2 @@
1
+ import { CircleLegendModel } from "../../types/components/circleLegend";
2
+ export declare function circleLegend(ctx: CanvasRenderingContext2D, circleLegendModel: CircleLegendModel): void;
@@ -0,0 +1,26 @@
1
+ import { circle } from "./basic";
2
+ import { label } from "./label";
3
+ export function circleLegend(ctx, circleLegendModel) {
4
+ const { x, y, radius, value } = circleLegendModel;
5
+ const ratioArray = [1, 0.5, 0.25];
6
+ ratioArray.forEach((ratio, idx) => {
7
+ const circleRadius = ratio * radius;
8
+ const circleY = y + (idx ? (1 - ratio) * radius : 0);
9
+ circle(ctx, {
10
+ type: 'circle',
11
+ x,
12
+ y: circleY,
13
+ radius: circleRadius,
14
+ color: '#fff',
15
+ seriesIndex: 0,
16
+ style: ['default', { strokeStyle: '#888', lineWidth: 1 }],
17
+ });
18
+ label(ctx, {
19
+ type: 'label',
20
+ x,
21
+ y: circleY - circleRadius,
22
+ text: String(value * ratio),
23
+ style: ['default', { textAlign: 'center', textBaseline: 'bottom' }],
24
+ });
25
+ });
26
+ }
@@ -0,0 +1,6 @@
1
+ import { DataLabelModel } from "../../types/components/dataLabels";
2
+ import { Point } from "../../types/options";
3
+ import { ArrowTheme, ArrowDirection } from "../../types/theme";
4
+ export declare function dataLabel(ctx: CanvasRenderingContext2D, model: DataLabelModel): void;
5
+ export declare function drawBubbleLabel(ctx: CanvasRenderingContext2D, model: DataLabelModel): void;
6
+ export declare function getBubbleArrowPoints(direction: ArrowDirection, { x, y }: Point, arrowPointTheme: ArrowTheme): Point[];
@@ -0,0 +1,176 @@
1
+ import { label, bubbleLabel } from "./label";
2
+ import { getTextHeight, getTextWidth } from "../helpers/calculator";
3
+ import { line } from "./basic";
4
+ import { getFont } from "../helpers/style";
5
+ import { pick, includes } from "../helpers/utils";
6
+ export function dataLabel(ctx, model) {
7
+ var _a;
8
+ const { x, y, text, textAlign, textBaseline, opacity, callout, theme, radian } = model;
9
+ const { color, textBubble } = theme;
10
+ const font = getFont(theme);
11
+ const textStyle = { textAlign, textBaseline, font, fillStyle: color };
12
+ const textStrokeStyle = getTextStrokeStyle(theme);
13
+ if (callout) {
14
+ const { theme: { lineWidth, lineColor }, } = callout;
15
+ line(ctx, Object.assign(Object.assign({ type: 'line' }, pick(callout, 'x', 'y', 'x2', 'y2')), { strokeStyle: lineColor, lineWidth }));
16
+ }
17
+ if ((_a = textBubble) === null || _a === void 0 ? void 0 : _a.visible) {
18
+ drawBubbleLabel(ctx, model);
19
+ return;
20
+ }
21
+ label(ctx, {
22
+ type: 'label',
23
+ x,
24
+ y,
25
+ text,
26
+ style: [textStyle],
27
+ stroke: [textStrokeStyle],
28
+ opacity,
29
+ radian,
30
+ });
31
+ }
32
+ export function drawBubbleLabel(ctx, model) {
33
+ const { text, theme, radian = 0 } = model;
34
+ const { color, textStrokeColor } = theme;
35
+ const font = getFont(theme);
36
+ const bubbleRect = getBubbleRect(model);
37
+ const { x, y, width, height } = bubbleRect;
38
+ bubbleLabel(ctx, {
39
+ type: 'bubbleLabel',
40
+ radian,
41
+ rotationPosition: { x: model.x, y: model.y },
42
+ bubble: bubbleRect,
43
+ label: {
44
+ x: x + width / 2,
45
+ y: y + height / 2,
46
+ text,
47
+ style: [{ font, fillStyle: color, textAlign: 'center', textBaseline: 'middle' }],
48
+ strokeStyle: textStrokeColor,
49
+ },
50
+ });
51
+ }
52
+ export function getBubbleArrowPoints(direction, { x, y }, arrowPointTheme) {
53
+ const width = arrowPointTheme.width;
54
+ const height = arrowPointTheme.height;
55
+ let points = [];
56
+ if (direction === 'top') {
57
+ points = [
58
+ { x: x - width / 2, y: y + height },
59
+ { x, y },
60
+ { x: x + width / 2, y: y + height },
61
+ ];
62
+ }
63
+ else if (direction === 'bottom') {
64
+ points = [
65
+ { x: x + width / 2, y: y - height },
66
+ { x, y },
67
+ { x: x - width / 2, y: y - height },
68
+ ];
69
+ }
70
+ else if (direction === 'right') {
71
+ points = [
72
+ { x: x - height, y: y - width / 2 },
73
+ { x, y },
74
+ { x: x - height, y: y + width / 2 },
75
+ ];
76
+ }
77
+ else if (direction === 'left') {
78
+ points = [
79
+ { x: x + height, y: y + width / 2 },
80
+ { x, y },
81
+ { x: x + height, y: y - width / 2 },
82
+ ];
83
+ }
84
+ return points;
85
+ }
86
+ function getBubbleRect(model) {
87
+ const { text, theme, textAlign, textBaseline } = model;
88
+ const font = getFont(theme);
89
+ const { arrow, paddingX, paddingY, borderRadius, borderColor, borderWidth, backgroundColor, shadowBlur, shadowOffsetX, shadowOffsetY, shadowColor, } = theme.textBubble;
90
+ const labelWidth = getTextWidth(text, font);
91
+ const width = labelWidth + paddingX * 2;
92
+ const height = getTextHeight(text, font) + paddingY * 2;
93
+ let { x, y } = model;
94
+ if (textAlign === 'center') {
95
+ x -= width / 2;
96
+ }
97
+ else if (includes(['right', 'end'], textAlign)) {
98
+ x -= width;
99
+ }
100
+ if (textBaseline === 'middle') {
101
+ y -= height / 2;
102
+ }
103
+ else if (textBaseline === 'bottom') {
104
+ y -= height;
105
+ }
106
+ const rect = { x, y, width, height };
107
+ return Object.assign(Object.assign(Object.assign({}, rect), { radius: borderRadius, lineWidth: borderWidth, fill: backgroundColor, strokeStyle: borderColor, style: [
108
+ {
109
+ shadowBlur,
110
+ shadowOffsetX,
111
+ shadowOffsetY,
112
+ shadowColor,
113
+ },
114
+ ] }), getArrowInfo(rect, textAlign, textBaseline, arrow));
115
+ }
116
+ function getArrowInfo(rect, textAlign, textBaseline, theme) {
117
+ var _a, _b;
118
+ if (!((_a = theme) === null || _a === void 0 ? void 0 : _a.visible)) {
119
+ return null;
120
+ }
121
+ const arrowHeight = theme.height;
122
+ const { width, height } = rect;
123
+ const direction = (_b = theme.direction, (_b !== null && _b !== void 0 ? _b : getArrowDirection(textAlign, textBaseline)));
124
+ let { x: boxX, y: boxY } = rect;
125
+ let { x: pointX, y: pointY } = rect;
126
+ if (direction === 'top') {
127
+ boxY += arrowHeight;
128
+ }
129
+ else if (direction === 'bottom') {
130
+ boxY -= arrowHeight;
131
+ pointY += height;
132
+ }
133
+ else if (direction === 'right') {
134
+ boxX -= arrowHeight;
135
+ pointX += width;
136
+ }
137
+ else if (direction === 'left') {
138
+ boxX += arrowHeight;
139
+ }
140
+ if (textAlign === 'center') {
141
+ pointX = rect.x + width / 2;
142
+ }
143
+ else if (textBaseline === 'middle') {
144
+ pointY = rect.y + height / 2;
145
+ }
146
+ return {
147
+ direction,
148
+ points: getBubbleArrowPoints(direction, { x: pointX, y: pointY }, theme),
149
+ x: boxX,
150
+ y: boxY,
151
+ };
152
+ }
153
+ function getArrowDirection(textAlign, textBaseline) {
154
+ let direction = 'top';
155
+ if (textAlign === 'center' && textBaseline === 'top') {
156
+ direction = 'top';
157
+ }
158
+ else if (textAlign === 'center' && textBaseline === 'bottom') {
159
+ direction = 'bottom';
160
+ }
161
+ else if (textBaseline === 'middle' && textAlign === 'right') {
162
+ direction = 'right';
163
+ }
164
+ else if (textBaseline === 'middle' && textAlign === 'left') {
165
+ direction = 'left';
166
+ }
167
+ return direction;
168
+ }
169
+ function getTextStrokeStyle(theme) {
170
+ const { textStrokeColor } = theme;
171
+ const textStrokeStyle = pick(theme, 'lineWidth', 'shadowColor', 'shadowBlur');
172
+ if (textStrokeColor) {
173
+ textStrokeStyle.strokeStyle = textStrokeColor;
174
+ }
175
+ return textStrokeStyle;
176
+ }
@@ -0,0 +1,2 @@
1
+ import { ExportMenuButtonModel } from "../../types/components/exportMenu";
2
+ export declare function exportMenuButton(ctx: CanvasRenderingContext2D, exportMenuButtonModel: ExportMenuButtonModel): void;