@undp/data-viz 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/AreaChart.js +3 -3
  2. package/dist/BarGraph.cjs +1 -1
  3. package/dist/BarGraph.cjs.map +1 -1
  4. package/dist/BarGraph.js +1760 -1604
  5. package/dist/BarGraph.js.map +1 -1
  6. package/dist/BeeSwarmChart.js +2 -2
  7. package/dist/BiVariateChoroplethMap.cjs +1 -1
  8. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  9. package/dist/BiVariateChoroplethMap.js +222 -207
  10. package/dist/BiVariateChoroplethMap.js.map +1 -1
  11. package/dist/BulletChart.cjs +1 -1
  12. package/dist/BulletChart.cjs.map +1 -1
  13. package/dist/BulletChart.d.ts +11 -0
  14. package/dist/BulletChart.js +726 -640
  15. package/dist/BulletChart.js.map +1 -1
  16. package/dist/ButterflyChart.cjs +1 -1
  17. package/dist/ButterflyChart.cjs.map +1 -1
  18. package/dist/ButterflyChart.js +366 -348
  19. package/dist/ButterflyChart.js.map +1 -1
  20. package/dist/ChoroplethMap.cjs +1 -1
  21. package/dist/ChoroplethMap.cjs.map +1 -1
  22. package/dist/ChoroplethMap.js +311 -297
  23. package/dist/ChoroplethMap.js.map +1 -1
  24. package/dist/CirclePackingGraph.js +1 -1
  25. package/dist/DifferenceLineChart.js +3 -3
  26. package/dist/DotDensityMap.cjs +1 -1
  27. package/dist/DotDensityMap.cjs.map +1 -1
  28. package/dist/DotDensityMap.js +219 -203
  29. package/dist/DotDensityMap.js.map +1 -1
  30. package/dist/DualAxisLineChart.js +3 -3
  31. package/dist/DumbbellChart.cjs +1 -1
  32. package/dist/DumbbellChart.cjs.map +1 -1
  33. package/dist/DumbbellChart.js +606 -556
  34. package/dist/DumbbellChart.js.map +1 -1
  35. package/dist/GraphEl-YKUlz-37.cjs +2 -0
  36. package/dist/GraphEl-YKUlz-37.cjs.map +1 -0
  37. package/dist/{GraphEl-ebgfxefq.js → GraphEl-sVZvlyWe.js} +3 -2
  38. package/dist/GraphEl-sVZvlyWe.js.map +1 -0
  39. package/dist/GriddedGraphs.cjs +1 -1
  40. package/dist/GriddedGraphs.js +2 -2
  41. package/dist/HeatMap.js +4 -4
  42. package/dist/Histogram.js +3 -3
  43. package/dist/HybridMap.cjs +1 -1
  44. package/dist/HybridMap.cjs.map +1 -1
  45. package/dist/HybridMap.js +357 -342
  46. package/dist/HybridMap.js.map +1 -1
  47. package/dist/LineChartWithConfidenceInterval.js +3 -3
  48. package/dist/MultiLineAltChart.cjs +1 -1
  49. package/dist/MultiLineAltChart.cjs.map +1 -1
  50. package/dist/MultiLineAltChart.js +453 -425
  51. package/dist/MultiLineAltChart.js.map +1 -1
  52. package/dist/MultiLineChart.js +3 -3
  53. package/dist/ParetoChart.js +2 -2
  54. package/dist/RadarChart.js +1 -1
  55. package/dist/ScatterPlot.cjs +1 -1
  56. package/dist/ScatterPlot.cjs.map +1 -1
  57. package/dist/ScatterPlot.js +471 -452
  58. package/dist/ScatterPlot.js.map +1 -1
  59. package/dist/SimpleLineChart.js +3 -3
  60. package/dist/SingleGraphDashboard.cjs +1 -1
  61. package/dist/SingleGraphDashboard.js +2 -2
  62. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  63. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  64. package/dist/SlopeChart.js +1 -1
  65. package/dist/SparkLine.js +3 -3
  66. package/dist/StripChart.js +1 -1
  67. package/dist/ThreeDGlobe.js +2 -2
  68. package/dist/Types.d.ts +1 -0
  69. package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
  70. package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
  71. package/dist/ensureCompleteData-DS7gCvVd.js +122 -0
  72. package/dist/ensureCompleteData-DS7gCvVd.js.map +1 -0
  73. package/dist/ensureCompleteData-Oib-vGb0.cjs +2 -0
  74. package/dist/ensureCompleteData-Oib-vGb0.cjs.map +1 -0
  75. package/dist/getSchema.cjs +1 -1
  76. package/dist/getSchema.cjs.map +1 -1
  77. package/dist/getSchema.js +15 -15
  78. package/dist/getSchema.js.map +1 -1
  79. package/dist/{index-BBV4tAeA.js → index-DPGq3eIL.js} +2 -2
  80. package/dist/{index-BBV4tAeA.js.map → index-DPGq3eIL.js.map} +1 -1
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.d.ts +3 -0
  83. package/dist/index.js +3 -3
  84. package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
  85. package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
  86. package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
  87. package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
  88. package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
  89. package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
  90. package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
  91. package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
  92. package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
  93. package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
  94. package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
  95. package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
  96. package/dist/transformData.cjs +1 -1
  97. package/dist/transformData.js +2 -2
  98. package/dist/transformDataForAggregation-CYoB5Xsk.cjs +2 -0
  99. package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +1 -0
  100. package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js} +14 -10
  101. package/dist/transformDataForAggregation-j34UL73s.js.map +1 -0
  102. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs → transformDataForGraphFromFile-CuXxR8uA.cjs} +2 -2
  103. package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs.map → transformDataForGraphFromFile-CuXxR8uA.cjs.map} +1 -1
  104. package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js} +2 -2
  105. package/dist/{transformDataForGraphFromFile-CSG24iF6.js.map → transformDataForGraphFromFile-DyP-83Nh.js.map} +1 -1
  106. package/package.json +4 -4
  107. package/dist/GraphEl-B16EYkko.cjs +0 -2
  108. package/dist/GraphEl-B16EYkko.cjs.map +0 -1
  109. package/dist/GraphEl-ebgfxefq.js.map +0 -1
  110. package/dist/ensureCompleteData-DNKEGRiP.js +0 -102
  111. package/dist/ensureCompleteData-DNKEGRiP.js.map +0 -1
  112. package/dist/ensureCompleteData-I6nYmT8E.cjs +0 -2
  113. package/dist/ensureCompleteData-I6nYmT8E.cjs.map +0 -1
  114. package/dist/sort-BIvMlUH1.js +0 -34
  115. package/dist/sort-BIvMlUH1.js.map +0 -1
  116. package/dist/sort-O96oMZLb.cjs +0 -2
  117. package/dist/sort-O96oMZLb.cjs.map +0 -1
  118. package/dist/transformDataForAggregation-DEU__LUl.js.map +0 -1
  119. package/dist/transformDataForAggregation-XNg0OGYE.cjs +0 -2
  120. package/dist/transformDataForAggregation-XNg0OGYE.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformDataForAggregation-j34UL73s.js","sources":["../src/Utils/transformData/graphConfig.ts","../src/Utils/checkDataValidity.ts","../src/Utils/transformData/transformDataForGraph.ts","../src/Utils/transformData/transformDataForAggregation.ts"],"sourcesContent":["import { GraphType, ThreeDGraphType } from '@/Types';\r\n\r\nexport const ChartConfiguration: {\r\n chartID: GraphType | ThreeDGraphType;\r\n configuration: { id: string; required: boolean; multiple: boolean }[];\r\n}[] = [\r\n {\r\n chartID: 'barChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'bulletChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'target',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'qualitativeRange',\r\n required: false,\r\n multiple: true,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'radarChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'values',\r\n required: true,\r\n multiple: true,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'stackedBarChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n multiple: true,\r\n required: true,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'groupedBarChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n multiple: true,\r\n required: true,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'lineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'dualAxisLineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y1',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'y2',\r\n multiple: false,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'differenceLineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y1',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'y2',\r\n multiple: false,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'multiLineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n multiple: true,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'multiLineAltChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'label',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'color',\r\n multiple: false,\r\n required: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'stackedAreaChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n multiple: true,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'threeDGlobe',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'choroplethMap',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'biVariateChoroplethMap',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'dotDensityMap',\r\n configuration: [\r\n {\r\n id: 'lat',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'long',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'label',\r\n multiple: false,\r\n required: false,\r\n },\r\n {\r\n id: 'color',\r\n multiple: false,\r\n required: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'hybridMap',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'lat',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'long',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'label',\r\n multiple: false,\r\n required: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'donutChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'slopeChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y1',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y2',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'scatterPlot',\r\n configuration: [\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'dumbbellChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n multiple: true,\r\n required: true,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'treeMap',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'circlePacking',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'sankeyChart',\r\n configuration: [\r\n {\r\n id: 'source',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'target',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'value',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'heatMap',\r\n configuration: [\r\n {\r\n id: 'row',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'column',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'stripChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'position',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'statCard',\r\n configuration: [\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'beeSwarmChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'position',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'butterflyChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'leftBar',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'rightBar',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'lineChartWithConfidenceInterval',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'yMin',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'yMax',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'histogram',\r\n configuration: [\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'sparkLine',\r\n configuration: [\r\n {\r\n id: 'dale',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'paretoChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'bar',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'line',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'unitChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n];\r\n","import flattenDeep from 'lodash.flattendeep';\r\n\r\nimport { ChartConfiguration } from './transformData/graphConfig';\r\n\r\nimport { GraphConfigurationDataType, GraphType, ThreeDGraphType } from '@/Types';\r\n\r\nfunction missingValuesInArray(superset: string[], subset: string[]): string[] {\r\n return subset.filter(value => !superset.includes(value));\r\n}\r\n\r\nexport function checkDataConfigValidity(\r\n dataConfig: GraphConfigurationDataType[],\r\n graph: GraphType | ThreeDGraphType,\r\n dataKeys: string[],\r\n) {\r\n const dataKeyFromDataConfig = flattenDeep(dataConfig.map(d => d.columnId));\r\n const checkDataKeys = missingValuesInArray(dataKeys, dataKeyFromDataConfig);\r\n if (checkDataKeys.length !== 0)\r\n return {\r\n isValid: false,\r\n err: `Key(s) in configuration that don't match keys in the data: ${checkDataKeys.join(\r\n ', ',\r\n )}. Possible reason: If you are using 'dataTransform' then the allowed keys (columns) are only the one present in 'aggregationColumnsSetting' array in 'dataTransform' object plus an additional key called 'count'.`,\r\n };\r\n const ids = dataConfig.map(el => el.chartConfigId);\r\n const requiredIds = ChartConfiguration[\r\n ChartConfiguration.findIndex(el => el.chartID === graph)\r\n ].configuration\r\n .filter(el => el.required)\r\n .map(el => el.id);\r\n const ifRequiredIdsPresent = missingValuesInArray(ids, requiredIds);\r\n return {\r\n isValid: ifRequiredIdsPresent.length === 0,\r\n err:\r\n ifRequiredIdsPresent.length === 0\r\n ? undefined\r\n : `Missing required ID(s) in configuration: ${ifRequiredIdsPresent.join(', ')}`,\r\n };\r\n}\r\n","import { checkDataConfigValidity } from '../checkDataValidity';\r\nimport { checkIfNullOrUndefined } from '../checkIfNullOrUndefined';\r\nimport { graphList } from '../getGraphList';\r\n\r\nimport { ChartConfiguration } from './graphConfig';\r\n\r\nimport { GraphConfigurationDataType, GraphType, ThreeDGraphType } from '@/Types';\r\n/**\r\n * Transforms the input data into a format suitable for graph visualization based on the given graph type and configuration.\r\n *\r\n * The function formats the data according to the specified graph configuration and checks the validity of the configuration.\r\n * It also handles cases for graphs like \"dataTable\" and \"dataCards\" without additional processing, and it processes\r\n * more complex graphs (e.g., charts) with a specific configuration.\r\n *\r\n * @param data - The data to be transformed, typically an array of objects representing rows of data.\r\n * @param graph - The type of graph to transform the data for (e.g., lineChart, barChart, etc.).\r\n * @param config - An optional array of configuration objects that define how the data should be mapped to the graph.\r\n * Each object in the array should define column mappings and how data should be grouped or aggregated.\r\n *\r\n * @returns The transformed data in the format required by the graph. If no valid configuration is provided, or if\r\n * data is invalid, an error message is returned.\r\n * - If the graph type is \"dataTable\" or \"dataCards\", the original data is returned unchanged.\r\n * - If data is invalid, an error message will be returned.\r\n *\r\n * @throws {string} If the configuration is invalid or the data can't be processed, an error message is logged and\r\n * returned.\r\n *\r\n * @example\r\n * const graphData = [\r\n * { category: 'A', value: 10 },\r\n * { category: 'B', value: 15 },\r\n * ];\r\n * const graph = 'barChart';\r\n * const config = [\r\n * { columnId: 'category', chartConfigId: 'label' },\r\n * { columnId: 'value', chartConfigId: 'size' },\r\n * ];\r\n * const transformedData = transformDataForGraph(graphData, graph, config);\r\n * console.log(transformedData);\r\n */\r\nexport function transformDataForGraph(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any,\r\n graph: GraphType | ThreeDGraphType,\r\n config?: GraphConfigurationDataType[],\r\n) {\r\n if (\r\n graphList\r\n .filter(el => el.geoHubMapPresentation)\r\n .map(el => el.graphID)\r\n .indexOf(graph) !== -1\r\n )\r\n return data;\r\n if (!data) return 'Cannot fetch data';\r\n if (graph === 'dataTable' || graph === 'dataCards' || data.length === 0) return data;\r\n if (!config) {\r\n console.error('Your data configuration is not accurate');\r\n return 'No graph configuration is provided';\r\n }\r\n const dataConfigValidity = checkDataConfigValidity(config, graph, Object.keys(data[0]));\r\n if (dataConfigValidity.isValid) {\r\n const chartConfig =\r\n ChartConfiguration[ChartConfiguration.findIndex(d => d.chartID === graph)].configuration;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const dataFormatted = data.map((d: any) => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const obj: any = {};\r\n config\r\n .filter(el => el.columnId)\r\n .forEach(el => {\r\n if (chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].multiple) {\r\n obj[chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].id] = [];\r\n (el.columnId as string[]).forEach(l => {\r\n obj[chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].id].push(\r\n checkIfNullOrUndefined(d[l]) ? null : d[l],\r\n );\r\n });\r\n } else {\r\n obj[chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].id] =\r\n checkIfNullOrUndefined(d[el.columnId as string]) ? null : d[el.columnId as string];\r\n }\r\n obj[`${el.chartConfigId}Columns`] = el.columnId;\r\n });\r\n obj.data = d;\r\n return obj;\r\n });\r\n return dataFormatted;\r\n }\r\n console.error(dataConfigValidity.err);\r\n return dataConfigValidity.err;\r\n}\r\n","import sum from 'lodash.sum';\r\nimport flattenDeep from 'lodash.flattendeep';\r\n\r\nimport { uniqBy } from '../uniqBy';\r\n\r\nimport { AggregationSettingsDataType } from '@/Types';\r\n/**\r\n * Transforms the data for aggregation based on a key column and specified aggregation settings.\r\n * It groups the data by unique values in the key column and applies the aggregation methods to each group.\r\n *\r\n * @param data - The input data to be aggregated. Can be an array of objects, where each object represents a data row.\r\n * @param keyColumn - The name of the column to group the data by (key column).\r\n * @param aggregationSettings - Optional settings for the aggregation, specifying the column and aggregation method (e.g., 'average', 'max', 'min', 'sum').\r\n * Each setting can define a column and a corresponding aggregation method to apply to that column.\r\n *\r\n * @returns An array of objects where each object contains the aggregated values for each unique value in the key column.\r\n * Each object includes the key column value, count of occurrences, and the aggregated values for each specified column.\r\n *\r\n * @example\r\n * const data = [\r\n * { category: 'A', value: 10, amount: 5 },\r\n * { category: 'A', value: 20, amount: 10 },\r\n * { category: 'B', value: 15, amount: 7 },\r\n * ];\r\n * const aggregationSettings = [\r\n * { column: 'value', aggregationMethod: 'average' },\r\n * { column: 'amount', aggregationMethod: 'sum' },\r\n * ];\r\n * const transformedData = transformDataForAggregation(data, 'category', aggregationSettings);\r\n * console.log(transformedData);\r\n * // Output:\r\n * // [\r\n * // { category: 'A', count: 2, value: 15, amount: 15 },\r\n * // { category: 'B', count: 1, value: 15, amount: 7 },\r\n * // ]\r\n */\r\nexport function transformDataForAggregation(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any,\r\n keyColumn: string,\r\n aggregationSettings?: AggregationSettingsDataType[],\r\n) {\r\n if (data.length === 0) return [];\r\n if (typeof data[0][keyColumn] !== 'object') {\r\n const uniqValues = uniqBy(data, keyColumn).map(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const dataObj: any = {};\r\n dataObj[keyColumn] = d;\r\n const filteredData = data.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (j: any) => j[keyColumn] === d,\r\n );\r\n dataObj.count = filteredData.length;\r\n dataObj.rollUpData = filteredData;\r\n aggregationSettings?.forEach(el => {\r\n dataObj[el.column] =\r\n el.aggregationMethod === 'average'\r\n ? parseFloat(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (sum(filteredData.map((j: any) => j[el.column])) / filteredData.length).toFixed(2),\r\n )\r\n : el.aggregationMethod === 'max'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.max(...filteredData.map((j: any) => j[el.column]))\r\n : el.aggregationMethod === 'min'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.min(...filteredData.map((j: any) => j[el.column]))\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n sum(filteredData.map((j: any) => j[el.column]));\r\n });\r\n return dataObj;\r\n });\r\n return uniqValues;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const values = [...new Set(flattenDeep(data.map((d: any) => d[keyColumn])))];\r\n const uniqValues = values.map(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const dataObj: any = {};\r\n dataObj[keyColumn] = d;\r\n const filteredData = data.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (j: any) => j[keyColumn].indexOf(d) !== -1,\r\n );\r\n dataObj.rollUpData = filteredData;\r\n dataObj.count = filteredData.length;\r\n aggregationSettings?.forEach(el => {\r\n dataObj[el.column] =\r\n el.aggregationMethod === 'average'\r\n ? parseFloat(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (sum(filteredData.map((j: any) => j[el.column])) / filteredData.length).toFixed(2),\r\n )\r\n : el.aggregationMethod === 'max'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.max(...filteredData.map((j: any) => j[el.column]))\r\n : el.aggregationMethod === 'min'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.min(...filteredData.map((j: any) => j[el.column]))\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n sum(filteredData.map((j: any) => j[el.column]));\r\n });\r\n return dataObj;\r\n });\r\n return uniqValues;\r\n}\r\n"],"names":["ChartConfiguration","chartID","configuration","id","required","multiple","missingValuesInArray","superset","subset","filter","value","includes","checkDataConfigValidity","dataConfig","graph","dataKeys","dataKeyFromDataConfig","flattenDeep","map","d","columnId","checkDataKeys","length","isValid","err","join","ids","el","chartConfigId","requiredIds","findIndex","ifRequiredIdsPresent","undefined","transformDataForGraph","data","config","graphList","geoHubMapPresentation","graphID","indexOf","console","error","dataConfigValidity","Object","keys","chartConfig","obj","forEach","k","l","push","checkIfNullOrUndefined","transformDataForAggregation","keyColumn","aggregationSettings","uniqBy","dataObj","filteredData","j","count","rollUpData","column","aggregationMethod","parseFloat","sum","toFixed","Math","max","min","Set"],"mappings":";;;;;AAEO,MAAMA,IAGP,CACJ;AAAA,EACEC,SAAS;AAAA,EACTC,eAAe,CACb;AAAA,IACEC,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,CACX;AAEL,GACA;AAAA,EACEJ,SAAS;AAAA,EACTC,eAAe,CACb;AAAA,IACEC,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,CACX;AAEL,GACA;AAAA,EACEJ,SAAS;AAAA,EACTC,eAAe,CACb;AAAA,IACEC,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,U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G,QAAQF,EAAanC,QAC7BgC,GAAqBP,QAAQpB,CAAAA,MAAM;AACjC6B,MAAAA,EAAQ7B,EAAGkC,MAAM,IACflC,EAAGmC,sBAAsB,YACrBC;AAAAA;AAAAA,SAEGC,EAAIP,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC,IAAIJ,EAAanC,QAAQ2C,QAAQ,CAAC;AAAA,MAAA,IAEnFtC,EAAGmC,sBAAsB;AAAA;AAAA,QAEvBI,KAAKC,IAAI,GAAGV,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC;AAAA,UACtDlC,EAAGmC,sBAAsB;AAAA;AAAA,QAEvBI,KAAKE,IAAI,GAAGX,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,QAEtDG,EAAIP,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC;AAAA;AAAA,IAC1D,CAAC,GACML;AAAAA,EACT,CAAC;AAEH;"}
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./fetchAndParseData-l5HGMAEs.cjs"),D=require("./transformDataForAggregation-XNg0OGYE.cjs");async function F(r,n,c,s,f,e,h,a,i){try{const o=await(typeof r=="string"?s==="json"?t.fetchAndParseJSON(r,e,a,!1):s==="api"?t.fetchAndTransformDataFromAPI(r,h,e,a,!1):t.fetchAndParseCSV(r,a,e,!1,f,!0):t.fetchAndParseMultipleDataSources(r,i));return D.transformDataForGraph(o,c,n)}catch(o){return console.error("Error fetching or processing data",o),null}}exports.transformDataForGraphFromFile=F;
2
- //# sourceMappingURL=transformDataForGraphFromFile-CzepNVGZ.cjs.map
1
+ "use strict";const t=require("./fetchAndParseData-l5HGMAEs.cjs"),D=require("./transformDataForAggregation-CYoB5Xsk.cjs");async function F(r,n,c,s,f,e,h,a,i){try{const o=await(typeof r=="string"?s==="json"?t.fetchAndParseJSON(r,e,a,!1):s==="api"?t.fetchAndTransformDataFromAPI(r,h,e,a,!1):t.fetchAndParseCSV(r,a,e,!1,f,!0):t.fetchAndParseMultipleDataSources(r,i));return D.transformDataForGraph(o,c,n)}catch(o){return console.error("Error fetching or processing data",o),null}}exports.transformDataForGraphFromFile=F;
2
+ //# sourceMappingURL=transformDataForGraphFromFile-CuXxR8uA.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformDataForGraphFromFile-CzepNVGZ.cjs","sources":["../src/Utils/transformData/transformDataForGraphFromFile.ts"],"sourcesContent":["import {\r\n fetchAndParseJSON,\r\n fetchAndParseCSV,\r\n fetchAndTransformDataFromAPI,\r\n fetchAndParseMultipleDataSources,\r\n} from '../fetchAndParseData';\r\n\r\nimport { transformDataForGraph } from './transformDataForGraph';\r\n\r\nimport {\r\n ColumnConfigurationDataType,\r\n FileSettingsDataType,\r\n GraphConfigurationDataType,\r\n GraphType,\r\n} from '@/Types';\r\n/**\r\n * Fetches data from a given URL or multiple data sources, processes it according to the specified graph configuration,\r\n * and formats it for use in a graph.\r\n *\r\n * This function supports different file types (CSV, JSON, and API), and can handle multiple data sources. It applies\r\n * any necessary data transformations and column formatting, then prepares the data for visualization in the specified graph.\r\n *\r\n * @param dataURL - The URL or array of data sources to fetch data from. If it's a string, it represents the URL to fetch data from.\r\n * If it's an array, it represents multiple data sources with different types (CSV, JSON, API).\r\n * @param dataConfiguration - The graph configuration data used to determine how the data should be formatted for the graph.\r\n * @param graph - The type of graph to be used (e.g., lineChart, barChart).\r\n * @param fileType - The type of the file being fetched. Can be 'csv', 'json', or 'api'. This parameter is ignored if `dataURL` is an array.\r\n * @param delimiter - The delimiter used in CSV files (default is ',' if not provided).\r\n * @param columnsToArray - Configuration for columns that need to be transformed into arrays (optional).\r\n * @param apiHeaders - Headers for the API request (optional).\r\n * @param dataTransformation - A Handlebars template used for transforming the data (optional).\r\n * @param idColumnTitle - The title of the ID column when merging multiple data sources (optional).\r\n *\r\n * @returns A Promise that resolves to the transformed data ready for the graph, or null if an error occurs.\r\n *\r\n * @throws {Error} Throws an error if the data fetching or processing fails.\r\n *\r\n * @example\r\n * const dataURL = 'https://example.com/data.json';\r\n * const dataConfiguration = [\r\n * { column: 'value', chartConfigId: 'size' },\r\n * { column: 'category', chartConfigId: 'label' },\r\n * ];\r\n * const graph = 'barChart';\r\n * transformDataForGraphFromFile(dataURL, dataConfiguration, graph, 'json')\r\n * .then(data => {\r\n * console.log('Formatted Data:', data);\r\n * })\r\n * .catch(error => {\r\n * console.error('Error:', error);\r\n * });\r\n */\r\nexport async function transformDataForGraphFromFile(\r\n dataURL: string | FileSettingsDataType[],\r\n dataConfiguration: GraphConfigurationDataType[],\r\n graph: GraphType,\r\n fileType?: 'csv' | 'json' | 'api',\r\n delimiter?: string,\r\n columnsToArray?: ColumnConfigurationDataType[],\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n apiHeaders?: any,\r\n dataTransformation?: string,\r\n idColumnTitle?: string,\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n): Promise<any> {\r\n // Ensure the function returns a Promise\r\n try {\r\n const fetchedData = await (typeof dataURL === 'string'\r\n ? fileType === 'json'\r\n ? fetchAndParseJSON(dataURL, columnsToArray, dataTransformation, false)\r\n : fileType === 'api'\r\n ? fetchAndTransformDataFromAPI(\r\n dataURL,\r\n apiHeaders,\r\n columnsToArray,\r\n dataTransformation,\r\n false,\r\n )\r\n : fetchAndParseCSV(dataURL, dataTransformation, columnsToArray, false, delimiter, true)\r\n : fetchAndParseMultipleDataSources(dataURL, idColumnTitle));\r\n\r\n const formattedData = transformDataForGraph(\r\n fetchedData,\r\n graph,\r\n dataConfiguration as GraphConfigurationDataType[],\r\n );\r\n return formattedData;\r\n } catch (error) {\r\n console.error('Error fetching or processing data', error);\r\n return null; // Return null in case of any errors\r\n }\r\n}\r\n"],"names":["transformDataForGraphFromFile","dataURL","dataConfiguration","graph","fileType","delimiter","columnsToArray","apiHeaders","dataTransformation","idColumnTitle","fetchedData","fetchAndParseJSON","fetchAndTransformDataFromAPI","fetchAndParseCSV","fetchAndParseMultipleDataSources","transformDataForGraph","error","console"],"mappings":"yHAoDA,eAAsBA,EACpBC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEAC,EACAC,EACAC,EAEc,CAEd,GAAI,CACF,MAAMC,EAAc,MAAO,OAAOT,GAAY,SAC1CG,IAAa,OACXO,EAAAA,kBAAkBV,EAASK,EAAgBE,EAAoB,EAAK,EACpEJ,IAAa,MACXQ,+BACEX,EACAM,EACAD,EACAE,EACA,EACF,EACAK,EAAAA,iBAAiBZ,EAASO,EAAoBF,EAAgB,GAAOD,EAAW,EAAI,EACxFS,EAAAA,iCAAiCb,EAASQ,CAAa,GAO3D,OALsBM,EAAAA,sBACpBL,EACAP,EACAD,CACF,CAEF,OAASc,EAAO,CACdC,eAAQD,MAAM,oCAAqCA,CAAK,EACjD,IACT,CACF"}
1
+ {"version":3,"file":"transformDataForGraphFromFile-CuXxR8uA.cjs","sources":["../src/Utils/transformData/transformDataForGraphFromFile.ts"],"sourcesContent":["import {\r\n fetchAndParseJSON,\r\n fetchAndParseCSV,\r\n fetchAndTransformDataFromAPI,\r\n fetchAndParseMultipleDataSources,\r\n} from '../fetchAndParseData';\r\n\r\nimport { transformDataForGraph } from './transformDataForGraph';\r\n\r\nimport {\r\n ColumnConfigurationDataType,\r\n FileSettingsDataType,\r\n GraphConfigurationDataType,\r\n GraphType,\r\n} from '@/Types';\r\n/**\r\n * Fetches data from a given URL or multiple data sources, processes it according to the specified graph configuration,\r\n * and formats it for use in a graph.\r\n *\r\n * This function supports different file types (CSV, JSON, and API), and can handle multiple data sources. It applies\r\n * any necessary data transformations and column formatting, then prepares the data for visualization in the specified graph.\r\n *\r\n * @param dataURL - The URL or array of data sources to fetch data from. If it's a string, it represents the URL to fetch data from.\r\n * If it's an array, it represents multiple data sources with different types (CSV, JSON, API).\r\n * @param dataConfiguration - The graph configuration data used to determine how the data should be formatted for the graph.\r\n * @param graph - The type of graph to be used (e.g., lineChart, barChart).\r\n * @param fileType - The type of the file being fetched. Can be 'csv', 'json', or 'api'. This parameter is ignored if `dataURL` is an array.\r\n * @param delimiter - The delimiter used in CSV files (default is ',' if not provided).\r\n * @param columnsToArray - Configuration for columns that need to be transformed into arrays (optional).\r\n * @param apiHeaders - Headers for the API request (optional).\r\n * @param dataTransformation - A Handlebars template used for transforming the data (optional).\r\n * @param idColumnTitle - The title of the ID column when merging multiple data sources (optional).\r\n *\r\n * @returns A Promise that resolves to the transformed data ready for the graph, or null if an error occurs.\r\n *\r\n * @throws {Error} Throws an error if the data fetching or processing fails.\r\n *\r\n * @example\r\n * const dataURL = 'https://example.com/data.json';\r\n * const dataConfiguration = [\r\n * { column: 'value', chartConfigId: 'size' },\r\n * { column: 'category', chartConfigId: 'label' },\r\n * ];\r\n * const graph = 'barChart';\r\n * transformDataForGraphFromFile(dataURL, dataConfiguration, graph, 'json')\r\n * .then(data => {\r\n * console.log('Formatted Data:', data);\r\n * })\r\n * .catch(error => {\r\n * console.error('Error:', error);\r\n * });\r\n */\r\nexport async function transformDataForGraphFromFile(\r\n dataURL: string | FileSettingsDataType[],\r\n dataConfiguration: GraphConfigurationDataType[],\r\n graph: GraphType,\r\n fileType?: 'csv' | 'json' | 'api',\r\n delimiter?: string,\r\n columnsToArray?: ColumnConfigurationDataType[],\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n apiHeaders?: any,\r\n dataTransformation?: string,\r\n idColumnTitle?: string,\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n): Promise<any> {\r\n // Ensure the function returns a Promise\r\n try {\r\n const fetchedData = await (typeof dataURL === 'string'\r\n ? fileType === 'json'\r\n ? fetchAndParseJSON(dataURL, columnsToArray, dataTransformation, false)\r\n : fileType === 'api'\r\n ? fetchAndTransformDataFromAPI(\r\n dataURL,\r\n apiHeaders,\r\n columnsToArray,\r\n dataTransformation,\r\n false,\r\n )\r\n : fetchAndParseCSV(dataURL, dataTransformation, columnsToArray, false, delimiter, true)\r\n : fetchAndParseMultipleDataSources(dataURL, idColumnTitle));\r\n\r\n const formattedData = transformDataForGraph(\r\n fetchedData,\r\n graph,\r\n dataConfiguration as GraphConfigurationDataType[],\r\n );\r\n return formattedData;\r\n } catch (error) {\r\n console.error('Error fetching or processing data', error);\r\n return null; // Return null in case of any errors\r\n }\r\n}\r\n"],"names":["transformDataForGraphFromFile","dataURL","dataConfiguration","graph","fileType","delimiter","columnsToArray","apiHeaders","dataTransformation","idColumnTitle","fetchedData","fetchAndParseJSON","fetchAndTransformDataFromAPI","fetchAndParseCSV","fetchAndParseMultipleDataSources","transformDataForGraph","error","console"],"mappings":"yHAoDA,eAAsBA,EACpBC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEAC,EACAC,EACAC,EAEc,CAEd,GAAI,CACF,MAAMC,EAAc,MAAO,OAAOT,GAAY,SAC1CG,IAAa,OACXO,EAAAA,kBAAkBV,EAASK,EAAgBE,EAAoB,EAAK,EACpEJ,IAAa,MACXQ,+BACEX,EACAM,EACAD,EACAE,EACA,EACF,EACAK,EAAAA,iBAAiBZ,EAASO,EAAoBF,EAAgB,GAAOD,EAAW,EAAI,EACxFS,EAAAA,iCAAiCb,EAASQ,CAAa,GAO3D,OALsBM,EAAAA,sBACpBL,EACAP,EACAD,CACF,CAEF,OAASc,EAAO,CACdC,eAAQD,MAAM,oCAAqCA,CAAK,EACjD,IACT,CACF"}
@@ -1,5 +1,5 @@
1
1
  import { f as p, a as i, b as m, c as D } from "./fetchAndParseData-BpqkBPQL.js";
2
- import { a as l } from "./transformDataForAggregation-DEU__LUl.js";
2
+ import { a as l } from "./transformDataForAggregation-j34UL73s.js";
3
3
  async function g(r, o, f, s, c, t, n, e, h) {
4
4
  try {
5
5
  const a = await (typeof r == "string" ? s === "json" ? p(r, t, e, !1) : s === "api" ? i(r, n, t, e, !1) : m(r, e, t, !1, c, !0) : D(r, h));
@@ -11,4 +11,4 @@ async function g(r, o, f, s, c, t, n, e, h) {
11
11
  export {
12
12
  g as t
13
13
  };
14
- //# sourceMappingURL=transformDataForGraphFromFile-CSG24iF6.js.map
14
+ //# sourceMappingURL=transformDataForGraphFromFile-DyP-83Nh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformDataForGraphFromFile-CSG24iF6.js","sources":["../src/Utils/transformData/transformDataForGraphFromFile.ts"],"sourcesContent":["import {\r\n fetchAndParseJSON,\r\n fetchAndParseCSV,\r\n fetchAndTransformDataFromAPI,\r\n fetchAndParseMultipleDataSources,\r\n} from '../fetchAndParseData';\r\n\r\nimport { transformDataForGraph } from './transformDataForGraph';\r\n\r\nimport {\r\n ColumnConfigurationDataType,\r\n FileSettingsDataType,\r\n GraphConfigurationDataType,\r\n GraphType,\r\n} from '@/Types';\r\n/**\r\n * Fetches data from a given URL or multiple data sources, processes it according to the specified graph configuration,\r\n * and formats it for use in a graph.\r\n *\r\n * This function supports different file types (CSV, JSON, and API), and can handle multiple data sources. It applies\r\n * any necessary data transformations and column formatting, then prepares the data for visualization in the specified graph.\r\n *\r\n * @param dataURL - The URL or array of data sources to fetch data from. If it's a string, it represents the URL to fetch data from.\r\n * If it's an array, it represents multiple data sources with different types (CSV, JSON, API).\r\n * @param dataConfiguration - The graph configuration data used to determine how the data should be formatted for the graph.\r\n * @param graph - The type of graph to be used (e.g., lineChart, barChart).\r\n * @param fileType - The type of the file being fetched. Can be 'csv', 'json', or 'api'. This parameter is ignored if `dataURL` is an array.\r\n * @param delimiter - The delimiter used in CSV files (default is ',' if not provided).\r\n * @param columnsToArray - Configuration for columns that need to be transformed into arrays (optional).\r\n * @param apiHeaders - Headers for the API request (optional).\r\n * @param dataTransformation - A Handlebars template used for transforming the data (optional).\r\n * @param idColumnTitle - The title of the ID column when merging multiple data sources (optional).\r\n *\r\n * @returns A Promise that resolves to the transformed data ready for the graph, or null if an error occurs.\r\n *\r\n * @throws {Error} Throws an error if the data fetching or processing fails.\r\n *\r\n * @example\r\n * const dataURL = 'https://example.com/data.json';\r\n * const dataConfiguration = [\r\n * { column: 'value', chartConfigId: 'size' },\r\n * { column: 'category', chartConfigId: 'label' },\r\n * ];\r\n * const graph = 'barChart';\r\n * transformDataForGraphFromFile(dataURL, dataConfiguration, graph, 'json')\r\n * .then(data => {\r\n * console.log('Formatted Data:', data);\r\n * })\r\n * .catch(error => {\r\n * console.error('Error:', error);\r\n * });\r\n */\r\nexport async function transformDataForGraphFromFile(\r\n dataURL: string | FileSettingsDataType[],\r\n dataConfiguration: GraphConfigurationDataType[],\r\n graph: GraphType,\r\n fileType?: 'csv' | 'json' | 'api',\r\n delimiter?: string,\r\n columnsToArray?: ColumnConfigurationDataType[],\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n apiHeaders?: any,\r\n dataTransformation?: string,\r\n idColumnTitle?: string,\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n): Promise<any> {\r\n // Ensure the function returns a Promise\r\n try {\r\n const fetchedData = await (typeof dataURL === 'string'\r\n ? fileType === 'json'\r\n ? fetchAndParseJSON(dataURL, columnsToArray, dataTransformation, false)\r\n : fileType === 'api'\r\n ? fetchAndTransformDataFromAPI(\r\n dataURL,\r\n apiHeaders,\r\n columnsToArray,\r\n dataTransformation,\r\n false,\r\n )\r\n : fetchAndParseCSV(dataURL, dataTransformation, columnsToArray, false, delimiter, true)\r\n : fetchAndParseMultipleDataSources(dataURL, idColumnTitle));\r\n\r\n const formattedData = transformDataForGraph(\r\n fetchedData,\r\n graph,\r\n dataConfiguration as GraphConfigurationDataType[],\r\n );\r\n return formattedData;\r\n } catch (error) {\r\n console.error('Error fetching or processing data', error);\r\n return null; // Return null in case of any errors\r\n }\r\n}\r\n"],"names":["transformDataForGraphFromFile","dataURL","dataConfiguration","graph","fileType","delimiter","columnsToArray","apiHeaders","dataTransformation","idColumnTitle","fetchedData","fetchAndParseJSON","fetchAndTransformDataFromAPI","fetchAndParseCSV","fetchAndParseMultipleDataSources","transformDataForGraph","error","console"],"mappings":";;AAoDA,eAAsBA,EACpBC,GACAC,GACAC,GACAC,GACAC,GACAC,GAEAC,GACAC,GACAC,GAEc;AAEd,MAAI;AACF,UAAMC,IAAc,OAAO,OAAOT,KAAY,WAC1CG,MAAa,SACXO,EAAkBV,GAASK,GAAgBE,GAAoB,EAAK,IACpEJ,MAAa,QACXQ,EACEX,GACAM,GACAD,GACAE,GACA,EACF,IACAK,EAAiBZ,GAASO,GAAoBF,GAAgB,IAAOD,GAAW,EAAI,IACxFS,EAAiCb,GAASQ,CAAa;AAO3D,WALsBM,EACpBL,GACAP,GACAD,CACF;AAAA,EAEF,SAASc,GAAO;AACdC,mBAAQD,MAAM,qCAAqCA,CAAK,GACjD;AAAA,EACT;AACF;"}
1
+ {"version":3,"file":"transformDataForGraphFromFile-DyP-83Nh.js","sources":["../src/Utils/transformData/transformDataForGraphFromFile.ts"],"sourcesContent":["import {\r\n fetchAndParseJSON,\r\n fetchAndParseCSV,\r\n fetchAndTransformDataFromAPI,\r\n fetchAndParseMultipleDataSources,\r\n} from '../fetchAndParseData';\r\n\r\nimport { transformDataForGraph } from './transformDataForGraph';\r\n\r\nimport {\r\n ColumnConfigurationDataType,\r\n FileSettingsDataType,\r\n GraphConfigurationDataType,\r\n GraphType,\r\n} from '@/Types';\r\n/**\r\n * Fetches data from a given URL or multiple data sources, processes it according to the specified graph configuration,\r\n * and formats it for use in a graph.\r\n *\r\n * This function supports different file types (CSV, JSON, and API), and can handle multiple data sources. It applies\r\n * any necessary data transformations and column formatting, then prepares the data for visualization in the specified graph.\r\n *\r\n * @param dataURL - The URL or array of data sources to fetch data from. If it's a string, it represents the URL to fetch data from.\r\n * If it's an array, it represents multiple data sources with different types (CSV, JSON, API).\r\n * @param dataConfiguration - The graph configuration data used to determine how the data should be formatted for the graph.\r\n * @param graph - The type of graph to be used (e.g., lineChart, barChart).\r\n * @param fileType - The type of the file being fetched. Can be 'csv', 'json', or 'api'. This parameter is ignored if `dataURL` is an array.\r\n * @param delimiter - The delimiter used in CSV files (default is ',' if not provided).\r\n * @param columnsToArray - Configuration for columns that need to be transformed into arrays (optional).\r\n * @param apiHeaders - Headers for the API request (optional).\r\n * @param dataTransformation - A Handlebars template used for transforming the data (optional).\r\n * @param idColumnTitle - The title of the ID column when merging multiple data sources (optional).\r\n *\r\n * @returns A Promise that resolves to the transformed data ready for the graph, or null if an error occurs.\r\n *\r\n * @throws {Error} Throws an error if the data fetching or processing fails.\r\n *\r\n * @example\r\n * const dataURL = 'https://example.com/data.json';\r\n * const dataConfiguration = [\r\n * { column: 'value', chartConfigId: 'size' },\r\n * { column: 'category', chartConfigId: 'label' },\r\n * ];\r\n * const graph = 'barChart';\r\n * transformDataForGraphFromFile(dataURL, dataConfiguration, graph, 'json')\r\n * .then(data => {\r\n * console.log('Formatted Data:', data);\r\n * })\r\n * .catch(error => {\r\n * console.error('Error:', error);\r\n * });\r\n */\r\nexport async function transformDataForGraphFromFile(\r\n dataURL: string | FileSettingsDataType[],\r\n dataConfiguration: GraphConfigurationDataType[],\r\n graph: GraphType,\r\n fileType?: 'csv' | 'json' | 'api',\r\n delimiter?: string,\r\n columnsToArray?: ColumnConfigurationDataType[],\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n apiHeaders?: any,\r\n dataTransformation?: string,\r\n idColumnTitle?: string,\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n): Promise<any> {\r\n // Ensure the function returns a Promise\r\n try {\r\n const fetchedData = await (typeof dataURL === 'string'\r\n ? fileType === 'json'\r\n ? fetchAndParseJSON(dataURL, columnsToArray, dataTransformation, false)\r\n : fileType === 'api'\r\n ? fetchAndTransformDataFromAPI(\r\n dataURL,\r\n apiHeaders,\r\n columnsToArray,\r\n dataTransformation,\r\n false,\r\n )\r\n : fetchAndParseCSV(dataURL, dataTransformation, columnsToArray, false, delimiter, true)\r\n : fetchAndParseMultipleDataSources(dataURL, idColumnTitle));\r\n\r\n const formattedData = transformDataForGraph(\r\n fetchedData,\r\n graph,\r\n dataConfiguration as GraphConfigurationDataType[],\r\n );\r\n return formattedData;\r\n } catch (error) {\r\n console.error('Error fetching or processing data', error);\r\n return null; // Return null in case of any errors\r\n }\r\n}\r\n"],"names":["transformDataForGraphFromFile","dataURL","dataConfiguration","graph","fileType","delimiter","columnsToArray","apiHeaders","dataTransformation","idColumnTitle","fetchedData","fetchAndParseJSON","fetchAndTransformDataFromAPI","fetchAndParseCSV","fetchAndParseMultipleDataSources","transformDataForGraph","error","console"],"mappings":";;AAoDA,eAAsBA,EACpBC,GACAC,GACAC,GACAC,GACAC,GACAC,GAEAC,GACAC,GACAC,GAEc;AAEd,MAAI;AACF,UAAMC,IAAc,OAAO,OAAOT,KAAY,WAC1CG,MAAa,SACXO,EAAkBV,GAASK,GAAgBE,GAAoB,EAAK,IACpEJ,MAAa,QACXQ,EACEX,GACAM,GACAD,GACAE,GACA,EACF,IACAK,EAAiBZ,GAASO,GAAoBF,GAAgB,IAAOD,GAAW,EAAI,IACxFS,EAAiCb,GAASQ,CAAa;AAO3D,WALsBM,EACpBL,GACAP,GACAD,CACF;AAAA,EAEF,SAASc,GAAO;AACdC,mBAAQD,MAAM,qCAAqCA,CAAK,GACjD;AAAA,EACT;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@undp/data-viz",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "browser": "./dist/index.umd.js",
@@ -470,7 +470,7 @@
470
470
  "peerDependencies": {
471
471
  "@dnd-kit/core": "^6.3.1",
472
472
  "@dnd-kit/modifiers": "^9.0.0",
473
- "@undp/design-system-react": "^1.5.0",
473
+ "@undp/design-system-react": "^1.5.1",
474
474
  "ajv": "^8.17.1",
475
475
  "dom-to-svg": "^0.12.2",
476
476
  "file-saver": "^2.0.5",
@@ -479,8 +479,8 @@
479
479
  "marked": "^16.4.1",
480
480
  "math-expression-evaluator": "^2.0.7",
481
481
  "pmtiles": "^4.3.0",
482
- "react": "^19.2.0",
483
- "react-dom": "^19.2.0",
482
+ "react": "^19.2.1",
483
+ "react-dom": "^19.2.1",
484
484
  "react-globe.gl": "^2.36.0",
485
485
  "tailwind-animate": "^0.2.10",
486
486
  "tailwind-merge": "^3.3.1",
@@ -1,2 +0,0 @@
1
- "use strict";const c=require("./index-CHPV5EwG-CTPQjnHt.cjs"),y=require("./Typography-DX7PlgQU.cjs"),S=require("./ButterflyChart.cjs"),V=require("./index-CF5hnGvG.cjs"),N=require("./DataTable.cjs"),H=require("./DonutChart.cjs"),A=require("./HeatMap.cjs"),v=require("./Histogram.cjs"),B=require("./DualAxisLineChart.cjs"),P=require("./SimpleLineChart.cjs"),I=require("./MultiLineChart.cjs"),W=require("./MultiLineAltChart.cjs"),j=require("./SparkLine.cjs"),q=require("./BiVariateChoroplethMap.cjs"),z=require("./ChoroplethMap.cjs"),F=require("./DotDensityMap.cjs"),E=require("./ParetoChart.cjs"),R=require("./ScatterPlot.cjs"),X=require("./SlopeChart.cjs"),Y=require("./AreaChart.cjs"),G=require("./StatCardFromData.cjs"),$=require("./TreeMapGraph.cjs"),_=require("./UnitChart.cjs"),U=require("./DifferenceLineChart.cjs"),J=require("./SankeyChart.cjs"),K=require("./LineChartWithConfidenceInterval.cjs"),Q=require("./DataCards.cjs"),x=require("./BarGraph.cjs"),Z=require("./DumbbellChart.cjs"),ee=require("./StripChart.cjs"),ae=require("./BeeSwarmChart.cjs"),te=require("./RadarChart.cjs"),oe=require("./BulletChart.cjs"),ie=require("./HybridMap.cjs"),r=require("./checkIfMultiple-wg6hJLXy.cjs");function re(L){const a=c.compilerRuntimeExports.c(24),{settings:e,graph:s,graphData:t,debugMode:M,graphDataConfiguration:o,readableHeader:i,updateFilters:n}=L;if(M&&(console.log(`Graph: ${s}`),console.log("Transformed data:",t),console.log("Settings:",e)),typeof t=="string"){const d=`flex my-0 mx-auto grow flex-col justify-center ${e?.width?"w-fit":"w-full"}`;let l;a[0]===Symbol.for("react.memo_cache_sentinel")?(l={height:"inherit"},a[0]=l):l=a[0];let h;a[1]!==t?(h=c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:t}),a[1]=t,a[2]=h):h=a[2];let b;return a[3]!==d||a[4]!==h?(b=c.jsxRuntimeExports.jsx("div",{className:d,style:l,children:h}),a[3]=d,a[4]=h,a[5]=b):b=a[5],b}let p;a[6]===Symbol.for("react.memo_cache_sentinel")?(p={barChart:x.SimpleBarGraph,bulletChart:oe.BulletChart,groupedBarChart:x.GroupedBarGraph,stackedBarChart:x.StackedBarGraph,lineChart:P.SimpleLineChart,dualAxisLineChart:B.DualAxisLineChart,multiLineChart:I.MultiLineChart,multiLineAltChart:W.MultiLineAltChart,stackedAreaChart:Y.AreaChart,choroplethMap:z.ChoroplethMap,biVariateChoroplethMap:q.BiVariateChoroplethMap,dotDensityMap:F.DotDensityMap,donutChart:H.DonutChart,slopeChart:X.SlopeChart,scatterPlot:R.ScatterPlot,dumbbellChart:Z.DumbbellChart,treeMap:$.TreeMapGraph,circlePacking:V.CirclePackingGraph,heatMap:A.HeatMap,stripChart:ee.StripChart,beeSwarmChart:ae.BeeSwarmChart,butterflyChart:S.ButterflyChart,histogram:v.Histogram,sparkLine:j.SparkLine,paretoChart:E.ParetoChart,dataTable:N.DataTable,statCard:G.StatCardFromData,unitChart:_.UnitChart,differenceLineChart:U.DifferenceLineChart,sankeyChart:J.SankeyChart,lineChartWithConfidenceInterval:K.LineChartWithConfidenceInterval,dataCards:Q.DataCards,radarChart:te.RadarChart,hybridMap:ie.HybridMap},a[6]=p):p=a[6];const O=p;let m;a[7]!==t||a[8]!==o||a[9]!==i||a[10]!==e||a[11]!==n?(m=d=>{switch(d){case"barChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,animate:e?.animate,naLabel:e?.naLabel};case"groupedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,sortParameter:e?.sortParameter,sortData:e?.sortData,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,showColorScale:e?.showColorScale,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,showLabels:e?.showLabels,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,labelOrder:e?.labelOrder,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"stackedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,showColorScale:e?.showColorScale,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,labelOrder:e?.labelOrder,showValues:e?.showValues,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,maxValue:e?.maxValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,sortParameter:e?.sortParameter,sortData:e?.sortData,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"bulletChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,barColor:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,qualitativeRangeColors:e?.qualitativeRangeColors,targetStyle:e?.targetStyle,targetColor:e?.targetColor,measureBarWidthFactor:e?.measureBarWidthFactor,animate:e?.animate,naLabel:e?.naLabel};case"lineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,curveType:e?.curveType,data:t,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"lineChartWithConfidenceInterval":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,showIntervalDots:e?.showIntervalDots,showIntervalValues:e?.showIntervalValues,intervalLineStrokeWidth:e?.intervalLineStrokeWidth,intervalLineColors:e?.intervalLineColors,intervalAreaColor:e?.intervalAreaColor,intervalAreaOpacity:e?.intervalAreaOpacity,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,colorLegendTitle:e?.colorLegendTitle,colorLegendColors:e?.colorLegendColors,colorLegendDomain:e?.colorLegendDomain,styles:e?.styles,classNames:e?.classNames};case"dualAxisLineChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,lineColors:e?.lineColors,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,ariaLabel:e?.ariaLabel,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,lineSuffixes:e?.lineSuffixes,linePrefixes:e?.linePrefixes,styles:e?.styles,classNames:e?.classNames};case"multiLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,data:t,curveType:e?.curveType,lineColors:e?.lineColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,showColorScale:e?.showColorScale,labels:e?.labels||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,dashedLines:e?.dashedLines,dashSettings:e?.dashSettings,labelsToBeHidden:e?.labelsToBeHidden};case"multiLineAltChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,dimmedOpacity:e?.dimmedOpacity,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,showLabels:e?.showLabels,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,colorDomain:e?.colorDomain,showNAColor:e?.showNAColor};case"differenceLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,lineColors:e?.lineColors,diffAreaColors:e?.diffAreaColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"stackedAreaChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,colorDomain:e?.colorDomain||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,colorLegendTitle:e?.colorLegendTitle,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,relativeHeight:e?.relativeHeight,bottomMargin:e?.bottomMargin,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showColorScale:e?.showColorScale,language:e?.language,minHeight:e?.minHeight,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,suffix:e?.suffix,prefix:e?.prefix,styles:e?.styles,classNames:e?.classNames};case"choroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("x",o||[],i||[]),scaleType:e?.scaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"biVariateChoroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,mapData:e?.mapData,mapProjection:e?.mapProjection,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e?.xColorLegendTitle:r.getValues("x",o||[],i||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e?.yColorLegendTitle:r.getValues("y",o||[],i||[]),xDomain:e?.xDomain,yDomain:e?.yDomain,colors:e?.colors,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,padding:e?.padding,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,isWorldMap:e?.isWorldMap,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,mapProperty:e?.mapProperty,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"dotDensityMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,maxRadiusValue:e?.maxRadiusValue,width:e?.width,height:e?.height,radius:e?.radius,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,padding:e?.padding,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"hybridMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,mapColorLegendTitle:Object.keys(e||{}).indexOf("mapColorLegendTitle")!==-1?e?.mapColorLegendTitle:r.getValues("x",o||[],i||[]),choroplethScaleType:e?.choroplethScaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate,maxRadiusValue:e?.maxRadiusValue,radius:e?.radius,showLabels:e?.showLabels,highlightedDataPoints:e?.highlightedDataPoints,dotLegendTitle:e?.dotLegendTitle,dotColor:e?.dotColor,dotBorderColor:e?.dotBorderColor,labelColor:e?.labelColor};case"donutChart":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,mainText:e?.mainText,data:t,colors:e?.colors,graphTitle:e?.graphTitle,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,graphDescription:e?.graphDescription,subNote:e?.subNote,footNote:e?.footNote,radius:e?.radius,strokeWidth:e?.strokeWidth,showColorScale:e?.showColorScale,backgroundColor:e?.backgroundColor,padding:e?.padding,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,colorDomain:e?.colorDomain,sortData:e?.sortData,language:e?.language,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,legendMaxWidth:e?.legendMaxWidth,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,colorScaleMaxWidth:e?.colorScaleMaxWidth};case"slopeChart":return{customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,axisTitles:e?.axisTitles,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"scatterPlot":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e?.xAxisTitle:r.getValues("x",o||[],i||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e?.yAxisTitle:r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refXValues:e?.refXValues,refYValues:e?.refYValues,highlightedDataPoints:e?.highlightedDataPoints,highlightAreaSettings:e?.highlightAreaSettings,showColorScale:e?.showColorScale,graphID:e?.graphID,maxRadiusValue:e?.maxRadiusValue,maxXValue:e?.maxXValue,minXValue:e?.minXValue,maxYValue:e?.maxYValue,minYValue:e?.minYValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfXTicks:e?.noOfXTicks,noOfYTicks:e?.noOfYTicks,labelColor:e?.labelColor,xSuffix:e?.xSuffix,ySuffix:e?.ySuffix,xPrefix:e?.xPrefix,yPrefix:e?.yPrefix,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dumbbellChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,refValues:e?.refValues,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,labelOrder:e?.labelOrder,showColorScale:e?.showColorScale,colorDomain:e?.colorDomain||r.getValues("x",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,radius:e?.radius,relativeHeight:e?.relativeHeight,showValues:e?.showValues,showLabels:e?.showLabels,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,suffix:e?.suffix,prefix:e?.prefix,language:e?.language,minHeight:e?.minHeight,sortParameter:e?.sortParameter,sortData:e?.sortData,arrowConnector:e?.arrowConnector,connectorStrokeWidth:e?.connectorStrokeWidth,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,axisTitle:e?.axisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,highlightedDataPoints:e?.highlightedDataPoints,dimmedOpacity:e?.dimmedOpacity};case"treeMap":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"circlePacking":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"heatMap":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,scaleType:e?.scaleType,colorDomain:e?.colorDomain,showColumnLabels:e?.showColumnLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,showRowLabels:e?.showRowLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,noDataColor:e?.noDataColor,showColorScale:e?.showColorScale,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"stripChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,noOfTicks:e?.noOfTicks,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,prefix:e?.prefix,suffix:e?.suffix,stripType:e?.stripType,valueColor:e?.valueColor,language:e?.language,minHeight:e?.minHeight,highlightColor:e?.highlightColor,dotOpacity:e?.dotOpacity,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"beeSwarmChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,maxValue:e?.maxValue,minValue:e?.minValue,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,orientation:e?.orientation,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"butterflyChart":return{naLabel:e?.naLabel,timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e?.leftBarTitle:r.getValues("leftBar",o||[],i||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e?.rightBarTitle:r.getValues("rightBar",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColors:e?.barColors,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,suffix:e?.suffix,prefix:e?.prefix,showTicks:e?.showTicks,showValues:e?.showValues,centerGap:e?.centerGap,maxValue:e?.maxValue,minValue:e?.minValue,showColorScale:e?.showColorScale,refValues:e?.refValues,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"histogram":return{precision:e?.precision,theme:e?.theme,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,maxValue:e?.maxValue,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,numberOfBins:e?.numberOfBins,truncateBy:e?.truncateBy,donutStrokeWidth:e?.donutStrokeWidth,sortData:e?.sortData,barGraphLayout:e?.barGraphLayout,graphType:e?.graphType,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames};case"sparkLine":return{customLayers:e?.customLayers,theme:e?.theme,data:t,curveType:e?.curveType,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,dateFormat:e?.dateFormat,area:e?.area,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames};case"paretoChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,showValues:e?.showValues,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e?.barTitle:r.getValues("barTitle",o||[],i||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e?.lineTitle:r.getValues("lineTitle",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColor:e?.barColor,curveType:e?.curveType,lineColor:e?.lineColor,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,showLabels:e?.showLabels,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfTicks:e?.noOfTicks,lineSuffix:e?.lineSuffix,barSuffix:e?.barSuffix,linePrefix:e?.lineSuffix,barPrefix:e?.barPrefix,barAxisTitle:e?.barAxisTitle,lineAxisTitle:e?.lineAxisTitle,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataTable":return{naLabel:e?.naLabel,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,minWidth:e?.minWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,styles:e?.styles,classNames:e?.classNames};case"statCard":return{precision:e?.precision,theme:e?.theme,year:e?.year,data:t,graphTitle:e?.graphTitle||"",graphDescription:e?.graphDescription,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources||[],footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,aggregationMethod:e?.aggregationMethod,language:e?.language,minHeight:e?.minHeight,countOnly:e?.countOnly,ariaLabel:e?.ariaLabel,textBackground:e?.textBackground,headingFontSize:e?.headingFontSize,centerAlign:e?.centerAlign,verticalAlign:e?.verticalAlign,styles:e?.styles,classNames:e?.classNames,layout:e?.layout};case"unitChart":return{precision:e?.precision,theme:e?.theme,totalNoOfDots:e?.totalNoOfDots,gridSize:e?.gridSize,unitPadding:e?.unitPadding,size:e?.size,graphTitle:e?.graphTitle,sources:e?.sources,colors:e?.colors,graphDescription:e?.graphDescription,footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,showColorScale:e?.showColorScale,showStrokeForWhiteDots:e?.showStrokeForWhiteDots,note:e?.note,data:t,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"sankeyChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,padding:e?.padding,backgroundColor:e?.backgroundColor,tooltip:e?.tooltip,suffix:e?.suffix,prefix:e?.prefix,relativeHeight:e?.relativeHeight,showValues:e?.showValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,sourceColors:e?.sourceColors,targetColors:e?.targetColors,sourceColorDomain:e?.sourceColorDomain,targetColorDomain:e?.targetColorDomain,nodePadding:e?.nodePadding,nodeWidth:e?.nodeWidth,highlightedSourceDataPoints:e?.highlightedSourceDataPoints,highlightedTargetDataPoints:e?.highlightedTargetDataPoints,defaultLinkOpacity:e?.defaultLinkOpacity,sourceTitle:e?.sourceTitle,targetTitle:e?.targetTitle,sortNodes:e?.sortNodes,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataCards":return{theme:e?.theme,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,cardTemplate:e?.cardTemplate,cardBackgroundColor:e?.cardBackgroundColor,cardFilters:e?.cardFilters||[],cardSortingOptions:e?.cardSortingOptions,cardSearchColumns:e?.cardSearchColumns,cardMinWidth:e?.cardMinWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,detailsOnClick:e?.detailsOnClick,allowDataDownloadOnDetail:e?.allowDataDownloadOnDetail,noOfItemsInAPage:e?.noOfItemsInAPage,uiMode:e?.uiMode,styles:e?.styles,classNames:e?.classNames};case"radarChart":return{customLayers:e?.customLayers,precision:e?.precision,graphTitle:e?.graphTitle,dimmedOpacity:e?.dimmedOpacity,graphDescription:e?.graphDescription,footNote:e?.footNote,sources:e?.sources,ariaLabel:e?.ariaLabel,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,styles:e?.styles,classNames:e?.classNames,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,padding:e?.padding,radius:e?.radius,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,maxValue:e?.maxValue,minValue:e?.minValue,showValues:e?.showValues,showDots:e?.showDots,strokeWidth:e?.strokeWidth,fillShape:e?.fillShape,noOfTicks:e?.noOfTicks,showColorScale:e?.showColorScale,showNAColor:e?.showNAColor,highlightedLines:e?.highlightedLines,axisLabels:e?.axisLabels,curveType:e?.curveType,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,tooltip:e?.tooltip,detailsOnClick:e?.detailsOnClick,language:e?.language,theme:e?.theme,graphID:e?.graphID,animate:e?.animate};default:return{}}},a[7]=t,a[8]=o,a[9]=i,a[10]=e,a[11]=n,a[12]=m):m=a[12];const w=m,u=O[s];let D;a[13]!==w||a[14]!==s?(D=w(s),a[13]=w,a[14]=s,a[15]=D):D=a[15];const T=D,k=`grow my-0 ${s!=="statCard"?"mx-auto":"mx-0"} flex flex-col w-full ${s!=="unitChart"&&s!=="statCard"?"justify-center":"justify-start"} ${e?.theme||"light"}`;let f;a[16]===Symbol.for("react.memo_cache_sentinel")?(f={minHeight:"inherit"},a[16]=f):f=a[16];let g;a[17]!==u||a[18]!==s||a[19]!==T?(g=u?c.jsxRuntimeExports.jsx(u,{...T}):c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${s}`}),a[17]=u,a[18]=s,a[19]=T,a[20]=g):g=a[20];let C;return a[21]!==k||a[22]!==g?(C=c.jsxRuntimeExports.jsx("div",{className:k,style:f,children:g}),a[21]=k,a[22]=g,a[23]=C):C=a[23],C}exports.GraphEl=re;
2
- //# sourceMappingURL=GraphEl-B16EYkko.cjs.map