@undp/data-viz 2.1.2 → 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.js +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +223 -223
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +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/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +1 -1
- package/dist/{GraphEl-YKUlz-37.cjs → GraphEl-BLMih7RN.cjs} +2 -2
- package/dist/GraphEl-BLMih7RN.cjs.map +1 -0
- package/dist/{GraphEl-sVZvlyWe.js → GraphEl-CRrAlbcr.js} +4 -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 +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- 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.js +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 +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.js +2 -2
- package/dist/Types.d.ts +1 -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-DS7gCvVd.js → ensureCompleteData-DH5c52Ub.js} +6 -6
- package/dist/{ensureCompleteData-DS7gCvVd.js.map → ensureCompleteData-DH5c52Ub.js.map} +1 -1
- package/dist/{ensureCompleteData-Oib-vGb0.cjs → ensureCompleteData-pZ9QO6kB.cjs} +2 -2
- package/dist/{ensureCompleteData-Oib-vGb0.cjs.map → ensureCompleteData-pZ9QO6kB.cjs.map} +1 -1
- package/dist/index.d.ts +5 -0
- 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/package.json +1 -1
- package/dist/GraphEl-YKUlz-37.cjs.map +0 -1
- package/dist/GraphEl-sVZvlyWe.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/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
|
@@ -36,7 +36,7 @@ function h(o, s) {
|
|
|
36
36
|
});
|
|
37
37
|
}), m(n, [(e) => c(`${e.date}`, s || "yyyy", /* @__PURE__ */ new Date())], ["asc"]);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function y(o, s) {
|
|
40
40
|
const l = Array.from(new Set(o.map((e) => e.label))), r = Array.from(new Set(o.map((e) => e.date))).filter((e) => e !== void 0);
|
|
41
41
|
if (r.length === 0) return o;
|
|
42
42
|
const i = new Set(
|
|
@@ -54,7 +54,7 @@ function $(o, s) {
|
|
|
54
54
|
});
|
|
55
55
|
}), m(n, [(e) => c(`${e.date}`, s, /* @__PURE__ */ new Date())], ["asc"]);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function $(o, s) {
|
|
58
58
|
const l = Array.from(new Set(o.map((t) => t.label))), r = Array.from(new Set(o.map((t) => t.date))).filter((t) => t !== void 0);
|
|
59
59
|
if (r.length === 0) return o;
|
|
60
60
|
const i = new Set(
|
|
@@ -109,14 +109,14 @@ function b(o, s) {
|
|
|
109
109
|
date: t
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
|
-
}), m(n, [(e) => c(`${e.date}`, s, /* @__PURE__ */ new Date())], ["asc"]);
|
|
112
|
+
}), m(n, [(e) => c(`${e.date}`, s || "yyyy", /* @__PURE__ */ new Date())], ["asc"]);
|
|
113
113
|
}
|
|
114
114
|
export {
|
|
115
|
-
|
|
115
|
+
$ as a,
|
|
116
116
|
b,
|
|
117
|
-
|
|
117
|
+
y as c,
|
|
118
118
|
h as d,
|
|
119
119
|
w as e,
|
|
120
120
|
u as f
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=ensureCompleteData-
|
|
122
|
+
//# sourceMappingURL=ensureCompleteData-DH5c52Ub.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensureCompleteData-DS7gCvVd.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 BulletChartDataType,\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\r\nexport function ensureCompleteDataForBulletChart(data: BulletChartDataType[], 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 // 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: null,\r\n target: null,\r\n qualitativeRange: 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","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CACD;AAAA,IAEL,CAAC;AAAA,EACH,CAAC,GAEMe,EACLL,GACA,CAACb,OAAKmB,EAAM,GAAGnB,EAAEG,IAAI,IAAIT,KAAc,4BAAY0B,KAAAA,CAAM,CAAC,GAC1D,CAAC,KAAK,CACR;AACF;AAEO,SAASW,EAAiCtC,GAA6BC,GAAoB;AAEhG,QAAMC,IAASC,MAAMC,KAAK,IAAIC,IAAIL,EAAKM,IAAIC,CAAAA,MAAKA,EAAEC,KAAK,CAAC,CAAC,GACnDC,IAAQN,MAAMC,KAAK,IAAIC,IAAIL,EAAKM,IAAIC,CAAAA,MAAKA,EAAEG,IAAI,CAAC,CAAC,EAAEC,OAAOJ,CAAAA,MAAKA,MAAMK,MAAS;AACpF,MAAIH,EAAMI,WAAW,EAAG,QAAOb;AAG/B,QAAMc,IAAuB,IAAIT;AAAAA;AAAAA,IAE/BL,EAAKM,IAAI,CAACC,MAAW,GAAGA,EAAEC,KAAK,IAAID,EAAEG,IAAI,EAAE;AAAA,EAAA,GAIvCU,IAAe,CAAC,GAAGpB,CAAI;AAE7BE,SAAAA,EAAOmB,QAAQb,CAAAA,MAAS;AACtBC,IAAAA,EAAMY,QAAQX,CAAAA,MAAQ;AACpB,MAAKI,EAAqBQ,IAAI,GAAGd,CAAK,IAAIE,CAAI,EAAE,KAC9CU,EAAaG,KAAK;AAAA,QAChBf,OAAAA;AAAAA,QACAgB,MAAM;AAAA,QACNe,QAAQ;AAAA,QACRC,kBAAkB;AAAA,QAClB9B,MAAAA;AAAAA,MAAAA,CACD;AAAA,IAEL,CAAC;AAAA,EACH,CAAC,GAEMe,EACLL,GACA,CAACb,OAAKmB,EAAM,GAAGnB,EAAEG,IAAI,IAAIT,uBAA0B0B,KAAAA,CAAM,CAAC,GAC1D,CAAC,KAAK,CACR;AACF;"}
|
|
1
|
+
{"version":3,"file":"ensureCompleteData-DH5c52Ub.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 BulletChartDataType,\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\r\nexport function ensureCompleteDataForBulletChart(data: BulletChartDataType[], 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 // 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: null,\r\n target: null,\r\n qualitativeRange: 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","ensureCompleteDataForBulletChart","target","qualitativeRange"],"mappings":";;AAYO,SAASA,EAA8BC,GAA0BC,GAAoB;AAE1F,QAAMC,IAASC,MAAMC,KAAK,IAAIC,IAAIL,EAAKM,IAAIC,CAAAA,MAAKA,EAAEC,KAAK,CAAC,CAAC,GACnDC,IAAQN,MAAMC,KAAK,IAAIC,IAAIL,EAAKM,IAAIC,CAAAA,MAAKA,EAAEG,IAAI,CAAC,CAAC,EAAEC,OAAOJ,CAAAA,MAAKA,MAAMK,MAAS;AACpF,MAAIH,EAAMI,WAAW,EAAG,QAAOb;AAG/B,QAAMc,IAAuB,IAAIT;AAAAA;AAAAA,IAE/BL,EAAKM,IAAI,CAACC,MAAW,GAAGA,EAAEC,KAAK,IAAID,EAAEG,IAAI,EAAE;AAAA,EAAA,GAIvCK,IAASf,EAAKgB,OAAO,CAACC,GAAUC,OAC/BD,EAAIC,EAAKV,KAAK,MACjBS,EAAIC,EAAKV,KAAK,IAAIU,EAAKC,Q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,CAAC,GAAGpB,CAAI;AAE7BE,SAAAA,EAAOmB,QAAQb,CAAAA,MAAS;AACtBC,IAAAA,EAAMY,QAAQX,CAAAA,MAAQ;AACpB,MAAKI,EAAqBQ,IAAI,GAAGd,CAAK,IAAIE,CAAI,EAAE,KAC9CU,EAAaG,KAAK;AAAA,QAChBf,OAAAA;AAAAA,QACAgB,MAAM;AAAA,QACNe,QAAQ;AAAA,QACRC,kBAAkB;AAAA,QAClB9B,MAAAA;AAAAA,MAAAA,CACD;AAAA,IAEL,CAAC;AAAA,EACH,CAAC,GAEMe,EACLL,GACA,CAACb,OAAKmB,EAAM,GAAGnB,EAAEG,IAAI,IAAIT,KAAc,4BAAY0B,KAAAA,CAAM,CAAC,GAC1D,CAAC,KAAK,CACR;AACF;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const c=require("./parse-hMnG_lRV.cjs"),m=require("./index-Cno4Q0YE.cjs");function u(r,s){const l=Array.from(new Set(r.map(t=>t.label))),o=Array.from(new Set(r.map(t=>t.date))).filter(t=>t!==void 0);if(o.length===0)return r;const i=new Set(r.map(t=>`${t.label}-${t.date}`)),n=r.reduce((t,a)=>(t[a.label]||(t[a.label]=a.color),t),{}),e=[...r];return l.forEach(t=>{o.forEach(a=>{i.has(`${t}-${a}`)||e.push({label:t,color:n[t],size:void 0,date:a})})}),m.orderBy(e,[t=>c.parse(`${t.date}`,s||"yyyy",new Date)],["asc"])}function f(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,size:r[0].size.map(a=>null),date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s||"yyyy",new Date)],["asc"])}function p(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,leftBar:void 0,rightBar:void 0,date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s,new Date)],["asc"])}function h(r,s){const l=Array.from(new Set(r.map(t=>t.label))),o=Array.from(new Set(r.map(t=>t.date))).filter(t=>t!==void 0);if(o.length===0)return r;const i=new Set(r.map(t=>`${t.label}-${t.date}`)),n=r.reduce((t,a)=>(t[a.label]||(t[a.label]=a.color),t),{}),e=[...r];return l.forEach(t=>{o.forEach(a=>{i.has(`${t}-${a}`)||e.push({label:t,color:n[t],x:void 0,y:void 0,radius:void 0,date:a})})}),m.orderBy(e,[t=>c.parse(`${t.date}`,s,new Date)],["asc"])}function y(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,x:r[0].x.map(a=>null),date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s||"yyyy",new Date)],["asc"])}function $(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,size:null,target:null,qualitativeRange:null,date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s,new Date)],["asc"])}exports.ensureCompleteDataForBarChart=u;exports.ensureCompleteDataForBulletChart=$;exports.ensureCompleteDataForButterFlyChart=p;exports.ensureCompleteDataForDumbbellChart=y;exports.ensureCompleteDataForScatterPlot=h;exports.ensureCompleteDataForStackedBarChart=f;
|
|
2
|
-
//# sourceMappingURL=ensureCompleteData-
|
|
1
|
+
"use strict";const c=require("./parse-hMnG_lRV.cjs"),m=require("./index-Cno4Q0YE.cjs");function u(r,s){const l=Array.from(new Set(r.map(t=>t.label))),o=Array.from(new Set(r.map(t=>t.date))).filter(t=>t!==void 0);if(o.length===0)return r;const i=new Set(r.map(t=>`${t.label}-${t.date}`)),n=r.reduce((t,a)=>(t[a.label]||(t[a.label]=a.color),t),{}),e=[...r];return l.forEach(t=>{o.forEach(a=>{i.has(`${t}-${a}`)||e.push({label:t,color:n[t],size:void 0,date:a})})}),m.orderBy(e,[t=>c.parse(`${t.date}`,s||"yyyy",new Date)],["asc"])}function f(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,size:r[0].size.map(a=>null),date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s||"yyyy",new Date)],["asc"])}function p(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,leftBar:void 0,rightBar:void 0,date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s,new Date)],["asc"])}function h(r,s){const l=Array.from(new Set(r.map(t=>t.label))),o=Array.from(new Set(r.map(t=>t.date))).filter(t=>t!==void 0);if(o.length===0)return r;const i=new Set(r.map(t=>`${t.label}-${t.date}`)),n=r.reduce((t,a)=>(t[a.label]||(t[a.label]=a.color),t),{}),e=[...r];return l.forEach(t=>{o.forEach(a=>{i.has(`${t}-${a}`)||e.push({label:t,color:n[t],x:void 0,y:void 0,radius:void 0,date:a})})}),m.orderBy(e,[t=>c.parse(`${t.date}`,s,new Date)],["asc"])}function y(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,x:r[0].x.map(a=>null),date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s||"yyyy",new Date)],["asc"])}function $(r,s){const l=Array.from(new Set(r.map(e=>e.label))),o=Array.from(new Set(r.map(e=>e.date))).filter(e=>e!==void 0);if(o.length===0)return r;const i=new Set(r.map(e=>`${e.label}-${e.date}`)),n=[...r];return l.forEach(e=>{o.forEach(t=>{i.has(`${e}-${t}`)||n.push({label:e,size:null,target:null,qualitativeRange:null,date:t})})}),m.orderBy(n,[e=>c.parse(`${e.date}`,s||"yyyy",new Date)],["asc"])}exports.ensureCompleteDataForBarChart=u;exports.ensureCompleteDataForBulletChart=$;exports.ensureCompleteDataForButterFlyChart=p;exports.ensureCompleteDataForDumbbellChart=y;exports.ensureCompleteDataForScatterPlot=h;exports.ensureCompleteDataForStackedBarChart=f;
|
|
2
|
+
//# sourceMappingURL=ensureCompleteData-pZ9QO6kB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensureCompleteData-Oib-vGb0.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 BulletChartDataType,\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\r\nexport function ensureCompleteDataForBulletChart(data: BulletChartDataType[], 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 // 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: null,\r\n target: null,\r\n qualitativeRange: 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","ensureCompleteDataForBulletChart","target","qualitativeRange"],"mappings":"uFAYO,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,EAAKC,OAElBF,GACN,CAAA,CAAE,EAGCG,EAAe,CAAC,GAAGpB,CAAI,EAE7BE,OAAAA,EAAOmB,QAAQb,GAAS,CACtBC,EAAMY,QAAQX,GAAQ,CACfI,EAAqBQ,IAAI,GAAGd,CAAK,IAAIE,CAAI,EAAE,GAC9CU,EAAaG,KAAK,CAChBf,MAAAA,EACAW,MAAOJ,EAAOP,CAAK,EACnBgB,KAAMZ,OACNF,KAAAA,CAAAA,CACD,CAEL,CAAC,CACH,CAAC,EAEMe,EAAAA,QACLL,EACA,IAAMM,EAAAA,MAAM,GAAGn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KA,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,EAIvCU,EAAe,CAAC,GAAGpB,CAAI,EAE7BE,OAAAA,EAAOmB,QAAQb,GAAS,CACtBC,EAAMY,QAAQX,GAAQ,CACfI,EAAqBQ,IAAI,GAAGd,CAAK,IAAIE,CAAI,EAAE,GAC9CU,EAAaG,KAAK,CAChBf,MAAAA,EACAgB,KAAM,KACNc,OAAQ,KACRC,iBAAkB,KAClB7B,KAAAA,CAAAA,CACD,CAEL,CAAC,CACH,CAAC,EAEMe,EAAAA,QACLL,EACA,IAAMM,EAAAA,MAAM,GAAGnB,EAAEG,IAAI,GAAIT,MAA0B0B,IAAM,CAAC,EAC1D,CAAC,KAAK,CACR,CACF"}
|
|
1
|
+
{"version":3,"file":"ensureCompleteData-pZ9QO6kB.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 BulletChartDataType,\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\r\nexport function ensureCompleteDataForBulletChart(data: BulletChartDataType[], 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 // 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: null,\r\n target: null,\r\n qualitativeRange: 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","ensureCompleteDataForBulletChart","target","qualitativeRange"],"mappings":"uFAYO,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,EAAKC,OAElBF,GACN,CAAA,CAAE,EAGCG,EAAe,CAAC,GAAGpB,CAAI,EAE7BE,OAAAA,EAAOmB,QAAQb,GAAS,CACtBC,EAAMY,QAAQX,GAAQ,CACfI,EAAqBQ,IAAI,GAAGd,CAAK,IAAIE,CAAI,EAAE,GAC9CU,EAAaG,KAAK,CAChBf,MAAAA,EACAW,MAAOJ,EAAOP,CAAK,EACnBgB,KAAMZ,OACNF,KAAAA,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,CAEO,SAASC,EACd5B,EACAC,EACA,CAEA,MAAMC,EAASC,MAAMC,KAAK,IAAIC,IAAIL,EAAKM,IAAIC,GAAKA,EAAE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,IAAID,EAAEG,IAAI,EAAE,CAAA,EAIvCU,EAAe,CAAC,GAAGpB,CAAI,EAE7BE,OAAAA,EAAOmB,QAAQb,GAAS,CACtBC,EAAMY,QAAQX,GAAQ,CACfI,EAAqBQ,IAAI,GAAGd,CAAK,IAAIE,CAAI,EAAE,GAC9CU,EAAaG,KAAK,CAChBf,MAAAA,EACAgB,KAAM,KACNc,OAAQ,KACRC,iBAAkB,KAClB7B,KAAAA,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/index.d.ts
CHANGED
|
@@ -4325,6 +4325,7 @@ declare interface GraphSettingsDataType {
|
|
|
4325
4325
|
dotBorderColor?: string;
|
|
4326
4326
|
mapColorLegendTitle?: string;
|
|
4327
4327
|
choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;
|
|
4328
|
+
trackColor?: string;
|
|
4328
4329
|
}
|
|
4329
4330
|
|
|
4330
4331
|
export declare function GraphTitle(props: Props_67): JSX.Element | null;
|
|
@@ -6652,6 +6653,8 @@ declare interface Props_3 {
|
|
|
6652
6653
|
strokeWidth?: number;
|
|
6653
6654
|
/** Sorting order for data. This is overwritten by labelOrder prop */
|
|
6654
6655
|
sortData?: 'asc' | 'desc';
|
|
6656
|
+
/** Toggles if the graph animates in when loaded. */
|
|
6657
|
+
animate?: boolean | AnimateDataType;
|
|
6655
6658
|
/** Large text at the center of the donut chart. If the type is an object then the text is the value in the data for the label mentioned in the object */
|
|
6656
6659
|
mainText?: string | {
|
|
6657
6660
|
label: string;
|
|
@@ -6662,6 +6665,8 @@ declare interface Props_3 {
|
|
|
6662
6665
|
subNote?: string;
|
|
6663
6666
|
/** Specifies the number of decimal places to display in the value. */
|
|
6664
6667
|
precision?: number;
|
|
6668
|
+
/** Track color (i.e. the color of the donut chart's background) of the donut chart */
|
|
6669
|
+
trackColor?: string;
|
|
6665
6670
|
/** Enable graph download option as png */
|
|
6666
6671
|
graphDownload?: boolean;
|
|
6667
6672
|
/** Enable data download option as a csv */
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { c as d, a as P } from "./array-USo-Szhp.js";
|
|
2
|
+
const g = Math.PI, v = 2 * g, c = 1e-6, A = v - c;
|
|
3
|
+
function E(e) {
|
|
4
|
+
this._ += e[0];
|
|
5
|
+
for (let t = 1, i = e.length; t < i; ++t)
|
|
6
|
+
this._ += arguments[t] + e[t];
|
|
7
|
+
}
|
|
8
|
+
function S(e) {
|
|
9
|
+
let t = Math.floor(e);
|
|
10
|
+
if (!(t >= 0)) throw new Error(`invalid digits: ${e}`);
|
|
11
|
+
if (t > 15) return E;
|
|
12
|
+
const i = 10 ** t;
|
|
13
|
+
return function(n) {
|
|
14
|
+
this._ += n[0];
|
|
15
|
+
for (let h = 1, o = n.length; h < o; ++h)
|
|
16
|
+
this._ += Math.round(arguments[h] * i) / i + n[h];
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
class k {
|
|
20
|
+
constructor(t) {
|
|
21
|
+
this._x0 = this._y0 = // start of current subpath
|
|
22
|
+
this._x1 = this._y1 = null, this._ = "", this._append = t == null ? E : S(t);
|
|
23
|
+
}
|
|
24
|
+
moveTo(t, i) {
|
|
25
|
+
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}`;
|
|
26
|
+
}
|
|
27
|
+
closePath() {
|
|
28
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
29
|
+
}
|
|
30
|
+
lineTo(t, i) {
|
|
31
|
+
this._append`L${this._x1 = +t},${this._y1 = +i}`;
|
|
32
|
+
}
|
|
33
|
+
quadraticCurveTo(t, i, n, h) {
|
|
34
|
+
this._append`Q${+t},${+i},${this._x1 = +n},${this._y1 = +h}`;
|
|
35
|
+
}
|
|
36
|
+
bezierCurveTo(t, i, n, h, o, f) {
|
|
37
|
+
this._append`C${+t},${+i},${+n},${+h},${this._x1 = +o},${this._y1 = +f}`;
|
|
38
|
+
}
|
|
39
|
+
arcTo(t, i, n, h, o) {
|
|
40
|
+
if (t = +t, i = +i, n = +n, h = +h, o = +o, o < 0) throw new Error(`negative radius: ${o}`);
|
|
41
|
+
let f = this._x1, l = this._y1, s = n - t, u = h - i, r = f - t, _ = l - i, a = r * r + _ * _;
|
|
42
|
+
if (this._x1 === null)
|
|
43
|
+
this._append`M${this._x1 = t},${this._y1 = i}`;
|
|
44
|
+
else if (a > c) if (!(Math.abs(_ * s - u * r) > c) || !o)
|
|
45
|
+
this._append`L${this._x1 = t},${this._y1 = i}`;
|
|
46
|
+
else {
|
|
47
|
+
let p = n - f, $ = h - l, m = s * s + u * u, L = p * p + $ * $, x = Math.sqrt(m), w = Math.sqrt(a), b = o * Math.tan((g - Math.acos((m + a - L) / (2 * x * w))) / 2), M = b / w, y = b / x;
|
|
48
|
+
Math.abs(M - 1) > c && this._append`L${t + M * r},${i + M * _}`, this._append`A${o},${o},0,0,${+(_ * p > r * $)},${this._x1 = t + y * s},${this._y1 = i + y * u}`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
arc(t, i, n, h, o, f) {
|
|
52
|
+
if (t = +t, i = +i, n = +n, f = !!f, n < 0) throw new Error(`negative radius: ${n}`);
|
|
53
|
+
let l = n * Math.cos(h), s = n * Math.sin(h), u = t + l, r = i + s, _ = 1 ^ f, a = f ? h - o : o - h;
|
|
54
|
+
this._x1 === null ? this._append`M${u},${r}` : (Math.abs(this._x1 - u) > c || Math.abs(this._y1 - r) > c) && this._append`L${u},${r}`, n && (a < 0 && (a = a % v + v), a > A ? this._append`A${n},${n},0,1,${_},${t - l},${i - s}A${n},${n},0,1,${_},${this._x1 = u},${this._y1 = r}` : a > c && this._append`A${n},${n},0,${+(a >= g)},${_},${this._x1 = t + n * Math.cos(o)},${this._y1 = i + n * Math.sin(o)}`);
|
|
55
|
+
}
|
|
56
|
+
rect(t, i, n, h) {
|
|
57
|
+
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}h${n = +n}v${+h}h${-n}Z`;
|
|
58
|
+
}
|
|
59
|
+
toString() {
|
|
60
|
+
return this._;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function q(e) {
|
|
64
|
+
let t = 3;
|
|
65
|
+
return e.digits = function(i) {
|
|
66
|
+
if (!arguments.length) return t;
|
|
67
|
+
if (i == null)
|
|
68
|
+
t = null;
|
|
69
|
+
else {
|
|
70
|
+
const n = Math.floor(i);
|
|
71
|
+
if (!(n >= 0)) throw new RangeError(`invalid digits: ${i}`);
|
|
72
|
+
t = n;
|
|
73
|
+
}
|
|
74
|
+
return e;
|
|
75
|
+
}, () => new k(t);
|
|
76
|
+
}
|
|
77
|
+
function T(e) {
|
|
78
|
+
this._context = e;
|
|
79
|
+
}
|
|
80
|
+
T.prototype = {
|
|
81
|
+
areaStart: function() {
|
|
82
|
+
this._line = 0;
|
|
83
|
+
},
|
|
84
|
+
areaEnd: function() {
|
|
85
|
+
this._line = NaN;
|
|
86
|
+
},
|
|
87
|
+
lineStart: function() {
|
|
88
|
+
this._point = 0;
|
|
89
|
+
},
|
|
90
|
+
lineEnd: function() {
|
|
91
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
92
|
+
},
|
|
93
|
+
point: function(e, t) {
|
|
94
|
+
switch (e = +e, t = +t, this._point) {
|
|
95
|
+
case 0:
|
|
96
|
+
this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
|
|
97
|
+
break;
|
|
98
|
+
case 1:
|
|
99
|
+
this._point = 2;
|
|
100
|
+
// falls through
|
|
101
|
+
default:
|
|
102
|
+
this._context.lineTo(e, t);
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
function C(e) {
|
|
108
|
+
return new T(e);
|
|
109
|
+
}
|
|
110
|
+
function N(e) {
|
|
111
|
+
return e[0];
|
|
112
|
+
}
|
|
113
|
+
function R(e) {
|
|
114
|
+
return e[1];
|
|
115
|
+
}
|
|
116
|
+
function z(e, t) {
|
|
117
|
+
var i = d(!0), n = null, h = C, o = null, f = q(l);
|
|
118
|
+
e = typeof e == "function" ? e : e === void 0 ? N : d(e), t = typeof t == "function" ? t : t === void 0 ? R : d(t);
|
|
119
|
+
function l(s) {
|
|
120
|
+
var u, r = (s = P(s)).length, _, a = !1, p;
|
|
121
|
+
for (n == null && (o = h(p = f())), u = 0; u <= r; ++u)
|
|
122
|
+
!(u < r && i(_ = s[u], u, s)) === a && ((a = !a) ? o.lineStart() : o.lineEnd()), a && o.point(+e(_, u, s), +t(_, u, s));
|
|
123
|
+
if (p) return o = null, p + "" || null;
|
|
124
|
+
}
|
|
125
|
+
return l.x = function(s) {
|
|
126
|
+
return arguments.length ? (e = typeof s == "function" ? s : d(+s), l) : e;
|
|
127
|
+
}, l.y = function(s) {
|
|
128
|
+
return arguments.length ? (t = typeof s == "function" ? s : d(+s), l) : t;
|
|
129
|
+
}, l.defined = function(s) {
|
|
130
|
+
return arguments.length ? (i = typeof s == "function" ? s : d(!!s), l) : i;
|
|
131
|
+
}, l.curve = function(s) {
|
|
132
|
+
return arguments.length ? (h = s, n != null && (o = h(n)), l) : h;
|
|
133
|
+
}, l.context = function(s) {
|
|
134
|
+
return arguments.length ? (s == null ? n = o = null : o = h(n = s), l) : n;
|
|
135
|
+
}, l;
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
C as c,
|
|
139
|
+
z as l,
|
|
140
|
+
q as w,
|
|
141
|
+
N as x,
|
|
142
|
+
R as y
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=line-DFlZsxI1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-DFlZsxI1.js","sources":["../node_modules/d3-path/src/path.js","../node_modules/d3-shape/src/path.js","../node_modules/d3-shape/src/curve/linear.js","../node_modules/d3-shape/src/point.js","../node_modules/d3-shape/src/line.js"],"sourcesContent":["const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","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":["pi","tau","epsilon","tauEpsilon","append","strings","i","n","appendRound","digits","d","k","Path","x","y","x1","y1","x2","y2","r","x0","y0","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","l","t01","t21","a0","a1","ccw","dx","dy","cw","da","w","withPath","shape","_","Linear","context","curveLinear","p","line","defined","constant","curve","output","path","pointX","pointY","data","array","defined0","buffer"],"mappings":";AAAA,MAAMA,IAAK,KAAK,IACZC,IAAM,IAAID,GACVE,IAAU,MACVC,IAAaF,IAAMC;AAEvB,SAASE,EAAOC,GAAS;AACvB,OAAK,KAAKA,EAAQ,CAAC;AACnB,WAASC,IAAI,GAAGC,IAAIF,EAAQ,QAAQC,IAAIC,GAAG,EAAED;A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C;AAG3D,QAAIG,EAAQ,QAAOP,IAAS,MAAMO,IAAS,MAAM;AAAA,EACnD;AAEA,SAAAX,EAAK,IAAI,SAASL,GAAG;AACnB,WAAO,UAAU,UAAUjC,IAAI,OAAOiC,KAAM,aAAaA,IAAIO,EAAS,CAACP,CAAC,GAAGK,KAAQtC;AAAAA,EACrF,GAEAsC,EAAK,IAAI,SAASL,GAAG;AACnB,WAAO,UAAU,UAAUhC,IAAI,OAAOgC,KAAM,aAAaA,IAAIO,EAAS,CAACP,CAAC,GAAGK,KAAQrC;AAAAA,EACrF,GAEAqC,EAAK,UAAU,SAASL,GAAG;AACzB,WAAO,UAAU,UAAUM,IAAU,OAAON,KAAM,aAAaA,IAAIO,EAAS,CAAC,CAACP,CAAC,GAAGK,KAAQC;AAAA,EAC5F,GAEAD,EAAK,QAAQ,SAASL,GAAG;AACvB,WAAO,UAAU,UAAUQ,IAAQR,GAAGE,KAAW,SAASO,IAASD,EAAMN,CAAO,IAAIG,KAAQG;AAAA,EAC9F,GAEAH,EAAK,UAAU,SAASL,GAAG;AACzB,WAAO,UAAU,UAAUA,KAAK,OAAOE,IAAUO,IAAS,OAAOA,IAASD,EAAMN,IAAUF,CAAC,GAAGK,KAAQH;AAAA,EACxG,GAEOG;AACT;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const p=require("./array-DMyR1sql.cjs"),g=Math.PI,v=2*g,d=1e-6,k=v-d;function E(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function C(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return E;const i=10**t;return function(n){this._+=n[0];for(let h=1,o=n.length;h<o;++h)this._+=Math.round(arguments[h]*i)/i+n[h]}}class N{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?E:C(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,n,h){this._append`Q${+t},${+i},${this._x1=+n},${this._y1=+h}`}bezierCurveTo(t,i,n,h,o,f){this._append`C${+t},${+i},${+n},${+h},${this._x1=+o},${this._y1=+f}`}arcTo(t,i,n,h,o){if(t=+t,i=+i,n=+n,h=+h,o=+o,o<0)throw new Error(`negative radius: ${o}`);let f=this._x1,u=this._y1,s=n-t,l=h-i,r=f-t,_=u-i,a=r*r+_*_;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if(a>d)if(!(Math.abs(_*s-l*r)>d)||!o)this._append`L${this._x1=t},${this._y1=i}`;else{let c=n-f,$=h-u,x=s*s+l*l,S=c*c+$*$,m=Math.sqrt(x),y=Math.sqrt(a),w=o*Math.tan((g-Math.acos((x+a-S)/(2*m*y)))/2),M=w/y,b=w/m;Math.abs(M-1)>d&&this._append`L${t+M*r},${i+M*_}`,this._append`A${o},${o},0,0,${+(_*c>r*$)},${this._x1=t+b*s},${this._y1=i+b*l}`}}arc(t,i,n,h,o,f){if(t=+t,i=+i,n=+n,f=!!f,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(h),s=n*Math.sin(h),l=t+u,r=i+s,_=1^f,a=f?h-o:o-h;this._x1===null?this._append`M${l},${r}`:(Math.abs(this._x1-l)>d||Math.abs(this._y1-r)>d)&&this._append`L${l},${r}`,n&&(a<0&&(a=a%v+v),a>k?this._append`A${n},${n},0,1,${_},${t-u},${i-s}A${n},${n},0,1,${_},${this._x1=l},${this._y1=r}`:a>d&&this._append`A${n},${n},0,${+(a>=g)},${_},${this._x1=t+n*Math.cos(o)},${this._y1=i+n*Math.sin(o)}`)}rect(t,i,n,h){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${n=+n}v${+h}h${-n}Z`}toString(){return this._}}function T(e){let t=3;return e.digits=function(i){if(!arguments.length)return t;if(i==null)t=null;else{const n=Math.floor(i);if(!(n>=0))throw new RangeError(`invalid digits: ${i}`);t=n}return e},()=>new N(t)}function L(e){this._context=e}L.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function P(e){return new L(e)}function q(e){return e[0]}function A(e){return e[1]}function R(e,t){var i=p.constant(!0),n=null,h=P,o=null,f=T(u);e=typeof e=="function"?e:e===void 0?q:p.constant(e),t=typeof t=="function"?t:t===void 0?A:p.constant(t);function u(s){var l,r=(s=p.array(s)).length,_,a=!1,c;for(n==null&&(o=h(c=f())),l=0;l<=r;++l)!(l<r&&i(_=s[l],l,s))===a&&((a=!a)?o.lineStart():o.lineEnd()),a&&o.point(+e(_,l,s),+t(_,l,s));if(c)return o=null,c+""||null}return u.x=function(s){return arguments.length?(e=typeof s=="function"?s:p.constant(+s),u):e},u.y=function(s){return arguments.length?(t=typeof s=="function"?s:p.constant(+s),u):t},u.defined=function(s){return arguments.length?(i=typeof s=="function"?s:p.constant(!!s),u):i},u.curve=function(s){return arguments.length?(h=s,n!=null&&(o=h(n)),u):h},u.context=function(s){return arguments.length?(s==null?n=o=null:o=h(n=s),u):n},u}exports.curveLinear=P;exports.line=R;exports.withPath=T;exports.x=q;exports.y=A;
|
|
2
|
+
//# sourceMappingURL=line-DaEMhXmx.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-DaEMhXmx.cjs","sources":["../node_modules/d3-path/src/path.js","../node_modules/d3-shape/src/path.js","../node_modules/d3-shape/src/curve/linear.js","../node_modules/d3-shape/src/point.js","../node_modules/d3-shape/src/line.js"],"sourcesContent":["const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","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":["pi","tau","epsilon","tauEpsilon","append","strings","i","n","appendRound","digits","d","k","Path","x","y","x1","y1","x2","y2","r","x0","y0","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","l","t01","t21","a0","a1","ccw","dx","dy","cw","da","w","withPath","shape","_","Linear","context","curveLinear","p","line","defined","constant","curve","output","path","pointX","pointY","data","array","defined0","buffer"],"mappings":"qDAAMA,EAAK,KAAK,GACZC,EAAM,EAAID,EACVE,EAAU,KACVC,EAAaF,EAAMC,EAEvB,SAASE,EAAOC,EAAS,CACvB,KAAK,GAAKA,EAAQ,CAAC,EACnB,QAASC,EAAI,EAAGC,EAAIF,EAAQ,OAAQC,EAAIC,EAAG,EAAED,EAC3C,KAAK,GAAK,UAAUA,CAAC,EAAID,EAAQC,CAAC,CAEtC,CAEA,SAASE,EAAYC,EAAQ,CAC3B,IAAIC,EAAI,KAAK,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