@undp/data-viz 2.1.1 → 2.1.3
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.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +2 -2
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +129 -120
- package/dist/BarGraph.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +49 -46
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +11 -0
- package/dist/BulletChart.js +758 -711
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +7 -4
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +52 -49
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +2 -2
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +10 -0
- package/dist/DonutChart.js +230 -264
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +37 -34
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +41 -38
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GraphEl-BLMih7RN.cjs +2 -0
- package/dist/GraphEl-BLMih7RN.cjs.map +1 -0
- package/dist/{GraphEl-DEzobeOM.js → GraphEl-CRrAlbcr.js} +5 -2
- package/dist/GraphEl-CRrAlbcr.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +2 -2
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +62 -59
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +2 -2
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +7 -4
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +2 -2
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.js +2 -2
- package/dist/Types.d.ts +2 -0
- package/dist/{area-BE2wo7fv.js → area-B6r7cv2o.js} +5 -5
- package/dist/{area-BE2wo7fv.js.map → area-B6r7cv2o.js.map} +1 -1
- package/dist/area-C1gxfNGD.cjs +2 -0
- package/dist/{area-D3Qx7k7K.cjs.map → area-C1gxfNGD.cjs.map} +1 -1
- package/dist/array-DMyR1sql.cjs +2 -0
- package/dist/array-DMyR1sql.cjs.map +1 -0
- package/dist/array-USo-Szhp.js +13 -0
- package/dist/array-USo-Szhp.js.map +1 -0
- package/dist/ensureCompleteData-DH5c52Ub.js +122 -0
- package/dist/ensureCompleteData-DH5c52Ub.js.map +1 -0
- package/dist/ensureCompleteData-pZ9QO6kB.cjs +2 -0
- package/dist/ensureCompleteData-pZ9QO6kB.cjs.map +1 -0
- package/dist/getSchema.cjs +1 -1
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.js +15 -15
- package/dist/getSchema.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +2 -2
- package/dist/line-DFlZsxI1.js +144 -0
- package/dist/line-DFlZsxI1.js.map +1 -0
- package/dist/line-DaEMhXmx.cjs +2 -0
- package/dist/line-DaEMhXmx.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +2 -2
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs +2 -0
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +1 -0
- package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js} +14 -10
- package/dist/transformDataForAggregation-j34UL73s.js.map +1 -0
- package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs → transformDataForGraphFromFile-CuXxR8uA.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-CzepNVGZ.cjs.map → transformDataForGraphFromFile-CuXxR8uA.cjs.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js} +2 -2
- package/dist/{transformDataForGraphFromFile-CSG24iF6.js.map → transformDataForGraphFromFile-DyP-83Nh.js.map} +1 -1
- package/package.json +1 -1
- package/dist/GraphEl-B16EYkko.cjs +0 -2
- package/dist/GraphEl-B16EYkko.cjs.map +0 -1
- package/dist/GraphEl-DEzobeOM.js.map +0 -1
- package/dist/area-D3Qx7k7K.cjs +0 -2
- package/dist/array-B7TkkRH0.js +0 -89
- package/dist/array-B7TkkRH0.js.map +0 -1
- package/dist/array-DKbXV8lR.cjs +0 -2
- package/dist/array-DKbXV8lR.cjs.map +0 -1
- package/dist/ensureCompleteData-DNKEGRiP.js +0 -102
- package/dist/ensureCompleteData-DNKEGRiP.js.map +0 -1
- package/dist/ensureCompleteData-I6nYmT8E.cjs +0 -2
- package/dist/ensureCompleteData-I6nYmT8E.cjs.map +0 -1
- package/dist/line-CPfhohvF.js +0 -68
- package/dist/line-CPfhohvF.js.map +0 -1
- package/dist/line-DHV4JwCR.cjs +0 -2
- package/dist/line-DHV4JwCR.cjs.map +0 -1
- package/dist/transformDataForAggregation-DEU__LUl.js.map +0 -1
- package/dist/transformDataForAggregation-XNg0OGYE.cjs +0 -2
- package/dist/transformDataForAggregation-XNg0OGYE.cjs.map +0 -1
package/dist/transformData.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./transformDataForAggregation-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./transformDataForAggregation-CYoB5Xsk.cjs"),a=require("./fetchAndParseData-l5HGMAEs.cjs"),o=require("./transformDataForGraphFromFile-CuXxR8uA.cjs");exports.transformDataForAggregation=r.transformDataForAggregation;exports.transformDataForGraph=r.transformDataForGraph;exports.transformColumnsToArray=a.transformColumnsToArray;exports.transformDataForGraphFromFile=o.transformDataForGraphFromFile;
|
|
2
2
|
//# sourceMappingURL=transformData.cjs.map
|
package/dist/transformData.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as o, a as t } from "./transformDataForAggregation-
|
|
1
|
+
import { t as o, a as t } from "./transformDataForAggregation-j34UL73s.js";
|
|
2
2
|
import { t as s } from "./fetchAndParseData-BpqkBPQL.js";
|
|
3
|
-
import { t as n } from "./transformDataForGraphFromFile-
|
|
3
|
+
import { t as n } from "./transformDataForGraphFromFile-DyP-83Nh.js";
|
|
4
4
|
export {
|
|
5
5
|
s as transformColumnsToArray,
|
|
6
6
|
o as transformDataForAggregation,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const q=require("./index-BS2TADPj.cjs"),m=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),h=require("./getGraphList-CA17dvFB.cjs"),o=require("./index-CSNtgibC.cjs"),g=require("./uniqBy-O05lp2S5.cjs"),c=[{chartID:"barChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"date",required:!1,multiple:!1}]},{chartID:"bulletChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"target",required:!1,multiple:!1},{id:"qualitativeRange",required:!1,multiple:!0},{id:"date",required:!1,multiple:!1}]},{chartID:"radarChart",configuration:[{id:"label",required:!1,multiple:!1},{id:"values",required:!0,multiple:!0},{id:"color",required:!1,multiple:!1}]},{chartID:"stackedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0},{id:"date",required:!1,multiple:!1}]},{chartID:"groupedBarChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",multiple:!0,required:!0},{id:"date",required:!1,multiple:!1}]},{chartID:"lineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"dualAxisLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y1",multiple:!1,required:!0},{id:"y2",multiple:!1,required:!0}]},{chartID:"differenceLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y1",multiple:!1,required:!0},{id:"y2",multiple:!1,required:!0}]},{chartID:"multiLineChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!0,required:!0}]},{chartID:"multiLineAltChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!1,required:!0},{id:"label",multiple:!1,required:!0},{id:"color",multiple:!1,required:!1}]},{chartID:"stackedAreaChart",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",multiple:!0,required:!0}]},{chartID:"threeDGlobe",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1}]},{chartID:"choroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"date",required:!1,multiple:!1}]},{chartID:"biVariateChoroplethMap",configuration:[{id:"id",required:!0,multiple:!1},{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"date",required:!1,multiple:!1}]},{chartID:"dotDensityMap",configuration:[{id:"lat",required:!0,multiple:!1},{id:"long",required:!0,multiple:!1},{id:"label",multiple:!1,required:!1},{id:"color",multiple:!1,required:!1},{id:"radius",required:!1,multiple:!1},{id:"date",required:!1,multiple:!1}]},{chartID:"hybridMap",configuration:[{id:"id",required:!1,multiple:!1},{id:"x",required:!1,multiple:!1},{id:"lat",required:!1,multiple:!1},{id:"long",required:!1,multiple:!1},{id:"label",multiple:!1,required:!1},{id:"radius",required:!1,multiple:!1},{id:"date",required:!1,multiple:!1}]},{chartID:"donutChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1}]},{chartID:"slopeChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"y1",required:!0,multiple:!1},{id:"y2",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"scatterPlot",configuration:[{id:"x",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1},{id:"label",required:!0,multiple:!1},{id:"date",required:!1,multiple:!1}]},{chartID:"dumbbellChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"x",multiple:!0,required:!0},{id:"date",required:!1,multiple:!1}]},{chartID:"treeMap",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"circlePacking",configuration:[{id:"label",required:!0,multiple:!1},{id:"size",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"sankeyChart",configuration:[{id:"source",required:!0,multiple:!1},{id:"target",required:!0,multiple:!1},{id:"value",required:!1,multiple:!1}]},{chartID:"heatMap",configuration:[{id:"row",required:!0,multiple:!1},{id:"column",required:!0,multiple:!1},{id:"value",required:!0,multiple:!1}]},{chartID:"stripChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"position",required:!0,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"statCard",configuration:[{id:"value",required:!0,multiple:!1}]},{chartID:"beeSwarmChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"position",required:!0,multiple:!1},{id:"radius",required:!1,multiple:!1},{id:"color",required:!1,multiple:!1}]},{chartID:"butterflyChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"leftBar",required:!0,multiple:!1},{id:"rightBar",required:!0,multiple:!1},{id:"date",required:!1,multiple:!1}]},{chartID:"lineChartWithConfidenceInterval",configuration:[{id:"date",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1},{id:"yMin",required:!1,multiple:!1},{id:"yMax",required:!1,multiple:!1}]},{chartID:"histogram",configuration:[{id:"value",required:!0,multiple:!1}]},{chartID:"sparkLine",configuration:[{id:"dale",required:!0,multiple:!1},{id:"y",required:!0,multiple:!1}]},{chartID:"paretoChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"bar",required:!0,multiple:!1},{id:"line",required:!0,multiple:!1}]},{chartID:"unitChart",configuration:[{id:"label",required:!0,multiple:!1},{id:"value",required:!0,multiple:!1}]}];function p(l,a){return a.filter(d=>!l.includes(d))}function I(l,a,d){const f=q.flattenDeep(l.map(e=>e.columnId)),u=p(d,f);if(u.length!==0)return{isValid:!1,err:`Key(s) in configuration that don't match keys in the data: ${u.join(", ")}. 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'.`};const s=l.map(e=>e.chartConfigId),t=c[c.findIndex(e=>e.chartID===a)].configuration.filter(e=>e.required).map(e=>e.id),i=p(s,t);return{isValid:i.length===0,err:i.length===0?void 0:`Missing required ID(s) in configuration: ${i.join(", ")}`}}function D(l,a,d){if(h.graphList.filter(u=>u.geoHubMapPresentation).map(u=>u.graphID).indexOf(a)!==-1)return l;if(!l)return"Cannot fetch data";if(a==="dataTable"||a==="dataCards"||l.length===0)return l;if(!d)return console.error("Your data configuration is not accurate"),"No graph configuration is provided";const f=I(d,a,Object.keys(l[0]));if(f.isValid){const u=c[c.findIndex(t=>t.chartID===a)].configuration;return l.map(t=>{const i={};return d.filter(e=>e.columnId).forEach(e=>{u[u.findIndex(r=>r.id===e.chartConfigId)].multiple?(i[u[u.findIndex(r=>r.id===e.chartConfigId)].id]=[],e.columnId.forEach(r=>{i[u[u.findIndex(n=>n.id===e.chartConfigId)].id].push(m.checkIfNullOrUndefined(t[r])?null:t[r])})):i[u[u.findIndex(r=>r.id===e.chartConfigId)].id]=m.checkIfNullOrUndefined(t[e.columnId])?null:t[e.columnId],i[`${e.chartConfigId}Columns`]=e.columnId}),i.data=t,i})}return console.error(f.err),f.err}function b(l,a,d){return l.length===0?[]:typeof l[0][a]!="object"?g.uniqBy(l,a).map(t=>{const i={};i[a]=t;const e=l.filter(r=>r[a]===t);return i.count=e.length,i.rollUpData=e,d?.forEach(r=>{i[r.column]=r.aggregationMethod==="average"?parseFloat((o.sum(e.map(n=>n[r.column]))/e.length).toFixed(2)):r.aggregationMethod==="max"?Math.max(...e.map(n=>n[r.column])):r.aggregationMethod==="min"?Math.min(...e.map(n=>n[r.column])):o.sum(e.map(n=>n[r.column]))}),i}):[...new Set(q.flattenDeep(l.map(s=>s[a])))].map(s=>{const t={};t[a]=s;const i=l.filter(e=>e[a].indexOf(s)!==-1);return t.rollUpData=i,t.count=i.length,d?.forEach(e=>{t[e.column]=e.aggregationMethod==="average"?parseFloat((o.sum(i.map(r=>r[e.column]))/i.length).toFixed(2)):e.aggregationMethod==="max"?Math.max(...i.map(r=>r[e.column])):e.aggregationMethod==="min"?Math.min(...i.map(r=>r[e.column])):o.sum(i.map(r=>r[e.column]))}),t})}exports.transformDataForAggregation=b;exports.transformDataForGraph=D;
|
|
2
|
+
//# sourceMappingURL=transformDataForAggregation-CYoB5Xsk.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformDataForAggregation-CYoB5Xsk.cjs","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":"sNAEaA,EAGP,CACJ,CACEC,QAAS,WACTC,cAAe,CACb,CACEC,GAAI,QACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,OACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,QACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,OACJC,SAAU,GACVC,SAAU,EAAA,CACX,CAEL,EACA,CACEJ,QAAS,cACTC,cAAe,CACb,CACEC,GAAI,QACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,OACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,SACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,mBACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,OACJC,SAAU,GACVC,SAAU,EAAA,CACX,CAEL,EACA,CACEJ,QAAS,aACTC,cAAe,CACb,CACEC,GAAI,QACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,SACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,QACJC,SAAU,GACVC,SAAU,EAAA,CACX,CAEL,EACA,CACEJ,QAAS,kBACTC,cAAe,CACb,CACEC,GAAI,QACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,OACJE,SAAU,GACVD,SAAU,EAAA,EAEZ,CACED,GAAI,OACJC,SAAU,GACVC,SAAU,EAAA,CACX,CAEL,EACA,CACEJ,QAAS,kBACTC,cAAe,CACb,CACEC,GAAI,QACJC,SAAU,GACVC,SAAU,EAAA,EAEZ,CACEF,GAAI,OACJE,SAAU,GACVD,SAAU,EAAA,EAEZ,CACED,GAAI,OACJC,SAAU,GACVC,SAAU,EAAA,CACX,CAEL,EACA,CACEJ,QAAS,YACTC,cAAe,CACb,CACEC,GAAI,OAC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AWA,EAAEkC,CAAS,CAAC,CAAC,CAAC,CAAC,EACjDnC,IAAIC,GAAK,CAEjC,MAAMqC,EAAe,CAAA,EACrBA,EAAQH,CAAS,EAAIlC,EACrB,MAAMsC,EAAevB,EAAKzB,OAEvBiD,GAAWA,EAAEL,CAAS,EAAEd,QAAQpB,CAAC,IAAM,EAAA,EAE1CqC,OAAAA,EAAQI,WAAaH,EACrBD,EAAQG,MAAQF,EAAanC,OAC7BgC,GAAqBP,QAAQpB,GAAM,CACjC6B,EAAQ7B,EAAGkC,MAAM,EACflC,EAAGmC,oBAAsB,UACrBC,YAEGC,EAAAA,IAAIP,EAAavC,IAAKwC,GAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC,EAAIJ,EAAanC,QAAQ2C,QAAQ,CAAC,CAAA,EAEnFtC,EAAGmC,oBAAsB,MAEvBI,KAAKC,IAAI,GAAGV,EAAavC,IAAKwC,GAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC,EACtDlC,EAAGmC,oBAAsB,MAEvBI,KAAKE,IAAI,GAAGX,EAAavC,IAAKwC,GAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC,EAEtDG,EAAAA,IAAIP,EAAavC,IAAKwC,GAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC,CAC1D,CAAC,EACML,CACT,CAAC,CAEH"}
|
package/dist/{transformDataForAggregation-DEU__LUl.js → transformDataForAggregation-j34UL73s.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { f as q } from "./index-EArKRVKg.js";
|
|
2
2
|
import { c } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
3
3
|
import { g as h } from "./getGraphList-Dxwo9TDb.js";
|
|
4
|
-
import { s } from "./index-CeVNqhMO.js";
|
|
4
|
+
import { s as o } from "./index-CeVNqhMO.js";
|
|
5
5
|
import { u as g } from "./uniqBy-BHy4I8PK.js";
|
|
6
6
|
const m = [{
|
|
7
7
|
chartID: "barChart",
|
|
@@ -40,6 +40,10 @@ const m = [{
|
|
|
40
40
|
id: "qualitativeRange",
|
|
41
41
|
required: !1,
|
|
42
42
|
multiple: !0
|
|
43
|
+
}, {
|
|
44
|
+
id: "date",
|
|
45
|
+
required: !1,
|
|
46
|
+
multiple: !1
|
|
43
47
|
}]
|
|
44
48
|
}, {
|
|
45
49
|
chartID: "radarChart",
|
|
@@ -531,7 +535,7 @@ function p(l, a) {
|
|
|
531
535
|
return a.filter((d) => !l.includes(d));
|
|
532
536
|
}
|
|
533
537
|
function I(l, a, d) {
|
|
534
|
-
const
|
|
538
|
+
const s = q(l.map((e) => e.columnId)), u = p(d, s);
|
|
535
539
|
if (u.length !== 0) return {
|
|
536
540
|
isValid: !1,
|
|
537
541
|
err: `Key(s) in configuration that don't match keys in the data: ${u.join(", ")}. 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'.`
|
|
@@ -548,8 +552,8 @@ function M(l, a, d) {
|
|
|
548
552
|
if (a === "dataTable" || a === "dataCards" || l.length === 0) return l;
|
|
549
553
|
if (!d)
|
|
550
554
|
return console.error("Your data configuration is not accurate"), "No graph configuration is provided";
|
|
551
|
-
const
|
|
552
|
-
if (
|
|
555
|
+
const s = I(d, a, Object.keys(l[0]));
|
|
556
|
+
if (s.isValid) {
|
|
553
557
|
const u = m[m.findIndex((t) => t.chartID === a)].configuration;
|
|
554
558
|
return l.map((t) => {
|
|
555
559
|
const i = {};
|
|
@@ -560,7 +564,7 @@ function M(l, a, d) {
|
|
|
560
564
|
}), i.data = t, i;
|
|
561
565
|
});
|
|
562
566
|
}
|
|
563
|
-
return console.error(
|
|
567
|
+
return console.error(s.err), s.err;
|
|
564
568
|
}
|
|
565
569
|
function v(l, a, d) {
|
|
566
570
|
return l.length === 0 ? [] : typeof l[0][a] != "object" ? g(l, a).map((t) => {
|
|
@@ -573,7 +577,7 @@ function v(l, a, d) {
|
|
|
573
577
|
return i.count = e.length, i.rollUpData = e, d?.forEach((r) => {
|
|
574
578
|
i[r.column] = r.aggregationMethod === "average" ? parseFloat(
|
|
575
579
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
576
|
-
(
|
|
580
|
+
(o(e.map((n) => n[r.column])) / e.length).toFixed(2)
|
|
577
581
|
) : r.aggregationMethod === "max" ? (
|
|
578
582
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
579
583
|
Math.max(...e.map((n) => n[r.column]))
|
|
@@ -582,7 +586,7 @@ function v(l, a, d) {
|
|
|
582
586
|
Math.min(...e.map((n) => n[r.column]))
|
|
583
587
|
) : (
|
|
584
588
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
585
|
-
|
|
589
|
+
o(e.map((n) => n[r.column]))
|
|
586
590
|
);
|
|
587
591
|
}), i;
|
|
588
592
|
}) : [...new Set(q(l.map((f) => f[a])))].map((f) => {
|
|
@@ -595,7 +599,7 @@ function v(l, a, d) {
|
|
|
595
599
|
return t.rollUpData = i, t.count = i.length, d?.forEach((e) => {
|
|
596
600
|
t[e.column] = e.aggregationMethod === "average" ? parseFloat(
|
|
597
601
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
598
|
-
(
|
|
602
|
+
(o(i.map((r) => r[e.column])) / i.length).toFixed(2)
|
|
599
603
|
) : e.aggregationMethod === "max" ? (
|
|
600
604
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
601
605
|
Math.max(...i.map((r) => r[e.column]))
|
|
@@ -604,7 +608,7 @@ function v(l, a, d) {
|
|
|
604
608
|
Math.min(...i.map((r) => r[e.column]))
|
|
605
609
|
) : (
|
|
606
610
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
607
|
-
|
|
611
|
+
o(i.map((r) => r[e.column]))
|
|
608
612
|
);
|
|
609
613
|
}), t;
|
|
610
614
|
});
|
|
@@ -613,4 +617,4 @@ export {
|
|
|
613
617
|
M as a,
|
|
614
618
|
v as t
|
|
615
619
|
};
|
|
616
|
-
//# sourceMappingURL=transformDataForAggregation-
|
|
620
|
+
//# sourceMappingURL=transformDataForAggregation-j34UL73s.js.map
|
|
@@ -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,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etchAndParseData-l5HGMAEs.cjs"),D=require("./transformDataForAggregation-
|
|
2
|
-
//# sourceMappingURL=transformDataForGraphFromFile-
|
|
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-
|
|
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"}
|
package/dist/{transformDataForGraphFromFile-CSG24iF6.js → transformDataForGraphFromFile-DyP-83Nh.js}
RENAMED
|
@@ -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-
|
|
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-
|
|
14
|
+
//# sourceMappingURL=transformDataForGraphFromFile-DyP-83Nh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformDataForGraphFromFile-
|
|
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,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
|