@hitachivantara/uikit-react-viz 4.1.10 → 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
@@ -1,126 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- 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; }
3
- 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) { _defineProperty(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; }
4
- import styles from "./styles";
5
- const setterIfNil = (object, property, value) => {
6
- var _object$property;
7
- // eslint-disable-next-line no-param-reassign
8
- object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
9
- };
10
-
11
- /**
12
- * Auxiliary functions to set the layout in order to follow the DS guideline.
13
- *
14
- */
15
-
16
- const applyLayoutYaxisDefaults = (inputLayout, layoutStyles, yAxisTitle, isHorizontal) => {
17
- const layout = inputLayout;
18
- setterIfNil(layout, "yaxis", {});
19
- setterIfNil(layout.yaxis, "automargin", true);
20
- setterIfNil(layout.yaxis, "title", {});
21
- setterIfNil(layout.yaxis.title, "font", {
22
- family: layoutStyles.vizText.fontFamily,
23
- size: layoutStyles.vizText.fontSize,
24
- color: layoutStyles.vizText.color
25
- });
26
- setterIfNil(layout.yaxis, "fixedrange", true);
27
- setterIfNil(layout.yaxis, "ticks", "");
28
- setterIfNil(layout.yaxis, "tickfont", {
29
- family: layoutStyles.vizText.fontFamily,
30
- size: layoutStyles.vizText.fontSize,
31
- color: layoutStyles.vizText.color
32
- });
33
- setterIfNil(layout.yaxis, "gridcolor", layoutStyles.gridColor);
34
- setterIfNil(layout.yaxis, "showgrid", !isHorizontal);
35
- setterIfNil(layout.yaxis, "showline", isHorizontal);
36
- setterIfNil(layout.yaxis, "linecolor", layoutStyles.lineColor);
37
- setterIfNil(layout.yaxis, "linewidth", 1);
38
- setterIfNil(layout.yaxis, "zeroline", false);
39
- if (yAxisTitle) {
40
- setterIfNil(layout, "yaxis", {});
41
- setterIfNil(layout.yaxis, "title", {});
42
- setterIfNil(layout.yaxis.title, "text", yAxisTitle);
43
- }
44
- return layout;
45
- };
46
- const applyLayoutXaxisDefaults = (inputLayout, layoutStyles, xAxisTitle, isHorizontal) => {
47
- const layout = inputLayout;
48
- setterIfNil(layout, "xaxis", {});
49
- setterIfNil(layout.xaxis, "automargin", true);
50
- setterIfNil(layout.xaxis, "title", {});
51
- setterIfNil(layout.xaxis.title, "font", {
52
- family: layoutStyles.vizText.fontFamily,
53
- size: layoutStyles.vizText.fontSize,
54
- color: layoutStyles.vizText.color
55
- });
56
- setterIfNil(layout.xaxis, "fixedrange", true);
57
- setterIfNil(layout.xaxis, "ticks", "");
58
- setterIfNil(layout.xaxis, "tickfont", {
59
- family: layoutStyles.vizText.fontFamily,
60
- size: layoutStyles.vizText.fontSize,
61
- color: layoutStyles.vizText.color
62
- });
63
- setterIfNil(layout.xaxis, "gridcolor", layoutStyles.gridColor);
64
- setterIfNil(layout.xaxis, "showgrid", isHorizontal);
65
- setterIfNil(layout.xaxis, "showline", !isHorizontal);
66
- setterIfNil(layout.xaxis, "linewidth", 1);
67
- setterIfNil(layout.xaxis, "linecolor", layoutStyles.lineColor);
68
- setterIfNil(layout.xaxis, "zeroline", false);
69
- if (xAxisTitle) {
70
- setterIfNil(layout, "xaxis", {});
71
- setterIfNil(layout.xaxis, "title", {});
72
- setterIfNil(layout.xaxis.title, "text", xAxisTitle);
73
- }
74
- return layout;
75
- };
76
- const applyLayoutLegendDefaults = (inputLayout, layoutStyles) => {
77
- const layout = inputLayout;
78
- setterIfNil(layout, "legend", {
79
- x: 0.5,
80
- y: 1.15,
81
- xanchor: "center",
82
- yanchor: "middle",
83
- orientation: "h"
84
- });
85
- setterIfNil(layout.legend, "font", {
86
- family: layoutStyles.legendText.fontFamily,
87
- size: layoutStyles.legendText.fontSize,
88
- color: layoutStyles.legendText.color
89
- });
90
- return layout;
91
- };
92
- const applyLayoutRootDefaults = (inputLayout, layoutStyles) => {
93
- const layout = inputLayout;
94
- setterIfNil(layout, "colorway", Object.values(layoutStyles.defaultColors));
95
- setterIfNil(layout, "autosize", true);
96
- setterIfNil(layout, "margin", {
97
- l: 50,
98
- b: 50,
99
- t: 50,
100
- pad: 0
101
- });
102
- setterIfNil(layout, "plot_bgcolor", layoutStyles.plotColor);
103
- setterIfNil(layout, "paper_bgcolor", layoutStyles.plotColor);
104
- };
105
- export const applyLayoutDefaults = (inputLayout, theme, isHorizontal, xAxisTitle, yAxisTitle) => {
106
- const layoutStyles = styles(theme);
107
- const layout = _objectSpread({}, inputLayout);
108
-
109
- // Layout
110
- applyLayoutRootDefaults(layout, layoutStyles);
111
-
112
- // Legend
113
- applyLayoutLegendDefaults(layout, layoutStyles);
114
-
115
- // Xaxis
116
- applyLayoutXaxisDefaults(layout, layoutStyles, xAxisTitle, isHorizontal);
117
-
118
- // Yaxis
119
- applyLayoutYaxisDefaults(layout, layoutStyles, yAxisTitle, isHorizontal);
120
- return layout;
121
- };
122
- export const applyConfigDefaults = config => _objectSpread({
123
- responsive: true,
124
- displayModeBar: false
125
- }, config);
126
- //# sourceMappingURL=chartPlotlyOverrides.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chartPlotlyOverrides.js","names":["styles","setterIfNil","object","property","value","applyLayoutYaxisDefaults","inputLayout","layoutStyles","yAxisTitle","isHorizontal","layout","yaxis","title","family","vizText","fontFamily","size","fontSize","color","gridColor","lineColor","applyLayoutXaxisDefaults","xAxisTitle","xaxis","applyLayoutLegendDefaults","x","y","xanchor","yanchor","orientation","legend","legendText","applyLayoutRootDefaults","Object","values","defaultColors","l","b","t","pad","plotColor","applyLayoutDefaults","theme","applyConfigDefaults","config","responsive","displayModeBar"],"sources":["../../../src/Chart/chartPlotlyOverrides.js"],"sourcesContent":["import styles from \"./styles\";\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 *\n */\n\nconst applyLayoutYaxisDefaults = (inputLayout, layoutStyles, yAxisTitle, isHorizontal) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"yaxis\", {});\n\n setterIfNil(layout.yaxis, \"automargin\", true);\n\n setterIfNil(layout.yaxis, \"title\", {});\n\n setterIfNil(layout.yaxis.title, \"font\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.yaxis, \"fixedrange\", true);\n\n setterIfNil(layout.yaxis, \"ticks\", \"\");\n setterIfNil(layout.yaxis, \"tickfont\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.yaxis, \"gridcolor\", layoutStyles.gridColor);\n setterIfNil(layout.yaxis, \"showgrid\", !isHorizontal);\n setterIfNil(layout.yaxis, \"showline\", isHorizontal);\n\n setterIfNil(layout.yaxis, \"linecolor\", layoutStyles.lineColor);\n setterIfNil(layout.yaxis, \"linewidth\", 1);\n setterIfNil(layout.yaxis, \"zeroline\", false);\n\n if (yAxisTitle) {\n setterIfNil(layout, \"yaxis\", {});\n setterIfNil(layout.yaxis, \"title\", {});\n setterIfNil(layout.yaxis.title, \"text\", yAxisTitle);\n }\n\n return layout;\n};\n\nconst applyLayoutXaxisDefaults = (inputLayout, layoutStyles, xAxisTitle, isHorizontal) => {\n const layout = inputLayout;\n setterIfNil(layout, \"xaxis\", {});\n\n setterIfNil(layout.xaxis, \"automargin\", true);\n\n setterIfNil(layout.xaxis, \"title\", {});\n setterIfNil(layout.xaxis.title, \"font\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.xaxis, \"fixedrange\", true);\n\n setterIfNil(layout.xaxis, \"ticks\", \"\");\n setterIfNil(layout.xaxis, \"tickfont\", {\n family: layoutStyles.vizText.fontFamily,\n size: layoutStyles.vizText.fontSize,\n color: layoutStyles.vizText.color,\n });\n\n setterIfNil(layout.xaxis, \"gridcolor\", layoutStyles.gridColor);\n setterIfNil(layout.xaxis, \"showgrid\", isHorizontal);\n setterIfNil(layout.xaxis, \"showline\", !isHorizontal);\n\n setterIfNil(layout.xaxis, \"linewidth\", 1);\n setterIfNil(layout.xaxis, \"linecolor\", layoutStyles.lineColor);\n setterIfNil(layout.xaxis, \"zeroline\", false);\n\n if (xAxisTitle) {\n setterIfNil(layout, \"xaxis\", {});\n setterIfNil(layout.xaxis, \"title\", {});\n setterIfNil(layout.xaxis.title, \"text\", xAxisTitle);\n }\n return layout;\n};\n\nconst applyLayoutLegendDefaults = (inputLayout, layoutStyles) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"legend\", {\n x: 0.5,\n y: 1.15,\n xanchor: \"center\",\n yanchor: \"middle\",\n orientation: \"h\",\n });\n\n setterIfNil(layout.legend, \"font\", {\n family: layoutStyles.legendText.fontFamily,\n size: layoutStyles.legendText.fontSize,\n color: layoutStyles.legendText.color,\n });\n return layout;\n};\n\nconst applyLayoutRootDefaults = (inputLayout, layoutStyles) => {\n const layout = inputLayout;\n\n setterIfNil(layout, \"colorway\", Object.values(layoutStyles.defaultColors));\n\n setterIfNil(layout, \"autosize\", true);\n\n setterIfNil(layout, \"margin\", {\n l: 50,\n b: 50,\n t: 50,\n pad: 0,\n });\n\n setterIfNil(layout, \"plot_bgcolor\", layoutStyles.plotColor);\n setterIfNil(layout, \"paper_bgcolor\", layoutStyles.plotColor);\n};\n\nexport const applyLayoutDefaults = (inputLayout, theme, isHorizontal, xAxisTitle, yAxisTitle) => {\n const layoutStyles = styles(theme);\n const layout = { ...inputLayout };\n\n // Layout\n applyLayoutRootDefaults(layout, layoutStyles);\n\n // Legend\n applyLayoutLegendDefaults(layout, layoutStyles);\n\n // Xaxis\n applyLayoutXaxisDefaults(layout, layoutStyles, xAxisTitle, isHorizontal);\n\n // Yaxis\n applyLayoutYaxisDefaults(layout, layoutStyles, yAxisTitle, isHorizontal);\n\n return layout;\n};\n\nexport const applyConfigDefaults = (config) => ({\n responsive: true,\n displayModeBar: false,\n ...config,\n});\n"],"mappings":";;;AAAA,OAAOA,MAAM,MAAM,UAAU;AAE7B,MAAMC,WAAW,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,KAAK;EAAA;EAC/C;EACAF,MAAM,CAACC,QAAQ,CAAC,uBAAGD,MAAM,CAACC,QAAQ,CAAC,+DAAIC,KAAK;AAC9C,CAAC;;AAED;AACA;AACA;AACA;;AAEA,MAAMC,wBAAwB,GAAG,CAACC,WAAW,EAAEC,YAAY,EAAEC,UAAU,EAAEC,YAAY,KAAK;EACxF,MAAMC,MAAM,GAAGJ,WAAW;EAE1BL,WAAW,CAACS,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAEhCT,WAAW,CAACS,MAAM,CAACC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC;EAE7CV,WAAW,CAACS,MAAM,CAACC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAEtCV,WAAW,CAACS,MAAM,CAACC,KAAK,CAACC,KAAK,EAAE,MAAM,EAAE;IACtCC,MAAM,EAAEN,YAAY,CAACO,OAAO,CAACC,UAAU;IACv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AE,EAAE;IACLC,CAAC,EAAE,EAAE;IACLC,CAAC,EAAE,EAAE;IACLC,GAAG,EAAE;EACP,CAAC,CAAC;EAEFtC,WAAW,CAACS,MAAM,EAAE,cAAc,EAAEH,YAAY,CAACiC,SAAS,CAAC;EAC3DvC,WAAW,CAACS,MAAM,EAAE,eAAe,EAAEH,YAAY,CAACiC,SAAS,CAAC;AAC9D,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAG,CAACnC,WAAW,EAAEoC,KAAK,EAAEjC,YAAY,EAAEa,UAAU,EAAEd,UAAU,KAAK;EAC/F,MAAMD,YAAY,GAAGP,MAAM,CAAC0C,KAAK,CAAC;EAClC,MAAMhC,MAAM,qBAAQJ,WAAW,CAAE;;EAEjC;EACA0B,uBAAuB,CAACtB,MAAM,EAAEH,YAAY,CAAC;;EAE7C;EACAiB,yBAAyB,CAACd,MAAM,EAAEH,YAAY,CAAC;;EAE/C;EACAc,wBAAwB,CAACX,MAAM,EAAEH,YAAY,EAAEe,UAAU,EAAEb,YAAY,CAAC;;EAExE;EACAJ,wBAAwB,CAACK,MAAM,EAAEH,YAAY,EAAEC,UAAU,EAAEC,YAAY,CAAC;EAExE,OAAOC,MAAM;AACf,CAAC;AAED,OAAO,MAAMiC,mBAAmB,GAAIC,MAAM;EACxCC,UAAU,EAAE,IAAI;EAChBC,cAAc,EAAE;AAAK,GAClBF,MAAM,CACT"}
@@ -1,5 +0,0 @@
1
- export { default } from "./Chart";
2
- export * from "./Chart";
3
-
4
- export { default as Plot } from "./Plot";
5
- export * from "./Plot";
@@ -1,2 +0,0 @@
1
- export { default } from "./Chart";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Chart/index.js"],"sourcesContent":["export { default } from \"./Chart\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,SAAS"}
@@ -1,19 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- 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; }
3
- 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) { _defineProperty(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; }
4
- const styles = theme => ({
5
- root: {
6
- padding: 0
7
- },
8
- defaultColors: _objectSpread({}, theme.hv.viz.palette.categorical),
9
- vizText: _objectSpread(_objectSpread({}, theme.hv.typography.vizText), {}, {
10
- fontFamily: theme.hv.typography.fontFamily,
11
- fontSize: 10
12
- }),
13
- legendText: _objectSpread({}, theme.hv.typography.normalText),
14
- lineColor: theme.hv.palette.atmosphere.atmo4,
15
- gridColor: theme.hv.palette.atmosphere.atmo4,
16
- plotColor: "transparent"
17
- });
18
- export default styles;
19
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","names":["styles","theme","root","padding","defaultColors","hv","viz","palette","categorical","vizText","typography","fontFamily","fontSize","legendText","normalText","lineColor","atmosphere","atmo4","gridColor","plotColor"],"sources":["../../../src/Chart/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: 0,\n },\n defaultColors: {\n ...theme.hv.viz.palette.categorical,\n },\n vizText: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n fontSize: 10,\n },\n legendText: {\n ...theme.hv.typography.normalText,\n },\n lineColor: theme.hv.palette.atmosphere.atmo4,\n gridColor: theme.hv.palette.atmosphere.atmo4,\n plotColor: \"transparent\",\n});\n\nexport default styles;\n"],"mappings":";;;AAAA,MAAMA,MAAM,GAAIC,KAAK,KAAM;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE;EACX,CAAC;EACDC,aAAa,oBACRH,KAAK,CAACI,EAAE,CAACC,GAAG,CAACC,OAAO,CAACC,WAAW,CACpC;EACDC,OAAO,kCACFR,KAAK,CAACI,EAAE,CAACK,UAAU,CAACD,OAAO;IAC9BE,UAAU,EAAEV,KAAK,CAACI,EAAE,CAACK,UAAU,CAACC,UAAU;IAC1CC,QAAQ,EAAE;EAAE,EACb;EACDC,UAAU,oBACLZ,KAAK,CAACI,EAAE,CAACK,UAAU,CAACI,UAAU,CAClC;EACDC,SAAS,EAAEd,KAAK,CAACI,EAAE,CAACE,OAAO,CAACS,UAAU,CAACC,KAAK;EAC5CC,SAAS,EAAEjB,KAAK,CAACI,EAAE,CAACE,OAAO,CAACS,UAAU,CAACC,KAAK;EAC5CE,SAAS,EAAE;AACb,CAAC,CAAC;AAEF,eAAenB,MAAM"}
@@ -1,10 +0,0 @@
1
- import { HvChartProps } from "../Chart";
2
-
3
- export interface HvConfusionMatrixProps extends HvChartProps {
4
- /**
5
- *
6
- */
7
- deltaMatrix?: number[][];
8
- }
9
-
10
- export default function HvConfusionMatrixProps(props: HvConfusionMatrixProps): JSX.Element | null;
@@ -1,76 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- const _excluded = ["id", "classes", "data", "layout", "config", "tooltip", "deltaMatrix"];
4
- 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; }
5
- 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) { _defineProperty(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; }
6
- import React, { useMemo } from "react";
7
- import PropTypes from "prop-types";
8
- import { withStyles } from "@mui/styles";
9
- import { useTheme } from "@mui/material/styles";
10
- import Chart from "../Chart";
11
- import CustomTooltip from "./CustomTooltip";
12
- import { applyDataDefaults, applyLayoutDefaults } from "./confusionMatrixPlotlyOverrides";
13
- import styles from "./styles";
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- const ConfusionMatrix = _ref => {
16
- let {
17
- id,
18
- classes,
19
- data,
20
- layout,
21
- config,
22
- tooltip,
23
- deltaMatrix
24
- } = _ref,
25
- others = _objectWithoutProperties(_ref, _excluded);
26
- const theme = useTheme();
27
- const dataWithDefaults = useMemo(() => applyDataDefaults(data, theme, deltaMatrix), [data, theme, deltaMatrix]);
28
- const layoutWithDefaults = useMemo(() => applyLayoutDefaults(layout, theme, dataWithDefaults, deltaMatrix), [layout, theme, dataWithDefaults, deltaMatrix]);
29
- return /*#__PURE__*/_jsx(Chart, _objectSpread({
30
- id: id,
31
- classes: classes,
32
- data: dataWithDefaults,
33
- layout: layoutWithDefaults,
34
- config: config,
35
- tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : tooltipData => /*#__PURE__*/_jsx(CustomTooltip, {
36
- data: tooltipData,
37
- deltaMatrix: !!deltaMatrix
38
- })
39
- }, others));
40
- };
41
- process.env.NODE_ENV !== "production" ? ConfusionMatrix.propTypes = {
42
- /**
43
- *
44
- */
45
- id: PropTypes.string,
46
- /**
47
- *
48
- */
49
- classes: PropTypes.shape({
50
- root: PropTypes.string
51
- }),
52
- /**
53
- *
54
- */
55
- data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,
56
- /**
57
- *
58
- */
59
- layout: PropTypes.instanceOf(Object),
60
- /**
61
- *
62
- */
63
- config: PropTypes.instanceOf(Object),
64
- /**
65
- *
66
- */
67
- tooltip: PropTypes.func,
68
- /**
69
- *
70
- */
71
- deltaMatrix: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))
72
- } : void 0;
73
- export default withStyles(styles, {
74
- name: "HvConfusionMatrix"
75
- })(ConfusionMatrix);
76
- //# sourceMappingURL=ConfusionMatrix.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfusionMatrix.js","names":["React","useMemo","PropTypes","withStyles","useTheme","Chart","CustomTooltip","applyDataDefaults","applyLayoutDefaults","styles","ConfusionMatrix","id","classes","data","layout","config","tooltip","deltaMatrix","others","theme","dataWithDefaults","layoutWithDefaults","tooltipData","propTypes","string","shape","root","arrayOf","instanceOf","Object","isRequired","func","number","name"],"sources":["../../../src/ConfusionMatrix/ConfusionMatrix.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Chart from \"../Chart\";\nimport CustomTooltip from \"./CustomTooltip\";\nimport { applyDataDefaults, applyLayoutDefaults } from \"./confusionMatrixPlotlyOverrides\";\nimport styles from \"./styles\";\n\nconst ConfusionMatrix = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltip,\n deltaMatrix,\n ...others\n}) => {\n const theme = useTheme();\n const dataWithDefaults = useMemo(\n () => applyDataDefaults(data, theme, deltaMatrix),\n [data, theme, deltaMatrix]\n );\n const layoutWithDefaults = useMemo(\n () => applyLayoutDefaults(layout, theme, dataWithDefaults, deltaMatrix),\n [layout, theme, dataWithDefaults, deltaMatrix]\n );\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={dataWithDefaults}\n layout={layoutWithDefaults}\n config={config}\n tooltip={\n tooltip ??\n ((tooltipData) => <CustomTooltip data={tooltipData} deltaMatrix={!!deltaMatrix} />)\n }\n {...others}\n />\n );\n};\n\nConfusionMatrix.propTypes = {\n /**\n *\n */\n id: PropTypes.string,\n /**\n *\n */\n classes: PropTypes.shape({\n root: PropTypes.string,\n }),\n /**\n *\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n *\n */\n layout: PropTypes.instanceOf(Object),\n /**\n *\n */\n config: PropTypes.instanceOf(Object),\n /**\n *\n */\n tooltip: PropTypes.func,\n /**\n *\n */\n deltaMatrix: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)),\n};\n\nexport default withStyles(styles, { name: \"HvConfusionMatrix\" })(ConfusionMatrix);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,OAAOC,KAAK,MAAM,UAAU;AAC5B,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,kCAAkC;AACzF,OAAOC,MAAM,MAAM,UAAU;AAAC;AAE9B,MAAMC,eAAe,GAAG,QASlB;EAAA,IATmB;MACvBC,EAAE;MACFC,OAAO;MACPC,IAAI;MACJC,MAAM;MACNC,MAAM;MACNC,OAAO;MACPC;IAEF,CAAC;IADIC,MAAM;EAET,MAAMC,KAAK,GAAGf,QAAQ,EAAE;EACxB,MAAMgB,gBAAgB,GAAGnB,OAAO,CAC9B,MAAMM,iBAAiB,CAACM,IAAI,EAAEM,KAAK,EAAEF,WAAW,CAAC,EACjD,CAACJ,IAAI,EAAEM,KAAK,EAAEF,WAAW,CAAC,CAC3B;EACD,MAAMI,kBAAkB,GAAGpB,OAAO,CAChC,MAAMO,mBAAmB,CAACM,MAAM,EAAEK,KAAK,EAAEC,gBAAgB,EAAEH,WAAW,CAAC,EACvE,CAACH,MAAM,EAAEK,KAAK,EAAEC,gBAAgB,EAAEH,WAAW,CAAC,CAC/C;EAED,oBACE,KAAC,KAAK;IACJ,EAAE,EAAEN,EAAG;IACP,OAAO,EAAEC,OAAQ;IACjB,IAAI,EAAEQ,gBAAiB;IACvB,MAAM,EAAEC,kBAAmB;IAC3B,MAAM,EAAEN,MAAO;IACf,OAAO,EACLC,OAAO,aAAPA,OAAO,cAAPA,OAAO,GACLM,WAAW,iBAAK,KAAC,aAAa;MAAC,IAAI,EAAEA,WAAY;MAAC,WAAW,EAAE,CAAC,CAACL;IAAY;EAChF,GACGC,MAAM,EACV;AAEN,CAAC;AAED,wCAAAR,eAAe,CAACa,SAAS,GAAG;EAC1B;AACF;AACA;EACEZ,EAAE,EAAET,SAAS,CAACsB,MAAM;EACpB;AACF;AACA;EACEZ,OAAO,EAAEV,SAAS,CAACuB,KAAK,CAAC;IACvBC,IAAI,EAAExB,SAAS,CAACsB;EAClB,CAAC,CAAC;EACF;AACF;AACA;EACEX,IAAI,EAAEX,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC,CAAC,CAACC,UAAU;EAChE;AACF;AACA;EACEhB,MAAM,EAAEZ,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACEd,MAAM,EAAEb,SAAS,CAAC0B,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACEb,OAAO,EAAEd,SAAS,CAAC6B,IAAI;EACvB;AACF;AACA;EACEd,WAAW,EAAEf,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAACyB,OAAO,CAACzB,SAAS,CAAC8B,MAAM,CAAC;AACpE,CAAC;AAED,eAAe7B,UAAU,CAACM,MAAM,EAAE;EAAEwB,IAAI,EAAE;AAAoB,CAAC,CAAC,CAACvB,eAAe,CAAC"}
@@ -1,37 +0,0 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- import { HvTypography } from "@hitachivantara/uikit-react-core";
4
- import useStyles from "./styles";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- const CustomTooltip = ({
7
- data,
8
- deltaMatrix
9
- }) => {
10
- const classes = useStyles();
11
- const [element] = data.elements;
12
- const value = deltaMatrix && data.title !== element.value ? 0 - element.zValue : element.zValue;
13
- const oneLiner = `${data.title} - ${element.value}: ${value}`;
14
- return /*#__PURE__*/_jsx("div", {
15
- className: classes.root,
16
- children: /*#__PURE__*/_jsx("div", {
17
- className: classes.container,
18
- children: /*#__PURE__*/_jsx("div", {
19
- children: /*#__PURE__*/_jsx(HvTypography, {
20
- children: oneLiner
21
- })
22
- })
23
- })
24
- });
25
- };
26
- process.env.NODE_ENV !== "production" ? CustomTooltip.propTypes = {
27
- data: PropTypes.shape({
28
- title: PropTypes.string,
29
- elements: PropTypes.arrayOf(PropTypes.shape({
30
- value: PropTypes.string,
31
- zValue: PropTypes.number
32
- }))
33
- }),
34
- deltaMatrix: PropTypes.bool
35
- } : void 0;
36
- export default CustomTooltip;
37
- //# sourceMappingURL=CustomTooltip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomTooltip.js","names":["React","PropTypes","HvTypography","useStyles","CustomTooltip","data","deltaMatrix","classes","element","elements","value","title","zValue","oneLiner","root","container","propTypes","shape","string","arrayOf","number","bool"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/CustomTooltip.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { HvTypography } from \"@hitachivantara/uikit-react-core\";\n\nimport useStyles from \"./styles\";\n\nconst CustomTooltip = ({ data, deltaMatrix }) => {\n const classes = useStyles();\n const [element] = data.elements;\n const value = deltaMatrix && data.title !== element.value ? 0 - element.zValue : element.zValue;\n const oneLiner = `${data.title} - ${element.value}: ${value}`;\n return (\n <div className={classes.root}>\n <div className={classes.container}>\n <div>\n <HvTypography>{oneLiner}</HvTypography>\n </div>\n </div>\n </div>\n );\n};\n\nCustomTooltip.propTypes = {\n data: PropTypes.shape({\n title: PropTypes.string,\n elements: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.string,\n zValue: PropTypes.number,\n })\n ),\n }),\n deltaMatrix: PropTypes.bool,\n};\n\nexport default CustomTooltip;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,kCAAkC;AAE/D,OAAOC,SAAS,MAAM,UAAU;AAAC;AAEjC,MAAMC,aAAa,GAAG,CAAC;EAAEC,IAAI;EAAEC;AAAY,CAAC,KAAK;EAC/C,MAAMC,OAAO,GAAGJ,SAAS,EAAE;EAC3B,MAAM,CAACK,OAAO,CAAC,GAAGH,IAAI,CAACI,QAAQ;EAC/B,MAAMC,KAAK,GAAGJ,WAAW,IAAID,IAAI,CAACM,KAAK,KAAKH,OAAO,CAACE,KAAK,GAAG,CAAC,GAAGF,OAAO,CAACI,MAAM,GAAGJ,OAAO,CAACI,MAAM;EAC/F,MAAMC,QAAQ,GAAI,GAAER,IAAI,CAACM,KAAM,MAAKH,OAAO,CAACE,KAAM,KAAIA,KAAM,EAAC;EAC7D,oBACE;IAAK,SAAS,EAAEH,OAAO,CAACO,IAAK;IAAA,uBAC3B;MAAK,SAAS,EAAEP,OAAO,CAACQ,SAAU;MAAA,uBAChC;QAAA,uBACE,KAAC,YAAY;UAAA,UAAEF;QAAQ;MAAgB;IACnC;EACF,EACF;AAEV,CAAC;AAED,wCAAAT,aAAa,CAACY,SAAS,GAAG;EACxBX,IAAI,EAAEJ,SAAS,CAACgB,KAAK,CAAC;IACpBN,KAAK,EAAEV,SAAS,CAACiB,MAAM;IACvBT,QAAQ,EAAER,SAAS,CAACkB,OAAO,CACzBlB,SAAS,CAACgB,KAAK,CAAC;MACdP,KAAK,EAAET,SAAS,CAACiB,MAAM;MACvBN,MAAM,EAAEX,SAAS,CAACmB;IACpB,CAAC,CAAC;EAEN,CAAC,CAAC;EACFd,WAAW,EAAEL,SAAS,CAACoB;AACzB,CAAC;AAED,eAAejB,aAAa"}
@@ -1,2 +0,0 @@
1
- export { default } from "./CustomTooltip";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/index.js"],"sourcesContent":["export { default } from \"./CustomTooltip\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,iBAAiB"}
@@ -1,17 +0,0 @@
1
- import { makeStyles } from "@mui/styles";
2
- const useStyles = makeStyles(theme => ({
3
- root: {
4
- backgroundColor: theme.hv.palette.atmosphere.atmo1,
5
- width: "fit-content",
6
- minWidth: 150,
7
- boxShadow: theme.hv.shadows[1],
8
- zIndex: 1000
9
- },
10
- container: {
11
- padding: theme.hvSpacing("15px", "sm"),
12
- display: "flex",
13
- flexDirection: "column"
14
- }
15
- }));
16
- export default useStyles;
17
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","names":["makeStyles","useStyles","theme","root","backgroundColor","hv","palette","atmosphere","atmo1","width","minWidth","boxShadow","shadows","zIndex","container","padding","hvSpacing","display","flexDirection"],"sources":["../../../../src/ConfusionMatrix/CustomTooltip/styles.js"],"sourcesContent":["import { makeStyles } from \"@mui/styles\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n width: \"fit-content\",\n minWidth: 150,\n boxShadow: theme.hv.shadows[1],\n zIndex: 1000,\n },\n container: {\n padding: theme.hvSpacing(\"15px\", \"sm\"),\n display: \"flex\",\n flexDirection: \"column\",\n },\n}));\n\nexport default useStyles;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,aAAa;AAExC,MAAMC,SAAS,GAAGD,UAAU,CAAEE,KAAK,KAAM;EACvCC,IAAI,EAAE;IACJC,eAAe,EAAEF,KAAK,CAACG,EAAE,CAACC,OAAO,CAACC,UAAU,CAACC,KAAK;IAClDC,KAAK,EAAE,aAAa;IACpBC,QAAQ,EAAE,GAAG;IACbC,SAAS,EAAET,KAAK,CAACG,EAAE,CAACO,OAAO,CAAC,CAAC,CAAC;IAC9BC,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTC,OAAO,EAAEb,KAAK,CAACc,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC;IACtCC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC,CAAC;AAEH,eAAejB,SAAS"}
@@ -1,154 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- 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; }
3
- 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) { _defineProperty(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; }
4
- /* eslint-disable no-param-reassign */
5
- import clone from "lodash/cloneDeep";
6
- const HEX_ALPHA_50 = "80";
7
- const HEIGHT_PER_CATEGORY = 45;
8
- const WIDTH_PER_CATEGORY = 55;
9
- const setterIfNil = (object, property, value) => {
10
- var _object$property;
11
- object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
12
- };
13
- const buildAnnotations = (trace, customAnnotations, deltaMatrix = false) => {
14
- const {
15
- x = [],
16
- y = [],
17
- z = []
18
- } = trace;
19
- const annotations = [];
20
- for (let i = 0; i < y.length; i += 1) {
21
- for (let j = 0; j < x.length; j += 1) {
22
- var _customAnnotations$te, _customAnnotations$te2, _customAnnotations$si;
23
- const currentValue = z[i][j];
24
- let textValue;
25
- let size = 12;
26
- if (currentValue > 999) {
27
- textValue = currentValue.toExponential(1);
28
- } else {
29
- textValue = currentValue;
30
- }
31
- if (deltaMatrix) {
32
- if (i !== j) {
33
- textValue = 0 - textValue;
34
- } else {
35
- textValue = `<span style="font-weight: 600;">${textValue}</span>`;
36
- size = 14;
37
- }
38
- }
39
- const result = {
40
- xref: "x1",
41
- yref: "y1",
42
- x: x[j],
43
- y: y[i],
44
- text: (_customAnnotations$te = customAnnotations === null || customAnnotations === void 0 ? void 0 : (_customAnnotations$te2 = customAnnotations.text) === null || _customAnnotations$te2 === void 0 ? void 0 : _customAnnotations$te2.call(customAnnotations, currentValue)) !== null && _customAnnotations$te !== void 0 ? _customAnnotations$te : textValue,
45
- font: {
46
- family: "Open Sans",
47
- size: (_customAnnotations$si = customAnnotations === null || customAnnotations === void 0 ? void 0 : customAnnotations.size) !== null && _customAnnotations$si !== void 0 ? _customAnnotations$si : size,
48
- color: customAnnotations === null || customAnnotations === void 0 ? void 0 : customAnnotations.textColor
49
- },
50
- showarrow: false
51
- };
52
- annotations.push(result);
53
- }
54
- }
55
- return annotations;
56
- };
57
-
58
- /**
59
- * Auxiliary functions to set the layout in order to follow the DS guideline.
60
- */
61
- export const applyLayoutDefaults = (inputLayout = {}, theme, data = [{}], deltaMatrix) => {
62
- var _theme$hv, _theme$hv$palette, _theme$hv$palette$acc, _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$at;
63
- const layout = clone(inputLayout);
64
- setterIfNil(layout, "hovermode", "closest");
65
- const [trace] = data;
66
- const categories = (trace === null || trace === void 0 ? void 0 : trace.x) || [];
67
- const squareWidth = categories.length * WIDTH_PER_CATEGORY;
68
- const squareHeight = categories.length * HEIGHT_PER_CATEGORY;
69
- const chartWidth = Math.max(squareWidth, WIDTH_PER_CATEGORY * 10);
70
- const chartHeight = Math.max(squareHeight, WIDTH_PER_CATEGORY * 10);
71
- setterIfNil(layout, "width", chartWidth);
72
- setterIfNil(layout, "height", chartHeight);
73
- setterIfNil(layout, "margin", {
74
- t: 130,
75
- b: 40,
76
- pad: 10
77
- });
78
- const textColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv = theme.hv) === null || _theme$hv === void 0 ? void 0 : (_theme$hv$palette = _theme$hv.palette) === null || _theme$hv$palette === void 0 ? void 0 : (_theme$hv$palette$acc = _theme$hv$palette.accent) === null || _theme$hv$palette$acc === void 0 ? void 0 : _theme$hv$palette$acc.acce1) || "black";
79
- const getAxisLayout = (text, standoff) => ({
80
- color: textColor,
81
- showline: false,
82
- showgrid: false,
83
- tickfont: {
84
- family: "Open Sans",
85
- size: 12
86
- },
87
- ticks: "",
88
- title: {
89
- text,
90
- standoff,
91
- font: {
92
- family: "Open Sans",
93
- size: 12
94
- }
95
- }
96
- });
97
- setterIfNil(layout, "yaxis", _objectSpread(_objectSpread({}, getAxisLayout("True Label", 50)), {}, {
98
- autorange: "reversed"
99
- }));
100
- setterIfNil(layout, "xaxis", _objectSpread(_objectSpread({}, getAxisLayout("Predicted Label", 15)), {}, {
101
- side: "top",
102
- tickangle: "-45"
103
- }));
104
- const backgroundColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv2 = theme.hv) === null || _theme$hv2 === void 0 ? void 0 : (_theme$hv2$palette = _theme$hv2.palette) === null || _theme$hv2$palette === void 0 ? void 0 : (_theme$hv2$palette$at = _theme$hv2$palette.atmosphere) === null || _theme$hv2$palette$at === void 0 ? void 0 : _theme$hv2$palette$at.atmo1) || "white";
105
- setterIfNil(layout, "paper_bgcolor", backgroundColor);
106
- setterIfNil(layout, "plot_bgcolor", backgroundColor);
107
- setterIfNil(layout, "annotations", buildAnnotations(trace, _objectSpread({
108
- textColor
109
- }, layout.customAnnotations || {}), deltaMatrix));
110
- return layout;
111
- };
112
- const calculateDeltaMatrix = (matrix1, matrix2) => {
113
- let deltaMin = 0;
114
- const matrixData = matrix1.reduce((lineAcc, classLine, lineIndex) => {
115
- const lineValues = classLine.reduce((columnAcc, columnValue, columnIndex) => {
116
- let value = columnValue - matrix2[lineIndex][columnIndex];
117
- deltaMin = Math.min(deltaMin, value);
118
- if (lineIndex !== columnIndex) {
119
- value = 0 - value;
120
- }
121
- return [...columnAcc, value];
122
- }, []);
123
- return [...lineAcc, lineValues];
124
- }, []);
125
- return [matrixData, deltaMin];
126
- };
127
- export const applyDataDefaults = (inputData = [{}], theme, deltaMatrix) => {
128
- var _theme$hv3, _theme$hv3$palette, _theme$hv3$palette$at, _theme$hv4, _theme$hv4$viz, _theme$hv4$viz$palett, _theme$hv4$viz$palett2, _theme$hv5, _theme$hv5$viz, _theme$hv5$viz$palett, _theme$hv5$viz$palett2;
129
- const data = clone(inputData);
130
- const backgroundColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv3 = theme.hv) === null || _theme$hv3 === void 0 ? void 0 : (_theme$hv3$palette = _theme$hv3.palette) === null || _theme$hv3$palette === void 0 ? void 0 : (_theme$hv3$palette$at = _theme$hv3$palette.atmosphere) === null || _theme$hv3$palette$at === void 0 ? void 0 : _theme$hv3$palette$at.atmo1) || "white";
131
- const greenColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv4 = theme.hv) === null || _theme$hv4 === void 0 ? void 0 : (_theme$hv4$viz = _theme$hv4.viz) === null || _theme$hv4$viz === void 0 ? void 0 : (_theme$hv4$viz$palett = _theme$hv4$viz.palette) === null || _theme$hv4$viz$palett === void 0 ? void 0 : (_theme$hv4$viz$palett2 = _theme$hv4$viz$palett.polarized) === null || _theme$hv4$viz$palett2 === void 0 ? void 0 : _theme$hv4$viz$palett2.cviz21) || "#008000";
132
- const redColor = (theme === null || theme === void 0 ? void 0 : (_theme$hv5 = theme.hv) === null || _theme$hv5 === void 0 ? void 0 : (_theme$hv5$viz = _theme$hv5.viz) === null || _theme$hv5$viz === void 0 ? void 0 : (_theme$hv5$viz$palett = _theme$hv5$viz.palette) === null || _theme$hv5$viz$palett === void 0 ? void 0 : (_theme$hv5$viz$palett2 = _theme$hv5$viz$palett.polarized) === null || _theme$hv5$viz$palett2 === void 0 ? void 0 : _theme$hv5$viz$palett2.cviz26) || "#FF0000";
133
- data.forEach(trace => {
134
- setterIfNil(trace, "type", "heatmap");
135
- setterIfNil(trace, "hoverinfo", "none");
136
- const colorscale = [[0, backgroundColor], [1, `${greenColor}${HEX_ALPHA_50}`]];
137
- const deltaColorscale = [[0, `${redColor}${HEX_ALPHA_50}`], [0.5, backgroundColor], [1, `${greenColor}${HEX_ALPHA_50}`]];
138
- setterIfNil(trace, "colorscale", deltaMatrix ? deltaColorscale : colorscale);
139
- setterIfNil(trace, "showscale", false);
140
- const [matrixData, deltaMin] = deltaMatrix ? calculateDeltaMatrix(trace.z, deltaMatrix) : [trace.z];
141
- trace.z = matrixData;
142
- if (deltaMatrix) {
143
- const getMax = matrix => {
144
- const max = Math.max(...matrix.flat());
145
- return max < 0 ? Math.abs(deltaMin) : max;
146
- };
147
- setterIfNil(trace, "zmin", deltaMin);
148
- setterIfNil(trace, "zmid", 0);
149
- setterIfNil(trace, "zmax", getMax(matrixData));
150
- }
151
- });
152
- return data;
153
- };
154
- //# sourceMappingURL=confusionMatrixPlotlyOverrides.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confusionMatrixPlotlyOverrides.js","names":["clone","HEX_ALPHA_50","HEIGHT_PER_CATEGORY","WIDTH_PER_CATEGORY","setterIfNil","object","property","value","buildAnnotations","trace","customAnnotations","deltaMatrix","x","y","z","annotations","i","length","j","currentValue","textValue","size","toExponential","result","xref","yref","text","font","family","color","textColor","showarrow","push","applyLayoutDefaults","inputLayout","theme","data","layout","categories","squareWidth","squareHeight","chartWidth","Math","max","chartHeight","t","b","pad","hv","palette","accent","acce1","getAxisLayout","standoff","showline","showgrid","tickfont","ticks","title","autorange","side","tickangle","backgroundColor","atmosphere","atmo1","calculateDeltaMatrix","matrix1","matrix2","deltaMin","matrixData","reduce","lineAcc","classLine","lineIndex","lineValues","columnAcc","columnValue","columnIndex","min","applyDataDefaults","inputData","greenColor","viz","polarized","cviz21","redColor","cviz26","forEach","colorscale","deltaColorscale","getMax","matrix","flat","abs"],"sources":["../../../src/ConfusionMatrix/confusionMatrixPlotlyOverrides.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport clone from \"lodash/cloneDeep\";\n\nconst HEX_ALPHA_50 = \"80\";\nconst HEIGHT_PER_CATEGORY = 45;\nconst WIDTH_PER_CATEGORY = 55;\n\nconst setterIfNil = (object, property, value) => {\n object[property] = object[property] ?? value;\n};\n\nconst buildAnnotations = (trace, customAnnotations, deltaMatrix = false) => {\n const { x = [], y = [], z = [] } = trace;\n const annotations = [];\n for (let i = 0; i < y.length; i += 1) {\n for (let j = 0; j < x.length; j += 1) {\n const currentValue = z[i][j];\n let textValue;\n let size = 12;\n if (currentValue > 999) {\n textValue = currentValue.toExponential(1);\n } else {\n textValue = currentValue;\n }\n\n if (deltaMatrix) {\n if (i !== j) {\n textValue = 0 - textValue;\n } else {\n textValue = `<span style=\"font-weight: 600;\">${textValue}</span>`;\n size = 14;\n }\n }\n\n const result = {\n xref: \"x1\",\n yref: \"y1\",\n x: x[j],\n y: y[i],\n text: customAnnotations?.text?.(currentValue) ?? textValue,\n font: {\n family: \"Open Sans\",\n size: customAnnotations?.size ?? size,\n color: customAnnotations?.textColor,\n },\n showarrow: false,\n };\n annotations.push(result);\n }\n }\n\n return annotations;\n};\n\n/**\n * Auxiliary functions to set the layout in order to follow the DS guideline.\n */\nexport const applyLayoutDefaults = (inputLayout = {}, theme, data = [{}], deltaMatrix) => {\n const layout = clone(inputLayout);\n setterIfNil(layout, \"hovermode\", \"closest\");\n const [trace] = data;\n\n const categories = trace?.x || [];\n const squareWidth = categories.length * WIDTH_PER_CATEGORY;\n const squareHeight = categories.length * HEIGHT_PER_CATEGORY;\n const chartWidth = Math.max(squareWidth, WIDTH_PER_CATEGORY * 10);\n const chartHeight = Math.max(squareHeight, WIDTH_PER_CATEGORY * 10);\n setterIfNil(layout, \"width\", chartWidth);\n setterIfNil(layout, \"height\", chartHeight);\n setterIfNil(layout, \"margin\", {\n t: 130,\n b: 40,\n pad: 10,\n });\n\n const textColor = theme?.hv?.palette?.accent?.acce1 || \"black\";\n\n const getAxisLayout = (text, standoff) => ({\n color: textColor,\n showline: false,\n showgrid: false,\n tickfont: {\n family: \"Open Sans\",\n size: 12,\n },\n ticks: \"\",\n title: {\n text,\n standoff,\n font: {\n family: \"Open Sans\",\n size: 12,\n },\n },\n });\n setterIfNil(layout, \"yaxis\", {\n ...getAxisLayout(\"True Label\", 50),\n autorange: \"reversed\",\n });\n setterIfNil(layout, \"xaxis\", {\n ...getAxisLayout(\"Predicted Label\", 15),\n side: \"top\",\n tickangle: \"-45\",\n });\n\n const backgroundColor = theme?.hv?.palette?.atmosphere?.atmo1 || \"white\";\n setterIfNil(layout, \"paper_bgcolor\", backgroundColor);\n setterIfNil(layout, \"plot_bgcolor\", backgroundColor);\n\n setterIfNil(\n layout,\n \"annotations\",\n buildAnnotations(trace, { textColor, ...(layout.customAnnotations || {}) }, deltaMatrix)\n );\n\n return layout;\n};\n\nconst calculateDeltaMatrix = (matrix1, matrix2) => {\n let deltaMin = 0;\n const matrixData = matrix1.reduce((lineAcc, classLine, lineIndex) => {\n const lineValues = classLine.reduce((columnAcc, columnValue, columnIndex) => {\n let value = columnValue - matrix2[lineIndex][columnIndex];\n deltaMin = Math.min(deltaMin, value);\n if (lineIndex !== columnIndex) {\n value = 0 - value;\n }\n return [...columnAcc, value];\n }, []);\n return [...lineAcc, lineValues];\n }, []);\n\n return [matrixData, deltaMin];\n};\n\nexport const applyDataDefaults = (inputData = [{}], theme, deltaMatrix) => {\n const data = clone(inputData);\n const backgroundColor = theme?.hv?.palette?.atmosphere?.atmo1 || \"white\";\n const greenColor = theme?.hv?.viz?.palette?.polarized?.cviz21 || \"#008000\";\n const redColor = theme?.hv?.viz?.palette?.polarized?.cviz26 || \"#FF0000\";\n\n data.forEach((trace) => {\n setterIfNil(trace, \"type\", \"heatmap\");\n setterIfNil(trace, \"hoverinfo\", \"none\");\n\n const colorscale = [\n [0, backgroundColor],\n [1, `${greenColor}${HEX_ALPHA_50}`],\n ];\n const deltaColorscale = [\n [0, `${redColor}${HEX_ALPHA_50}`],\n [0.5, backgroundColor],\n [1, `${greenColor}${HEX_ALPHA_50}`],\n ];\n\n setterIfNil(trace, \"colorscale\", deltaMatrix ? deltaColorscale : colorscale);\n setterIfNil(trace, \"showscale\", false);\n\n const [matrixData, deltaMin] = deltaMatrix\n ? calculateDeltaMatrix(trace.z, deltaMatrix)\n : [trace.z];\n trace.z = matrixData;\n\n if (deltaMatrix) {\n const getMax = (matrix) => {\n const max = Math.max(...matrix.flat());\n return max < 0 ? Math.abs(deltaMin) : max;\n };\n\n setterIfNil(trace, \"zmin\", deltaMin);\n setterIfNil(trace, \"zmid\", 0);\n setterIfNil(trace, \"zmax\", getMax(matrixData));\n }\n });\n\n return data;\n};\n"],"mappings":";;;AAAA;AACA,OAAOA,KAAK,MAAM,kBAAkB;AAEpC,MAAMC,YAAY,GAAG,IAAI;AACzB,MAAMC,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,kBAAkB,GAAG,EAAE;AAE7B,MAAMC,WAAW,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,KAAK;EAAA;EAC/CF,MAAM,CAACC,QAAQ,CAAC,uBAAGD,MAAM,CAACC,QAAQ,CAAC,+DAAIC,KAAK;AAC9C,CAAC;AAED,MAAMC,gBAAgB,GAAG,CAACC,KAAK,EAAEC,iBAAiB,EAAEC,WAAW,GAAG,KAAK,KAAK;EAC1E,MAAM;IAAEC,CAAC,GAAG,EAAE;IAAEC,CAAC,GAAG,EAAE;IAAEC,CAAC,GAAG;EAAG,CAAC,GAAGL,KAAK;EACxC,MAAMM,WAAW,GAAG,EAAE;EACtB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,CAAC,CAACI,MAAM,EAAED,CAAC,IAAI,CAAC,EAAE;IACpC,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGN,CAAC,CAACK,MAAM,EAA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AC"}
@@ -1,2 +0,0 @@
1
- export { default } from "./ConfusionMatrix";
2
- export * from "./ConfusionMatrix";
@@ -1,2 +0,0 @@
1
- export { default } from "./ConfusionMatrix";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["default"],"sources":["../../../src/ConfusionMatrix/index.js"],"sourcesContent":["export { default } from \"./ConfusionMatrix\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,mBAAmB"}
@@ -1,3 +0,0 @@
1
- const styles = {};
2
- export default styles;
3
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/ConfusionMatrix/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,CAAC,CAAC;AAEjB,eAAeA,MAAM"}
@@ -1,10 +0,0 @@
1
- import { HvChartProps } from "../Chart";
2
-
3
- export interface HvDonutchartProps extends HvChartProps {
4
- /**
5
- * Sets the type of graph.
6
- */
7
- type?: "regular" | "thin";
8
- }
9
-
10
- export default function HvDonutchart(props: HvDonutchartProps): JSX.Element | null;