@alfalab/core-components-chart 4.0.1 → 4.0.2

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 (286) hide show
  1. package/Component.d.ts +1 -1
  2. package/Component.js +1 -1
  3. package/Component.js.map +1 -1
  4. package/components/Dot/index.css +7 -7
  5. package/components/Dot/index.d.ts +1 -1
  6. package/components/Dot/index.js.map +1 -1
  7. package/components/Dot/index.module.css.js +1 -1
  8. package/components/Legends/index.css +7 -7
  9. package/components/Legends/index.d.ts +3 -3
  10. package/components/Legends/index.js.map +1 -1
  11. package/components/Legends/index.module.css.js +1 -1
  12. package/components/Legends/index.module.css.js.map +1 -1
  13. package/components/LinearGradient.d.ts +1 -1
  14. package/components/LinearGradient.js.map +1 -1
  15. package/components/RectBar.js.map +1 -1
  16. package/components/Tick/index.css +2 -5
  17. package/components/Tick/index.d.ts +1 -1
  18. package/components/Tick/index.js.map +1 -1
  19. package/components/Tick/index.module.css.js +1 -1
  20. package/components/Tick/index.module.css.js.map +1 -1
  21. package/components/TooltipContent/index.css +8 -7
  22. package/components/TooltipContent/index.d.ts +3 -3
  23. package/components/TooltipContent/index.js.map +1 -1
  24. package/components/TooltipContent/index.module.css.js +1 -1
  25. package/components/TooltipContent/index.module.css.js.map +1 -1
  26. package/cssm/Component.d.ts +1 -1
  27. package/cssm/Component.js +1 -1
  28. package/cssm/Component.js.map +1 -1
  29. package/cssm/components/Dot/index.d.ts +1 -1
  30. package/cssm/components/Dot/index.js.map +1 -1
  31. package/cssm/components/Legends/index.d.ts +3 -3
  32. package/cssm/components/Legends/index.js.map +1 -1
  33. package/cssm/components/LinearGradient.d.ts +1 -1
  34. package/cssm/components/LinearGradient.js.map +1 -1
  35. package/cssm/components/RectBar.js.map +1 -1
  36. package/cssm/components/Tick/index.d.ts +1 -1
  37. package/cssm/components/Tick/index.js.map +1 -1
  38. package/cssm/components/Tick/index.module.css +0 -3
  39. package/cssm/components/TooltipContent/index.d.ts +3 -3
  40. package/cssm/components/TooltipContent/index.js.map +1 -1
  41. package/cssm/components/TooltipContent/index.module.css +2 -1
  42. package/cssm/hooks/usePathBar/index.d.ts +1 -1
  43. package/cssm/hooks/usePathBar/index.js.map +1 -1
  44. package/cssm/hooks/useSettings/index.d.ts +3 -3
  45. package/cssm/hooks/useSettings/index.js.map +1 -1
  46. package/cssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +4 -4
  47. package/cssm/hooks/useSettings/utils/setComposedChartsMargin.js.map +1 -1
  48. package/cssm/hooks/useSettings/utils/setDatas.d.ts +2 -2
  49. package/cssm/hooks/useSettings/utils/setDatas.js.map +1 -1
  50. package/cssm/hooks/useSettings/utils/setGradientCharts.d.ts +1 -1
  51. package/cssm/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
  52. package/cssm/hooks/useSettings/utils/setLegendMargin.d.ts +2 -2
  53. package/cssm/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
  54. package/cssm/hooks/useSettings/utils/sortByIndex.d.ts +1 -1
  55. package/cssm/hooks/useSettings/utils/sortByIndex.js.map +1 -1
  56. package/cssm/index.module.css +3 -1
  57. package/cssm/types/brush.types.d.ts +2 -2
  58. package/cssm/types/chart.types.d.ts +5 -5
  59. package/cssm/types/legend.types.d.ts +1 -1
  60. package/cssm/types/options.types.d.ts +10 -10
  61. package/cssm/types/payload.types.d.ts +1 -1
  62. package/cssm/types/responsiveContainer.types.d.ts +1 -1
  63. package/cssm/types/seria.types.d.ts +4 -4
  64. package/cssm/types/tooltip.types.d.ts +2 -2
  65. package/cssm/types/utils/axis.types.d.ts +1 -1
  66. package/cssm/types/utils/dot.types.d.ts +2 -2
  67. package/cssm/types/utils/tick.types.d.ts +1 -1
  68. package/cssm/types/xAxis.types.d.ts +1 -1
  69. package/cssm/types/yAxis.types.d.ts +1 -1
  70. package/esm/Component.d.ts +1 -1
  71. package/esm/Component.js +1 -1
  72. package/esm/Component.js.map +1 -1
  73. package/esm/components/Dot/index.css +7 -7
  74. package/esm/components/Dot/index.d.ts +1 -1
  75. package/esm/components/Dot/index.js.map +1 -1
  76. package/esm/components/Dot/index.module.css.js +1 -1
  77. package/esm/components/Legends/index.css +7 -7
  78. package/esm/components/Legends/index.d.ts +3 -3
  79. package/esm/components/Legends/index.js.map +1 -1
  80. package/esm/components/Legends/index.module.css.js +1 -1
  81. package/esm/components/Legends/index.module.css.js.map +1 -1
  82. package/esm/components/LinearGradient.d.ts +1 -1
  83. package/esm/components/LinearGradient.js.map +1 -1
  84. package/esm/components/RectBar.js.map +1 -1
  85. package/esm/components/Tick/index.css +2 -5
  86. package/esm/components/Tick/index.d.ts +1 -1
  87. package/esm/components/Tick/index.js.map +1 -1
  88. package/esm/components/Tick/index.module.css.js +1 -1
  89. package/esm/components/Tick/index.module.css.js.map +1 -1
  90. package/esm/components/TooltipContent/index.css +8 -7
  91. package/esm/components/TooltipContent/index.d.ts +3 -3
  92. package/esm/components/TooltipContent/index.js.map +1 -1
  93. package/esm/components/TooltipContent/index.module.css.js +1 -1
  94. package/esm/components/TooltipContent/index.module.css.js.map +1 -1
  95. package/esm/hooks/usePathBar/index.d.ts +1 -1
  96. package/esm/hooks/usePathBar/index.js.map +1 -1
  97. package/esm/hooks/useSettings/index.d.ts +3 -3
  98. package/esm/hooks/useSettings/index.js.map +1 -1
  99. package/esm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +4 -4
  100. package/esm/hooks/useSettings/utils/setComposedChartsMargin.js.map +1 -1
  101. package/esm/hooks/useSettings/utils/setDatas.d.ts +2 -2
  102. package/esm/hooks/useSettings/utils/setDatas.js.map +1 -1
  103. package/esm/hooks/useSettings/utils/setGradientCharts.d.ts +1 -1
  104. package/esm/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
  105. package/esm/hooks/useSettings/utils/setLegendMargin.d.ts +2 -2
  106. package/esm/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
  107. package/esm/hooks/useSettings/utils/sortByIndex.d.ts +1 -1
  108. package/esm/hooks/useSettings/utils/sortByIndex.js.map +1 -1
  109. package/esm/index.css +7 -5
  110. package/esm/index.module.css.js +1 -1
  111. package/esm/index.module.css.js.map +1 -1
  112. package/esm/types/brush.types.d.ts +2 -2
  113. package/esm/types/chart.types.d.ts +5 -5
  114. package/esm/types/legend.types.d.ts +1 -1
  115. package/esm/types/options.types.d.ts +10 -10
  116. package/esm/types/payload.types.d.ts +1 -1
  117. package/esm/types/responsiveContainer.types.d.ts +1 -1
  118. package/esm/types/seria.types.d.ts +4 -4
  119. package/esm/types/tooltip.types.d.ts +2 -2
  120. package/esm/types/utils/axis.types.d.ts +1 -1
  121. package/esm/types/utils/dot.types.d.ts +2 -2
  122. package/esm/types/utils/tick.types.d.ts +1 -1
  123. package/esm/types/xAxis.types.d.ts +1 -1
  124. package/esm/types/yAxis.types.d.ts +1 -1
  125. package/hooks/usePathBar/index.d.ts +1 -1
  126. package/hooks/usePathBar/index.js.map +1 -1
  127. package/hooks/useSettings/index.d.ts +3 -3
  128. package/hooks/useSettings/index.js.map +1 -1
  129. package/hooks/useSettings/utils/setComposedChartsMargin.d.ts +4 -4
  130. package/hooks/useSettings/utils/setComposedChartsMargin.js.map +1 -1
  131. package/hooks/useSettings/utils/setDatas.d.ts +2 -2
  132. package/hooks/useSettings/utils/setDatas.js.map +1 -1
  133. package/hooks/useSettings/utils/setGradientCharts.d.ts +1 -1
  134. package/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
  135. package/hooks/useSettings/utils/setLegendMargin.d.ts +2 -2
  136. package/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
  137. package/hooks/useSettings/utils/sortByIndex.d.ts +1 -1
  138. package/hooks/useSettings/utils/sortByIndex.js.map +1 -1
  139. package/index.css +7 -5
  140. package/index.module.css.js +1 -1
  141. package/index.module.css.js.map +1 -1
  142. package/modern/Component.d.ts +1 -1
  143. package/modern/Component.js +1 -1
  144. package/modern/Component.js.map +1 -1
  145. package/modern/components/Dot/index.css +7 -7
  146. package/modern/components/Dot/index.d.ts +1 -1
  147. package/modern/components/Dot/index.js.map +1 -1
  148. package/modern/components/Dot/index.module.css.js +1 -1
  149. package/modern/components/Legends/index.css +7 -7
  150. package/modern/components/Legends/index.d.ts +3 -3
  151. package/modern/components/Legends/index.js.map +1 -1
  152. package/modern/components/Legends/index.module.css.js +1 -1
  153. package/modern/components/Legends/index.module.css.js.map +1 -1
  154. package/modern/components/LinearGradient.d.ts +1 -1
  155. package/modern/components/LinearGradient.js.map +1 -1
  156. package/modern/components/RectBar.js.map +1 -1
  157. package/modern/components/Tick/index.css +2 -5
  158. package/modern/components/Tick/index.d.ts +1 -1
  159. package/modern/components/Tick/index.js.map +1 -1
  160. package/modern/components/Tick/index.module.css.js +1 -1
  161. package/modern/components/Tick/index.module.css.js.map +1 -1
  162. package/modern/components/TooltipContent/index.css +8 -7
  163. package/modern/components/TooltipContent/index.d.ts +3 -3
  164. package/modern/components/TooltipContent/index.js.map +1 -1
  165. package/modern/components/TooltipContent/index.module.css.js +1 -1
  166. package/modern/components/TooltipContent/index.module.css.js.map +1 -1
  167. package/modern/hooks/usePathBar/index.d.ts +1 -1
  168. package/modern/hooks/usePathBar/index.js.map +1 -1
  169. package/modern/hooks/useSettings/index.d.ts +3 -3
  170. package/modern/hooks/useSettings/index.js.map +1 -1
  171. package/modern/hooks/useSettings/utils/setComposedChartsMargin.d.ts +4 -4
  172. package/modern/hooks/useSettings/utils/setComposedChartsMargin.js.map +1 -1
  173. package/modern/hooks/useSettings/utils/setDatas.d.ts +2 -2
  174. package/modern/hooks/useSettings/utils/setDatas.js.map +1 -1
  175. package/modern/hooks/useSettings/utils/setGradientCharts.d.ts +1 -1
  176. package/modern/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
  177. package/modern/hooks/useSettings/utils/setLegendMargin.d.ts +2 -2
  178. package/modern/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
  179. package/modern/hooks/useSettings/utils/sortByIndex.d.ts +1 -1
  180. package/modern/hooks/useSettings/utils/sortByIndex.js.map +1 -1
  181. package/modern/index.css +7 -5
  182. package/modern/index.module.css.js +1 -1
  183. package/modern/index.module.css.js.map +1 -1
  184. package/modern/types/brush.types.d.ts +2 -2
  185. package/modern/types/chart.types.d.ts +5 -5
  186. package/modern/types/legend.types.d.ts +1 -1
  187. package/modern/types/options.types.d.ts +10 -10
  188. package/modern/types/payload.types.d.ts +1 -1
  189. package/modern/types/responsiveContainer.types.d.ts +1 -1
  190. package/modern/types/seria.types.d.ts +4 -4
  191. package/modern/types/tooltip.types.d.ts +2 -2
  192. package/modern/types/utils/axis.types.d.ts +1 -1
  193. package/modern/types/utils/dot.types.d.ts +2 -2
  194. package/modern/types/utils/tick.types.d.ts +1 -1
  195. package/modern/types/xAxis.types.d.ts +1 -1
  196. package/modern/types/yAxis.types.d.ts +1 -1
  197. package/moderncssm/Component.d.ts +1 -1
  198. package/moderncssm/Component.js +1 -1
  199. package/moderncssm/Component.js.map +1 -1
  200. package/moderncssm/components/Dot/index.d.ts +1 -1
  201. package/moderncssm/components/Dot/index.js.map +1 -1
  202. package/moderncssm/components/Legends/index.d.ts +3 -3
  203. package/moderncssm/components/Legends/index.js.map +1 -1
  204. package/moderncssm/components/Legends/index.module.css +2 -0
  205. package/moderncssm/components/LinearGradient.d.ts +1 -1
  206. package/moderncssm/components/LinearGradient.js.map +1 -1
  207. package/moderncssm/components/RectBar.js.map +1 -1
  208. package/moderncssm/components/Tick/index.d.ts +1 -1
  209. package/moderncssm/components/Tick/index.js.map +1 -1
  210. package/moderncssm/components/Tick/index.module.css +2 -5
  211. package/moderncssm/components/TooltipContent/index.d.ts +3 -3
  212. package/moderncssm/components/TooltipContent/index.js.map +1 -1
  213. package/moderncssm/components/TooltipContent/index.module.css +2 -0
  214. package/moderncssm/hooks/usePathBar/index.d.ts +1 -1
  215. package/moderncssm/hooks/usePathBar/index.js.map +1 -1
  216. package/moderncssm/hooks/useSettings/index.d.ts +3 -3
  217. package/moderncssm/hooks/useSettings/index.js.map +1 -1
  218. package/moderncssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +4 -4
  219. package/moderncssm/hooks/useSettings/utils/setComposedChartsMargin.js.map +1 -1
  220. package/moderncssm/hooks/useSettings/utils/setDatas.d.ts +2 -2
  221. package/moderncssm/hooks/useSettings/utils/setDatas.js.map +1 -1
  222. package/moderncssm/hooks/useSettings/utils/setGradientCharts.d.ts +1 -1
  223. package/moderncssm/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
  224. package/moderncssm/hooks/useSettings/utils/setLegendMargin.d.ts +2 -2
  225. package/moderncssm/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
  226. package/moderncssm/hooks/useSettings/utils/sortByIndex.d.ts +1 -1
  227. package/moderncssm/hooks/useSettings/utils/sortByIndex.js.map +1 -1
  228. package/moderncssm/index.module.css +5 -2
  229. package/moderncssm/types/brush.types.d.ts +2 -2
  230. package/moderncssm/types/chart.types.d.ts +5 -5
  231. package/moderncssm/types/legend.types.d.ts +1 -1
  232. package/moderncssm/types/options.types.d.ts +10 -10
  233. package/moderncssm/types/payload.types.d.ts +1 -1
  234. package/moderncssm/types/responsiveContainer.types.d.ts +1 -1
  235. package/moderncssm/types/seria.types.d.ts +4 -4
  236. package/moderncssm/types/tooltip.types.d.ts +2 -2
  237. package/moderncssm/types/utils/axis.types.d.ts +1 -1
  238. package/moderncssm/types/utils/dot.types.d.ts +2 -2
  239. package/moderncssm/types/utils/tick.types.d.ts +1 -1
  240. package/moderncssm/types/xAxis.types.d.ts +1 -1
  241. package/moderncssm/types/yAxis.types.d.ts +1 -1
  242. package/package.json +3 -3
  243. package/src/Component.tsx +8 -8
  244. package/src/components/Dot/index.tsx +1 -1
  245. package/src/components/Legends/index.module.css +1 -1
  246. package/src/components/Legends/index.tsx +3 -3
  247. package/src/components/LinearGradient.tsx +1 -1
  248. package/src/components/RectBar.tsx +4 -4
  249. package/src/components/Tick/index.module.css +1 -6
  250. package/src/components/Tick/index.tsx +1 -1
  251. package/src/components/TooltipContent/index.module.css +1 -1
  252. package/src/components/TooltipContent/index.tsx +3 -3
  253. package/src/hooks/usePathBar/{index.tsx → index.ts} +3 -3
  254. package/src/hooks/useSettings/{index.tsx → index.ts} +3 -3
  255. package/src/hooks/useSettings/utils/setComposedChartsMargin.ts +4 -4
  256. package/src/hooks/useSettings/utils/setDatas.ts +4 -4
  257. package/src/hooks/useSettings/utils/setGradientCharts.ts +2 -2
  258. package/src/hooks/useSettings/utils/setLegendMargin.ts +2 -2
  259. package/src/hooks/useSettings/utils/sortByIndex.ts +1 -1
  260. package/src/index.module.css +4 -2
  261. package/src/types/brush.types.ts +2 -2
  262. package/src/types/chart.types.ts +5 -5
  263. package/src/types/legend.types.ts +1 -1
  264. package/src/types/options.types.ts +10 -10
  265. package/src/types/payload.types.ts +1 -1
  266. package/src/types/responsiveContainer.types.ts +1 -1
  267. package/src/types/seria.types.ts +4 -4
  268. package/src/types/tooltip.types.ts +2 -2
  269. package/src/types/utils/axis.types.ts +1 -1
  270. package/src/types/utils/dot.types.ts +2 -2
  271. package/src/types/utils/tick.types.ts +1 -1
  272. package/src/types/xAxis.types.ts +1 -1
  273. package/src/types/yAxis.types.ts +1 -1
  274. package/types/brush.types.d.ts +2 -2
  275. package/types/chart.types.d.ts +5 -5
  276. package/types/legend.types.d.ts +1 -1
  277. package/types/options.types.d.ts +10 -10
  278. package/types/payload.types.d.ts +1 -1
  279. package/types/responsiveContainer.types.d.ts +1 -1
  280. package/types/seria.types.d.ts +4 -4
  281. package/types/tooltip.types.d.ts +2 -2
  282. package/types/utils/axis.types.d.ts +1 -1
  283. package/types/utils/dot.types.d.ts +2 -2
  284. package/types/utils/tick.types.d.ts +1 -1
  285. package/types/xAxis.types.d.ts +1 -1
  286. package/types/yAxis.types.d.ts +1 -1
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  .tickText {
2
4
  fill: var(--color-light-text-primary);
3
5
  font-size: 16px;
@@ -9,8 +11,3 @@
9
11
  opacity: 0.3;
10
12
  fill: var(--color-dark-base-bg-primary);
11
13
  }
