@undp/data-viz 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DataCards.cjs +21 -1
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +622 -12
- package/dist/DataCards.js.map +1 -1
- package/dist/GraphEl-B6SoGRFW.cjs +2 -0
- package/dist/GraphEl-B6SoGRFW.cjs.map +1 -0
- package/dist/{checkIfMultiple-BB7PlCNh.js → GraphEl-Cw2tDUb3.js} +129 -1163
- package/dist/GraphEl-Cw2tDUb3.js.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +2 -4
- package/dist/GriddedGraphs.js +9 -8
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -4
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +16 -12
- package/dist/MultiGraphDashboard.js +2 -2
- package/dist/MultiGraphDashboardFromConfig.d.ts +16 -12
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +566 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +353 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +570 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +38 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.cjs +2 -0
- package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +493 -0
- package/dist/PerformanceIntensiveScrollStory.js +122 -0
- package/dist/PerformanceIntensiveScrollStory.js.map +1 -0
- package/dist/ScrollStory.cjs.map +1 -1
- package/dist/ScrollStory.d.ts +3 -5
- package/dist/ScrollStory.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -5
- package/dist/SingleGraphDashboard.js +194 -194
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -4
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +428 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +185 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +432 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +25 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +540 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +610 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +2 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +543 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +35 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -0
- package/dist/Types.d.ts +38 -11
- package/dist/checkIfMultiple-CYp3vADF.js +912 -0
- package/dist/checkIfMultiple-CYp3vADF.js.map +1 -0
- package/dist/checkIfMultiple-Do4kADNr.cjs +12 -0
- package/dist/checkIfMultiple-Do4kADNr.cjs.map +1 -0
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.d.ts +7 -5
- package/dist/getSchema.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +330 -163
- package/dist/index.js +150 -136
- package/dist/index.js.map +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.d.ts +5 -5
- package/dist/transformData.js +2 -2
- package/dist/{transformDataForAggregation-DAQJWGNL.js → transformDataForAggregation-CdcwlnNe.js} +2 -2
- package/dist/transformDataForAggregation-CdcwlnNe.js.map +1 -0
- package/dist/{transformDataForAggregation-BUGJnson.cjs → transformDataForAggregation-Du-Hei-W.cjs} +2 -2
- package/dist/transformDataForAggregation-Du-Hei-W.cjs.map +1 -0
- package/dist/{transformDataForGraphFromFile-DdNiOWeC.js → transformDataForGraphFromFile-CA0rw80A.js} +2 -2
- package/dist/{transformDataForGraphFromFile-DdNiOWeC.js.map → transformDataForGraphFromFile-CA0rw80A.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CrntpaMU.cjs → transformDataForGraphFromFile-D9G3ToQf.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-CrntpaMU.cjs.map → transformDataForGraphFromFile-D9G3ToQf.cjs.map} +1 -1
- package/dist/transformDataForSelect-D8AuvYdf.js +14 -0
- package/dist/transformDataForSelect-D8AuvYdf.js.map +1 -0
- package/dist/transformDataForSelect-YmStusCI.cjs +2 -0
- package/dist/transformDataForSelect-YmStusCI.cjs.map +1 -0
- package/dist/validateSchema.d.ts +2 -4
- package/package.json +36 -1
- package/dist/checkIfMultiple-BB7PlCNh.js.map +0 -1
- package/dist/checkIfMultiple-D5ysrI7G.cjs +0 -12
- package/dist/checkIfMultiple-D5ysrI7G.cjs.map +0 -1
- package/dist/index-D9h2WYDS.cjs +0 -22
- package/dist/index-D9h2WYDS.cjs.map +0 -1
- package/dist/index-OCoyy1wG.js +0 -635
- package/dist/index-OCoyy1wG.js.map +0 -1
- package/dist/transformDataForAggregation-BUGJnson.cjs.map +0 -1
- package/dist/transformDataForAggregation-DAQJWGNL.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { GroupedBarGraph as e, SimpleBarGraph as
|
|
1
|
+
import { GroupedBarGraph as e, SimpleBarGraph as a, StackedBarGraph as t } from "./BarGraph.js";
|
|
2
2
|
import { C as p } from "./index-BVnYktl4.js";
|
|
3
3
|
import { DonutChart as h } from "./DonutChart.js";
|
|
4
|
-
import { DumbbellChart as
|
|
4
|
+
import { DumbbellChart as x } from "./DumbbellChart.js";
|
|
5
5
|
import { BeeSwarmChart as s } from "./BeeSwarmChart.js";
|
|
6
6
|
import { DualAxisLineChart as d } from "./DualAxisLineChart.js";
|
|
7
7
|
import { LineChartWithConfidenceInterval as S } from "./LineChartWithConfidenceInterval.js";
|
|
8
8
|
import { SimpleLineChart as c } from "./SimpleLineChart.js";
|
|
9
|
-
import { MultiLineChart as
|
|
10
|
-
import { MultiLineAltChart as
|
|
11
|
-
import { DifferenceLineChart as
|
|
9
|
+
import { MultiLineChart as G } from "./MultiLineChart.js";
|
|
10
|
+
import { MultiLineAltChart as b } from "./MultiLineAltChart.js";
|
|
11
|
+
import { DifferenceLineChart as M } from "./DifferenceLineChart.js";
|
|
12
12
|
import { SparkLine as B } from "./SparkLine.js";
|
|
13
|
-
import { BiVariateChoroplethMap as
|
|
14
|
-
import { ChoroplethMap as
|
|
15
|
-
import { DotDensityMap as
|
|
16
|
-
import { ThreeDGlobe as
|
|
17
|
-
import { GeoHubMap as
|
|
18
|
-
import { GeoHubCompareMaps as
|
|
19
|
-
import { GeoHubMapWithLayerSelection as
|
|
13
|
+
import { BiVariateChoroplethMap as P } from "./BiVariateChoroplethMap.js";
|
|
14
|
+
import { ChoroplethMap as A } from "./ChoroplethMap.js";
|
|
15
|
+
import { DotDensityMap as y } from "./DotDensityMap.js";
|
|
16
|
+
import { ThreeDGlobe as k } from "./ThreeDGlobe.js";
|
|
17
|
+
import { GeoHubMap as I } from "./GeoHubMap.js";
|
|
18
|
+
import { GeoHubCompareMaps as W } from "./GeoHubCompareMaps.js";
|
|
19
|
+
import { GeoHubMapWithLayerSelection as V } from "./GeoHubMapWithLayerSelection.js";
|
|
20
20
|
import { ScatterPlot as E } from "./ScatterPlot.js";
|
|
21
21
|
import { SlopeChart as q } from "./SlopeChart.js";
|
|
22
22
|
import { BulletChart as j } from "./BulletChart.js";
|
|
@@ -25,157 +25,171 @@ import { BasicStatCard as Y } from "./BasicStatCard.js";
|
|
|
25
25
|
import { StatCardFromData as _ } from "./StatCardFromData.js";
|
|
26
26
|
import { TreeMapGraph as rr } from "./TreeMapGraph.js";
|
|
27
27
|
import { UnitChart as er } from "./UnitChart.js";
|
|
28
|
-
import { HeatMap as
|
|
28
|
+
import { HeatMap as tr } from "./HeatMap.js";
|
|
29
29
|
import { DataTable as pr } from "./DataTable.js";
|
|
30
|
-
import {
|
|
31
|
-
import { StripChart as
|
|
30
|
+
import { DataCards as hr } from "./DataCards.js";
|
|
31
|
+
import { StripChart as xr } from "./StripChart.js";
|
|
32
32
|
import { ParetoChart as sr } from "./ParetoChart.js";
|
|
33
33
|
import { ButterflyChart as dr } from "./ButterflyChart.js";
|
|
34
34
|
import { Histogram as Sr } from "./Histogram.js";
|
|
35
35
|
import { SankeyChart as cr } from "./SankeyChart.js";
|
|
36
|
-
import { RadarChart as
|
|
37
|
-
import { MultiGraphDashboard as
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import { g as
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
36
|
+
import { RadarChart as Gr } from "./RadarChart.js";
|
|
37
|
+
import { MultiGraphDashboard as br } from "./MultiGraphDashboard.js";
|
|
38
|
+
import { PerformanceIntensiveMultiGraphDashboard as Mr } from "./PerformanceIntensiveMultiGraphDashboard.js";
|
|
39
|
+
import { MultiGraphDashboardWideToLongFormat as Br } from "./MultiGraphDashboardWideToLongFormat.js";
|
|
40
|
+
import { SingleGraphDashboard as Pr } from "./SingleGraphDashboard.js";
|
|
41
|
+
import { SingleGraphDashboardGeoHubMaps as Ar } from "./SingleGraphDashboardGeoHubMaps.js";
|
|
42
|
+
import { SingleGraphDashboardThreeDGraphs as yr } from "./SingleGraphDashboardThreeDGraphs.js";
|
|
43
|
+
import { GriddedGraphs as kr } from "./GriddedGraphs.js";
|
|
44
|
+
import { ScrollStory as Ir } from "./ScrollStory.js";
|
|
45
|
+
import { PerformanceIntensiveScrollStory as Wr } from "./PerformanceIntensiveScrollStory.js";
|
|
46
|
+
import { MultiGraphDashboardFromConfig as Vr } from "./MultiGraphDashboardFromConfig.js";
|
|
47
|
+
import { PerformanceIntensiveMultiGraphDashboardFromConfig as Er } from "./PerformanceIntensiveMultiGraphDashboardFromConfig.js";
|
|
48
|
+
import { MultiGraphDashboardWideToLongFormatFromConfig as qr } from "./MultiGraphDashboardWideToLongFormatFromConfig.js";
|
|
49
|
+
import { SingleGraphDashboardFromConfig as jr } from "./SingleGraphDashboardFromConfig.js";
|
|
50
|
+
import { SingleGraphDashboardGeoHubMapsFromConfig as Kr } from "./SingleGraphDashboardGeoHubMapsFromConfig.js";
|
|
51
|
+
import { SingleGraphDashboardThreeDGraphsFromConfig as Yr } from "./SingleGraphDashboardThreeDGraphsFromConfig.js";
|
|
52
|
+
import { GriddedGraphsFromConfig as _r } from "./GriddedGraphsFromConfig.js";
|
|
53
|
+
import { ExcelDownloadButton as ro } from "./ExcelDownloadButton.js";
|
|
54
|
+
import { ImageDownloadButton as eo } from "./ImageDownloadButton.js";
|
|
55
|
+
import { SVGDownloadButton as to } from "./SVGDownloadButton.js";
|
|
56
|
+
import { CsvDownloadButton as po } from "./CsvDownloadButton.js";
|
|
57
|
+
import { CopyTextButton as ho } from "./CopyTextButton.js";
|
|
58
|
+
import { Colors as xo } from "./Colors.js";
|
|
59
|
+
import { ColorLegend as so } from "./ColorLegend.js";
|
|
60
|
+
import { ColorLegendWithMouseOver as go } from "./ColorLegendWithMouseOver.js";
|
|
61
|
+
import { LinearColorLegend as Co } from "./LinearColorLegend.js";
|
|
62
|
+
import { ThresholdColorLegendWithMouseOver as Do } from "./ThresholdColorLegendWithMouseOver.js";
|
|
63
|
+
import { GraphFooter as uo } from "./GraphFooter.js";
|
|
64
|
+
import { GraphHeader as Fo } from "./GraphHeader.js";
|
|
65
|
+
import { FootNote as Lo } from "./FootNote.js";
|
|
66
|
+
import { GraphDescription as To } from "./GraphDescription.js";
|
|
67
|
+
import { GraphTitle as vo } from "./GraphTitle.js";
|
|
68
|
+
import { Source as Oo } from "./Source.js";
|
|
69
|
+
import { c as Ho } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
70
|
+
import { g as wo, a as Io, b as No, c as Wo, r as Jo } from "./removeOutliers-DR48e-18.js";
|
|
71
|
+
import { n as Uo } from "./numberFormattingFunction-14YCbkN2.js";
|
|
72
|
+
import { g as Ro } from "./getTextColorBasedOnBgColor-B6Nk2WBf.js";
|
|
73
|
+
import { g as Qo } from "./getJenks-VhM3GIoC.js";
|
|
74
|
+
import { i as zo } from "./imageDownload-Dcci2LEy.js";
|
|
75
|
+
import { s as Xo } from "./svgDownload-C2-E3yf2.js";
|
|
76
|
+
import { e as Zo } from "./excelDownload-BOA-lskf.js";
|
|
77
|
+
import { g as $o } from "./getUniqValue-BtUENB2H.js";
|
|
78
|
+
import { b as oe, d as ee, f as ae, c as te, a as me, t as pe } from "./fetchAndParseData-Bcmr659B.js";
|
|
79
|
+
import { t as he, a as ne } from "./transformDataForAggregation-CdcwlnNe.js";
|
|
80
|
+
import { t as ie } from "./transformDataForGraphFromFile-CA0rw80A.js";
|
|
81
|
+
import { validateConfigSchema as le, validateDataSchema as de, validateSettingsSchema as ge } from "./validateSchema.js";
|
|
82
|
+
import { getDashboardJSONSchema as Ce, getDashboardWideToLongFormatJSONSchema as ce, getDataFiltersSchema as De, getDataSchema as Ge, getDataSelectionSchema as ue, getDataSettingsSchema as be, getDataTransformSchema as Fe, getFiltersSchema as Me, getGraphDataConfigurationSchema as Le, getGriddedGraphJSONSchema as Be, getReadableHeaderSchema as Te, getSettingsSchema as Pe, getSingleGraphJSONSchema as ve } from "./getSchema.js";
|
|
83
|
+
import { g as Oe } from "./getGraphList-DuColTJM.js";
|
|
77
84
|
export {
|
|
78
85
|
K as AreaChart,
|
|
79
86
|
Y as BasicStatCard,
|
|
80
87
|
s as BeeSwarmChart,
|
|
81
|
-
|
|
88
|
+
P as BiVariateChoroplethMap,
|
|
82
89
|
j as BulletChart,
|
|
83
90
|
dr as ButterflyChart,
|
|
84
|
-
|
|
91
|
+
A as ChoroplethMap,
|
|
85
92
|
p as CirclePackingGraph,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
so as ColorLegend,
|
|
94
|
+
go as ColorLegendWithMouseOver,
|
|
95
|
+
xo as Colors,
|
|
96
|
+
ho as CopyTextButton,
|
|
97
|
+
po as CsvDownloadButton,
|
|
91
98
|
hr as DataCards,
|
|
92
99
|
pr as DataTable,
|
|
93
|
-
|
|
100
|
+
M as DifferenceLineChart,
|
|
94
101
|
h as DonutChart,
|
|
95
|
-
|
|
102
|
+
y as DotDensityMap,
|
|
96
103
|
d as DualAxisLineChart,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
x as DumbbellChart,
|
|
105
|
+
ro as ExcelDownloadButton,
|
|
106
|
+
Lo as FootNote,
|
|
107
|
+
W as GeoHubCompareMaps,
|
|
108
|
+
I as GeoHubMap,
|
|
109
|
+
V as GeoHubMapWithLayerSelection,
|
|
110
|
+
To as GraphDescription,
|
|
111
|
+
uo as GraphFooter,
|
|
112
|
+
Fo as GraphHeader,
|
|
113
|
+
vo as GraphTitle,
|
|
114
|
+
kr as GriddedGraphs,
|
|
115
|
+
_r as GriddedGraphsFromConfig,
|
|
109
116
|
e as GroupedBarGraph,
|
|
110
|
-
|
|
117
|
+
tr as HeatMap,
|
|
111
118
|
Sr as Histogram,
|
|
112
|
-
|
|
119
|
+
eo as ImageDownloadButton,
|
|
113
120
|
S as LineChartWithConfidenceInterval,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
Co as LinearColorLegend,
|
|
122
|
+
br as MultiGraphDashboard,
|
|
123
|
+
Vr as MultiGraphDashboardFromConfig,
|
|
124
|
+
Br as MultiGraphDashboardWideToLongFormat,
|
|
125
|
+
qr as MultiGraphDashboardWideToLongFormatFromConfig,
|
|
126
|
+
b as MultiLineAltChart,
|
|
127
|
+
G as MultiLineChart,
|
|
121
128
|
sr as ParetoChart,
|
|
122
|
-
|
|
123
|
-
|
|
129
|
+
Mr as PerformanceIntensiveMultiGraphDashboard,
|
|
130
|
+
Er as PerformanceIntensiveMultiGraphDashboardFromConfig,
|
|
131
|
+
Wr as PerformanceIntensiveScrollStory,
|
|
132
|
+
Gr as RadarChart,
|
|
133
|
+
to as SVGDownloadButton,
|
|
124
134
|
cr as SankeyChart,
|
|
125
135
|
E as ScatterPlot,
|
|
126
|
-
|
|
127
|
-
|
|
136
|
+
Ir as ScrollStory,
|
|
137
|
+
a as SimpleBarGraph,
|
|
128
138
|
c as SimpleLineChart,
|
|
129
|
-
|
|
130
|
-
|
|
139
|
+
Pr as SingleGraphDashboard,
|
|
140
|
+
jr as SingleGraphDashboardFromConfig,
|
|
141
|
+
Ar as SingleGraphDashboardGeoHubMaps,
|
|
142
|
+
Kr as SingleGraphDashboardGeoHubMapsFromConfig,
|
|
143
|
+
yr as SingleGraphDashboardThreeDGraphs,
|
|
144
|
+
Yr as SingleGraphDashboardThreeDGraphsFromConfig,
|
|
131
145
|
q as SlopeChart,
|
|
132
|
-
|
|
146
|
+
Oo as Source,
|
|
133
147
|
B as SparkLine,
|
|
134
|
-
|
|
148
|
+
t as StackedBarGraph,
|
|
135
149
|
_ as StatCardFromData,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
xr as StripChart,
|
|
151
|
+
k as ThreeDGlobe,
|
|
152
|
+
Do as ThresholdColorLegendWithMouseOver,
|
|
139
153
|
rr as TreeMapGraph,
|
|
140
154
|
er as UnitChart,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
155
|
+
Ho as checkIfNullOrUndefined,
|
|
156
|
+
Zo as excelDownload,
|
|
157
|
+
oe as fetchAndParseCSV,
|
|
158
|
+
ee as fetchAndParseCSVFromTextBlob,
|
|
159
|
+
ae as fetchAndParseJSON,
|
|
160
|
+
te as fetchAndParseMultipleDataSources,
|
|
161
|
+
me as fetchAndTransformDataFromAPI,
|
|
162
|
+
wo as generateEmbedLink,
|
|
163
|
+
Io as generateIframeCode,
|
|
164
|
+
Ce as getDashboardJSONSchema,
|
|
165
|
+
ce as getDashboardWideToLongFormatJSONSchema,
|
|
166
|
+
De as getDataFiltersSchema,
|
|
167
|
+
Ge as getDataSchema,
|
|
168
|
+
ue as getDataSelectionSchema,
|
|
169
|
+
be as getDataSettingsSchema,
|
|
170
|
+
Fe as getDataTransformSchema,
|
|
171
|
+
Me as getFiltersSchema,
|
|
172
|
+
Le as getGraphDataConfigurationSchema,
|
|
173
|
+
Be as getGriddedGraphJSONSchema,
|
|
174
|
+
Qo as getJenks,
|
|
175
|
+
No as getPercentileValue,
|
|
176
|
+
Wo as getQueryParamsFromLink,
|
|
177
|
+
Te as getReadableHeaderSchema,
|
|
178
|
+
Pe as getSettingsSchema,
|
|
179
|
+
ve as getSingleGraphJSONSchema,
|
|
180
|
+
Ro as getTextColorBasedOnBgColor,
|
|
181
|
+
$o as getUniqValue,
|
|
182
|
+
Oe as graphList,
|
|
183
|
+
zo as imageDownload,
|
|
184
|
+
Uo as numberFormattingFunction,
|
|
185
|
+
Jo as removeOutliers,
|
|
186
|
+
Xo as svgDownload,
|
|
187
|
+
pe as transformColumnsToArray,
|
|
188
|
+
he as transformDataForAggregation,
|
|
189
|
+
ne as transformDataForGraph,
|
|
190
|
+
ie as transformDataForGraphFromFile,
|
|
191
|
+
le as validateConfigSchema,
|
|
192
|
+
de as validateDataSchema,
|
|
193
|
+
ge as validateSettingsSchema
|
|
180
194
|
};
|
|
181
195
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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-Du-Hei-W.cjs"),a=require("./fetchAndParseData-DmgQtB9n.cjs"),o=require("./transformDataForGraphFromFile-D9G3ToQf.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.d.ts
CHANGED
|
@@ -18,16 +18,16 @@ declare interface FileSettingsDataType {
|
|
|
18
18
|
dataTransformation?: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
declare type GeoHubGraphType = 'geoHubCompareMap' | 'geoHubMap' | 'geoHubMapWithLayerSelection';
|
|
22
|
-
|
|
23
21
|
declare interface GraphConfigurationDataType {
|
|
24
22
|
columnId: string | string[];
|
|
25
23
|
chartConfigId: string;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
declare type GraphType = GraphTypeForGriddedGraph
|
|
26
|
+
declare type GraphType = GraphTypeForGriddedGraph;
|
|
27
|
+
|
|
28
|
+
declare type GraphTypeForGriddedGraph = 'barChart' | 'stackedBarChart' | 'groupedBarChart' | 'lineChart' | 'dualAxisLineChart' | 'multiLineChart' | 'multiLineAltChart' | 'differenceLineChart' | 'stackedAreaChart' | 'choroplethMap' | 'biVariateChoroplethMap' | 'dotDensityMap' | 'donutChart' | 'slopeChart' | 'scatterPlot' | 'dumbbellChart' | 'treeMap' | 'circlePacking' | 'heatMap' | 'stripChart' | 'beeSwarmChart' | 'butterflyChart' | 'histogram' | 'sparkLine' | 'paretoChart' | 'dataTable' | 'statCard' | 'unitChart' | 'sankeyChart' | 'lineChartWithConfidenceInterval' | 'dataCards' | 'radarChart' | 'bulletChart';
|
|
29
29
|
|
|
30
|
-
declare type
|
|
30
|
+
declare type ThreeDGraphType = 'threeDGlobe';
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Transforms specified columns of the CSV data into arrays, splitting the string values based on a delimiter.
|
|
@@ -126,7 +126,7 @@ export declare function transformDataForAggregation(data: any, keyColumn: string
|
|
|
126
126
|
* const transformedData = transformDataForGraph(graphData, graph, config);
|
|
127
127
|
* console.log(transformedData);
|
|
128
128
|
*/
|
|
129
|
-
export declare function transformDataForGraph(data: any, graph: GraphType, config?: GraphConfigurationDataType[]): any;
|
|
129
|
+
export declare function transformDataForGraph(data: any, graph: GraphType | ThreeDGraphType, config?: GraphConfigurationDataType[]): any;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* Fetches data from a given URL or multiple data sources, processes it according to the specified graph configuration,
|
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-CdcwlnNe.js";
|
|
2
2
|
import { t as s } from "./fetchAndParseData-Bcmr659B.js";
|
|
3
|
-
import { t as n } from "./transformDataForGraphFromFile-
|
|
3
|
+
import { t as n } from "./transformDataForGraphFromFile-CA0rw80A.js";
|
|
4
4
|
export {
|
|
5
5
|
s as transformColumnsToArray,
|
|
6
6
|
o as transformDataForAggregation,
|
package/dist/{transformDataForAggregation-DAQJWGNL.js → transformDataForAggregation-CdcwlnNe.js}
RENAMED
|
@@ -670,7 +670,7 @@ function I(a, l, d) {
|
|
|
670
670
|
isValid: !1,
|
|
671
671
|
err: `Key(s) in configuration that don't match keys in the data: ${u.join(
|
|
672
672
|
", "
|
|
673
|
-
)}. Possible reason: If you are using 'dataTransform' then the allowed keys (columns) are only the one present in 'aggregationColumnsSetting' array in 'dataTransform' object plus
|
|
673
|
+
)}. 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'.`
|
|
674
674
|
};
|
|
675
675
|
const n = a.map((e) => e.chartConfigId), t = c[c.findIndex((e) => e.chartID === l)].configuration.filter((e) => e.required).map((e) => e.id), i = q(n, t);
|
|
676
676
|
return {
|
|
@@ -756,4 +756,4 @@ export {
|
|
|
756
756
|
M as a,
|
|
757
757
|
v as t
|
|
758
758
|
};
|
|
759
|
-
//# sourceMappingURL=transformDataForAggregation-
|
|
759
|
+
//# sourceMappingURL=transformDataForAggregation-CdcwlnNe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformDataForAggregation-CdcwlnNe.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: '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 uniqBy from 'lodash.uniqby';\r\nimport sum from 'lodash.sum';\r\nimport flattenDeep from 'lodash.flattendeep';\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const uniqValues = uniqBy(data, (d: any) => d[keyColumn]).map(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const dataObj: any = {};\r\n dataObj[keyColumn] = d[keyColumn];\r\n const filteredData = data.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (j: any) => j[keyColumn] === d[keyColumn],\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 const values = uniqBy(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n flattenDeep(data.map((d: any) => d[keyColumn])),\r\n el => el,\r\n );\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","missingValuesInArray","superset","subset","value","checkDataConfigValidity","dataConfig","graph","dataKeys","dataKeyFromDataConfig","flattenDeep","d","checkDataKeys","ids","el","requiredIds","ifRequiredIdsPresent","transformDataForGraph","data","config","graphList","dataConfigValidity","chartConfig","obj","k","l","checkIfNullOrUndefined","transformDataForAggregation","keyColumn","aggregationSettings","uniqBy","dataObj","filteredData","j","sum"],"mappings":";;;;;AAEO,MAAMA,IAGP;AAAA,EACJ;AAAA,IACE,SAAS;AAAA,IACT,eAAe;AAAA,MACb;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,UAAU;AAAA,MAAA;AAAA,MAEZ;AAAA,QACE,IAAI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ACC,MAAWA,EAAEnB,EAAG,MAAM,CAAC,CAAC;AAAA,UACtDA,EAAG,sBAAsB;AAAA;AAAA,QAEvB,KAAK,IAAI,GAAGkB,EAAa,IAAI,CAACC,MAAWA,EAAEnB,EAAG,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,QAEtDoB,EAAIF,EAAa,IAAI,CAACC,MAAWA,EAAEnB,EAAG,MAAM,CAAC,CAAC;AAAA;AAAA,IAC1D,CAAC,GACMiB;AAAA,EACT,CAAC;AAEH;"}
|
package/dist/{transformDataForAggregation-BUGJnson.cjs → transformDataForAggregation-Du-Hei-W.cjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const h=require("./index-B0rbzOoC.cjs"),m=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),g=require("./getGraphList-gf02xgT2.cjs"),p=require("./index-CZbIGs8q.cjs"),f=require("./index-C21TvELx.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:"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 q(a,l){return l.filter(d=>!a.includes(d))}function I(a,l,d){const s=h.flattenDeep(a.map(e=>e.columnId)),u=q(d,s);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
|
|
2
|
-
//# sourceMappingURL=transformDataForAggregation-
|
|
1
|
+
"use strict";const h=require("./index-B0rbzOoC.cjs"),m=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),g=require("./getGraphList-gf02xgT2.cjs"),p=require("./index-CZbIGs8q.cjs"),f=require("./index-C21TvELx.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:"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 q(a,l){return l.filter(d=>!a.includes(d))}function I(a,l,d){const s=h.flattenDeep(a.map(e=>e.columnId)),u=q(d,s);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 n=a.map(e=>e.chartConfigId),t=c[c.findIndex(e=>e.chartID===l)].configuration.filter(e=>e.required).map(e=>e.id),i=q(n,t);return{isValid:i.length===0,err:i.length===0?void 0:`Missing required ID(s) in configuration: ${i.join(", ")}`}}function D(a,l,d){if(g.graphList.filter(u=>u.geoHubMapPresentation).map(u=>u.graphID).indexOf(l)!==-1)return a;if(!a)return"Cannot fetch data";if(l==="dataTable"||l==="dataCards"||a.length===0)return a;if(!d)return console.error("Your data configuration is not accurate"),"No graph configuration is provided";const s=I(d,l,Object.keys(a[0]));if(s.isValid){const u=c[c.findIndex(t=>t.chartID===l)].configuration;return a.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(o=>o.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(s.err),s.err}function b(a,l,d){return a.length===0?[]:typeof a[0][l]!="object"?p.uniqBy(a,t=>t[l]).map(t=>{const i={};i[l]=t[l];const e=a.filter(r=>r[l]===t[l]);return i.count=e.length,i.rollUpData=e,d?.forEach(r=>{i[r.column]=r.aggregationMethod==="average"?parseFloat((f.sum(e.map(o=>o[r.column]))/e.length).toFixed(2)):r.aggregationMethod==="max"?Math.max(...e.map(o=>o[r.column])):r.aggregationMethod==="min"?Math.min(...e.map(o=>o[r.column])):f.sum(e.map(o=>o[r.column]))}),i}):p.uniqBy(h.flattenDeep(a.map(n=>n[l])),n=>n).map(n=>{const t={};t[l]=n;const i=a.filter(e=>e[l].indexOf(n)!==-1);return t.rollUpData=i,t.count=i.length,d?.forEach(e=>{t[e.column]=e.aggregationMethod==="average"?parseFloat((f.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])):f.sum(i.map(r=>r[e.column]))}),t})}exports.transformDataForAggregation=b;exports.transformDataForGraph=D;
|
|
2
|
+
//# sourceMappingURL=transformDataForAggregation-Du-Hei-W.cjs.map
|