@hitachivantara/uikit-react-viz 4.1.9 → 5.1.0

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 (291) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/LineChart/LineChart.cjs +398 -0
  3. package/dist/cjs/components/LineChart/LineChart.cjs.map +1 -0
  4. package/dist/cjs/components/LineChart/LineChart.styles.cjs +85 -0
  5. package/dist/cjs/components/LineChart/LineChart.styles.cjs.map +1 -0
  6. package/dist/cjs/hooks/useVizTheme.cjs +9 -0
  7. package/dist/cjs/hooks/useVizTheme.cjs.map +1 -0
  8. package/dist/cjs/index.cjs +8 -0
  9. package/dist/cjs/index.cjs.map +1 -0
  10. package/dist/cjs/providers/Provider.cjs +137 -0
  11. package/dist/cjs/providers/Provider.cjs.map +1 -0
  12. package/dist/cjs/utils/getAgFunc.cjs +5 -0
  13. package/dist/cjs/utils/getAgFunc.cjs.map +1 -0
  14. package/dist/cjs/utils/getAxisType.cjs +16 -0
  15. package/dist/cjs/utils/getAxisType.cjs.map +1 -0
  16. package/dist/cjs/utils/getLegendIcon.cjs +10 -0
  17. package/dist/cjs/utils/getLegendIcon.cjs.map +1 -0
  18. package/dist/esm/components/LineChart/LineChart.js +377 -0
  19. package/dist/esm/components/LineChart/LineChart.js.map +1 -0
  20. package/dist/esm/components/LineChart/LineChart.styles.js +85 -0
  21. package/dist/esm/components/LineChart/LineChart.styles.js.map +1 -0
  22. package/dist/esm/hooks/useVizTheme.js +9 -0
  23. package/dist/esm/hooks/useVizTheme.js.map +1 -0
  24. package/dist/esm/index.js +8 -0
  25. package/dist/esm/index.js.map +1 -0
  26. package/dist/esm/providers/Provider.js +118 -0
  27. package/dist/esm/providers/Provider.js.map +1 -0
  28. package/dist/esm/utils/getAgFunc.js +5 -0
  29. package/dist/esm/utils/getAgFunc.js.map +1 -0
  30. package/dist/esm/utils/getAxisType.js +16 -0
  31. package/dist/esm/utils/getAxisType.js.map +1 -0
  32. package/dist/esm/utils/getLegendIcon.js +10 -0
  33. package/dist/esm/utils/getLegendIcon.js.map +1 -0
  34. package/dist/types/index.d.ts +229 -0
  35. package/package.json +36 -48
  36. package/LICENSE.txt +0 -201
  37. package/dist/Barchart/Barchart.d.ts +0 -14
  38. package/dist/Barchart/Barchart.js +0 -214
  39. package/dist/Barchart/Barchart.js.map +0 -1
  40. package/dist/Barchart/barchartPlotlyOverrides.js +0 -47
  41. package/dist/Barchart/barchartPlotlyOverrides.js.map +0 -1
  42. package/dist/Barchart/index.d.ts +0 -2
  43. package/dist/Barchart/index.js +0 -14
  44. package/dist/Barchart/index.js.map +0 -1
  45. package/dist/Barchart/styles.js +0 -10
  46. package/dist/Barchart/styles.js.map +0 -1
  47. package/dist/Chart/Chart.d.ts +0 -44
  48. package/dist/Chart/Chart.js +0 -194
  49. package/dist/Chart/Chart.js.map +0 -1
  50. package/dist/Chart/Plot/Plot.d.ts +0 -43
  51. package/dist/Chart/Plot/Plot.js +0 -110
  52. package/dist/Chart/Plot/Plot.js.map +0 -1
  53. package/dist/Chart/Plot/index.d.ts +0 -2
  54. package/dist/Chart/Plot/index.js +0 -14
  55. package/dist/Chart/Plot/index.js.map +0 -1
  56. package/dist/Chart/Plot/styles.js +0 -10
  57. package/dist/Chart/Plot/styles.js.map +0 -1
  58. package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -143
  59. package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +0 -1
  60. package/dist/Chart/Tooltip/MultiTooltip/index.js +0 -14
  61. package/dist/Chart/Tooltip/MultiTooltip/index.js.map +0 -1
  62. package/dist/Chart/Tooltip/MultiTooltip/styles.js +0 -49
  63. package/dist/Chart/Tooltip/MultiTooltip/styles.js.map +0 -1
  64. package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -73
  65. package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +0 -1
  66. package/dist/Chart/Tooltip/SingleTooltip/index.js +0 -14
  67. package/dist/Chart/Tooltip/SingleTooltip/index.js.map +0 -1
  68. package/dist/Chart/Tooltip/SingleTooltip/styles.js +0 -24
  69. package/dist/Chart/Tooltip/SingleTooltip/styles.js.map +0 -1
  70. package/dist/Chart/Tooltip/Tooltip.js +0 -146
  71. package/dist/Chart/Tooltip/Tooltip.js.map +0 -1
  72. package/dist/Chart/Tooltip/index.js +0 -14
  73. package/dist/Chart/Tooltip/index.js.map +0 -1
  74. package/dist/Chart/Tooltip/styles.js +0 -16
  75. package/dist/Chart/Tooltip/styles.js.map +0 -1
  76. package/dist/Chart/chartPlotlyOverrides.js +0 -145
  77. package/dist/Chart/chartPlotlyOverrides.js.map +0 -1
  78. package/dist/Chart/index.d.ts +0 -5
  79. package/dist/Chart/index.js +0 -14
  80. package/dist/Chart/index.js.map +0 -1
  81. package/dist/Chart/styles.js +0 -36
  82. package/dist/Chart/styles.js.map +0 -1
  83. package/dist/ConfusionMatrix/ConfusionMatrix.d.ts +0 -10
  84. package/dist/ConfusionMatrix/ConfusionMatrix.js +0 -102
  85. package/dist/ConfusionMatrix/ConfusionMatrix.js.map +0 -1
  86. package/dist/ConfusionMatrix/CustomTooltip/CustomTooltip.js +0 -47
  87. package/dist/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +0 -1
  88. package/dist/ConfusionMatrix/CustomTooltip/index.js +0 -14
  89. package/dist/ConfusionMatrix/CustomTooltip/index.js.map +0 -1
  90. package/dist/ConfusionMatrix/CustomTooltip/styles.js +0 -26
  91. package/dist/ConfusionMatrix/CustomTooltip/styles.js.map +0 -1
  92. package/dist/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +0 -189
  93. package/dist/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +0 -1
  94. package/dist/ConfusionMatrix/index.d.ts +0 -2
  95. package/dist/ConfusionMatrix/index.js +0 -14
  96. package/dist/ConfusionMatrix/index.js.map +0 -1
  97. package/dist/ConfusionMatrix/styles.js +0 -10
  98. package/dist/ConfusionMatrix/styles.js.map +0 -1
  99. package/dist/Donutchart/Donutchart.d.ts +0 -10
  100. package/dist/Donutchart/Donutchart.js +0 -103
  101. package/dist/Donutchart/Donutchart.js.map +0 -1
  102. package/dist/Donutchart/donutchartPlotlyOverrides.js +0 -44
  103. package/dist/Donutchart/donutchartPlotlyOverrides.js.map +0 -1
  104. package/dist/Donutchart/index.d.ts +0 -2
  105. package/dist/Donutchart/index.js +0 -14
  106. package/dist/Donutchart/index.js.map +0 -1
  107. package/dist/Donutchart/styles.js +0 -10
  108. package/dist/Donutchart/styles.js.map +0 -1
  109. package/dist/Linechart/Linechart.d.ts +0 -14
  110. package/dist/Linechart/Linechart.js +0 -108
  111. package/dist/Linechart/Linechart.js.map +0 -1
  112. package/dist/Linechart/index.d.ts +0 -2
  113. package/dist/Linechart/index.js +0 -14
  114. package/dist/Linechart/index.js.map +0 -1
  115. package/dist/Linechart/lineChartPlotlyOverrides.js +0 -63
  116. package/dist/Linechart/lineChartPlotlyOverrides.js.map +0 -1
  117. package/dist/Linechart/styles.js +0 -10
  118. package/dist/Linechart/styles.js.map +0 -1
  119. package/dist/index.d.ts +0 -11
  120. package/dist/index.js +0 -35
  121. package/dist/index.js.map +0 -1
  122. package/dist/legacy/Barchart/Barchart.d.ts +0 -14
  123. package/dist/legacy/Barchart/Barchart.js +0 -199
  124. package/dist/legacy/Barchart/Barchart.js.map +0 -1
  125. package/dist/legacy/Barchart/barchartPlotlyOverrides.js +0 -38
  126. package/dist/legacy/Barchart/barchartPlotlyOverrides.js.map +0 -1
  127. package/dist/legacy/Barchart/index.d.ts +0 -2
  128. package/dist/legacy/Barchart/index.js +0 -2
  129. package/dist/legacy/Barchart/index.js.map +0 -1
  130. package/dist/legacy/Barchart/styles.js +0 -3
  131. package/dist/legacy/Barchart/styles.js.map +0 -1
  132. package/dist/legacy/Chart/Chart.d.ts +0 -44
  133. package/dist/legacy/Chart/Chart.js +0 -181
  134. package/dist/legacy/Chart/Chart.js.map +0 -1
  135. package/dist/legacy/Chart/Plot/Plot.d.ts +0 -43
  136. package/dist/legacy/Chart/Plot/Plot.js +0 -95
  137. package/dist/legacy/Chart/Plot/Plot.js.map +0 -1
  138. package/dist/legacy/Chart/Plot/index.d.ts +0 -2
  139. package/dist/legacy/Chart/Plot/index.js +0 -2
  140. package/dist/legacy/Chart/Plot/index.js.map +0 -1
  141. package/dist/legacy/Chart/Plot/styles.js +0 -3
  142. package/dist/legacy/Chart/Plot/styles.js.map +0 -1
  143. package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -130
  144. package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +0 -1
  145. package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js +0 -2
  146. package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js.map +0 -1
  147. package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js +0 -42
  148. package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js.map +0 -1
  149. package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -57
  150. package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +0 -1
  151. package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js +0 -2
  152. package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js.map +0 -1
  153. package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js +0 -17
  154. package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js.map +0 -1
  155. package/dist/legacy/Chart/Tooltip/Tooltip.js +0 -129
  156. package/dist/legacy/Chart/Tooltip/Tooltip.js.map +0 -1
  157. package/dist/legacy/Chart/Tooltip/index.js +0 -2
  158. package/dist/legacy/Chart/Tooltip/index.js.map +0 -1
  159. package/dist/legacy/Chart/Tooltip/styles.js +0 -9
  160. package/dist/legacy/Chart/Tooltip/styles.js.map +0 -1
  161. package/dist/legacy/Chart/chartPlotlyOverrides.js +0 -136
  162. package/dist/legacy/Chart/chartPlotlyOverrides.js.map +0 -1
  163. package/dist/legacy/Chart/index.d.ts +0 -5
  164. package/dist/legacy/Chart/index.js +0 -2
  165. package/dist/legacy/Chart/index.js.map +0 -1
  166. package/dist/legacy/Chart/styles.js +0 -28
  167. package/dist/legacy/Chart/styles.js.map +0 -1
  168. package/dist/legacy/ConfusionMatrix/ConfusionMatrix.d.ts +0 -10
  169. package/dist/legacy/ConfusionMatrix/ConfusionMatrix.js +0 -87
  170. package/dist/legacy/ConfusionMatrix/ConfusionMatrix.js.map +0 -1
  171. package/dist/legacy/ConfusionMatrix/CustomTooltip/CustomTooltip.js +0 -39
  172. package/dist/legacy/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +0 -1
  173. package/dist/legacy/ConfusionMatrix/CustomTooltip/index.js +0 -2
  174. package/dist/legacy/ConfusionMatrix/CustomTooltip/index.js.map +0 -1
  175. package/dist/legacy/ConfusionMatrix/CustomTooltip/styles.js +0 -19
  176. package/dist/legacy/ConfusionMatrix/CustomTooltip/styles.js.map +0 -1
  177. package/dist/legacy/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +0 -181
  178. package/dist/legacy/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +0 -1
  179. package/dist/legacy/ConfusionMatrix/index.d.ts +0 -2
  180. package/dist/legacy/ConfusionMatrix/index.js +0 -2
  181. package/dist/legacy/ConfusionMatrix/index.js.map +0 -1
  182. package/dist/legacy/ConfusionMatrix/styles.js +0 -3
  183. package/dist/legacy/ConfusionMatrix/styles.js.map +0 -1
  184. package/dist/legacy/Donutchart/Donutchart.d.ts +0 -10
  185. package/dist/legacy/Donutchart/Donutchart.js +0 -89
  186. package/dist/legacy/Donutchart/Donutchart.js.map +0 -1
  187. package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js +0 -35
  188. package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js.map +0 -1
  189. package/dist/legacy/Donutchart/index.d.ts +0 -2
  190. package/dist/legacy/Donutchart/index.js +0 -2
  191. package/dist/legacy/Donutchart/index.js.map +0 -1
  192. package/dist/legacy/Donutchart/styles.js +0 -3
  193. package/dist/legacy/Donutchart/styles.js.map +0 -1
  194. package/dist/legacy/Linechart/Linechart.d.ts +0 -14
  195. package/dist/legacy/Linechart/Linechart.js +0 -94
  196. package/dist/legacy/Linechart/Linechart.js.map +0 -1
  197. package/dist/legacy/Linechart/index.d.ts +0 -2
  198. package/dist/legacy/Linechart/index.js +0 -2
  199. package/dist/legacy/Linechart/index.js.map +0 -1
  200. package/dist/legacy/Linechart/lineChartPlotlyOverrides.js +0 -54
  201. package/dist/legacy/Linechart/lineChartPlotlyOverrides.js.map +0 -1
  202. package/dist/legacy/Linechart/styles.js +0 -3
  203. package/dist/legacy/Linechart/styles.js.map +0 -1
  204. package/dist/legacy/index.d.ts +0 -11
  205. package/dist/legacy/index.js +0 -6
  206. package/dist/legacy/index.js.map +0 -1
  207. package/dist/modern/Barchart/Barchart.d.ts +0 -14
  208. package/dist/modern/Barchart/Barchart.js +0 -185
  209. package/dist/modern/Barchart/Barchart.js.map +0 -1
  210. package/dist/modern/Barchart/barchartPlotlyOverrides.js +0 -36
  211. package/dist/modern/Barchart/barchartPlotlyOverrides.js.map +0 -1
  212. package/dist/modern/Barchart/index.d.ts +0 -2
  213. package/dist/modern/Barchart/index.js +0 -2
  214. package/dist/modern/Barchart/index.js.map +0 -1
  215. package/dist/modern/Barchart/styles.js +0 -3
  216. package/dist/modern/Barchart/styles.js.map +0 -1
  217. package/dist/modern/Chart/Chart.d.ts +0 -44
  218. package/dist/modern/Chart/Chart.js +0 -162
  219. package/dist/modern/Chart/Chart.js.map +0 -1
  220. package/dist/modern/Chart/Plot/Plot.d.ts +0 -43
  221. package/dist/modern/Chart/Plot/Plot.js +0 -89
  222. package/dist/modern/Chart/Plot/Plot.js.map +0 -1
  223. package/dist/modern/Chart/Plot/index.d.ts +0 -2
  224. package/dist/modern/Chart/Plot/index.js +0 -2
  225. package/dist/modern/Chart/Plot/index.js.map +0 -1
  226. package/dist/modern/Chart/Plot/styles.js +0 -3
  227. package/dist/modern/Chart/Plot/styles.js.map +0 -1
  228. package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -122
  229. package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +0 -1
  230. package/dist/modern/Chart/Tooltip/MultiTooltip/index.js +0 -2
  231. package/dist/modern/Chart/Tooltip/MultiTooltip/index.js.map +0 -1
  232. package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js +0 -40
  233. package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js.map +0 -1
  234. package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -54
  235. package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +0 -1
  236. package/dist/modern/Chart/Tooltip/SingleTooltip/index.js +0 -2
  237. package/dist/modern/Chart/Tooltip/SingleTooltip/index.js.map +0 -1
  238. package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js +0 -15
  239. package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js.map +0 -1
  240. package/dist/modern/Chart/Tooltip/Tooltip.js +0 -129
  241. package/dist/modern/Chart/Tooltip/Tooltip.js.map +0 -1
  242. package/dist/modern/Chart/Tooltip/index.js +0 -2
  243. package/dist/modern/Chart/Tooltip/index.js.map +0 -1
  244. package/dist/modern/Chart/Tooltip/styles.js +0 -9
  245. package/dist/modern/Chart/Tooltip/styles.js.map +0 -1
  246. package/dist/modern/Chart/chartPlotlyOverrides.js +0 -126
  247. package/dist/modern/Chart/chartPlotlyOverrides.js.map +0 -1
  248. package/dist/modern/Chart/index.d.ts +0 -5
  249. package/dist/modern/Chart/index.js +0 -2
  250. package/dist/modern/Chart/index.js.map +0 -1
  251. package/dist/modern/Chart/styles.js +0 -19
  252. package/dist/modern/Chart/styles.js.map +0 -1
  253. package/dist/modern/ConfusionMatrix/ConfusionMatrix.d.ts +0 -10
  254. package/dist/modern/ConfusionMatrix/ConfusionMatrix.js +0 -76
  255. package/dist/modern/ConfusionMatrix/ConfusionMatrix.js.map +0 -1
  256. package/dist/modern/ConfusionMatrix/CustomTooltip/CustomTooltip.js +0 -37
  257. package/dist/modern/ConfusionMatrix/CustomTooltip/CustomTooltip.js.map +0 -1
  258. package/dist/modern/ConfusionMatrix/CustomTooltip/index.js +0 -2
  259. package/dist/modern/ConfusionMatrix/CustomTooltip/index.js.map +0 -1
  260. package/dist/modern/ConfusionMatrix/CustomTooltip/styles.js +0 -17
  261. package/dist/modern/ConfusionMatrix/CustomTooltip/styles.js.map +0 -1
  262. package/dist/modern/ConfusionMatrix/confusionMatrixPlotlyOverrides.js +0 -154
  263. package/dist/modern/ConfusionMatrix/confusionMatrixPlotlyOverrides.js.map +0 -1
  264. package/dist/modern/ConfusionMatrix/index.d.ts +0 -2
  265. package/dist/modern/ConfusionMatrix/index.js +0 -2
  266. package/dist/modern/ConfusionMatrix/index.js.map +0 -1
  267. package/dist/modern/ConfusionMatrix/styles.js +0 -3
  268. package/dist/modern/ConfusionMatrix/styles.js.map +0 -1
  269. package/dist/modern/Donutchart/Donutchart.d.ts +0 -10
  270. package/dist/modern/Donutchart/Donutchart.js +0 -78
  271. package/dist/modern/Donutchart/Donutchart.js.map +0 -1
  272. package/dist/modern/Donutchart/donutchartPlotlyOverrides.js +0 -33
  273. package/dist/modern/Donutchart/donutchartPlotlyOverrides.js.map +0 -1
  274. package/dist/modern/Donutchart/index.d.ts +0 -2
  275. package/dist/modern/Donutchart/index.js +0 -2
  276. package/dist/modern/Donutchart/index.js.map +0 -1
  277. package/dist/modern/Donutchart/styles.js +0 -3
  278. package/dist/modern/Donutchart/styles.js.map +0 -1
  279. package/dist/modern/Linechart/Linechart.d.ts +0 -14
  280. package/dist/modern/Linechart/Linechart.js +0 -82
  281. package/dist/modern/Linechart/Linechart.js.map +0 -1
  282. package/dist/modern/Linechart/index.d.ts +0 -2
  283. package/dist/modern/Linechart/index.js +0 -2
  284. package/dist/modern/Linechart/index.js.map +0 -1
  285. package/dist/modern/Linechart/lineChartPlotlyOverrides.js +0 -50
  286. package/dist/modern/Linechart/lineChartPlotlyOverrides.js.map +0 -1
  287. package/dist/modern/Linechart/styles.js +0 -3
  288. package/dist/modern/Linechart/styles.js.map +0 -1
  289. package/dist/modern/index.d.ts +0 -11
  290. package/dist/modern/index.js +0 -6
  291. package/dist/modern/index.js.map +0 -1