12
-
13
- .circle {
14
- opacity: 0.3;
15
- fill: var(--color-dark-base-bg-primary);
16
- }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { PayloadProps } from '../../types/payload.types';
3
- import { SeriaProps } from '../../types/seria.types';
4
- import { TooltipProps } from '../../types/tooltip.types';
2
+ import { type PayloadProps } from '../../types/payload.types';
3
+ import { type SeriaProps } from '../../types/seria.types';
4
+ import { type TooltipProps } from '../../types/tooltip.types';
5
5
  export interface TooltipContentProps extends TooltipProps {
6
6
  payload: PayloadProps[];
7
7
  series: SeriaProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/TooltipContent/index.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { PayloadProps } from '../../types/payload.types';\nimport { SeriaProps } from '../../types/seria.types';\nimport { TooltipProps } from '../../types/tooltip.types';\n\nimport styles from './index.module.css';\n\nexport interface TooltipContentProps extends TooltipProps {\n payload: PayloadProps[];\n series: SeriaProps[];\n}\n\nexport const TooltipContent = ({\n payload,\n separator,\n label,\n tooltipArrowSide,\n arrow,\n series,\n labelFormatter,\n labelStyle,\n}: TooltipContentProps) => {\n if (!label || payload.length === 0) return null;\n\n return (\n <div className={cn(styles.tooltip)}>\n {arrow && (\n <span\n className={cn(\n styles.tooltipArrow,\n tooltipArrowSide ? '' : styles.tooltipArrowRight,\n )}\n />\n )}\n <ul className={cn(styles.tooltipList)}>\n <li className={cn(styles.tooltipItem)} style={labelStyle}>\n <Text\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipLabel)}\n >\n {labelFormatter ? labelFormatter(label) : label}\n </Text>\n </li>\n {payload.map((entry: PayloadProps) => {\n const data: SeriaProps | undefined = series.find(\n (d: SeriaProps) => d.properties.dataKey === entry.dataKey,\n );\n\n if (data?.hideTooltip || data?.hide) return null;\n\n return (\n <li\n className={cn(styles.tooltipItem)}\n key={entry.dataKey}\n style={{ color: entry.color }}\n >\n <Text\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipValue)}\n >\n {entry?.formatter ? entry.formatter(entry.value) : entry.value}\n {separator || ' '}\n </Text>\n <Text\n view='secondary-large'\n tag='span'\n className={cn(styles.tooltipName)}\n >{`${entry.name}`}</Text>\n </li>\n );\n })}\n </ul>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;MAgBa,cAAc,GAAG,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,KAAK,EACL,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,cAAc,EACd,UAAU,GACQ,KAAI;AACtB,IAAA,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;IAE/C,QACI,6BAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAA;QAC7B,KAAK,KACF,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,YAAY,EACnB,gBAAgB,GAAG,EAAE,GAAG,MAAM,CAAC,iBAAiB,CACnD,EAAA,CACH,CACL;AACD,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EAAA;YACjC,KAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,UAAU,EAAA;AACpD,gBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,IAAI,EAAC,gBAAgB,EACrB,GAAG,EAAC,MAAM,EACV,MAAM,EAAC,QAAQ,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAA,EAEjC,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK,CAC5C,CACN;AACJ,YAAA,OAAO,CAAC,GAAG,CAAC,CAAC,KAAmB,KAAI;gBACjC,MAAM,IAAI,GAA2B,MAAM,CAAC,IAAI,CAC5C,CAAC,CAAa,KAAK,CAAC,CAAC,UAAU,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAC5D;AAED,gBAAA,IAAI,IAAI,EAAE,WAAW,IAAI,IAAI,EAAE,IAAI;AAAE,oBAAA,OAAO,IAAI;gBAEhD,QACI,KACI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EACjC,GAAG,EAAE,KAAK,CAAC,OAAO,EAClB,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAA;oBAE7B,KAAC,CAAA,aAAA,CAAA,IAAI,IACD,IAAI,EAAC,gBAAgB,EACrB,GAAG,EAAC,MAAM,EACV,MAAM,EAAC,QAAQ,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAA;AAEjC,wBAAA,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK;wBAC7D,SAAS,IAAI,GAAG,CACd;oBACP,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,EAAA,IAAI,EAAC,iBAAiB,EACtB,GAAG,EAAC,MAAM,EACV,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EAAA,EACnC,CAAG,EAAA,KAAK,CAAC,IAAI,CAAE,CAAA,CAAQ,CACxB;AAEb,aAAC,CAAC,CACD,CACH;AAEd;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/TooltipContent/index.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { type PayloadProps } from '../../types/payload.types';\nimport { type SeriaProps } from '../../types/seria.types';\nimport { type TooltipProps } from '../../types/tooltip.types';\n\nimport styles from './index.module.css';\n\nexport interface TooltipContentProps extends TooltipProps {\n payload: PayloadProps[];\n series: SeriaProps[];\n}\n\nexport const TooltipContent = ({\n payload,\n separator,\n label,\n tooltipArrowSide,\n arrow,\n series,\n labelFormatter,\n labelStyle,\n}: TooltipContentProps) => {\n if (!label || payload.length === 0) return null;\n\n return (\n <div className={cn(styles.tooltip)}>\n {arrow && (\n <span\n className={cn(\n styles.tooltipArrow,\n tooltipArrowSide ? '' : styles.tooltipArrowRight,\n )}\n />\n )}\n <ul className={cn(styles.tooltipList)}>\n <li className={cn(styles.tooltipItem)} style={labelStyle}>\n <Text\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipLabel)}\n >\n {labelFormatter ? labelFormatter(label) : label}\n </Text>\n </li>\n {payload.map((entry: PayloadProps) => {\n const data: SeriaProps | undefined = series.find(\n (d: SeriaProps) => d.properties.dataKey === entry.dataKey,\n );\n\n if (data?.hideTooltip || data?.hide) return null;\n\n return (\n <li\n className={cn(styles.tooltipItem)}\n key={entry.dataKey}\n style={{ color: entry.color }}\n >\n <Text\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipValue)}\n >\n {entry?.formatter ? entry.formatter(entry.value) : entry.value}\n {separator || ' '}\n </Text>\n <Text\n view='secondary-large'\n tag='span'\n className={cn(styles.tooltipName)}\n >{`${entry.name}`}</Text>\n </li>\n );\n })}\n </ul>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;MAgBa,cAAc,GAAG,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,KAAK,EACL,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,cAAc,EACd,UAAU,GACQ,KAAI;AACtB,IAAA,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;IAE/C,QACI,6BAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAA;QAC7B,KAAK,KACF,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,YAAY,EACnB,gBAAgB,GAAG,EAAE,GAAG,MAAM,CAAC,iBAAiB,CACnD,EAAA,CACH,CACL;AACD,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EAAA;YACjC,KAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,UAAU,EAAA;AACpD,gBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,IAAI,EAAC,gBAAgB,EACrB,GAAG,EAAC,MAAM,EACV,MAAM,EAAC,QAAQ,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAA,EAEjC,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK,CAC5C,CACN;AACJ,YAAA,OAAO,CAAC,GAAG,CAAC,CAAC,KAAmB,KAAI;gBACjC,MAAM,IAAI,GAA2B,MAAM,CAAC,IAAI,CAC5C,CAAC,CAAa,KAAK,CAAC,CAAC,UAAU,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAC5D;AAED,gBAAA,IAAI,IAAI,EAAE,WAAW,IAAI,IAAI,EAAE,IAAI;AAAE,oBAAA,OAAO,IAAI;gBAEhD,QACI,KACI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EACjC,GAAG,EAAE,KAAK,CAAC,OAAO,EAClB,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAA;oBAE7B,KAAC,CAAA,aAAA,CAAA,IAAI,IACD,IAAI,EAAC,gBAAgB,EACrB,GAAG,EAAC,MAAM,EACV,MAAM,EAAC,QAAQ,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAA;AAEjC,wBAAA,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK;wBAC7D,SAAS,IAAI,GAAG,CACd;oBACP,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,EAAA,IAAI,EAAC,iBAAiB,EACtB,GAAG,EAAC,MAAM,EACV,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EAAA,EACnC,CAAG,EAAA,KAAK,CAAC,IAAI,CAAE,CAAA,CAAQ,CACxB;AAEb,aAAC,CAAC,CACD,CACH;AAEd;;;;"}
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  .tooltip {
2
4
  background-color: var(--color-light-base-bg-primary);
3
5
  border: 1px solid var(--color-light-neutral-400);
@@ -1,4 +1,4 @@
1
- import { RadiusProp } from '../../types/seria.types';
1
+ import { type RadiusProp } from '../../types/seria.types';
2
2
  export declare type usePathBarProps = {
3
3
  radius?: RadiusProp;
4
4
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/usePathBar/index.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { RadiusProp } from '../../types/seria.types';\n\nimport { getRadius } from './utils/getRadius';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type usePathBarProps = {\n radius?: RadiusProp;\n height: number;\n background?: {\n x: number;\n y: number;\n height: number;\n width: number;\n };\n y?: number;\n};\n\nexport const usePathBar = (props: usePathBarProps): number[] => {\n const [topRadius, setTopRadius] = useState<number>(0);\n const [bottomRadius, setBottomRadius] = useState<number>(0);\n const [initHeight, setInitHeight] = useState<number>(0);\n const [initY, setInitY] = useState<number>(0);\n\n useEffect(() => {\n const { radius, height, background, y } = props;\n const radiusTop = radius?.top ? getRadius(height, radius.top) : 0;\n const radiusBottom = radius?.bottom ? getRadius(height, radius.bottom) : 0;\n\n const heightCheck =\n (radius && height !== 0 && height / 2 < (radius?.top || 0)) ||\n height / 2 < (radius?.bottom || 0);\n\n // eslint-disable-next-line no-nested-ternary\n const heightInit = heightCheck\n ? (radiusTop || radiusBottom) && radiusTop + radiusBottom\n : height > 0 && height < 2\n ? 2\n : height;\n\n if (background && y) {\n const yInit = heightCheck\n ? background.height + background.y - (radiusTop + radiusBottom)\n : y;\n\n setInitY(yInit);\n }\n\n if (radiusTop !== 0) setTopRadius(radiusTop);\n if (radiusBottom !== 0) setBottomRadius(radiusBottom);\n if (heightInit !== 0) setInitHeight(heightInit);\n }, [props]);\n\n return [initHeight, topRadius, bottomRadius, initY];\n};\n"],"names":[],"mappings":";;;AAmBa,MAAA,UAAU,GAAG,CAAC,KAAsB,KAAc;IAC3D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IACrD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IAC3D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IACvD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IAE7C,SAAS,CAAC,MAAK;QACX,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,KAAK;QAC/C,MAAM,SAAS,GAAG,MAAM,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;QACjE,MAAM,YAAY,GAAG,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;QAE1E,MAAM,WAAW,GACb,CAAC,MAAM,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;YAC1D,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;;QAGtC,MAAM,UAAU,GAAG;cACb,CAAC,SAAS,IAAI,YAAY,KAAK,SAAS,GAAG;AAC7C,cAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;AACzB,kBAAE;kBACA,MAAM;QAEZ,IAAI,UAAU,IAAI,CAAC,EAAE;YACjB,MAAM,KAAK,GAAG;AACV,kBAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,IAAI,SAAS,GAAG,YAAY;kBAC5D,CAAC;YAEP,QAAQ,CAAC,KAAK,CAAC;AAClB;QAED,IAAI,SAAS,KAAK,CAAC;YAAE,YAAY,CAAC,SAAS,CAAC;QAC5C,IAAI,YAAY,KAAK,CAAC;YAAE,eAAe,CAAC,YAAY,CAAC;QACrD,IAAI,UAAU,KAAK,CAAC;YAAE,aAAa,CAAC,UAAU,CAAC;AACnD,KAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAEX,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC;AACvD;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/usePathBar/index.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { type RadiusProp } from '../../types/seria.types';\n\nimport { getRadius } from './utils/getRadius';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type usePathBarProps = {\n radius?: RadiusProp;\n height: number;\n background?: {\n x: number;\n y: number;\n height: number;\n width: number;\n };\n y?: number;\n};\n\nexport const usePathBar = (props: usePathBarProps): number[] => {\n const [topRadius, setTopRadius] = useState<number>(0);\n const [bottomRadius, setBottomRadius] = useState<number>(0);\n const [initHeight, setInitHeight] = useState<number>(0);\n const [initY, setInitY] = useState<number>(0);\n\n useEffect(() => {\n const { radius, height, background, y } = props;\n const radiusTop = radius?.top ? getRadius(height, radius.top) : 0;\n const radiusBottom = radius?.bottom ? getRadius(height, radius.bottom) : 0;\n\n const heightCheck =\n (radius && height !== 0 && height / 2 < (radius?.top || 0)) ||\n height / 2 < (radius?.bottom || 0);\n\n // eslint-disable-next-line no-nested-ternary\n const heightInit = heightCheck\n ? (radiusTop || radiusBottom) && radiusTop + radiusBottom\n : height > 0 && height < 2\n ? 2\n : height;\n\n if (background && y) {\n const yInit = heightCheck\n ? background.height + background.y - (radiusTop + radiusBottom)\n : y;\n\n setInitY(yInit);\n }\n\n if (radiusTop !== 0) setTopRadius(radiusTop);\n if (radiusBottom !== 0) setBottomRadius(radiusBottom);\n if (heightInit !== 0) setInitHeight(heightInit);\n }, [props]);\n\n return [initHeight, topRadius, bottomRadius, initY];\n};\n"],"names":[],"mappings":";;;AAmBa,MAAA,UAAU,GAAG,CAAC,KAAsB,KAAc;IAC3D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IACrD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IAC3D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IACvD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IAE7C,SAAS,CAAC,MAAK;QACX,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,KAAK;QAC/C,MAAM,SAAS,GAAG,MAAM,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;QACjE,MAAM,YAAY,GAAG,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;QAE1E,MAAM,WAAW,GACb,CAAC,MAAM,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;YAC1D,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;;QAGtC,MAAM,UAAU,GAAG;cACb,CAAC,SAAS,IAAI,YAAY,KAAK,SAAS,GAAG;AAC7C,cAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;AACvB,kBAAE;kBACA,MAAM;QAEd,IAAI,UAAU,IAAI,CAAC,EAAE;YACjB,MAAM,KAAK,GAAG;AACV,kBAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,IAAI,SAAS,GAAG,YAAY;kBAC5D,CAAC;YAEP,QAAQ,CAAC,KAAK,CAAC;AAClB;QAED,IAAI,SAAS,KAAK,CAAC;YAAE,YAAY,CAAC,SAAS,CAAC;QAC5C,IAAI,YAAY,KAAK,CAAC;YAAE,eAAe,CAAC,YAAY,CAAC;QACrD,IAAI,UAAU,KAAK,CAAC;YAAE,aAAa,CAAC,UAAU,CAAC;AACnD,KAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAEX,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC;AACvD;;;;"}
@@ -1,6 +1,6 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- import { OptionsProps } from '../../types/options.types';
3
- import { DataDynamicBooleanProps, DataDynamicProps } from '../../types/utils/data.types';
1
+ import { type Dispatch, type SetStateAction } from 'react';
2
+ import { type OptionsProps } from '../../types/options.types';
3
+ import { type DataDynamicBooleanProps, type DataDynamicProps } from '../../types/utils/data.types';
4
4
  declare type Settings = [
5
5
  {
6
6
  state: OptionsProps | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/hooks/useSettings/index.tsx"],"sourcesContent":["import { Dispatch, SetStateAction, useEffect, useState } from 'react';\n\nimport { OptionsProps } from '../../types/options.types';\nimport { DataDynamicBooleanProps, DataDynamicProps } from '../../types/utils/data.types';\n\nimport { setComposedChartsMargin } from './utils/setComposedChartsMargin';\nimport { setDatas } from './utils/setDatas';\nimport { setGradientCharts } from './utils/setGradientCharts';\nimport { setLegendMargin } from './utils/setLegendMargin';\nimport { sortByIndex } from './utils/sortByIndex';\n\ntype Settings = [\n {\n state: OptionsProps | null;\n data: DataDynamicProps[];\n charts: DataDynamicBooleanProps;\n filterCount: number;\n },\n {\n setState: Dispatch<SetStateAction<OptionsProps | null>>;\n setData: Dispatch<SetStateAction<DataDynamicProps[]>>;\n setCharts: Dispatch<SetStateAction<DataDynamicBooleanProps>>;\n setFilterCount: Dispatch<SetStateAction<number>>;\n },\n];\n\nexport const useSettings = (options: OptionsProps): Settings => {\n const [state, setState] = useState<OptionsProps | null>(null);\n const [charts, setCharts] = useState<DataDynamicBooleanProps>({});\n const [data, setData] = useState<DataDynamicProps[]>([]);\n const [filterCount, setFilterCount] = useState<number>(0);\n\n useEffect(() => {\n const settings: OptionsProps = { ...options };\n const { brush, legend, series, labels, composeChart, xAxis } = settings;\n\n if (settings.legend?.margin && brush && legend)\n settings.legend.margin.top = setLegendMargin(brush, legend);\n\n settings.series = setGradientCharts(series);\n const [initData, chartsNames, count] = setDatas(settings.series, labels);\n\n settings.composeChart.margin = setComposedChartsMargin(composeChart, legend, brush, xAxis);\n settings.series = sortByIndex(settings.series);\n\n setState(settings);\n setData(initData);\n setCharts(chartsNames);\n setFilterCount(count);\n }, [options]);\n\n return [\n {\n state,\n data,\n charts,\n filterCount,\n },\n {\n setState,\n setData,\n setCharts,\n setFilterCount,\n },\n ];\n};\n"],"names":[],"mappings":";;;;;;;AA0Ba,MAAA,WAAW,GAAG,CAAC,OAAqB,KAAc;IAC3D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAsB,IAAI,CAAC;IAC7D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAA0B,EAAE,CAAC;IACjE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAqB,EAAE,CAAC;IACxD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IAEzD,SAAS,CAAC,MAAK;AACX,QAAA,MAAM,QAAQ,GAAiB,EAAE,GAAG,OAAO,EAAE;AAC7C,QAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,QAAQ;QAEvE,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,IAAI,MAAM;AAC1C,YAAA,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC;AAE/D,QAAA,QAAQ,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC;AAC3C,QAAA,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;AAExE,QAAA,QAAQ,CAAC,YAAY,CAAC,MAAM,GAAG,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;QAC1F,QAAQ,CAAC,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC;QAE9C,QAAQ,CAAC,QAAQ,CAAC;QAClB,OAAO,CAAC,QAAQ,CAAC;QACjB,SAAS,CAAC,WAAW,CAAC;QACtB,cAAc,CAAC,KAAK,CAAC;AACzB,KAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEb,OAAO;AACH,QAAA;YACI,KAAK;YACL,IAAI;YACJ,MAAM;YACN,WAAW;AACd,SAAA;AACD,QAAA;YACI,QAAQ;YACR,OAAO;YACP,SAAS;YACT,cAAc;AACjB,SAAA;KACJ;AACL;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/useSettings/index.ts"],"sourcesContent":["import { type Dispatch, type SetStateAction, useEffect, useState } from 'react';\n\nimport { type OptionsProps } from '../../types/options.types';\nimport { type DataDynamicBooleanProps, type DataDynamicProps } from '../../types/utils/data.types';\n\nimport { setComposedChartsMargin } from './utils/setComposedChartsMargin';\nimport { setDatas } from './utils/setDatas';\nimport { setGradientCharts } from './utils/setGradientCharts';\nimport { setLegendMargin } from './utils/setLegendMargin';\nimport { sortByIndex } from './utils/sortByIndex';\n\ntype Settings = [\n {\n state: OptionsProps | null;\n data: DataDynamicProps[];\n charts: DataDynamicBooleanProps;\n filterCount: number;\n },\n {\n setState: Dispatch<SetStateAction<OptionsProps | null>>;\n setData: Dispatch<SetStateAction<DataDynamicProps[]>>;\n setCharts: Dispatch<SetStateAction<DataDynamicBooleanProps>>;\n setFilterCount: Dispatch<SetStateAction<number>>;\n },\n];\n\nexport const useSettings = (options: OptionsProps): Settings => {\n const [state, setState] = useState<OptionsProps | null>(null);\n const [charts, setCharts] = useState<DataDynamicBooleanProps>({});\n const [data, setData] = useState<DataDynamicProps[]>([]);\n const [filterCount, setFilterCount] = useState<number>(0);\n\n useEffect(() => {\n const settings: OptionsProps = { ...options };\n const { brush, legend, series, labels, composeChart, xAxis } = settings;\n\n if (settings.legend?.margin && brush && legend)\n settings.legend.margin.top = setLegendMargin(brush, legend);\n\n settings.series = setGradientCharts(series);\n const [initData, chartsNames, count] = setDatas(settings.series, labels);\n\n settings.composeChart.margin = setComposedChartsMargin(composeChart, legend, brush, xAxis);\n settings.series = sortByIndex(settings.series);\n\n setState(settings);\n setData(initData);\n setCharts(chartsNames);\n setFilterCount(count);\n }, [options]);\n\n return [\n {\n state,\n data,\n charts,\n filterCount,\n },\n {\n setState,\n setData,\n setCharts,\n setFilterCount,\n },\n ];\n};\n"],"names":[],"mappings":";;;;;;;AA0Ba,MAAA,WAAW,GAAG,CAAC,OAAqB,KAAc;IAC3D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAsB,IAAI,CAAC;IAC7D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAA0B,EAAE,CAAC;IACjE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAqB,EAAE,CAAC;IACxD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;IAEzD,SAAS,CAAC,MAAK;AACX,QAAA,MAAM,QAAQ,GAAiB,EAAE,GAAG,OAAO,EAAE;AAC7C,QAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,QAAQ;QAEvE,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,IAAI,MAAM;AAC1C,YAAA,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC;AAE/D,QAAA,QAAQ,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC;AAC3C,QAAA,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;AAExE,QAAA,QAAQ,CAAC,YAAY,CAAC,MAAM,GAAG,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;QAC1F,QAAQ,CAAC,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC;QAE9C,QAAQ,CAAC,QAAQ,CAAC;QAClB,OAAO,CAAC,QAAQ,CAAC;QACjB,SAAS,CAAC,WAAW,CAAC;QACtB,cAAc,CAAC,KAAK,CAAC;AACzB,KAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEb,OAAO;AACH,QAAA;YACI,KAAK;YACL,IAAI;YACJ,MAAM;YACN,WAAW;AACd,SAAA;AACD,QAAA;YACI,QAAQ;YACR,OAAO;YACP,SAAS;YACT,cAAc;AACjB,SAAA;KACJ;AACL;;;;"}
@@ -1,7 +1,7 @@
1
- import { BrushProps } from '../../../types/brush.types';
2
- import { ComposedChartProps } from '../../../types/composedChart.types';
3
- import { LegendProps } from '../../../types/legend.types';
4
- import { XAxisProps } from '../../../types/xAxis.types';
1
+ import { type BrushProps } from '../../../types/brush.types';
2
+ import { type ComposedChartProps } from '../../../types/composedChart.types';
3
+ import { type LegendProps } from '../../../types/legend.types';
4
+ import { type XAxisProps } from '../../../types/xAxis.types';
5
5
  declare type ComposedChartsMarginResultProps = {
6
6
  top: number;
7
7
  bottom: number;
@@ -1 +1 @@
1
- {"version":3,"file":"setComposedChartsMargin.js","sources":["../../../../src/hooks/useSettings/utils/setComposedChartsMargin.ts"],"sourcesContent":["import { BrushProps } from '../../../types/brush.types';\nimport { ComposedChartProps } from '../../../types/composedChart.types';\nimport { LegendProps } from '../../../types/legend.types';\nimport { XAxisProps } from '../../../types/xAxis.types';\n\ntype ComposedChartsMarginResultProps = {\n top: number;\n bottom: number;\n left: number;\n right: number;\n};\n\nexport const setComposedChartsMargin = (\n composeChart: ComposedChartProps,\n legend: LegendProps | undefined,\n brush: BrushProps | undefined,\n xAxis: XAxisProps,\n): ComposedChartsMarginResultProps => ({\n top:\n (composeChart?.initMargin?.top || 0) +\n (legend?.verticalAlign === 'top' && legend?.marginTop ? Math.abs(legend.marginTop) : 0),\n bottom:\n (composeChart?.initMargin?.bottom || 0) +\n (xAxis?.tickMargin || 0) +\n (brush?.brushMargin || 0) +\n (legend?.verticalAlign !== 'top' && legend?.marginTop ? legend.marginTop : 0),\n left: composeChart?.initMargin?.left || 0,\n right: composeChart?.initMargin?.right || 0,\n});\n"],"names":[],"mappings":"AAYO,MAAM,uBAAuB,GAAG,CACnC,YAAgC,EAChC,MAA+B,EAC/B,KAA6B,EAC7B,KAAiB,MACkB;IACnC,GAAG,EACC,CAAC,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;SAClC,MAAM,EAAE,aAAa,KAAK,KAAK,IAAI,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3F,MAAM,EACF,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACtC,SAAC,KAAK,EAAE,UAAU,IAAI,CAAC,CAAC;AACxB,SAAC,KAAK,EAAE,WAAW,IAAI,CAAC,CAAC;AACzB,SAAC,MAAM,EAAE,aAAa,KAAK,KAAK,IAAI,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC;AACjF,IAAA,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,IAAI,CAAC;AACzC,IAAA,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;AAC9C,CAAA;;;;"}
1
+ {"version":3,"file":"setComposedChartsMargin.js","sources":["../../../../src/hooks/useSettings/utils/setComposedChartsMargin.ts"],"sourcesContent":["import { type BrushProps } from '../../../types/brush.types';\nimport { type ComposedChartProps } from '../../../types/composedChart.types';\nimport { type LegendProps } from '../../../types/legend.types';\nimport { type XAxisProps } from '../../../types/xAxis.types';\n\ntype ComposedChartsMarginResultProps = {\n top: number;\n bottom: number;\n left: number;\n right: number;\n};\n\nexport const setComposedChartsMargin = (\n composeChart: ComposedChartProps,\n legend: LegendProps | undefined,\n brush: BrushProps | undefined,\n xAxis: XAxisProps,\n): ComposedChartsMarginResultProps => ({\n top:\n (composeChart?.initMargin?.top || 0) +\n (legend?.verticalAlign === 'top' && legend?.marginTop ? Math.abs(legend.marginTop) : 0),\n bottom:\n (composeChart?.initMargin?.bottom || 0) +\n (xAxis?.tickMargin || 0) +\n (brush?.brushMargin || 0) +\n (legend?.verticalAlign !== 'top' && legend?.marginTop ? legend.marginTop : 0),\n left: composeChart?.initMargin?.left || 0,\n right: composeChart?.initMargin?.right || 0,\n});\n"],"names":[],"mappings":"AAYO,MAAM,uBAAuB,GAAG,CACnC,YAAgC,EAChC,MAA+B,EAC/B,KAA6B,EAC7B,KAAiB,MACkB;IACnC,GAAG,EACC,CAAC,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;SAClC,MAAM,EAAE,aAAa,KAAK,KAAK,IAAI,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3F,MAAM,EACF,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACtC,SAAC,KAAK,EAAE,UAAU,IAAI,CAAC,CAAC;AACxB,SAAC,KAAK,EAAE,WAAW,IAAI,CAAC,CAAC;AACzB,SAAC,MAAM,EAAE,aAAa,KAAK,KAAK,IAAI,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC;AACjF,IAAA,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,IAAI,CAAC;AACzC,IAAA,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;AAC9C,CAAA;;;;"}
@@ -1,5 +1,5 @@
1
- import { SeriaProps } from '../../../types/seria.types';
2
- import { DataDynamicBooleanProps, DataDynamicProps } from '../../../types/utils/data.types';
1
+ import { type SeriaProps } from '../../../types/seria.types';
2
+ import { type DataDynamicBooleanProps, type DataDynamicProps } from '../../../types/utils/data.types';
3
3
  declare type DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];
4
4
  export declare const setDatas: (series: SeriaProps[], labels: Array<string | number>) => DatasResultProps;
5
5
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"setDatas.js","sources":["../../../../src/hooks/useSettings/utils/setDatas.ts"],"sourcesContent":["import { SeriaProps } from '../../../types/seria.types';\nimport {\n DataDynamicBooleanProps,\n DataDynamicProps,\n DataProps,\n} from '../../../types/utils/data.types';\n\ntype DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];\n\nexport const setDatas = (\n series: SeriaProps[],\n labels: Array<string | number>,\n): DatasResultProps => {\n const initData: DataDynamicProps[] = [];\n const chartsNames: DataDynamicBooleanProps = {};\n let count = 0;\n\n for (let i = 0; i < series.length; i++) {\n const {\n properties: { dataKey = '' } = {},\n data: seriaData = [],\n hideLegend,\n hide,\n } = series[i];\n\n if (!hideLegend && !hide) count += 1;\n\n labels.map((label) => {\n const item = seriaData.find((d: DataProps) => d.label === label);\n\n if (item) {\n const obj: DataDynamicProps = {\n label,\n };\n\n obj[`${dataKey}`] = item.value;\n\n if (!chartsNames[`${dataKey}`]) chartsNames[`${dataKey}`] = true;\n\n const index = initData\n .map((dataItem: DataDynamicProps) => dataItem.label)\n .indexOf(label);\n\n if (index === -1) initData.push(obj);\n else initData[index] = { ...initData[index], ...obj };\n }\n\n return null;\n });\n }\n\n return [initData, chartsNames, count];\n};\n"],"names":[],"mappings":"MASa,QAAQ,GAAG,CACpB,MAAoB,EACpB,MAA8B,KACZ;IAClB,MAAM,QAAQ,GAAuB,EAAE;IACvC,MAAM,WAAW,GAA4B,EAAE;IAC/C,IAAI,KAAK,GAAG,CAAC;AAEb,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,MAAM,EACF,UAAU,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,EAAE,EACjC,IAAI,EAAE,SAAS,GAAG,EAAE,EACpB,UAAU,EACV,IAAI,GACP,GAAG,MAAM,CAAC,CAAC,CAAC;AAEb,QAAA,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI;YAAE,KAAK,IAAI,CAAC;AAEpC,QAAA,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;AACjB,YAAA,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAY,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC;AAEhE,YAAA,IAAI,IAAI,EAAE;AACN,gBAAA,MAAM,GAAG,GAAqB;oBAC1B,KAAK;iBACR;gBAED,GAAG,CAAC,GAAG,OAAO,CAAA,CAAE,CAAC,GAAG,IAAI,CAAC,KAAK;AAE9B,gBAAA,IAAI,CAAC,WAAW,CAAC,CAAG,EAAA,OAAO,EAAE,CAAC;AAAE,oBAAA,WAAW,CAAC,CAAG,EAAA,OAAO,EAAE,CAAC,GAAG,IAAI;gBAEhE,MAAM,KAAK,GAAG;qBACT,GAAG,CAAC,CAAC,QAA0B,KAAK,QAAQ,CAAC,KAAK;qBAClD,OAAO,CAAC,KAAK,CAAC;gBAEnB,IAAI,KAAK,KAAK,EAAE;AAAE,oBAAA,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;AAC/B,oBAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,EAAE;AACxD;AAED,YAAA,OAAO,IAAI;AACf,SAAC,CAAC;AACL;AAED,IAAA,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC;AACzC;;;;"}
1
+ {"version":3,"file":"setDatas.js","sources":["../../../../src/hooks/useSettings/utils/setDatas.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport {\n type DataDynamicBooleanProps,\n type DataDynamicProps,\n type DataProps,\n} from '../../../types/utils/data.types';\n\ntype DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];\n\nexport const setDatas = (\n series: SeriaProps[],\n labels: Array<string | number>,\n): DatasResultProps => {\n const initData: DataDynamicProps[] = [];\n const chartsNames: DataDynamicBooleanProps = {};\n let count = 0;\n\n for (let i = 0; i < series.length; i++) {\n const {\n properties: { dataKey = '' } = {},\n data: seriaData = [],\n hideLegend,\n hide,\n } = series[i];\n\n if (!hideLegend && !hide) count += 1;\n\n labels.map((label) => {\n const item = seriaData.find((d: DataProps) => d.label === label);\n\n if (item) {\n const obj: DataDynamicProps = {\n label,\n };\n\n obj[`${dataKey}`] = item.value;\n\n if (!chartsNames[`${dataKey}`]) chartsNames[`${dataKey}`] = true;\n\n const index = initData\n .map((dataItem: DataDynamicProps) => dataItem.label)\n .indexOf(label);\n\n if (index === -1) initData.push(obj);\n else initData[index] = { ...initData[index], ...obj };\n }\n\n return null;\n });\n }\n\n return [initData, chartsNames, count];\n};\n"],"names":[],"mappings":"MASa,QAAQ,GAAG,CACpB,MAAoB,EACpB,MAA8B,KACZ;IAClB,MAAM,QAAQ,GAAuB,EAAE;IACvC,MAAM,WAAW,GAA4B,EAAE;IAC/C,IAAI,KAAK,GAAG,CAAC;AAEb,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,MAAM,EACF,UAAU,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,EAAE,EACjC,IAAI,EAAE,SAAS,GAAG,EAAE,EACpB,UAAU,EACV,IAAI,GACP,GAAG,MAAM,CAAC,CAAC,CAAC;AAEb,QAAA,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI;YAAE,KAAK,IAAI,CAAC;AAEpC,QAAA,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;AACjB,YAAA,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAY,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC;AAEhE,YAAA,IAAI,IAAI,EAAE;AACN,gBAAA,MAAM,GAAG,GAAqB;oBAC1B,KAAK;iBACR;gBAED,GAAG,CAAC,GAAG,OAAO,CAAA,CAAE,CAAC,GAAG,IAAI,CAAC,KAAK;AAE9B,gBAAA,IAAI,CAAC,WAAW,CAAC,CAAG,EAAA,OAAO,EAAE,CAAC;AAAE,oBAAA,WAAW,CAAC,CAAG,EAAA,OAAO,EAAE,CAAC,GAAG,IAAI;gBAEhE,MAAM,KAAK,GAAG;qBACT,GAAG,CAAC,CAAC,QAA0B,KAAK,QAAQ,CAAC,KAAK;qBAClD,OAAO,CAAC,KAAK,CAAC;gBAEnB,IAAI,KAAK,KAAK,EAAE;AAAE,oBAAA,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;AAC/B,oBAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,EAAE;AACxD;AAED,YAAA,OAAO,IAAI;AACf,SAAC,CAAC;AACL;AAED,IAAA,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC;AACzC;;;;"}
@@ -1,2 +1,2 @@
1
- import { SeriaProps } from '../../../types/seria.types';
1
+ import { type SeriaProps } from '../../../types/seria.types';
2
2
  export declare const setGradientCharts: (series: SeriaProps[]) => SeriaProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"setGradientCharts.js","sources":["../../../../src/hooks/useSettings/utils/setGradientCharts.ts"],"sourcesContent":["import { SeriaProps } from '../../../types/seria.types';\nimport { DataProps } from '../../../types/utils/data.types';\n\nexport const setGradientCharts = (series: SeriaProps[]): SeriaProps[] => {\n const filterSeries = series.filter((item) => item.chart !== 'gradient');\n\n return filterSeries.reduce((accum: SeriaProps[], item: SeriaProps) => {\n const { chart, data: dataSeria, offset, fill } = item;\n\n if (chart === 'area') {\n let newData = null;\n\n if (offset) {\n newData = dataSeria.map((d: DataProps) => {\n const { label, value } = d;\n\n return {\n label,\n value: Math.ceil(value - value * offset),\n };\n });\n }\n\n accum.push({\n ...item,\n zIndex: -100,\n chart: 'gradient',\n hideLegend: true,\n hideTooltip: true,\n properties: {\n ...item.properties,\n dataKey: `${item.properties.dataKey}-gradient`,\n fill,\n },\n data: newData || item.data,\n });\n }\n\n accum.push(item);\n\n return accum;\n }, []);\n};\n"],"names":[],"mappings":"AAGa,MAAA,iBAAiB,GAAG,CAAC,MAAoB,KAAkB;AACpE,IAAA,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC;IAEvE,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,KAAmB,EAAE,IAAgB,KAAI;AACjE,QAAA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI;QAErD,IAAI,KAAK,KAAK,MAAM,EAAE;YAClB,IAAI,OAAO,GAAG,IAAI;AAElB,YAAA,IAAI,MAAM,EAAE;gBACR,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAY,KAAI;AACrC,oBAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC;oBAE1B,OAAO;wBACH,KAAK;wBACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;qBAC3C;AACL,iBAAC,CAAC;AACL;YAED,KAAK,CAAC,IAAI,CAAC;AACP,gBAAA,GAAG,IAAI;gBACP,MAAM,EAAE,IAAI;AACZ,gBAAA,KAAK,EAAE,UAAU;AACjB,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,UAAU,EAAE;oBACR,GAAG,IAAI,CAAC,UAAU;AAClB,oBAAA,OAAO,EAAE,CAAG,EAAA,IAAI,CAAC,UAAU,CAAC,OAAO,CAAW,SAAA,CAAA;oBAC9C,IAAI;AACP,iBAAA;AACD,gBAAA,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI;AAC7B,aAAA,CAAC;AACL;AAED,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAEhB,QAAA,OAAO,KAAK;KACf,EAAE,EAAE,CAAC;AACV;;;;"}
1
+ {"version":3,"file":"setGradientCharts.js","sources":["../../../../src/hooks/useSettings/utils/setGradientCharts.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport { type DataProps } from '../../../types/utils/data.types';\n\nexport const setGradientCharts = (series: SeriaProps[]): SeriaProps[] => {\n const filterSeries = series.filter((item) => item.chart !== 'gradient');\n\n return filterSeries.reduce((accum: SeriaProps[], item: SeriaProps) => {\n const { chart, data: dataSeria, offset, fill } = item;\n\n if (chart === 'area') {\n let newData = null;\n\n if (offset) {\n newData = dataSeria.map((d: DataProps) => {\n const { label, value } = d;\n\n return {\n label,\n value: Math.ceil(value - value * offset),\n };\n });\n }\n\n accum.push({\n ...item,\n zIndex: -100,\n chart: 'gradient',\n hideLegend: true,\n hideTooltip: true,\n properties: {\n ...item.properties,\n dataKey: `${item.properties.dataKey}-gradient`,\n fill,\n },\n data: newData || item.data,\n });\n }\n\n accum.push(item);\n\n return accum;\n }, []);\n};\n"],"names":[],"mappings":"AAGa,MAAA,iBAAiB,GAAG,CAAC,MAAoB,KAAkB;AACpE,IAAA,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC;IAEvE,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,KAAmB,EAAE,IAAgB,KAAI;AACjE,QAAA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI;QAErD,IAAI,KAAK,KAAK,MAAM,EAAE;YAClB,IAAI,OAAO,GAAG,IAAI;AAElB,YAAA,IAAI,MAAM,EAAE;gBACR,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAY,KAAI;AACrC,oBAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC;oBAE1B,OAAO;wBACH,KAAK;wBACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;qBAC3C;AACL,iBAAC,CAAC;AACL;YAED,KAAK,CAAC,IAAI,CAAC;AACP,gBAAA,GAAG,IAAI;gBACP,MAAM,EAAE,IAAI;AACZ,gBAAA,KAAK,EAAE,UAAU;AACjB,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,UAAU,EAAE;oBACR,GAAG,IAAI,CAAC,UAAU;AAClB,oBAAA,OAAO,EAAE,CAAG,EAAA,IAAI,CAAC,UAAU,CAAC,OAAO,CAAW,SAAA,CAAA;oBAC9C,IAAI;AACP,iBAAA;AACD,gBAAA,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI;AAC7B,aAAA,CAAC;AACL;AAED,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAEhB,QAAA,OAAO,KAAK;KACf,EAAE,EAAE,CAAC;AACV;;;;"}
@@ -1,3 +1,3 @@
1
- import { BrushProps } from '../../../types/brush.types';
2
- import { LegendProps } from '../../../types/legend.types';
1
+ import { type BrushProps } from '../../../types/brush.types';
2
+ import { type LegendProps } from '../../../types/legend.types';
3
3
  export declare const setLegendMargin: (brush: BrushProps, legend: LegendProps) => number;
@@ -1 +1 @@
1
- {"version":3,"file":"setLegendMargin.js","sources":["../../../../src/hooks/useSettings/utils/setLegendMargin.ts"],"sourcesContent":["import { BrushProps } from '../../../types/brush.types';\nimport { LegendProps } from '../../../types/legend.types';\n\nexport const setLegendMargin = (brush: BrushProps, legend: LegendProps): number => {\n let top = 0;\n\n if (typeof brush?.brushMargin !== 'number' || !legend?.verticalAlign) return top;\n\n if (legend.verticalAlign === 'top') {\n top = legend.marginTop ? Number(legend.marginTop * -1) : 0;\n } else {\n top = legend?.marginTop ? legend.marginTop + (brush?.brushMargin || 0) : brush?.brushMargin;\n }\n\n return top;\n};\n"],"names":[],"mappings":"MAGa,eAAe,GAAG,CAAC,KAAiB,EAAE,MAAmB,KAAY;IAC9E,IAAI,GAAG,GAAG,CAAC;IAEX,IAAI,OAAO,KAAK,EAAE,WAAW,KAAK,QAAQ,IAAI,CAAC,MAAM,EAAE,aAAa;AAAE,QAAA,OAAO,GAAG;AAEhF,IAAA,IAAI,MAAM,CAAC,aAAa,KAAK,KAAK,EAAE;QAChC,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC;AAC7D;AAAM,SAAA;QACH,GAAG,GAAG,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,KAAK,EAAE,WAAW,IAAI,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW;AAC9F;AAED,IAAA,OAAO,GAAG;AACd;;;;"}
1
+ {"version":3,"file":"setLegendMargin.js","sources":["../../../../src/hooks/useSettings/utils/setLegendMargin.ts"],"sourcesContent":["import { type BrushProps } from '../../../types/brush.types';\nimport { type LegendProps } from '../../../types/legend.types';\n\nexport const setLegendMargin = (brush: BrushProps, legend: LegendProps): number => {\n let top = 0;\n\n if (typeof brush?.brushMargin !== 'number' || !legend?.verticalAlign) return top;\n\n if (legend.verticalAlign === 'top') {\n top = legend.marginTop ? Number(legend.marginTop * -1) : 0;\n } else {\n top = legend?.marginTop ? legend.marginTop + (brush?.brushMargin || 0) : brush?.brushMargin;\n }\n\n return top;\n};\n"],"names":[],"mappings":"MAGa,eAAe,GAAG,CAAC,KAAiB,EAAE,MAAmB,KAAY;IAC9E,IAAI,GAAG,GAAG,CAAC;IAEX,IAAI,OAAO,KAAK,EAAE,WAAW,KAAK,QAAQ,IAAI,CAAC,MAAM,EAAE,aAAa;AAAE,QAAA,OAAO,GAAG;AAEhF,IAAA,IAAI,MAAM,CAAC,aAAa,KAAK,KAAK,EAAE;QAChC,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC;AAC7D;AAAM,SAAA;QACH,GAAG,GAAG,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,KAAK,EAAE,WAAW,IAAI,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW;AAC9F;AAED,IAAA,OAAO,GAAG;AACd;;;;"}
@@ -1,2 +1,2 @@
1
- import { SeriaProps } from '../../../types/seria.types';
1
+ import { type SeriaProps } from '../../../types/seria.types';
2
2
  export declare const sortByIndex: (series: SeriaProps[]) => SeriaProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"sortByIndex.js","sources":["../../../../src/hooks/useSettings/utils/sortByIndex.ts"],"sourcesContent":["import { SeriaProps } from '../../../types/seria.types';\n\nexport const sortByIndex = (series: SeriaProps[]): SeriaProps[] =>\n series.sort((a: SeriaProps, b: SeriaProps) => {\n if (a?.zIndex && b?.zIndex && a?.zIndex > b?.zIndex) {\n return 1;\n }\n\n return -1;\n });\n"],"names":[],"mappings":"AAEa,MAAA,WAAW,GAAG,CAAC,MAAoB,KAC5C,MAAM,CAAC,IAAI,CAAC,CAAC,CAAa,EAAE,CAAa,KAAI;AACzC,IAAA,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE;AACjD,QAAA,OAAO,CAAC;AACX;IAED,OAAO,EAAE;AACb,CAAC;;;;"}
1
+ {"version":3,"file":"sortByIndex.js","sources":["../../../../src/hooks/useSettings/utils/sortByIndex.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\n\nexport const sortByIndex = (series: SeriaProps[]): SeriaProps[] =>\n series.sort((a: SeriaProps, b: SeriaProps) => {\n if (a?.zIndex && b?.zIndex && a?.zIndex > b?.zIndex) {\n return 1;\n }\n\n return -1;\n });\n"],"names":[],"mappings":"AAEa,MAAA,WAAW,GAAG,CAAC,MAAoB,KAC5C,MAAM,CAAC,IAAI,CAAC,CAAC,CAAa,EAAE,CAAa,KAAI;AACzC,IAAA,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE;AACjD,QAAA,OAAO,CAAC;AACX;IAED,OAAO,EAAE;AACb,CAAC;;;;"}
@@ -1,4 +1,5 @@
1
- .coreChart :global(.recharts-line path) {
1
+
2
+ .coreChart :global(.recharts-line path) {
2
3
  transition: d 0.2s ease-out;
3
4
  }
4
5
 
@@ -9,7 +10,9 @@
9
10
  }
10
11
 
11
12
  .bar {
12
- transition: opacity 0.2s ease-out, d 0.2s ease-out;
13
+ transition:
14
+ opacity 0.2s ease-out,
15
+ d 0.2s ease-out;
13
16
  }
14
17
 
15
18
  .unfocused {
@@ -1,5 +1,5 @@
1
- import { ReactText } from 'react';
2
- import { DataKey } from 'recharts/types/util/types';
1
+ import { type ReactText } from 'react';
2
+ import { type DataKey } from 'recharts/types/util/types';
3
3
  export interface BrushProps {
4
4
  /**
5
5
  * Ключ данных
@@ -1,8 +1,8 @@
1
- import { ReactElement } from 'react';
2
- import { RectangleProps } from 'recharts';
3
- import { DataKey } from 'recharts/types/util/types';
4
- import { DataProps } from './utils/data.types';
5
- import { DotSettingProps } from './utils/dot.types';
1
+ import { type ReactElement } from 'react';
2
+ import { type RectangleProps } from 'recharts';
3
+ import { type DataKey } from 'recharts/types/util/types';
4
+ import { type DataProps } from './utils/data.types';
5
+ import { type DotSettingProps } from './utils/dot.types';
6
6
  declare type CurveType = 'linear' | 'monotone' | 'step';
7
7
  export declare type RectangleShapeType = ReactElement<SVGElement> | ((props: any) => ReactElement<SVGElement>) | RectangleProps | boolean;
8
8
  export interface ChartProps {
@@ -1,4 +1,4 @@
1
- import { Formatter } from 'recharts/types/component/DefaultLegendContent';
1
+ import { type Formatter } from 'recharts/types/component/DefaultLegendContent';
2
2
  export interface LegendProps {
3
3
  /**
4
4
  * Выравнивание элементов легенды в вертикальном направлении.
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import { BrushProps } from './brush.types';
3
- import { CartesianGridProps } from './cartesianGrid.types';
4
- import { ComposedChartProps } from './composedChart.types';
5
- import { LegendProps } from './legend.types';
6
- import { ResponsiveContainerProps } from './responsiveContainer.types';
7
- import { SeriaProps } from './seria.types';
8
- import { TooltipProps } from './tooltip.types';
9
- import { XAxisProps } from './xAxis.types';
10
- import { YAxisProps } from './yAxis.types';
1
+ import type React from 'react';
2
+ import { type BrushProps } from './brush.types';
3
+ import { type CartesianGridProps } from './cartesianGrid.types';
4
+ import { type ComposedChartProps } from './composedChart.types';
5
+ import { type LegendProps } from './legend.types';
6
+ import { type ResponsiveContainerProps } from './responsiveContainer.types';
7
+ import { type SeriaProps } from './seria.types';
8
+ import { type TooltipProps } from './tooltip.types';
9
+ import { type XAxisProps } from './xAxis.types';
10
+ import { type YAxisProps } from './yAxis.types';
11
11
  export interface OptionsProps {
12
12
  /**
13
13
  * Индефикатор графика
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { DataDynamicBooleanProps } from './utils/data.types';
2
+ import { type DataDynamicBooleanProps } from './utils/data.types';
3
3
  export interface PayloadProps {
4
4
  /**
5
5
  * Цвет графика
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export interface ResponsiveContainerProps {
3
3
  /**
4
4
  * Debounce функция при ресайзе
@@ -1,7 +1,7 @@
1
- import { DataProps } from './utils/data.types';
2
- import { GradientProps } from './utils/gradient.types';
3
- import { ChartProps } from './chart.types';
4
- import { LabelListProps } from './labelList.types';
1
+ import { type DataProps } from './utils/data.types';
2
+ import { type GradientProps } from './utils/gradient.types';
3
+ import { type ChartProps } from './chart.types';
4
+ import { type LabelListProps } from './labelList.types';
5
5
  export declare type RadiusProp = {
6
6
  top?: number;
7
7
  bottom?: number;
@@ -1,5 +1,5 @@
1
- import { ReactElement, ReactText, SVGProps } from 'react';
2
- import { AnimationTiming } from 'recharts/types/util/types';
1
+ import { type ReactElement, type ReactText, type SVGProps } from 'react';
2
+ import { type AnimationTiming } from 'recharts/types/util/types';
3
3
  export interface TooltipProps {
4
4
  /**
5
5
  * Разделитель между именем и значением.
@@ -1,4 +1,4 @@
1
- import { ReactElement, SVGProps } from 'react';
1
+ import { type ReactElement, type SVGProps } from 'react';
2
2
  export interface AxisProps {
3
3
  /**
4
4
  * Скрыть ось
@@ -1,5 +1,5 @@
1
- import { CoordinatesProps } from './coordinates.types';
2
- import { DataProps } from './data.types';
1
+ import { type CoordinatesProps } from './coordinates.types';
2
+ import { type DataProps } from './data.types';
3
3
  export interface DotSettingProps {
4
4
  /**
5
5
  * Значение media query.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { XAxisProps } from '../xAxis.types';
2
+ import { type XAxisProps } from '../xAxis.types';
3
3
  export interface TickProps {
4
4
  payload: {
5
5
  coordinate: number;
@@ -1,4 +1,4 @@
1
- import { AxisProps } from './utils/axis.types';
1
+ import { type AxisProps } from './utils/axis.types';
2
2
  export interface XAxisProps extends AxisProps {
3
3
  /**
4
4
  * Ключ данных, отображаемых на оси.
@@ -1,4 +1,4 @@
1
- import { AxisProps } from './utils/axis.types';
1
+ import { type AxisProps } from './utils/axis.types';
2
2
  export interface YAxisProps extends AxisProps {
3
3
  /**
4
4
  * Ориентация оси
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-chart",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Chart component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "main": "index.js",
11
11
  "module": "./esm/index.js",
12
12
  "dependencies": {
13
- "@alfalab/core-components-typography": "^5.0.1",
13
+ "@alfalab/core-components-typography": "^5.0.2",
14
14
  "classnames": "^2.5.1",
15
15
  "recharts": "^2.12.7",
16
16
  "tslib": "^2.4.0"
@@ -23,6 +23,6 @@
23
23
  "access": "public",
24
24
  "directory": "dist"
25
25
  },
26
- "themesVersion": "14.1.0",
26
+ "themesVersion": "14.1.2",
27
27
  "varsVersion": "10.1.0"
28
28
  }
package/src/Component.tsx CHANGED
@@ -27,13 +27,13 @@ import { TooltipContent } from './components/TooltipContent';
27
27
  import { CustomizedHOC } from './hoc/Customized';
28
28
  import { useSettings } from './hooks/useSettings';
29
29
  import {
30
- ActiveDotProps,
31
- CoordinatesProps,
32
- DataDynamicBooleanProps,
33
- DataDynamicProps,
34
- OptionsProps,
35
- SeriaProps,
36
- ToggleChartProps,
30
+ type ActiveDotProps,
31
+ type CoordinatesProps,
32
+ type DataDynamicBooleanProps,
33
+ type DataDynamicProps,
34
+ type OptionsProps,
35
+ type SeriaProps,
36
+ type ToggleChartProps,
37
37
  } from './types';
38
38
 
39
39
  import styles from './index.module.css';
@@ -287,7 +287,7 @@ export const Chart = (props: OptionsProps) => {
287
287
 
288
288
  // Позиционирование brush
289
289
  useEffect(() => {
290
- if (!state || !state.brush) return;
290
+ if (!state?.brush) return;
291
291
  if (!heightLegend || heightLegend === 0) return;
292
292
 
293
293
  const align = state?.legend?.verticalAlign;
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
4
  import { PointIcon } from '../../icons/Point';
5
- import { DotProps, DotSettingProps } from '../../types/utils/dot.types';
5
+ import { type DotProps, type DotSettingProps } from '../../types/utils/dot.types';
6
6
 
7
7
  import styles from './index.module.css';
8
8
 
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/index.css';
1
+ @import '@alfalab/core-components-vars/src/no-typography-index.css';
2
2
 
3
3
  .legendContent {
4
4
  display: flex;
@@ -7,9 +7,9 @@ import { CircleIcon } from '../../icons/Circle';
7
7
  import { CircleLineIcon } from '../../icons/CircleLine';
8
8
  import { FilledCircleIcon } from '../../icons/FilledCircle';
9
9
  import { StrokeCircleIcon } from '../../icons/StrokeCircle';
10
- import { LegendProps } from '../../types/legend.types';
11
- import { SeriaProps } from '../../types/seria.types';
12
- import { DataDynamicBooleanProps } from '../../types/utils/data.types';
10
+ import { type LegendProps } from '../../types/legend.types';
11
+ import { type SeriaProps } from '../../types/seria.types';
12
+ import { type DataDynamicBooleanProps } from '../../types/utils/data.types';
13
13
 
14
14
  import styles from './index.module.css';
15
15
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- import { GradientProps, LinearGradientProps } from '../types/utils/gradient.types';
3
+ import { type GradientProps, type LinearGradientProps } from '../types/utils/gradient.types';
4
4
 
5
5
  export const LinearGradient = ({ id, gid, points }: LinearGradientProps): React.ReactElement => (
6
6
  <linearGradient key={`${id}-${gid}`} id={`${id}-${gid}`} x1='0' y1='0' x2='0' y2='1'>
@@ -16,16 +16,16 @@ const getPath = (
16
16
  `
17
17
  M${x + ((height !== 0 && bottomRadius) || 0)} ${initY + initHeight || 0}
18
18
  Q${x} ${initY + initHeight} ${x} ${
19
- initY + initHeight - ((height !== 0 && bottomRadius) || 0)
20
- }
19
+ initY + initHeight - ((height !== 0 && bottomRadius) || 0)
20
+ }
21
21
  L${x} ${initY + ((height !== 0 && topRadius) || 0)}
22
22
  Q${x} ${initY} ${x + ((height !== 0 && topRadius) || 0)} ${initY}
23
23
  L${x + width - ((height !== 0 && topRadius) || 0)} ${initY}
24
24
  Q${x + width} ${initY} ${x + width} ${initY + (topRadius || 0)}
25
25
  L${x + width} ${initY + initHeight - ((height !== 0 && bottomRadius) || 0)}
26
26
  Q${x + width} ${initY + initHeight} ${x + width - ((height !== 0 && bottomRadius) || 0)} ${
27
- initY + initHeight
28
- }
27
+ initY + initHeight
28
+ }
29
29
  Z
30
30
  `;
31
31
 
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/index.css';
1
+ @import '@alfalab/core-components-vars/src/no-typography-index.css';
2
2
 
3
3
  .tickText {
4
4
  fill: var(--color-light-text-primary);
@@ -9,8 +9,3 @@
9
9
  opacity: 0.3;
10
10
  fill: var(--color-dark-base-bg-primary);
11
11
  }
12
-
13
- .circle {
14
- opacity: 0.3;
15
- fill: var(--color-dark-base-bg-primary);
16
- }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- import { TickProps } from '../../types/utils/tick.types';
4
+ import { type TickProps } from '../../types/utils/tick.types';
5
5
 
6
6
  import styles from './index.module.css';
7
7
 
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/index.css';
1
+ @import '@alfalab/core-components-vars/src/no-typography-index.css';
2
2
 
3
3
  .tooltip {
4
4
  background-color: var(--color-light-base-bg-primary);
@@ -3,9 +3,9 @@ import cn from 'classnames';
3
3
 
4
4
  import { Text } from '@alfalab/core-components-typography';
5
5
 
6
- import { PayloadProps } from '../../types/payload.types';
7
- import { SeriaProps } from '../../types/seria.types';
8
- import { TooltipProps } from '../../types/tooltip.types';
6
+ import { type PayloadProps } from '../../types/payload.types';
7
+ import { type SeriaProps } from '../../types/seria.types';
8
+ import { type TooltipProps } from '../../types/tooltip.types';
9
9
 
10
10
  import styles from './index.module.css';
11
11
 
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useState } from 'react';
2
2
 
3
- import { RadiusProp } from '../../types/seria.types';
3
+ import { type RadiusProp } from '../../types/seria.types';
4
4
 
5
5
  import { getRadius } from './utils/getRadius';
6
6
 
@@ -36,8 +36,8 @@ export const usePathBar = (props: usePathBarProps): number[] => {
36
36
  const heightInit = heightCheck
37
37
  ? (radiusTop || radiusBottom) && radiusTop + radiusBottom
38
38
  : height > 0 && height < 2
39
- ? 2
40
- : height;
39
+ ? 2
40
+ : height;
41
41
 
42
42
  if (background && y) {
43
43
  const yInit = heightCheck
@@ -1,7 +1,7 @@
1
- import { Dispatch, SetStateAction, useEffect, useState } from 'react';
1
+ import { type Dispatch, type SetStateAction, useEffect, useState } from 'react';
2
2
 
3
- import { OptionsProps } from '../../types/options.types';
4
- import { DataDynamicBooleanProps, DataDynamicProps } from '../../types/utils/data.types';
3
+ import { type OptionsProps } from '../../types/options.types';
4
+ import { type DataDynamicBooleanProps, type DataDynamicProps } from '../../types/utils/data.types';
5
5
 
6
6
  import { setComposedChartsMargin } from './utils/setComposedChartsMargin';
7
7
  import { setDatas } from './utils/setDatas';
@@ -1,7 +1,7 @@
1
- import { BrushProps } from '../../../types/brush.types';
2
- import { ComposedChartProps } from '../../../types/composedChart.types';
3
- import { LegendProps } from '../../../types/legend.types';
4
- import { XAxisProps } from '../../../types/xAxis.types';
1
+ import { type BrushProps } from '../../../types/brush.types';
2
+ import { type ComposedChartProps } from '../../../types/composedChart.types';
3
+ import { type LegendProps } from '../../../types/legend.types';
4
+ import { type XAxisProps } from '../../../types/xAxis.types';
5
5
 
6
6
  type ComposedChartsMarginResultProps = {
7
7
  top: number;
@@ -1,8 +1,8 @@
1
- import { SeriaProps } from '../../../types/seria.types';
1
+ import { type SeriaProps } from '../../../types/seria.types';
2
2
  import {
3
- DataDynamicBooleanProps,
4
- DataDynamicProps,
5
- DataProps,
3
+ type DataDynamicBooleanProps,
4
+ type DataDynamicProps,
5
+ type DataProps,
6
6
  } from '../../../types/utils/data.types';
7
7
 
8
8
  type DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];