@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,125 @@
1
+ import { circle, pathRect } from "./basic";
2
+ import { polygon } from "./polygon";
3
+ import { fillStyle } from "../helpers/style";
4
+ function regularPolygon(ctx, model) {
5
+ const { numberOfSides, size, x, y, borderColor, borderWidth, fillColor } = model;
6
+ const s = size / 2;
7
+ const shift = numberOfSides % 2 ? (Math.PI / 180.0) * (10 + (numberOfSides - 3) / 2) * numberOfSides : 0;
8
+ const step = (2 * Math.PI) / numberOfSides;
9
+ ctx.beginPath();
10
+ for (let i = 0; i <= numberOfSides; i += 1) {
11
+ const curStep = i * step + shift;
12
+ ctx.lineTo(x + s * Math.cos(curStep), y + s * Math.sin(curStep));
13
+ }
14
+ ctx.strokeStyle = borderColor;
15
+ ctx.lineWidth = borderWidth;
16
+ fillStyle(ctx, fillColor);
17
+ ctx.stroke();
18
+ ctx.closePath();
19
+ }
20
+ // https://programmingthomas.wordpress.com/2012/05/16/drawing-stars-with-html5-canvas/
21
+ function star(ctx, model) {
22
+ const { x, y, borderColor, borderWidth, size, fillColor } = model;
23
+ ctx.lineWidth = borderWidth;
24
+ ctx.strokeStyle = borderColor;
25
+ ctx.fillStyle = fillColor;
26
+ ctx.save();
27
+ ctx.beginPath();
28
+ ctx.translate(x, y);
29
+ ctx.moveTo(0, -size);
30
+ for (let i = 0; i < 5; i += 1) {
31
+ ctx.rotate(Math.PI / 5);
32
+ ctx.lineTo(0, -size / 2);
33
+ ctx.rotate(Math.PI / 5);
34
+ ctx.lineTo(0, -size);
35
+ }
36
+ ctx.fill();
37
+ ctx.stroke();
38
+ ctx.restore();
39
+ ctx.closePath();
40
+ }
41
+ function cross(ctx, model) {
42
+ const { x, y, borderColor, borderWidth, size, fillColor } = model;
43
+ const quarter = size / 4;
44
+ const half = size / 2;
45
+ const xPointsOffset = [
46
+ -half,
47
+ -half,
48
+ -quarter,
49
+ -quarter,
50
+ quarter,
51
+ quarter,
52
+ half,
53
+ half,
54
+ quarter,
55
+ quarter,
56
+ -quarter,
57
+ -quarter,
58
+ ];
59
+ const yPointsOffset = [];
60
+ for (let idx = 0, len = xPointsOffset.length; idx < len; idx += 1) {
61
+ const startIdx = 9;
62
+ yPointsOffset.push(xPointsOffset[(startIdx + idx) % len]);
63
+ }
64
+ polygon(ctx, {
65
+ type: 'polygon',
66
+ lineWidth: borderWidth,
67
+ color: borderColor,
68
+ points: xPointsOffset.map((val, idx) => ({ x: x + val, y: y + yPointsOffset[idx] })),
69
+ fillColor,
70
+ });
71
+ }
72
+ function getNumberOfSidesByIconType(iconType) {
73
+ switch (iconType) {
74
+ case 'triangle':
75
+ return 3;
76
+ case 'diamond':
77
+ return 4;
78
+ case 'pentagon':
79
+ return 5;
80
+ case 'hexagon':
81
+ return 6;
82
+ }
83
+ }
84
+ export function scatterSeries(ctx, model) {
85
+ const { x, y, borderColor, borderWidth, fillColor, iconType, size } = model;
86
+ const commonModel = { x, y, fillColor, borderColor, borderWidth, size };
87
+ ctx.beginPath();
88
+ switch (iconType) {
89
+ case 'rect':
90
+ pathRect(ctx, {
91
+ type: 'pathRect',
92
+ x: x - size / 2,
93
+ y: y - size / 2,
94
+ width: size,
95
+ height: size,
96
+ stroke: borderColor,
97
+ lineWidth: borderWidth,
98
+ fill: fillColor,
99
+ });
100
+ break;
101
+ case 'triangle':
102
+ case 'pentagon':
103
+ case 'diamond':
104
+ case 'hexagon':
105
+ regularPolygon(ctx, Object.assign({ type: 'regularPolygon', numberOfSides: getNumberOfSidesByIconType(iconType) }, commonModel));
106
+ break;
107
+ case 'star':
108
+ star(ctx, Object.assign(Object.assign({ type: 'star' }, commonModel), { size: size / 2 }));
109
+ break;
110
+ case 'cross':
111
+ cross(ctx, Object.assign({ type: 'cross' }, commonModel));
112
+ break;
113
+ default:
114
+ circle(ctx, {
115
+ type: 'circle',
116
+ x,
117
+ y,
118
+ radius: size / 2,
119
+ style: [{ strokeStyle: borderColor, lineWidth: borderWidth }],
120
+ color: fillColor,
121
+ });
122
+ }
123
+ ctx.stroke();
124
+ ctx.closePath();
125
+ }
@@ -0,0 +1,2 @@
1
+ import { SectorModel } from "../../types/components/series";
2
+ export declare function sector(ctx: CanvasRenderingContext2D, sectorModel: SectorModel): void;
@@ -0,0 +1,54 @@
1
+ import { makeStyleObj, fillStyle } from "../helpers/style";
2
+ import { calculateDegreeToRadian, getRadialPosition, DEGREE_360 } from "../helpers/sector";
3
+ export function sector(ctx, sectorModel) {
4
+ const { degree: { start, end }, color, style, lineWidth, } = sectorModel;
5
+ if (start === end) {
6
+ return;
7
+ }
8
+ const isCircle = Math.abs(start - end) === DEGREE_360;
9
+ ctx.beginPath();
10
+ if (style) {
11
+ const styleObj = makeStyleObj(style, {});
12
+ Object.keys(styleObj).forEach((key) => {
13
+ ctx[key] = styleObj[key];
14
+ });
15
+ }
16
+ if (isCircle) {
17
+ drawCircle(ctx, sectorModel);
18
+ }
19
+ else {
20
+ drawSector(ctx, sectorModel);
21
+ }
22
+ ctx.closePath();
23
+ fillStyle(ctx, color);
24
+ if (lineWidth) {
25
+ ctx.lineWidth = lineWidth;
26
+ ctx.stroke();
27
+ }
28
+ }
29
+ function drawSector(ctx, sectorModel) {
30
+ const { x, y, radius: { inner, outer }, degree: { start, end }, clockwise, drawingStartAngle, } = sectorModel;
31
+ if (inner < 0 || outer < 0) {
32
+ return;
33
+ }
34
+ const startRadian = calculateDegreeToRadian(start, drawingStartAngle);
35
+ const endRadian = calculateDegreeToRadian(end, drawingStartAngle);
36
+ if (!inner) {
37
+ ctx.moveTo(x, y);
38
+ }
39
+ ctx.arc(x, y, outer, startRadian, endRadian, !clockwise);
40
+ if (inner) {
41
+ ctx.arc(x, y, inner, endRadian, startRadian, clockwise);
42
+ }
43
+ }
44
+ function drawCircle(ctx, sectorModel) {
45
+ const { x, y, radius: { inner, outer }, clockwise, } = sectorModel;
46
+ ctx.arc(x, y, outer, 0, 2 * Math.PI, !clockwise);
47
+ if (inner) {
48
+ const { x: innerStartPosX, y: innerStartPosY } = getRadialPosition(x, y, inner, 0);
49
+ const startX = inner ? innerStartPosX : x;
50
+ const startY = inner ? innerStartPosY : y;
51
+ ctx.moveTo(startX, startY);
52
+ ctx.arc(x, y, inner, 0, 2 * Math.PI, clockwise);
53
+ }
54
+ }
@@ -0,0 +1,14 @@
1
+ import { SpectrumLegendModel, SpectrumLegendTooltipModel } from "../../types/components/spectrumLegend";
2
+ export declare const SPECTRUM_LEGEND_LABEL_HEIGHT = 12;
3
+ export declare const spectrumLegendBar: {
4
+ HEIGHT: number;
5
+ PADDING: number;
6
+ };
7
+ export declare const spectrumLegendTooltip: {
8
+ HEIGHT: number;
9
+ POINT_WIDTH: number;
10
+ POINT_HEIGHT: number;
11
+ PADDING: number;
12
+ };
13
+ export declare function spectrumLegend(ctx: CanvasRenderingContext2D, model: SpectrumLegendModel): void;
14
+ export declare function spectrumTooltip(ctx: CanvasRenderingContext2D, model: SpectrumLegendTooltipModel): void;
@@ -0,0 +1,199 @@
1
+ import { padding } from "../store/layout";
2
+ import { getTextWidth, getMaxLengthLabelWidth } from "../helpers/calculator";
3
+ import { label, bubbleLabel } from "./label";
4
+ import { getBubbleArrowPoints } from "./dataLabel";
5
+ export const SPECTRUM_LEGEND_LABEL_HEIGHT = 12;
6
+ export const spectrumLegendBar = {
7
+ HEIGHT: 6,
8
+ PADDING: 5,
9
+ };
10
+ export const spectrumLegendTooltip = {
11
+ HEIGHT: 28,
12
+ POINT_WIDTH: 8,
13
+ POINT_HEIGHT: 6,
14
+ PADDING: 6,
15
+ };
16
+ function getBarStartPoint(model) {
17
+ const { align, x: modelX, y: modelY, labels, width } = model;
18
+ const { PADDING } = spectrumLegendBar;
19
+ let x, y;
20
+ if (align === 'top') {
21
+ x = modelX;
22
+ y = modelY + SPECTRUM_LEGEND_LABEL_HEIGHT + PADDING;
23
+ }
24
+ else if (align === 'bottom') {
25
+ x = modelX;
26
+ y = modelY + spectrumLegendTooltip.HEIGHT;
27
+ }
28
+ else if (align === 'left') {
29
+ x = modelX + getMaxLengthLabelWidth(labels) + PADDING;
30
+ y = modelY + SPECTRUM_LEGEND_LABEL_HEIGHT / 2;
31
+ }
32
+ else {
33
+ x =
34
+ modelX +
35
+ width -
36
+ (getMaxLengthLabelWidth(labels) + padding.X + PADDING * 2 + spectrumLegendBar.HEIGHT);
37
+ y = modelY + SPECTRUM_LEGEND_LABEL_HEIGHT / 2;
38
+ }
39
+ return { x, y };
40
+ }
41
+ function getLabelsStartPoint(model) {
42
+ const { align, x: modelX, y: modelY, labels, width } = model;
43
+ let x, y;
44
+ if (align === 'top') {
45
+ x = modelX;
46
+ y = modelY;
47
+ }
48
+ else if (align === 'bottom') {
49
+ x = modelX;
50
+ y =
51
+ modelY + spectrumLegendTooltip.HEIGHT + spectrumLegendBar.HEIGHT + spectrumLegendBar.PADDING;
52
+ }
53
+ else if (align === 'left') {
54
+ x = modelX + getMaxLengthLabelWidth(labels);
55
+ y = modelY;
56
+ }
57
+ else {
58
+ x = modelX + width - getMaxLengthLabelWidth(labels) - padding.X;
59
+ y = modelY;
60
+ }
61
+ return { x, y };
62
+ }
63
+ function getBarSize(width, height, verticalAlign) {
64
+ const { HEIGHT } = spectrumLegendBar;
65
+ const barWidth = verticalAlign ? width : HEIGHT;
66
+ const barHeight = verticalAlign ? HEIGHT : height - SPECTRUM_LEGEND_LABEL_HEIGHT;
67
+ return { barWidth, barHeight };
68
+ }
69
+ function drawLabels(ctx, model) {
70
+ const { labels, align, x, y, width, height, verticalAlign } = model;
71
+ const { barWidth, barHeight } = getBarSize(width, height, verticalAlign);
72
+ const labelSize = labels.length - 1;
73
+ const textBaseStyleMap = {
74
+ left: {
75
+ textAlign: 'right',
76
+ textBaseline: 'top',
77
+ },
78
+ right: {
79
+ textAlign: 'left',
80
+ textBaseline: 'top',
81
+ },
82
+ top: {
83
+ textAlign: 'center',
84
+ textBaseline: 'top',
85
+ },
86
+ bottom: {
87
+ textAlign: 'center',
88
+ textBaseline: 'top',
89
+ },
90
+ };
91
+ labels.forEach((text, idx) => {
92
+ const startX = verticalAlign ? x + (barWidth / labelSize) * idx : x;
93
+ const startY = verticalAlign ? y : y + (barHeight / labelSize) * idx;
94
+ label(ctx, {
95
+ type: 'label',
96
+ x: startX,
97
+ y: startY,
98
+ text,
99
+ style: ['default', textBaseStyleMap[align]],
100
+ });
101
+ });
102
+ }
103
+ function drawBar(ctx, model) {
104
+ const { width, height, startColor, endColor, x, y, verticalAlign } = model;
105
+ const { barWidth, barHeight } = getBarSize(width, height, verticalAlign);
106
+ const gradient = verticalAlign
107
+ ? ctx.createLinearGradient(x, y, x + barWidth, y)
108
+ : ctx.createLinearGradient(x, y, x, y + barHeight);
109
+ gradient.addColorStop(0, startColor);
110
+ gradient.addColorStop(1, endColor);
111
+ ctx.fillStyle = gradient;
112
+ ctx.fillRect(x, y, barWidth, barHeight);
113
+ }
114
+ function getTooltipArrowPoint(model) {
115
+ const { align, colorRatio, width, height, x, y, labels, verticalAlign } = model;
116
+ const { barWidth, barHeight } = getBarSize(width, height, verticalAlign);
117
+ const { PADDING, HEIGHT } = spectrumLegendBar;
118
+ if (align === 'top') {
119
+ return {
120
+ x: x + barWidth * colorRatio,
121
+ y: y + SPECTRUM_LEGEND_LABEL_HEIGHT + HEIGHT + PADDING * 2,
122
+ };
123
+ }
124
+ if (align === 'bottom') {
125
+ return {
126
+ x: x + barWidth * colorRatio,
127
+ y: y + SPECTRUM_LEGEND_LABEL_HEIGHT + PADDING * 2,
128
+ };
129
+ }
130
+ if (align === 'left') {
131
+ return {
132
+ x: x + getMaxLengthLabelWidth(labels) + HEIGHT + PADDING * 2,
133
+ y: y + barHeight * colorRatio + PADDING,
134
+ };
135
+ }
136
+ if (align === 'right') {
137
+ return {
138
+ x: x + width - (getMaxLengthLabelWidth(labels) + padding.X + PADDING * 3 + HEIGHT),
139
+ y: y + barHeight * colorRatio + PADDING,
140
+ };
141
+ }
142
+ }
143
+ export function spectrumLegend(ctx, model) {
144
+ const labelsStartPoint = getLabelsStartPoint(model);
145
+ const barStartPoint = getBarStartPoint(model);
146
+ drawLabels(ctx, Object.assign(Object.assign({}, model), labelsStartPoint));
147
+ drawBar(ctx, Object.assign(Object.assign({}, model), barStartPoint));
148
+ }
149
+ export function spectrumTooltip(ctx, model) {
150
+ const { x, y } = getTooltipArrowPoint(model);
151
+ const { PADDING, POINT_HEIGHT, POINT_WIDTH } = spectrumLegendTooltip;
152
+ const { align, text, color } = model;
153
+ const labelWidth = getTextWidth(text);
154
+ const width = labelWidth + PADDING * 2;
155
+ const height = SPECTRUM_LEGEND_LABEL_HEIGHT + PADDING * 2;
156
+ const direction = align;
157
+ let boxStartX = x;
158
+ let boxStartY = y;
159
+ if (align === 'top') {
160
+ boxStartY += POINT_HEIGHT;
161
+ }
162
+ else if (align === 'right') {
163
+ boxStartX -= width / 2 + POINT_HEIGHT;
164
+ boxStartY -= height / 2;
165
+ }
166
+ else if (align === 'left') {
167
+ boxStartX += width / 2 + POINT_HEIGHT;
168
+ boxStartY -= height / 2;
169
+ }
170
+ else if (align === 'bottom') {
171
+ boxStartY -= height + POINT_HEIGHT;
172
+ }
173
+ const points = getBubbleArrowPoints(align, { x, y }, { visible: true, width: POINT_WIDTH, height: POINT_HEIGHT });
174
+ bubbleLabel(ctx, {
175
+ type: 'bubbleLabel',
176
+ bubble: {
177
+ x: boxStartX - width / 2,
178
+ y: boxStartY,
179
+ width,
180
+ height,
181
+ points,
182
+ direction,
183
+ fill: color,
184
+ },
185
+ label: {
186
+ text,
187
+ x: boxStartX,
188
+ y: boxStartY + height / 2,
189
+ style: [
190
+ {
191
+ font: 'normal 11px Arial',
192
+ fillStyle: '#333333',
193
+ textAlign: 'center',
194
+ textBaseline: 'middle',
195
+ },
196
+ ],
197
+ },
198
+ });
199
+ }
@@ -0,0 +1,254 @@
1
+ import Chart from "./chart";
2
+ import { AreaChartOptions, AreaSeriesData, AreaSeriesDataType, AreaSeriesInput, PlotLine, PlotBand } from "../../types/options";
3
+ import { AreaChartProps, SelectSeriesInfo } from "../../types/charts";
4
+ /**
5
+ * @class
6
+ * @classdesc Area Chart
7
+ * @param {Object} props
8
+ * @param {HTMLElement} props.el - The target element to create chart.
9
+ * @param {Object} props.data - Data for making Area Chart.
10
+ * @param {Array<string>} props.data.categories - Categories.
11
+ * @param {Array<Object>} props.data.series - Series data.
12
+ * @param {string} props.data.series.name - Series name.
13
+ * @param {Array<number|Array<number>>} props.data.series.data - Series data.
14
+ * @param {Object} [props.options] - Options for making Area Chart.
15
+ * @param {Object} [props.options.chart]
16
+ * @param {string|Object} [props.options.chart.title] - Chart title text or options.
17
+ * @param {string} [props.options.chart.title.text] - Chart title text.
18
+ * @param {number} [props.options.chart.title.offsetX] - Offset value to move title horizontally.
19
+ * @param {number} [props.options.chart.title.offsetY] - Offset value to move title vertically.
20
+ * @param {string} [props.options.chart.title.align] - Chart text align. 'left', 'right', 'center' is available.
21
+ * @param {boolean|Object} [props.options.chart.animation] - Whether to use animation and duration when rendering the initial chart.
22
+ * @param {number|string} [props.options.chart.width] - Chart width. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the width of the parent container is followed.
23
+ * @param {number|string} [props.options.chart.height] - Chart height. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the height of the parent container is followed.
24
+ * @param {Object} [props.options.series]
25
+ * @param {boolean} [props.options.series.selectable=false] - Whether to make selectable series or not.
26
+ * @param {boolean} [props.options.series.showDot=false] - Whether to show dot or not.
27
+ * @param {boolean} [props.options.series.spline=false] - Whether to make spline chart or not.
28
+ * @param {boolean} [props.options.series.zoomable=false] - Whether to use zoom feature or not.
29
+ * @param {boolean} [props.options.series.rangeSelectable=false] - Whether to use range selection feature or not.
30
+ * @param {string} [props.options.series.eventDetectType] - Event detect type. 'near', 'nearest', 'grouped', 'point' is available.
31
+ * @param {boolean} [props.options.series.shift=false] - Whether to use shift when addData or not.
32
+ * @param {Object} [props.options.series.dataLabels] - Set the visibility, location, and formatting of dataLabel. For specific information, refer to the {@link https://github.com/nhn/tui.chart|DataLabels guide} on github.
33
+ * @param {boolean|Object} [props.options.series.stack] - Option to decide whether to use stack chart and type of stack chart. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Area Chart guide} on github.
34
+ * @param {Object} [props.options.xAxis]
35
+ * @param {string|Object} [props.options.xAxis.title] - Axis title.
36
+ * @param {boolean} [props.options.xAxis.pointOnColumn=false] - Whether to move the start of the chart to the center of the column.
37
+ * @param {boolean} [props.options.xAxis.rotateLabel=true] - Whether to allow axis label rotation.
38
+ * @param {boolean|Object} [props.options.xAxis.date] - Whether the x axis label is of date type. Format option used for date type. Whether the x axis label is of date type. If use date type, format option used for date type.
39
+ * @param {Object} [props.options.xAxis.tick] - Option to adjust tick interval.
40
+ * @param {Object} [props.options.xAxis.label] - Option to adjust label interval.
41
+ * @param {Object} [props.options.xAxis.scale] - Option to adjust axis minimum, maximum, step size.
42
+ * @param {number} [props.options.xAxis.width] - Width of xAxis.
43
+ * @param {number} [props.options.xAxis.height] - Height of xAxis.
44
+ * @param {Object|Array<Object>} [props.options.yAxis] - If this option is an array type, use the secondary y axis.
45
+ * @param {string|Object} [props.options.yAxis.title] - Axis title.
46
+ * @param {Object} [props.options.yAxis.tick] - Option to adjust tick interval.
47
+ * @param {Object} [props.options.yAxis.label] - Option to adjust label interval.
48
+ * @param {Object} [props.options.yAxis.scale] - Option to adjust axis minimum, maximum, step size.
49
+ * @param {number} [props.options.yAxis.width] - Width of yAxis.
50
+ * @param {number} [props.options.yAxis.height] - Height of yAxis.
51
+ * @param {Object} [props.options.plot]
52
+ * @param {number} [props.options.plot.width] - Width of plot.
53
+ * @param {number} [props.options.plot.height] - Height of plot.
54
+ * @param {boolean} [props.options.plot.visible] - Whether to show plot line.
55
+ * @param {Array<Object>} [props.options.plot.lines] - Plot lines information. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Plot guide} on github.
56
+ * @param {Array<Object>} [props.options.plot.bands] - Plot bands information. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Plot guide} on github.
57
+ * @param {Object} [props.options.legend]
58
+ * @param {string} [props.options.legend.align] - Legend align. 'top', 'bottom', 'right', 'left' is available.
59
+ * @param {string} [props.options.legend.showCheckbox] - Whether to show checkbox.
60
+ * @param {boolean} [props.options.legend.visible] - Whether to show legend.
61
+ * @param {number} [props.options.legend.width] - Width of legend.
62
+ * @param {Object} [props.options.legend.item] - `width` and `overflow` options of the legend item. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Legend guide} on github.
63
+ * @param {Object} [props.options.exportMenu]
64
+ * @param {boolean} [props.options.exportMenu.visible] - Whether to show export menu.
65
+ * @param {string} [props.options.exportMenu.filename] - File name applied when downloading.
66
+ * @param {Object} [props.options.tooltip]
67
+ * @param {number} [props.options.tooltip.offsetX] - Offset value to move title horizontally.
68
+ * @param {number} [props.options.tooltip.offsetY] - Offset value to move title vertically.
69
+ * @param {Function} [props.options.tooltip.formatter] - Function to format data value.
70
+ * @param {Function} [props.options.tooltip.template] - Function to create custom template. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Tooltip guide} on github.
71
+ * @param {Object} [props.options.responsive] - Rules for changing chart options. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Responsive guide} on github.
72
+ * @param {boolean|Object} [props.options.responsive.animation] - Animation duration when the chart is modified.
73
+ * @param {Array<Object>} [props.options.responsive.rules] - Rules for the Chart to Respond.
74
+ * @param {Object} [props.options.lang] - Options for changing the text displayed on the chart or i18n languages.
75
+ * @param {Object} [props.options.lang.noData] - No Data Layer Text.
76
+ * @param {Object} [props.options.theme] - Chart theme options. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Area Chart guide} on github.
77
+ * @param {Object} [props.options.theme.chart] - Chart font theme.
78
+ * @param {Object} [props.options.theme.noData] - No Data Layer Text theme.
79
+ * @param {Object} [props.options.theme.series] - Series theme.
80
+ * @param {Object} [props.options.theme.title] - Title theme.
81
+ * @param {Object} [props.options.theme.xAxis] - X Axis theme.
82
+ * @param {Object|Array<Object>} [props.options.theme.yAxis] - Y Axis theme. In the case of an arrangement, the first is the main axis and the second is the theme for the secondary axis.
83
+ * @param {Object} [props.options.theme.legend] - Legend theme.
84
+ * @param {Object} [props.options.theme.tooltip] - Tooltip theme.
85
+ * @param {Object} [props.options.theme.plot] - Plot theme.
86
+ * @param {Object} [props.options.theme.exportMenu] - ExportMenu theme.
87
+ * @extends Chart
88
+ */
89
+ export default class AreaChart extends Chart<AreaChartOptions> {
90
+ constructor(props: AreaChartProps);
91
+ protected initialize(): void;
92
+ /**
93
+ * Add data.
94
+ * @param {Array} data - Array of data to be added.
95
+ * @param {string} category - Category to be added.
96
+ * @api
97
+ * @example
98
+ * chart.addData([10, 20], '6');
99
+ */
100
+ addData(data: AreaSeriesDataType[], category: string): void;
101
+ /**
102
+ * Add series.
103
+ * @param {Object} data - Data to be added.
104
+ * @param {string} data.name - Series name.
105
+ * @param {Array<number|Array<number>>} data.data - Array of data to be added.
106
+ * @api
107
+ * @example
108
+ * chart.addSeries({
109
+ * name: 'newSeries',
110
+ * data: [10, 100, 50, 40, 70, 55, 33, 70, 90, 110],
111
+ * });
112
+ */
113
+ addSeries(data: AreaSeriesInput): void;
114
+ /**
115
+ * Convert the chart data to new data.
116
+ * @param {Object} data - Data to be set
117
+ * @api
118
+ * @example
119
+ * chart.setData({
120
+ * categories: ['1', '2', '3'],
121
+ * series: [
122
+ * {
123
+ * name: 'new series',
124
+ * data: [1, 2, 3],
125
+ * },
126
+ * {
127
+ * name: 'new series2',
128
+ * data: [4, 5, 6],
129
+ * }
130
+ * ]
131
+ * });
132
+ */
133
+ setData(data: AreaSeriesData): void;
134
+ /**
135
+ * Add plot line.
136
+ * @param {Object} data - Plot info.
137
+ * @param {string|number} data.value - The value where the plot line will be drawn.
138
+ * @param {string} data.color - Plot line color.
139
+ * @param {string} [data.id] - Plot id. The value on which the removePlotLine is based.
140
+ * @api
141
+ * @example
142
+ * chart.addPlotLine({
143
+ * value: 2,
144
+ * color: '#00ff22',
145
+ * id: 'plot-1',
146
+ * });
147
+ */
148
+ addPlotLine(data: PlotLine): void;
149
+ /**
150
+ * Remove plot line with id.
151
+ * @param {string} id - Id of the plot line to be removed.
152
+ * @api
153
+ * @example
154
+ * chart.removePlotLine('plot-1');
155
+ */
156
+ removePlotLine(id: string): void;
157
+ /**
158
+ * Add plot band.
159
+ * @param {Object} data - Plot info.
160
+ * @param {Array<string|number>} data.range - The range to be drawn.
161
+ * @param {string} data.color - Plot band color.
162
+ * @param {string} [data.id] - Plot id. The value on which the removePlotBand is based.
163
+ * @api
164
+ * @example
165
+ * chart.addPlotBand({
166
+ * value: [2, 4],
167
+ * color: '#00ff22',
168
+ * id: 'plot-1',
169
+ * });
170
+ */
171
+ addPlotBand(data: PlotBand): void;
172
+ /**
173
+ * Remove plot band with id.
174
+ * @param {string} id - id of the plot band to be removed.
175
+ * @api
176
+ * @example
177
+ * chart.removePlotBand('plot-1');
178
+ */
179
+ removePlotBand(id: string): void;
180
+ /**
181
+ * Hide series data label.
182
+ * @api
183
+ * @example
184
+ * chart.hideSeriesDataLabel();
185
+ */
186
+ hideSeriesDataLabel(): void;
187
+ /**
188
+ * Show series data label.
189
+ * @api
190
+ * @example
191
+ * chart.showSeriesDataLabel();
192
+ */
193
+ showSeriesDataLabel(): void;
194
+ /**
195
+ * Convert the chart options to new options.
196
+ * @param {Object} options - Chart options.
197
+ * @api
198
+ * @example
199
+ * chart.setOptions({
200
+ * chart: {
201
+ * width: 500,
202
+ * height: 'auto',
203
+ * title: 'Energy Usage',
204
+ * },
205
+ * xAxis: {
206
+ * title: 'Month',
207
+ * date: { format: 'yy/MM' },
208
+ * },
209
+ * yAxis: {
210
+ * title: 'Energy (kWh)',
211
+ * },
212
+ * series: {
213
+ * selectable: true,
214
+ * },
215
+ * tooltip: {
216
+ * formatter: (value) => `${value}kWh`,
217
+ * },
218
+ * });
219
+ */
220
+ setOptions(options: AreaChartOptions): void;
221
+ /**
222
+ * Update chart options.
223
+ * @param {Object} options - Chart options.
224
+ * @api
225
+ * @example
226
+ * chart.updateOptions({
227
+ * chart: {
228
+ * height: 'auto',
229
+ * title: 'Energy Usage',
230
+ * },
231
+ * tooltip: {
232
+ * formatter: (value) => `${value}kWh`,
233
+ * },
234
+ * });
235
+ */
236
+ updateOptions(options: AreaChartOptions): void;
237
+ /**
238
+ * Show tooltip.
239
+ * @param {Object} seriesInfo - Information of the series for the tooltip to be displayed.
240
+ * @param {number} seriesInfo.index - Index of data within series. If 'series.eventDetectType' is "grouped", only seriesIndex is needed.
241
+ * @param {number} [seriesInfo.seriesIndex] - Index of series.
242
+ * @api
243
+ * @example
244
+ * chart.showTooltip({index: 1, seriesIndex: 2});
245
+ */
246
+ showTooltip(seriesInfo: SelectSeriesInfo): void;
247
+ /**
248
+ * Hide tooltip.
249
+ * @api
250
+ * @example
251
+ * chart.hideTooltip();
252
+ */
253
+ hideTooltip(): void;
254
+ }