@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ensureCompleteData-DNKEGRiP.js","sources":["../src/Utils/ensureCompleteData.ts"],"sourcesContent":["import { parse } from 'date-fns/parse';\r\nimport orderBy from 'lodash.orderby';\r\n\r\nimport {\r\n BarGraphDataType,\r\n ButterflyChartDataType,\r\n DumbbellChartDataType,\r\n GroupedBarGraphDataType,\r\n ScatterPlotDataType,\r\n} from '@/Types';\r\n\r\nexport function ensureCompleteDataForBarChart(data: BarGraphDataType[], dateFormat: string) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const colors = data.reduce((acc: any, curr: any) => {\r\n if (!acc[curr.label]) {\r\n acc[curr.label] = curr.color;\r\n }\r\n return acc;\r\n }, {});\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n color: colors[label], // Keep the same color for the label\r\n size: undefined,\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForStackedBarChart(\r\n data: GroupedBarGraphDataType[],\r\n dateFormat: string,\r\n) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n size: data[0].size.map(_d => null),\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForButterFlyChart(\r\n data: ButterflyChartDataType[],\r\n dateFormat: string,\r\n) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n leftBar: undefined,\r\n rightBar: undefined,\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForScatterPlot(data: ScatterPlotDataType[], dateFormat: string) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const colors = data.reduce((acc: any, curr: any) => {\r\n if (!acc[curr.label]) {\r\n acc[curr.label] = curr.color;\r\n }\r\n return acc;\r\n }, {});\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n color: colors[label], // Keep the same color for the label\r\n x: undefined,\r\n y: undefined,\r\n radius: undefined,\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForDumbbellChart(\r\n data: DumbbellChartDataType[],\r\n dateFormat: string,\r\n) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n x: data[0].x.map(_d => null),\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n"],"names":["ensureCompleteDataForBarChart","data","dateFormat","labels","Array","from","Set","map","d","label","dates","date","filter","undefined","length","existingCombinations","colors","reduce","acc","curr","color","completeData","forEach","has","push","size","orderBy","parse","Date","ensureCompleteDataForStackedBarChart","_d","ensureCompleteDataForButterFlyChart","leftBar","rightBar","ensureCompleteDataForScatterPlot","x","y","radius","ensureCompleteDataForDumbbellChart"],"mappings":";;AAWO,SAASA,EAA8BC,GAA0BC,GAAoB;AAE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c,4BAAY0B,KAAAA,CAAM,CAAC,GAC1D,CAAC,KAAK,CACR;AACF;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("./parse-hMnG_lRV.cjs"),m=require("./index-Cno4Q0YE.cjs");function f(t,s){const l=Array.from(new Set(t.map(r=>r.label))),n=Array.from(new Set(t.map(r=>r.date))).filter(r=>r!==void 0);if(n.length===0)return t;const i=new Set(t.map(r=>`${r.label}-${r.date}`)),a=t.reduce((r,o)=>(r[o.label]||(r[o.label]=o.color),r),{}),e=[...t];return l.forEach(r=>{n.forEach(o=>{i.has(`${r}-${o}`)||e.push({label:r,color:a[r],size:void 0,date:o})})}),m.orderBy(e,[r=>c.parse(`${r.date}`,s||"yyyy",new Date)],["asc"])}function p(t,s){const l=Array.from(new Set(t.map(e=>e.label))),n=Array.from(new Set(t.map(e=>e.date))).filter(e=>e!==void 0);if(n.length===0)return t;const i=new Set(t.map(e=>`${e.label}-${e.date}`)),a=[...t];return l.forEach(e=>{n.forEach(r=>{i.has(`${e}-${r}`)||a.push({label:e,size:t[0].size.map(o=>null),date:r})})}),m.orderBy(a,[e=>c.parse(`${e.date}`,s||"yyyy",new Date)],["asc"])}function u(t,s){const l=Array.from(new Set(t.map(e=>e.label))),n=Array.from(new Set(t.map(e=>e.date))).filter(e=>e!==void 0);if(n.length===0)return t;const i=new Set(t.map(e=>`${e.label}-${e.date}`)),a=[...t];return l.forEach(e=>{n.forEach(r=>{i.has(`${e}-${r}`)||a.push({label:e,leftBar:void 0,rightBar:void 0,date:r})})}),m.orderBy(a,[e=>c.parse(`${e.date}`,s,new Date)],["asc"])}function h(t,s){const l=Array.from(new Set(t.map(r=>r.label))),n=Array.from(new Set(t.map(r=>r.date))).filter(r=>r!==void 0);if(n.length===0)return t;const i=new Set(t.map(r=>`${r.label}-${r.date}`)),a=t.reduce((r,o)=>(r[o.label]||(r[o.label]=o.color),r),{}),e=[...t];return l.forEach(r=>{n.forEach(o=>{i.has(`${r}-${o}`)||e.push({label:r,color:a[r],x:void 0,y:void 0,radius:void 0,date:o})})}),m.orderBy(e,[r=>c.parse(`${r.date}`,s,new Date)],["asc"])}function y(t,s){const l=Array.from(new Set(t.map(e=>e.label))),n=Array.from(new Set(t.map(e=>e.date))).filter(e=>e!==void 0);if(n.length===0)return t;const i=new Set(t.map(e=>`${e.label}-${e.date}`)),a=[...t];return l.forEach(e=>{n.forEach(r=>{i.has(`${e}-${r}`)||a.push({label:e,x:t[0].x.map(o=>null),date:r})})}),m.orderBy(a,[e=>c.parse(`${e.date}`,s||"yyyy",new Date)],["asc"])}exports.ensureCompleteDataForBarChart=f;exports.ensureCompleteDataForButterFlyChart=u;exports.ensureCompleteDataForDumbbellChart=y;exports.ensureCompleteDataForScatterPlot=h;exports.ensureCompleteDataForStackedBarChart=p;
|
|
2
|
-
//# sourceMappingURL=ensureCompleteData-I6nYmT8E.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ensureCompleteData-I6nYmT8E.cjs","sources":["../src/Utils/ensureCompleteData.ts"],"sourcesContent":["import { parse } from 'date-fns/parse';\r\nimport orderBy from 'lodash.orderby';\r\n\r\nimport {\r\n BarGraphDataType,\r\n ButterflyChartDataType,\r\n DumbbellChartDataType,\r\n GroupedBarGraphDataType,\r\n ScatterPlotDataType,\r\n} from '@/Types';\r\n\r\nexport function ensureCompleteDataForBarChart(data: BarGraphDataType[], dateFormat: string) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const colors = data.reduce((acc: any, curr: any) => {\r\n if (!acc[curr.label]) {\r\n acc[curr.label] = curr.color;\r\n }\r\n return acc;\r\n }, {});\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n color: colors[label], // Keep the same color for the label\r\n size: undefined,\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForStackedBarChart(\r\n data: GroupedBarGraphDataType[],\r\n dateFormat: string,\r\n) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n size: data[0].size.map(_d => null),\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForButterFlyChart(\r\n data: ButterflyChartDataType[],\r\n dateFormat: string,\r\n) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n leftBar: undefined,\r\n rightBar: undefined,\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForScatterPlot(data: ScatterPlotDataType[], dateFormat: string) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const colors = data.reduce((acc: any, curr: any) => {\r\n if (!acc[curr.label]) {\r\n acc[curr.label] = curr.color;\r\n }\r\n return acc;\r\n }, {});\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n color: colors[label], // Keep the same color for the label\r\n x: undefined,\r\n y: undefined,\r\n radius: undefined,\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n\r\nexport function ensureCompleteDataForDumbbellChart(\r\n data: DumbbellChartDataType[],\r\n dateFormat: string,\r\n) {\r\n // Extract unique labels and dates\r\n const labels = Array.from(new Set(data.map(d => d.label)));\r\n const dates = Array.from(new Set(data.map(d => d.date))).filter(d => d !== undefined);\r\n if (dates.length === 0) return data;\r\n\r\n // Create a set of existing label-date combinations\r\n const existingCombinations = new Set(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data.map((d: any) => `${d.label}-${d.date}`),\r\n );\r\n\r\n // Add missing label-date combinations with size as undefined\r\n const completeData = [...data];\r\n\r\n labels.forEach(label => {\r\n dates.forEach(date => {\r\n if (!existingCombinations.has(`${label}-${date}`)) {\r\n completeData.push({\r\n label,\r\n x: data[0].x.map(_d => null),\r\n date,\r\n });\r\n }\r\n });\r\n });\r\n\r\n return orderBy(\r\n completeData,\r\n [d => parse(`${d.date}`, dateFormat || 'yyyy', new Date())],\r\n ['asc'],\r\n );\r\n}\r\n"],"names":["ensureCompleteDataForBarChart","data","dateFormat","labels","Array","from","Set","map","d","label","dates","date","filter","undefined","length","existingCombinations","colors","reduce","acc","curr","color","completeData","forEach","has","push","size","orderBy","parse","Date","ensureCompleteDataForStackedBarChart","ensureCompleteDataForButterFlyChart","leftBar","rightBar","ensureCompleteDataForScatterPlot","x","y","radius","ensureCompleteDataForDumbbellChart"],"mappings":"uFAWO,SAASA,EAA8BC,EAA0BC,EAAoB,CAE1F,MAAMC,EAASC,MAAMC,KAAK,IAAIC,IAAIL,EAAKM,IAAIC,GAAKA,EAAEC,KAAK,CAAC,CAAC,EACnDC,EAAQN,MAAMC,KAAK,IAAIC,IAAIL,EAAKM,IAAIC,GAAKA,EAAEG,IAAI,CAAC,CAAC,EAAEC,OAAOJ,GAAKA,IAAMK,MAAS,EACpF,GAAIH,EAAMI,SAAW,EAAG,OAAOb,EAG/B,MAAMc,EAAuB,IAAIT,IAE/BL,EAAKM,IAAKC,GAAW,GAAGA,EAAEC,KAAK,IAAID,EAAEG,IAAI,EAAE,CAAA,EAIvCK,EAASf,EAAKgB,OAAO,CAACC,EAAUC,KAC/BD,EAAIC,EAAKV,KAAK,IACjBS,EAAIC,EAAKV,KAAK,EAAIU,EAAK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AA,CAAAA,CACD,CAEL,CAAC,CACH,CAAC,EAEMe,EAAAA,QACLL,EACA,IAAMM,EAAAA,MAAM,GAAGnB,EAAEG,IAAI,GAAIT,GAAc,WAAY0B,IAAM,CAAC,EAC1D,CAAC,KAAK,CACR,CACF"}
|
package/dist/line-CPfhohvF.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { w as _, c as f, a as m } from "./array-B7TkkRH0.js";
|
|
2
|
-
function g(t) {
|
|
3
|
-
this._context = t;
|
|
4
|
-
}
|
|
5
|
-
g.prototype = {
|
|
6
|
-
areaStart: function() {
|
|
7
|
-
this._line = 0;
|
|
8
|
-
},
|
|
9
|
-
areaEnd: function() {
|
|
10
|
-
this._line = NaN;
|
|
11
|
-
},
|
|
12
|
-
lineStart: function() {
|
|
13
|
-
this._point = 0;
|
|
14
|
-
},
|
|
15
|
-
lineEnd: function() {
|
|
16
|
-
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
17
|
-
},
|
|
18
|
-
point: function(t, e) {
|
|
19
|
-
switch (t = +t, e = +e, this._point) {
|
|
20
|
-
case 0:
|
|
21
|
-
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
|
|
22
|
-
break;
|
|
23
|
-
case 1:
|
|
24
|
-
this._point = 2;
|
|
25
|
-
// falls through
|
|
26
|
-
default:
|
|
27
|
-
this._context.lineTo(t, e);
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
function v(t) {
|
|
33
|
-
return new g(t);
|
|
34
|
-
}
|
|
35
|
-
function w(t) {
|
|
36
|
-
return t[0];
|
|
37
|
-
}
|
|
38
|
-
function b(t) {
|
|
39
|
-
return t[1];
|
|
40
|
-
}
|
|
41
|
-
function S(t, e) {
|
|
42
|
-
var s = f(!0), r = null, l = v, u = null, d = _(i);
|
|
43
|
-
t = typeof t == "function" ? t : t === void 0 ? w : f(t), e = typeof e == "function" ? e : e === void 0 ? b : f(e);
|
|
44
|
-
function i(n) {
|
|
45
|
-
var o, p = (n = m(n)).length, h, c = !1, a;
|
|
46
|
-
for (r == null && (u = l(a = d())), o = 0; o <= p; ++o)
|
|
47
|
-
!(o < p && s(h = n[o], o, n)) === c && ((c = !c) ? u.lineStart() : u.lineEnd()), c && u.point(+t(h, o, n), +e(h, o, n));
|
|
48
|
-
if (a) return u = null, a + "" || null;
|
|
49
|
-
}
|
|
50
|
-
return i.x = function(n) {
|
|
51
|
-
return arguments.length ? (t = typeof n == "function" ? n : f(+n), i) : t;
|
|
52
|
-
}, i.y = function(n) {
|
|
53
|
-
return arguments.length ? (e = typeof n == "function" ? n : f(+n), i) : e;
|
|
54
|
-
}, i.defined = function(n) {
|
|
55
|
-
return arguments.length ? (s = typeof n == "function" ? n : f(!!n), i) : s;
|
|
56
|
-
}, i.curve = function(n) {
|
|
57
|
-
return arguments.length ? (l = n, r != null && (u = l(r)), i) : l;
|
|
58
|
-
}, i.context = function(n) {
|
|
59
|
-
return arguments.length ? (n == null ? r = u = null : u = l(r = n), i) : r;
|
|
60
|
-
}, i;
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
v as c,
|
|
64
|
-
S as l,
|
|
65
|
-
w as x,
|
|
66
|
-
b as y
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=line-CPfhohvF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"line-CPfhohvF.js","sources":["../node_modules/d3-shape/src/curve/linear.js","../node_modules/d3-shape/src/point.js","../node_modules/d3-shape/src/line.js"],"sourcesContent":["function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n"],"names":["Linear","context","x","y","curveLinear","p","line","defined","constant","curve","output","path","withPath","pointX","pointY","data","i","n","array","d","defined0","buffer","_"],"mappings":";AAAA,SAASA,EAAOC,GAAS;AACvB,OAAK,WAAWA;AAClB;AAEA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@@
|
|
|
1
|
-
"use strict";const r=require("./array-DKbXV8lR.cjs");function g(t){this._context=t}g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function d(t){return new g(t)}function _(t){return t[0]}function v(t){return t[1]}function b(t,e){var s=r.constant(!0),c=null,f=d,u=null,m=r.withPath(i);t=typeof t=="function"?t:t===void 0?_:r.constant(t),e=typeof e=="function"?e:e===void 0?v:r.constant(e);function i(n){var o,p=(n=r.array(n)).length,h,l=!1,a;for(c==null&&(u=f(a=m())),o=0;o<=p;++o)!(o<p&&s(h=n[o],o,n))===l&&((l=!l)?u.lineStart():u.lineEnd()),l&&u.point(+t(h,o,n),+e(h,o,n));if(a)return u=null,a+""||null}return i.x=function(n){return arguments.length?(t=typeof n=="function"?n:r.constant(+n),i):t},i.y=function(n){return arguments.length?(e=typeof n=="function"?n:r.constant(+n),i):e},i.defined=function(n){return arguments.length?(s=typeof n=="function"?n:r.constant(!!n),i):s},i.curve=function(n){return arguments.length?(f=n,c!=null&&(u=f(c)),i):f},i.context=function(n){return arguments.length?(n==null?c=u=null:u=f(c=n),i):c},i}exports.curveLinear=d;exports.line=b;exports.x=_;exports.y=v;
|
|
2
|
-
//# sourceMappingURL=line-DHV4JwCR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"line-DHV4JwCR.cjs","sources":["../node_modules/d3-shape/src/curve/linear.js","../node_modules/d3-shape/src/point.js","../node_modules/d3-shape/src/line.js"],"sourcesContent":["function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n"],"names":["Linear","context","x","y","curveLinear","p","line","defined","constant","curve","output","path","withPath","pointX","pointY","data","i","n","array","d","defined0","buffer","_"],"mappings":"qDAAA,SAASA,EAAOC,EAAS,CACvB,KAAK,SAAWA,CAClB,CAEAD,EAAO,UAAY,CACjB,UAAW,UAAW,CACpB,KAAK,MAAQ,CACf,EACA,QAAS,UAAW,CAClB,KAAK,MAAQ,GACf,EACA,UAAW,UAAW,CACpB,KAAK,OAAS,CAChB,EACA,QAAS,UAAW,EACd,KAAK,OAAU,KAAK,QAAU,GAAK,KAAK,SAAW,IAAI,KAAK,SAAS,UAAS,EAClF,KAAK,MAAQ,EAAI,KAAK,KACxB,EACA,MAAO,SAASE,EAAGC,EAAG,CAEpB,OADAD,EAAI,CAACA,EAAGC,EAAI,CAACA,EACL,KAAK,OAAM,CACjB,IAAK,GAAG,KAAK,OAAS,EAAG,KAAK,MAAQ,KAAK,SAAS,OAAOD,EAAGC,CAAC,EAAI,KAAK,SAAS,OAAOD,EAAGC,CAAC,EAAG,MAC/F,IAAK,GAAG,KAAK,OAAS,EACtB,QAAS,KAAK,SAAS,OAAOD,EAAGC,CAAC,EAAG,KAC3C,CACE,CACF,EAEe,SAAAC,EAASH,EAAS,CAC/B,OAAO,IAAID,EAAOC,CAAO,CAC3B,CC9BO,SAASC,EAAEG,EAAG,CACnB,OAAOA,EAAE,CAAC,CACZ,CAEO,SAASF,EAAEE,EAAG,CACnB,OAAOA,EAAE,CAAC,CACZ,CCAe,SAAAC,EAASJ,EAAGC,EAAG,CAC5B,IAAII,EAAUC,EAAAA,SAAS,EAAI,EACvBP,EAAU,KACVQ,EAAQL,EACRM,EAAS,KACTC,EAAOC,EAAAA,SAASN,CAAI,EAExBJ,EAAI,OAAOA,GAAM,WAAaA,EAAKA,IAAM,OAAaW,EAASL,EAAAA,SAASN,CAAC,EACzEC,EAAI,OAAOA,GAAM,WAAaA,EAAKA,IAAM,OAAaW,EAASN,EAAAA,SAASL,CAAC,EAEzE,SAASG,EAAKS,EAAM,CAClB,IAAIC,EACAC,GAAKF,EAA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Aggregation-DEU__LUl.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 },\r\n {\r\n chartID: 'radarChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'values',\r\n required: true,\r\n multiple: true,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'stackedBarChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n multiple: true,\r\n required: true,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'groupedBarChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n multiple: true,\r\n required: true,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'lineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'dualAxisLineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y1',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'y2',\r\n multiple: false,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'differenceLineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y1',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'y2',\r\n multiple: false,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'multiLineChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n multiple: true,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'multiLineAltChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'label',\r\n multiple: false,\r\n required: true,\r\n },\r\n {\r\n id: 'color',\r\n multiple: false,\r\n required: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'stackedAreaChart',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n multiple: true,\r\n required: true,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'threeDGlobe',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'choroplethMap',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'biVariateChoroplethMap',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'dotDensityMap',\r\n configuration: [\r\n {\r\n id: 'lat',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'long',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'label',\r\n multiple: false,\r\n required: false,\r\n },\r\n {\r\n id: 'color',\r\n multiple: false,\r\n required: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'hybridMap',\r\n configuration: [\r\n {\r\n id: 'id',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'lat',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'long',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'label',\r\n multiple: false,\r\n required: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'donutChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'slopeChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y1',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y2',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'scatterPlot',\r\n configuration: [\r\n {\r\n id: 'x',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'dumbbellChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'x',\r\n multiple: true,\r\n required: true,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'treeMap',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'circlePacking',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'size',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'sankeyChart',\r\n configuration: [\r\n {\r\n id: 'source',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'target',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'value',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'heatMap',\r\n configuration: [\r\n {\r\n id: 'row',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'column',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'stripChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'position',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'statCard',\r\n configuration: [\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'beeSwarmChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'position',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'radius',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'color',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'butterflyChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'leftBar',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'rightBar',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'date',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'lineChartWithConfidenceInterval',\r\n configuration: [\r\n {\r\n id: 'date',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'yMin',\r\n required: false,\r\n multiple: false,\r\n },\r\n {\r\n id: 'yMax',\r\n required: false,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'histogram',\r\n configuration: [\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'sparkLine',\r\n configuration: [\r\n {\r\n id: 'dale',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'y',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'paretoChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'bar',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'line',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n {\r\n chartID: 'unitChart',\r\n configuration: [\r\n {\r\n id: 'label',\r\n required: true,\r\n multiple: false,\r\n },\r\n {\r\n id: 'value',\r\n required: true,\r\n multiple: false,\r\n },\r\n ],\r\n },\r\n];\r\n","import flattenDeep from 'lodash.flattendeep';\r\n\r\nimport { ChartConfiguration } from './transformData/graphConfig';\r\n\r\nimport { GraphConfigurationDataType, GraphType, ThreeDGraphType } from '@/Types';\r\n\r\nfunction missingValuesInArray(superset: string[], subset: string[]): string[] {\r\n return subset.filter(value => !superset.includes(value));\r\n}\r\n\r\nexport function checkDataConfigValidity(\r\n dataConfig: GraphConfigurationDataType[],\r\n graph: GraphType | ThreeDGraphType,\r\n dataKeys: string[],\r\n) {\r\n const dataKeyFromDataConfig = flattenDeep(dataConfig.map(d => d.columnId));\r\n const checkDataKeys = missingValuesInArray(dataKeys, dataKeyFromDataConfig);\r\n if (checkDataKeys.length !== 0)\r\n return {\r\n isValid: false,\r\n err: `Key(s) in configuration that don't match keys in the data: ${checkDataKeys.join(\r\n ', ',\r\n )}. Possible reason: If you are using 'dataTransform' then the allowed keys (columns) are only the one present in 'aggregationColumnsSetting' array in 'dataTransform' object plus an additional key called 'count'.`,\r\n };\r\n const ids = dataConfig.map(el => el.chartConfigId);\r\n const requiredIds = ChartConfiguration[\r\n ChartConfiguration.findIndex(el => el.chartID === graph)\r\n ].configuration\r\n .filter(el => el.required)\r\n .map(el => el.id);\r\n const ifRequiredIdsPresent = missingValuesInArray(ids, requiredIds);\r\n return {\r\n isValid: ifRequiredIdsPresent.length === 0,\r\n err:\r\n ifRequiredIdsPresent.length === 0\r\n ? undefined\r\n : `Missing required ID(s) in configuration: ${ifRequiredIdsPresent.join(', ')}`,\r\n };\r\n}\r\n","import { checkDataConfigValidity } from '../checkDataValidity';\r\nimport { checkIfNullOrUndefined } from '../checkIfNullOrUndefined';\r\nimport { graphList } from '../getGraphList';\r\n\r\nimport { ChartConfiguration } from './graphConfig';\r\n\r\nimport { GraphConfigurationDataType, GraphType, ThreeDGraphType } from '@/Types';\r\n/**\r\n * Transforms the input data into a format suitable for graph visualization based on the given graph type and configuration.\r\n *\r\n * The function formats the data according to the specified graph configuration and checks the validity of the configuration.\r\n * It also handles cases for graphs like \"dataTable\" and \"dataCards\" without additional processing, and it processes\r\n * more complex graphs (e.g., charts) with a specific configuration.\r\n *\r\n * @param data - The data to be transformed, typically an array of objects representing rows of data.\r\n * @param graph - The type of graph to transform the data for (e.g., lineChart, barChart, etc.).\r\n * @param config - An optional array of configuration objects that define how the data should be mapped to the graph.\r\n * Each object in the array should define column mappings and how data should be grouped or aggregated.\r\n *\r\n * @returns The transformed data in the format required by the graph. If no valid configuration is provided, or if\r\n * data is invalid, an error message is returned.\r\n * - If the graph type is \"dataTable\" or \"dataCards\", the original data is returned unchanged.\r\n * - If data is invalid, an error message will be returned.\r\n *\r\n * @throws {string} If the configuration is invalid or the data can't be processed, an error message is logged and\r\n * returned.\r\n *\r\n * @example\r\n * const graphData = [\r\n * { category: 'A', value: 10 },\r\n * { category: 'B', value: 15 },\r\n * ];\r\n * const graph = 'barChart';\r\n * const config = [\r\n * { columnId: 'category', chartConfigId: 'label' },\r\n * { columnId: 'value', chartConfigId: 'size' },\r\n * ];\r\n * const transformedData = transformDataForGraph(graphData, graph, config);\r\n * console.log(transformedData);\r\n */\r\nexport function transformDataForGraph(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any,\r\n graph: GraphType | ThreeDGraphType,\r\n config?: GraphConfigurationDataType[],\r\n) {\r\n if (\r\n graphList\r\n .filter(el => el.geoHubMapPresentation)\r\n .map(el => el.graphID)\r\n .indexOf(graph) !== -1\r\n )\r\n return data;\r\n if (!data) return 'Cannot fetch data';\r\n if (graph === 'dataTable' || graph === 'dataCards' || data.length === 0) return data;\r\n if (!config) {\r\n console.error('Your data configuration is not accurate');\r\n return 'No graph configuration is provided';\r\n }\r\n const dataConfigValidity = checkDataConfigValidity(config, graph, Object.keys(data[0]));\r\n if (dataConfigValidity.isValid) {\r\n const chartConfig =\r\n ChartConfiguration[ChartConfiguration.findIndex(d => d.chartID === graph)].configuration;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const dataFormatted = data.map((d: any) => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const obj: any = {};\r\n config\r\n .filter(el => el.columnId)\r\n .forEach(el => {\r\n if (chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].multiple) {\r\n obj[chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].id] = [];\r\n (el.columnId as string[]).forEach(l => {\r\n obj[chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].id].push(\r\n checkIfNullOrUndefined(d[l]) ? null : d[l],\r\n );\r\n });\r\n } else {\r\n obj[chartConfig[chartConfig.findIndex(k => k.id === el.chartConfigId)].id] =\r\n checkIfNullOrUndefined(d[el.columnId as string]) ? null : d[el.columnId as string];\r\n }\r\n obj[`${el.chartConfigId}Columns`] = el.columnId;\r\n });\r\n obj.data = d;\r\n return obj;\r\n });\r\n return dataFormatted;\r\n }\r\n console.error(dataConfigValidity.err);\r\n return dataConfigValidity.err;\r\n}\r\n","import sum from 'lodash.sum';\r\nimport flattenDeep from 'lodash.flattendeep';\r\n\r\nimport { uniqBy } from '../uniqBy';\r\n\r\nimport { AggregationSettingsDataType } from '@/Types';\r\n/**\r\n * Transforms the data for aggregation based on a key column and specified aggregation settings.\r\n * It groups the data by unique values in the key column and applies the aggregation methods to each group.\r\n *\r\n * @param data - The input data to be aggregated. Can be an array of objects, where each object represents a data row.\r\n * @param keyColumn - The name of the column to group the data by (key column).\r\n * @param aggregationSettings - Optional settings for the aggregation, specifying the column and aggregation method (e.g., 'average', 'max', 'min', 'sum').\r\n * Each setting can define a column and a corresponding aggregation method to apply to that column.\r\n *\r\n * @returns An array of objects where each object contains the aggregated values for each unique value in the key column.\r\n * Each object includes the key column value, count of occurrences, and the aggregated values for each specified column.\r\n *\r\n * @example\r\n * const data = [\r\n * { category: 'A', value: 10, amount: 5 },\r\n * { category: 'A', value: 20, amount: 10 },\r\n * { category: 'B', value: 15, amount: 7 },\r\n * ];\r\n * const aggregationSettings = [\r\n * { column: 'value', aggregationMethod: 'average' },\r\n * { column: 'amount', aggregationMethod: 'sum' },\r\n * ];\r\n * const transformedData = transformDataForAggregation(data, 'category', aggregationSettings);\r\n * console.log(transformedData);\r\n * // Output:\r\n * // [\r\n * // { category: 'A', count: 2, value: 15, amount: 15 },\r\n * // { category: 'B', count: 1, value: 15, amount: 7 },\r\n * // ]\r\n */\r\nexport function transformDataForAggregation(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any,\r\n keyColumn: string,\r\n aggregationSettings?: AggregationSettingsDataType[],\r\n) {\r\n if (data.length === 0) return [];\r\n if (typeof data[0][keyColumn] !== 'object') {\r\n const uniqValues = uniqBy(data, keyColumn).map(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const dataObj: any = {};\r\n dataObj[keyColumn] = d;\r\n const filteredData = data.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (j: any) => j[keyColumn] === d,\r\n );\r\n dataObj.count = filteredData.length;\r\n dataObj.rollUpData = filteredData;\r\n aggregationSettings?.forEach(el => {\r\n dataObj[el.column] =\r\n el.aggregationMethod === 'average'\r\n ? parseFloat(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (sum(filteredData.map((j: any) => j[el.column])) / filteredData.length).toFixed(2),\r\n )\r\n : el.aggregationMethod === 'max'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.max(...filteredData.map((j: any) => j[el.column]))\r\n : el.aggregationMethod === 'min'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.min(...filteredData.map((j: any) => j[el.column]))\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n sum(filteredData.map((j: any) => j[el.column]));\r\n });\r\n return dataObj;\r\n });\r\n return uniqValues;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const values = [...new Set(flattenDeep(data.map((d: any) => d[keyColumn])))];\r\n const uniqValues = values.map(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const dataObj: any = {};\r\n dataObj[keyColumn] = d;\r\n const filteredData = data.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (j: any) => j[keyColumn].indexOf(d) !== -1,\r\n );\r\n dataObj.rollUpData = filteredData;\r\n dataObj.count = filteredData.length;\r\n aggregationSettings?.forEach(el => {\r\n dataObj[el.column] =\r\n el.aggregationMethod === 'average'\r\n ? parseFloat(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (sum(filteredData.map((j: any) => j[el.column])) / filteredData.length).toFixed(2),\r\n )\r\n : el.aggregationMethod === 'max'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.max(...filteredData.map((j: any) => j[el.column]))\r\n : el.aggregationMethod === 'min'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n Math.min(...filteredData.map((j: any) => j[el.column]))\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n sum(filteredData.map((j: any) => j[el.column]));\r\n });\r\n return dataObj;\r\n });\r\n return uniqValues;\r\n}\r\n"],"names":["ChartConfiguration","chartID","configuration","id","required","multiple","missingValuesInArray","superset","subset","filter","value","includes","checkDataConfigValidity","dataConfig","graph","dataKeys","dataKeyFromDataConfig","flattenDeep","map","d","columnId","checkDataKeys","length","isValid","err","join","ids","el","chartConfigId","requiredIds","findIndex","ifRequiredIdsPresent","undefined","transformDataForGraph","data","config","graphList","geoHubMapPresentation","graphID","indexOf","console","error","dataConfigValidity","Object","keys","chartConfig","obj","forEach","k","l","push","checkIfNullOrUndefined","transformDataForAggregation","keyColumn","aggregationSettings","uniqBy","dataObj","filteredData","j","count","rollUpData","column","aggregationMethod","parseFloat","sum","toFixed","Math","max","min","Set"],"mappings":";;;;;AAEO,MAAMA,IAGP,CACJ;AAAA,EACEC,SAAS;AAAA,EACTC,eAAe,CACb;AAAA,IACEC,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,CACX;AAEL,GACA;AAAA,EACEJ,SAAS;AAAA,EACTC,eAAe,CACb;AAAA,IACEC,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,GAEZ;AAAA,IACEF,IAAI;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,EAAA,CACX;AAEL,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AAEjC,UAAMqC,IAAe,CAAA;AACrBA,IAAAA,EAAQH,CAAS,IAAIlC;AACrB,UAAMsC,IAAevB,EAAKzB;AAAAA;AAAAA,MAExB,CAACiD,MAAWA,EAAEL,CAAS,EAAEd,QAAQpB,CAAC,MAAM;AAAA,IAAA;AAE1CqC,WAAAA,EAAQI,aAAaH,GACrBD,EAAQG,QAAQF,EAAanC,QAC7BgC,GAAqBP,QAAQpB,CAAAA,MAAM;AACjC6B,MAAAA,EAAQ7B,EAAGkC,MAAM,IACflC,EAAGmC,sBAAsB,YACrBC;AAAAA;AAAAA,SAEGC,EAAIP,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC,IAAIJ,EAAanC,QAAQ2C,QAAQ,CAAC;AAAA,MAAA,IAEnFtC,EAAGmC,sBAAsB;AAAA;AAAA,QAEvBI,KAAKC,IAAI,GAAGV,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC;AAAA,UACtDlC,EAAGmC,sBAAsB;AAAA;AAAA,QAEvBI,KAAKE,IAAI,GAAGX,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,QAEtDG,EAAIP,EAAavC,IAAI,CAACwC,MAAWA,EAAE/B,EAAGkC,MAAM,CAAC,CAAC;AAAA;AAAA,IAC1D,CAAC,GACML;AAAAA,EACT,CAAC;AAEH;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
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}]},{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-XNg0OGYE.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformDataForAggregation-XNg0OGYE.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 },\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,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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