package/LICENSE.txt DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2019 Hitachi Vantara Corporation
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,14 +0,0 @@
1
- import { HvChartProps } from "../Chart";
2
-
3
- export interface HvBarchartProps extends HvChartProps {
4
- /**
5
- * Sets if the chart is stack.
6
- */
7
- stack?: boolean;
8
- /**
9
- * Sets if the chart is horizontal.
10
- */
11
- horizontal?: boolean;
12
- }
13
-
14
- export default function HvBarchart(props: HvBarchartProps): JSX.Element | null;
@@ -1,214 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.object.keys.js");
4
- require("core-js/modules/es.symbol.js");
5
- require("core-js/modules/es.array.filter.js");
6
- require("core-js/modules/es.object.to-string.js");
7
- require("core-js/modules/es.object.get-own-property-descriptor.js");
8
- require("core-js/modules/web.dom-collections.for-each.js");
9
- require("core-js/modules/es.object.get-own-property-descriptors.js");
10
- require("core-js/modules/es.array.iterator.js");
11
- require("core-js/modules/es.string.iterator.js");
12
- require("core-js/modules/es.weak-map.js");
13
- require("core-js/modules/web.dom-collections.iterator.js");
14
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
15
- var _typeof = require("@babel/runtime/helpers/typeof");
16
- Object.defineProperty(exports, "__esModule", {
17
- value: true
18
- });
19
- exports.default = void 0;
20
- require("core-js/modules/es.array.map.js");
21
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
22
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
23
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
24
- var _react = _interopRequireWildcard(require("react"));
25
- var _propTypes = _interopRequireDefault(require("prop-types"));
26
- var _styles = require("@mui/styles");
27
- var _Chart = _interopRequireDefault(require("../Chart"));
28
- var _barchartPlotlyOverrides = require("./barchartPlotlyOverrides");
29
- var _styles2 = _interopRequireDefault(require("./styles"));
30
- var _jsxRuntime = require("react/jsx-runtime");
31
- var _excluded = ["id", "classes", "data", "layout", "config", "tooltipType", "stack", "horizontal"];
32
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
34
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
36
- var MARGIN = 50;
37
- var MAX_BAR_WIDTH = 90;
38
- var MIN_BAR_WIDTH = 3;
39
- var MIN_WIDTH = 75;
40
-
41
- /**
42
- * A Bar chart is a chart or graph that presents categorical data with rectangular bars.
43
- *
44
- * Our implementation leverages the Plotly charting library. If you have a specific case
45
- * that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.
46
- */
47
- var Barchart = function Barchart(_ref) {
48
- var id = _ref.id,
49
- classes = _ref.classes,
50
- data = _ref.data,
51
- layout = _ref.layout,
52
- config = _ref.config,
53
- _ref$tooltipType = _ref.tooltipType,
54
- tooltipType = _ref$tooltipType === void 0 ? "multiple" : _ref$tooltipType,
55
- _ref$stack = _ref.stack,
56
- stack = _ref$stack === void 0 ? false : _ref$stack,
57
- _ref$horizontal = _ref.horizontal,
58
- horizontal = _ref$horizontal === void 0 ? false : _ref$horizontal,
59
- others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
60
- /* Values derived from props */
61
-
62
- var dataWithDefaults = (0, _react.useMemo)(function () {
63
- return (0, _barchartPlotlyOverrides.applyDataDefaults)(data, horizontal);
64
- }, [data, horizontal]);
65
- var chartLayout = (0, _react.useMemo)(function () {
66
- return (0, _barchartPlotlyOverrides.applyLayoutDefaults)(layout, stack, horizontal);
67
- }, [layout, stack, horizontal]);
68
-
69
- /* State */
70
-
71
- var _useState = (0, _react.useState)(dataWithDefaults),
72
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
73
- chartData = _useState2[0],
74
- setChartData = _useState2[1];
75
-
76
- /* Effects */
77
-
78
- var firstRender = (0, _react.useRef)(true);
79
- (0, _react.useEffect)(function () {
80
- // only setChartData when prop value changes
81
- // not needed on first render because the
82
- // initial state is already properly set
83
- if (!firstRender.current) {
84
- setChartData(dataWithDefaults);
85
- }
86
- firstRender.current = false;
87
- }, [dataWithDefaults]);
88
-
89
- /**
90
- * Used to force the max width of each bar with 90px.
91
- *
92
- * (this is effectively more an effect than a callback)
93
- */
94
- var recalculateBarWidth = (0, _react.useCallback)(function (ref) {
95
- // use the data and layout info directly from the plotly ref
96
- // as it's always the most uptodate version.
97
- var plotData = ref.current.props.data;
98
- var plotLayout = ref.current.props.layout;
99
- if (plotData.length > 0) {
100
- var barmode = plotLayout.barmode,
101
- bargap = plotLayout.bargap,
102
- bargroupgap = plotLayout.bargroupgap;
103
- var isStack = barmode === "stack";
104
- var numberOfBarsByGroup = isStack ? 1 : plotData.length;
105
- var numberOfGroup = plotData[0].x.length;
106
- var _ref$current$el$getBo = ref.current.el.getBoundingClientRect(),
107
- boundingRect = _ref$current$el$getBo.width;
108
- var width = boundingRect < MIN_WIDTH ? MIN_WIDTH : boundingRect;
109
- var plotWidth = width - MARGIN;
110
- var groupWidth = plotWidth / numberOfGroup;
111
- var colWidth = groupWidth * (1 - bargap) - groupWidth * (1 - bargap) * bargroupgap;
112
- var calculatedBarWidth = colWidth / numberOfBarsByGroup;
113
- var greaterThan90 = calculatedBarWidth > MAX_BAR_WIDTH;
114
- var lessThan3 = calculatedBarWidth < MIN_BAR_WIDTH;
115
- var isAlreadyGreaterThan90 = plotData[0].width !== undefined;
116
- if (greaterThan90 && !isAlreadyGreaterThan90) {
117
- var newWidth = MAX_BAR_WIDTH / plotWidth * numberOfGroup;
118
- var newData = plotData.map(function (subData) {
119
- return _objectSpread(_objectSpread({}, subData), {}, {
120
- width: newWidth
121
- });
122
- });
123
- setChartData(newData);
124
- }
125
- if (lessThan3 && !isAlreadyGreaterThan90) {
126
- var _newWidth = MIN_BAR_WIDTH / plotWidth * numberOfGroup;
127
- var _newData = plotData.map(function (subData) {
128
- return _objectSpread(_objectSpread({}, subData), {}, {
129
- width: _newWidth
130
- });
131
- });
132
- setChartData(_newData);
133
- }
134
- if (!greaterThan90 && isAlreadyGreaterThan90) {
135
- var _newData2 = plotData.map(function (subData) {
136
- return _objectSpread(_objectSpread({}, subData), {}, {
137
- width: undefined
138
- });
139
- });
140
- setChartData(_newData2);
141
- }
142
- }
143
- }, []);
144
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chart.default, _objectSpread({
145
- id: id,
146
- classes: classes,
147
- data: chartData,
148
- layout: chartLayout,
149
- config: config,
150
- tooltipType: tooltipType,
151
- afterPlot: recalculateBarWidth
152
- }, others));
153
- };
154
- process.env.NODE_ENV !== "production" ? Barchart.propTypes = {
155
- /**
156
- * An Id passed on to the component
157
- */
158
- id: _propTypes.default.string,
159
- /**
160
- * A Jss Object used to override or extend the styles applied.
161
- */
162
- classes: _propTypes.default.shape({
163
- root: _propTypes.default.string
164
- }),
165
- /**
166
- * Plotly data object (see https://plot.ly/javascript/reference/).
167
- */
168
- data: _propTypes.default.arrayOf(_propTypes.default.instanceOf(Object)).isRequired,
169
- /**
170
- * Plotly layout object (see https://plot.ly/javascript/reference/#layout).
171
- */
172
- layout: _propTypes.default.instanceOf(Object),
173
- /**
174
- * Plotly config object (see https://plot.ly/javascript/configuration-options/).
175
- */
176
- config: _propTypes.default.instanceOf(Object),
177
- /**
178
- * Defines if should use a single or multiline tooltip.
179
- */
180
- tooltipType: _propTypes.default.oneOf(["single", "multiple"]),
181
- /**
182
- * Custom tooltip element to be displayed
183
- */
184
- tooltip: _propTypes.default.func,
185
- /**
186
- * Function to be called after plot render.
187
- */
188
- afterPlot: _propTypes.default.func,
189
- /**
190
- * Defines the X axis title.
191
- */
192
- xAxisTitle: _propTypes.default.string,
193
- /**
194
- * Defines the Y axis title.
195
- */
196
- yAxisTitle: _propTypes.default.string,
197
- /**
198
- * Defines the chart subtitle.
199
- */
200
- subtitle: _propTypes.default.string,
201
- /**
202
- * Sets is the chart is stack.
203
- */
204
- stack: _propTypes.default.bool,
205
- /**
206
- * Sets is the chart is horizontal.
207
- */
208
- horizontal: _propTypes.default.bool
209
- } : void 0;
210
- var _default = (0, _styles.withStyles)(_styles2.default, {
211
- name: "HvBarchart"
212
- })(Barchart);
213
- exports.default = _default;
214
- //# sourceMappingURL=Barchart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Barchart.js","names":["MARGIN","MAX_BAR_WIDTH","MIN_BAR_WIDTH","MIN_WIDTH","Barchart","id","classes","data","layout","config","tooltipType","stack","horizontal","others","dataWithDefaults","useMemo","applyDataDefaults","chartLayout","applyLayoutDefaults","useState","chartData","setChartData","firstRender","useRef","useEffect","current","recalculateBarWidth","useCallback","ref","plotData","props","plotLayout","length","barmode","bargap","bargroupgap","isStack","numberOfBarsByGroup","numberOfGroup","x","el","getBoundingClientRect","boundingRect","width","plotWidth","groupWidth","colWidth","calculatedBarWidth","greaterThan90","lessThan3","isAlreadyGreaterThan90","undefined","newWidth","newData","map","subData","propTypes","PropTypes","string","shape","root","arrayOf","instanceOf","Object","isRequired","oneOf","tooltip","func","afterPlot","xAxisTitle","yAxisTitle","subtitle","bool","withStyles","styles","name"],"sources":["../../src/Barchart/Barchart.js"],"sourcesContent":["import React, { useMemo, useEffect, useState, useCallback, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport Chart from \"../Chart\";\nimport { applyLayoutDefaults, applyDataDefaults } from \"./barchartPlotlyOverrides\";\nimport styles from \"./styles\";\n\nconst MARGIN = 50;\nconst MAX_BAR_WIDTH = 90;\nconst MIN_BAR_WIDTH = 3;\nconst MIN_WIDTH = 75;\n\n/**\n * A Bar chart is a chart or graph that presents categorical data with rectangular bars.\n *\n * Our implementation leverages the Plotly charting library. If you have a specific case\n * that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.\n */\nconst Barchart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n stack = false,\n horizontal = false,\n ...others\n}) => {\n /* Values derived from props */\n\n const dataWithDefaults = useMemo(() => applyDataDefaults(data, horizontal), [data, horizontal]);\n const chartLayout = useMemo(\n () => applyLayoutDefaults(layout, stack, horizontal),\n [layout, stack, horizontal]\n );\n\n /* State */\n\n const [chartData, setChartData] = useState(dataWithDefaults);\n\n /* Effects */\n\n const firstRender = useRef(true);\n useEffect(() => {\n // only setChartData when prop value changes\n // not needed on first render because the\n // initial state is already properly set\n if (!firstRender.current) {\n setChartData(dataWithDefaults);\n }\n\n firstRender.current = false;\n }, [dataWithDefaults]);\n\n /**\n * Used to force the max width of each bar with 90px.\n *\n * (this is effectively more an effect than a callback)\n */\n const recalculateBarWidth = useCallback((ref) => {\n // use the data and layout info directly from the plotly ref\n // as it's always the most uptodate version.\n const plotData = ref.current.props.data;\n const plotLayout = ref.current.props.layout;\n\n if (plotData.length > 0) {\n const { barmode, bargap, bargroupgap } = plotLayout;\n\n const isStack = barmode === \"stack\";\n const numberOfBarsByGroup = isStack ? 1 : plotData.length;\n const numberOfGroup = plotData[0].x.length;\n\n const { width: boundingRect } = ref.current.el.getBoundingClientRect();\n const width = boundingRect < MIN_WIDTH ? MIN_WIDTH : boundingRect;\n const plotWidth = width - MARGIN;\n const groupWidth = plotWidth / numberOfGroup;\n const colWidth = groupWidth * (1 - bargap) - groupWidth * (1 - bargap) * bargroupgap;\n\n const calculatedBarWidth = colWidth / numberOfBarsByGroup;\n const greaterThan90 = calculatedBarWidth > MAX_BAR_WIDTH;\n const lessThan3 = calculatedBarWidth < MIN_BAR_WIDTH;\n const isAlreadyGreaterThan90 = plotData[0].width !== undefined;\n\n if (greaterThan90 && !isAlreadyGreaterThan90) {\n const newWidth = (MAX_BAR_WIDTH / plotWidth) * numberOfGroup;\n\n const newData = plotData.map((subData) => {\n return { ...subData, width: newWidth };\n });\n\n setChartData(newData);\n }\n\n if (lessThan3 && !isAlreadyGreaterThan90) {\n const newWidth = (MIN_BAR_WIDTH / plotWidth) * numberOfGroup;\n\n const newData = plotData.map((subData) => {\n return { ...subData, width: newWidth };\n });\n\n setChartData(newData);\n }\n\n if (!greaterThan90 && isAlreadyGreaterThan90) {\n const newData = plotData.map((subData) => {\n return { ...subData, width: undefined };\n });\n\n setChartData(newData);\n }\n }\n }, []);\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={chartData}\n layout={chartLayout}\n config={config}\n tooltipType={tooltipType}\n afterPlot={recalculateBarWidth}\n {...others}\n />\n );\n};\nBarchart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n root: PropTypes.string,\n }),\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object),\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Custom tooltip element to be displayed\n */\n tooltip: PropTypes.func,\n /**\n * Function to be called after plot render.\n */\n afterPlot: PropTypes.func,\n /**\n * Defines the X axis title.\n */\n xAxisTitle: PropTypes.string,\n /**\n * Defines the Y axis title.\n */\n yAxisTitle: PropTypes.string,\n /**\n * Defines the chart subtitle.\n */\n subtitle: PropTypes.string,\n /**\n * Sets is the chart is stack.\n */\n stack: PropTypes.bool,\n /**\n * Sets is the chart is horizontal.\n */\n horizontal: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvBarchart\" })(Barchart);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAE9B,IAAMA,MAAM,GAAG,EAAE;AACjB,IAAMC,aAAa,GAAG,EAAE;AACxB,IAAMC,aAAa,GAAG,CAAC;AACvB,IAAMC,SAAS,GAAG,EAAE;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,QAAQ,GAAG,SAAXA,QAAQ,OAUR;EAAA,IATJC,EAAE,QAAFA,EAAE;IACFC,OAAO,QAAPA,OAAO;IACPC,IAAI,QAAJA,IAAI;IACJC,MAAM,QAANA,MAAM;IACNC,MAAM,QAANA,MAAM;IAAA,wBACNC,WAAW;I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CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;EACpD;AACF;AACA;EACEC,OAAO,EAAET,kBAAS,CAACU,IAAI;EACvB;AACF;AACA;EACEC,SAAS,EAAEX,kBAAS,CAACU,IAAI;EACzB;AACF;AACA;EACEE,UAAU,EAAEZ,kBAAS,CAACC,MAAM;EAC5B;AACF;AACA;EACEY,UAAU,EAAEb,kBAAS,CAACC,MAAM;EAC5B;AACF;AACA;EACEa,QAAQ,EAAEd,kBAAS,CAACC,MAAM;EAC1B;AACF;AACA;EACE/C,KAAK,EAAE8C,kBAAS,CAACe,IAAI;EACrB;AACF;AACA;EACE5D,UAAU,EAAE6C,kBAAS,CAACe;AACxB,CAAC;AAAC,eAEa,IAAAC,kBAAU,EAACC,gBAAM,EAAE;EAAEC,IAAI,EAAE;AAAa,CAAC,CAAC,CAACvE,QAAQ,CAAC;AAAA"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.applyLayoutDefaults = exports.applyDataDefaults = void 0;
8
- require("core-js/modules/es.object.to-string.js");
9
- require("core-js/modules/web.dom-collections.for-each.js");
10
- var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
11
- var setterIfNil = function setterIfNil(object, property, value) {
12
- var _object$property;
13
- // eslint-disable-next-line no-param-reassign
14
- object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
15
- };
16
-
17
- /**
18
- * Auxiliary functions to set the layout in order to follow the DS guideline.
19
- */
20
- var applyLayoutDefaults = function applyLayoutDefaults(inputLayout, stack, isHorizontal) {
21
- var layout = inputLayout === undefined ? {} : (0, _cloneDeep.default)(inputLayout);
22
- setterIfNil(layout, "bargap", 0.25);
23
- setterIfNil(layout, "bargroupgap", 0.25);
24
- setterIfNil(layout, "hovermode", "closest");
25
- if (stack) setterIfNil(layout, "barmode", "stack");
26
- setterIfNil(layout, "yaxis", {});
27
- setterIfNil(layout, "xaxis", {});
28
- if (isHorizontal) {
29
- setterIfNil(layout.yaxis, "showline", true);
30
- setterIfNil(layout.xaxis, "showline", false);
31
- } else {
32
- setterIfNil(layout.yaxis, "showline", false);
33
- }
34
- return layout;
35
- };
36
- exports.applyLayoutDefaults = applyLayoutDefaults;
37
- var applyDataDefaults = function applyDataDefaults(inputData, isHorizontal) {
38
- var data = inputData;
39
- data.forEach(function (trace) {
40
- setterIfNil(trace, "type", "bar");
41
- setterIfNil(trace, "hoverinfo", "none");
42
- if (isHorizontal) setterIfNil(trace, "orientation", "h");
43
- });
44
- return data;
45
- };
46
- exports.applyDataDefaults = applyDataDefaults;
47
- //# sourceMappingURL=barchartPlotlyOverrides.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"barchartPlotlyOverrides.js","names":["setterIfNil","object","property","value","applyLayoutDefaults","inputLayout","stack","isHorizontal","layout","undefined","clone","yaxis","xaxis","applyDataDefaults","inputData","data","forEach","trace"],"sources":["../../src/Barchart/barchartPlotlyOverrides.js"],"sourcesContent":["import clone from \"lodash/cloneDeep\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the layout in order to follow the DS guideline.\n */\nexport const applyLayoutDefaults = (inputLayout, stack, isHorizontal) => {\n const layout = inputLayout === undefined ? {} : clone(inputLayout);\n setterIfNil(layout, \"bargap\", 0.25);\n setterIfNil(layout, \"bargroupgap\", 0.25);\n setterIfNil(layout, \"hovermode\", \"closest\");\n if (stack) setterIfNil(layout, \"barmode\", \"stack\");\n\n setterIfNil(layout, \"yaxis\", {});\n setterIfNil(layout, \"xaxis\", {});\n\n if (isHorizontal) {\n setterIfNil(layout.yaxis, \"showline\", true);\n setterIfNil(layout.xaxis, \"showline\", false);\n } else {\n setterIfNil(layout.yaxis, \"showline\", false);\n }\n\n return layout;\n};\n\nexport const applyDataDefaults = (inputData, isHorizontal) => {\n const data = inputData;\n\n data.forEach((trace) => {\n setterIfNil(trace, \"type\", \"bar\");\n setterIfNil(trace, \"hoverinfo\", \"none\");\n if (isHorizontal) setterIfNil(trace, \"orientation\", \"h\");\n });\n\n return data;\n};\n"],"mappings":";;;;;;;;;AAAA;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAW,CAAIC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAK;EAAA;EAC/C;EACAF,MAAM,CAACC,QAAQ,CAAC,uBAAGD,MAAM,CAACC,QAAQ,CAAC,+DAAIC,KAAK;AAC9C,CAAC;;AAED;AACA;AACA;AACO,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmB,CAAIC,WAAW,EAAEC,KAAK,EAAEC,YAAY,EAAK;EACvE,IAAMC,MAAM,GAAGH,WAAW,KAAKI,SAAS,GAAG,CAAC,CAAC,GAAG,IAAAC,kBAAK,EAACL,WAAW,CAAC;EAClEL,WAAW,CAACQ,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC;EACnCR,WAAW,CAACQ,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC;EACxCR,WAAW,CAACQ,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC;EAC3C,IAAIF,KAAK,EAAEN,WAAW,CAACQ,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC;EAElDR,WAAW,CAACQ,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAChCR,WAAW,CAACQ,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAEhC,IAAID,YAAY,EAAE;IAChBP,WAAW,CAACQ,MAAM,CAACG,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC;IAC3CX,WAAW,CAACQ,MAAM,CAACI,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC;EAC9C,CAAC,MAAM;IACLZ,WAAW,CAACQ,MAAM,CAACG,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC;EAC9C;EAEA,OAAOH,MAAM;AACf,CAAC;AAAC;AAEK,IAAMK,iBAAiB,GAAG,SAApBA,iBAAiB,CAAIC,SAAS,EAAEP,YAAY,EAAK;EAC5D,IAAMQ,IAAI,GAAGD,SAAS;EAEtBC,IAAI,CAACC,OAAO,CAAC,UAACC,KAAK,EAAK;IACtBjB,WAAW,CAACiB,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;IACjCjB,WAAW,CAACiB,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC;IACvC,IAAIV,YAAY,EAAEP,WAAW,CAACiB,KAAK,EAAE,aAAa,EAAE,GAAG,CAAC;EAC1D,CAAC,CAAC;EAEF,OAAOF,IAAI;AACb,CAAC;AAAC"}
@@ -1,2 +0,0 @@
1
- export { default } from "./Barchart";
2
- export * from "./Barchart";
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function get() {
10
- return _Barchart.default;
11
- }
12
- });
13
- var _Barchart = _interopRequireDefault(require("./Barchart"));
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/Barchart/index.js"],"sourcesContent":["export { default } from \"./Barchart\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var styles = {};
8
- var _default = styles;
9
- exports.default = _default;
10
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","names":["styles"],"sources":["../../src/Barchart/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG,CAAC,CAAC;AAAC,eAEHA,MAAM;AAAA"}
@@ -1,44 +0,0 @@
1
- import { StandardProps } from "@mui/material";
2
- import { HvPlotProps } from "./Plot";
3
-
4
- export type HvChartClassKey = "root";
5
-
6
- export type TooltipElementObject = {
7
- color: string;
8
- name: string;
9
- value: number | string;
10
- };
11
-
12
- export type TooltipDataObject = {
13
- title: string;
14
- elements: TooltipElementObject[];
15
- };
16
-
17
- export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey> {
18
- /**
19
- * An Id passed on to the component
20
- */
21
- id?: string;
22
- /**
23
- * Defines if should use a single or multiline tooltip.
24
- */
25
- tooltipType?: "single" | "multiple";
26
- /**
27
- * Custom tooltip element to be displayed
28
- */
29
- tooltip?: (data: TooltipDataObject) => JSX.Element;
30
- /**
31
- * Defines the X axis title.
32
- */
33
- xAxisTitle?: string;
34
- /**
35
- * Defines the Y axis title.
36
- */
37
- yAxisTitle?: string;
38
- /**
39
- * Defines the chart subtitle.
40
- */
41
- subtitle?: string;
42
- }
43
-
44
- export default function HvChart(props: HvChartProps): JSX.Element | null;