drizzle-cube 0.2.14 → 0.2.16
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/adapters/compiler-BU728aIU.cjs +22 -0
- package/dist/adapters/{compiler-DrkCCzf0.js → compiler-B_yO7zBu.js} +3648 -2916
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts.js +27 -36
- package/dist/client/charts.js.map +1 -1
- package/dist/client/chunks/charts-B8YMw1mi.js +7227 -0
- package/dist/client/chunks/charts-B8YMw1mi.js.map +1 -0
- package/dist/client/chunks/charts-amt7VOyw.js +277 -0
- package/dist/client/chunks/{charts-PgJ3XcwQ.js.map → charts-amt7VOyw.js.map} +1 -1
- package/dist/client/chunks/{components-Cd068oGo.js → components-K3xrnHN-.js} +10247 -10583
- package/dist/client/chunks/components-K3xrnHN-.js.map +1 -0
- package/dist/client/chunks/core-Dkym7d1O.js +6 -0
- package/dist/client/chunks/core-Dkym7d1O.js.map +1 -0
- package/dist/client/chunks/{index-Baq5aJv1.js → index-B7NSVb33.js} +2 -2
- package/dist/client/chunks/{index-Baq5aJv1.js.map → index-B7NSVb33.js.map} +1 -1
- package/dist/client/chunks/javascript-DII1YQGr.js +659 -0
- package/dist/client/chunks/javascript-DII1YQGr.js.map +1 -0
- package/dist/client/components/AnalysisBuilder/AnalysisFilterItem.d.ts +1 -3
- package/dist/client/components/AnalysisBuilder/FilterConfigModal.d.ts +16 -0
- package/dist/client/components/DashboardFilters/FilterEditModal.d.ts +1 -1
- package/dist/client/components/DashboardFilters/ReadOnlyFilterList.d.ts +1 -1
- package/dist/client/components/QueryBuilderShim.d.ts +3 -0
- package/dist/client/components/{QueryBuilder → shared}/CubeMetaExplorer.d.ts +1 -1
- package/dist/client/components/{QueryBuilder → shared}/DateRangeFilter.d.ts +1 -1
- package/dist/client/components/{QueryBuilder → shared}/FilterBuilder.d.ts +1 -1
- package/dist/client/components/{QueryBuilder → shared}/FilterGroup.d.ts +1 -1
- package/dist/client/components/{QueryBuilder → shared}/FilterItem.d.ts +1 -1
- package/dist/client/components/{QueryBuilder → shared}/FilterValueSelector.d.ts +1 -1
- package/dist/client/components/{QueryBuilder → shared}/utils.d.ts +1 -1
- package/dist/client/components.d.ts +1 -1
- package/dist/client/components.js +2 -2
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +5 -5
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +49 -52
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +5 -6
- package/dist/client/providers.js.map +1 -1
- package/dist/client/shared/components/CodeBlock.d.ts +10 -0
- package/dist/client/shared/index.d.ts +1 -0
- package/dist/client/styles.css +1 -1
- package/dist/client/utils/index.d.ts +1 -0
- package/dist/client/{components/QueryBuilder → utils}/shareUtils.d.ts +1 -1
- package/dist/client/utils/syntaxHighlighting.d.ts +31 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.cjs +18 -18
- package/dist/server/index.d.ts +272 -3
- package/dist/server/index.js +2760 -2037
- package/package.json +5 -1
- package/dist/adapters/compiler-CMwSRhTS.cjs +0 -22
- package/dist/client/chunks/chart-activitygridchart-BSA93MaS.js +0 -2630
- package/dist/client/chunks/chart-activitygridchart-BSA93MaS.js.map +0 -1
- package/dist/client/chunks/chart-activitygridchart-config-AVBoHdRn.js +0 -244
- package/dist/client/chunks/chart-activitygridchart-config-AVBoHdRn.js.map +0 -1
- package/dist/client/chunks/chart-areachart-Cz-Bv8ZB.js +0 -238
- package/dist/client/chunks/chart-areachart-Cz-Bv8ZB.js.map +0 -1
- package/dist/client/chunks/chart-areachart-config-D9pPUKHZ.js +0 -78
- package/dist/client/chunks/chart-areachart-config-D9pPUKHZ.js.map +0 -1
- package/dist/client/chunks/chart-axisformatcontrols-BNfQgqND.js +0 -196
- package/dist/client/chunks/chart-axisformatcontrols-BNfQgqND.js.map +0 -1
- package/dist/client/chunks/chart-barchart-CI8LhTwO.js +0 -219
- package/dist/client/chunks/chart-barchart-CI8LhTwO.js.map +0 -1
- package/dist/client/chunks/chart-barchart-config-iniz62ni.js +0 -71
- package/dist/client/chunks/chart-barchart-config-iniz62ni.js.map +0 -1
- package/dist/client/chunks/chart-bubblechart-DaFSD3dc.js +0 -247
- package/dist/client/chunks/chart-bubblechart-DaFSD3dc.js.map +0 -1
- package/dist/client/chunks/chart-bubblechart-config-yLq2oyR3.js +0 -72
- package/dist/client/chunks/chart-bubblechart-config-yLq2oyR3.js.map +0 -1
- package/dist/client/chunks/chart-chartcontainer-CdwzIKP1.js +0 -103
- package/dist/client/chunks/chart-chartcontainer-CdwzIKP1.js.map +0 -1
- package/dist/client/chunks/chart-charttooltip-hLOOlEDZ.js +0 -26
- package/dist/client/chunks/chart-charttooltip-hLOOlEDZ.js.map +0 -1
- package/dist/client/chunks/chart-datatable-Dj_3LWKH.js +0 -350
- package/dist/client/chunks/chart-datatable-Dj_3LWKH.js.map +0 -1
- package/dist/client/chunks/chart-datatable-config-DmEA3A-7.js +0 -29
- package/dist/client/chunks/chart-datatable-config-DmEA3A-7.js.map +0 -1
- package/dist/client/chunks/chart-kpidelta-D45MO-i1.js +0 -435
- package/dist/client/chunks/chart-kpidelta-D45MO-i1.js.map +0 -1
- package/dist/client/chunks/chart-kpidelta-config-DtSDG4Kl.js +0 -98
- package/dist/client/chunks/chart-kpidelta-config-DtSDG4Kl.js.map +0 -1
- package/dist/client/chunks/chart-kpinumber-J3jJ1lz7.js +0 -400
- package/dist/client/chunks/chart-kpinumber-J3jJ1lz7.js.map +0 -1
- package/dist/client/chunks/chart-kpinumber-config-Da2LFeKM.js +0 -76
- package/dist/client/chunks/chart-kpinumber-config-Da2LFeKM.js.map +0 -1
- package/dist/client/chunks/chart-kpitext-Bo86g7Jn.js +0 -165
- package/dist/client/chunks/chart-kpitext-Bo86g7Jn.js.map +0 -1
- package/dist/client/chunks/chart-kpitext-config-DjvigyfE.js +0 -48
- package/dist/client/chunks/chart-kpitext-config-DjvigyfE.js.map +0 -1
- package/dist/client/chunks/chart-linechart-B7HFYqC7.js +0 -202
- package/dist/client/chunks/chart-linechart-B7HFYqC7.js.map +0 -1
- package/dist/client/chunks/chart-linechart-config-DLVS2Zxc.js +0 -66
- package/dist/client/chunks/chart-linechart-config-DLVS2Zxc.js.map +0 -1
- package/dist/client/chunks/chart-markdownchart-C-lDJMtY.js +0 -257
- package/dist/client/chunks/chart-markdownchart-C-lDJMtY.js.map +0 -1
- package/dist/client/chunks/chart-markdownchart-config-CgOA3YSw.js +0 -61
- package/dist/client/chunks/chart-markdownchart-config-CgOA3YSw.js.map +0 -1
- package/dist/client/chunks/chart-piechart-CJCJZXmm.js +0 -127
- package/dist/client/chunks/chart-piechart-CJCJZXmm.js.map +0 -1
- package/dist/client/chunks/chart-piechart-config-DgwOeKHr.js +0 -39
- package/dist/client/chunks/chart-piechart-config-DgwOeKHr.js.map +0 -1
- package/dist/client/chunks/chart-radarchart-CJ-8qPmX.js +0 -131
- package/dist/client/chunks/chart-radarchart-CJ-8qPmX.js.map +0 -1
- package/dist/client/chunks/chart-radarchart-config-BAV8D5PR.js +0 -45
- package/dist/client/chunks/chart-radarchart-config-BAV8D5PR.js.map +0 -1
- package/dist/client/chunks/chart-radialbarchart-C8PlVtXx.js +0 -120
- package/dist/client/chunks/chart-radialbarchart-C8PlVtXx.js.map +0 -1
- package/dist/client/chunks/chart-radialbarchart-config-CKozBBEC.js +0 -38
- package/dist/client/chunks/chart-radialbarchart-config-CKozBBEC.js.map +0 -1
- package/dist/client/chunks/chart-scatterchart-CXujAIug.js +0 -203
- package/dist/client/chunks/chart-scatterchart-CXujAIug.js.map +0 -1
- package/dist/client/chunks/chart-scatterchart-config-UdHmbZ3s.js +0 -54
- package/dist/client/chunks/chart-scatterchart-config-UdHmbZ3s.js.map +0 -1
- package/dist/client/chunks/chart-treemapchart-D9lYs_Y9.js +0 -265
- package/dist/client/chunks/chart-treemapchart-D9lYs_Y9.js.map +0 -1
- package/dist/client/chunks/chart-treemapchart-config-D17VOwTM.js +0 -47
- package/dist/client/chunks/chart-treemapchart-config-D17VOwTM.js.map +0 -1
- package/dist/client/chunks/charts-PgJ3XcwQ.js +0 -286
- package/dist/client/chunks/components-Cd068oGo.js.map +0 -1
- package/dist/client/components/QueryBuilder/QueryAnalysisPanel.d.ts +0 -7
- package/dist/client/components/QueryBuilder/QueryPanel.d.ts +0 -4
- package/dist/client/components/QueryBuilder/ResultsPanel.d.ts +0 -4
- package/dist/client/components/QueryBuilder/SetupPanel.d.ts +0 -11
- package/dist/client/components/QueryBuilder/ShareWarningModal.d.ts +0 -9
- package/dist/client/components/QueryBuilder/index.d.ts +0 -3
- /package/dist/client/components/{QueryBuilder → shared}/DateRangeSelector.d.ts +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { g as e } from "./chart-activitygridchart-config-AVBoHdRn.js";
|
|
2
|
-
const i = {
|
|
3
|
-
icon: e("bar"),
|
|
4
|
-
description: "Compare values across categories",
|
|
5
|
-
useCase: "Best for comparing discrete categories, showing rankings, or displaying changes over time",
|
|
6
|
-
dropZones: [
|
|
7
|
-
{
|
|
8
|
-
key: "xAxis",
|
|
9
|
-
label: "X-Axis (Categories)",
|
|
10
|
-
description: "Dimensions and time dimensions for grouping",
|
|
11
|
-
mandatory: !1,
|
|
12
|
-
acceptTypes: ["dimension", "timeDimension"],
|
|
13
|
-
emptyText: "Drop dimensions & time dimensions here"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
key: "yAxis",
|
|
17
|
-
label: "Y-Axis (Values)",
|
|
18
|
-
description: "Measures for bar heights",
|
|
19
|
-
mandatory: !0,
|
|
20
|
-
acceptTypes: ["measure"],
|
|
21
|
-
emptyText: "Drop measures here",
|
|
22
|
-
enableDualAxis: !0
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
key: "series",
|
|
26
|
-
label: "Series (Split into Multiple Series)",
|
|
27
|
-
description: "Dimensions to create separate data series",
|
|
28
|
-
mandatory: !1,
|
|
29
|
-
acceptTypes: ["dimension"],
|
|
30
|
-
emptyText: "Drop dimensions here to split data into series"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
displayOptions: ["showLegend", "showGrid", "showTooltip", "hideHeader"],
|
|
34
|
-
displayOptionsConfig: [
|
|
35
|
-
{
|
|
36
|
-
key: "stackType",
|
|
37
|
-
label: "Stacking",
|
|
38
|
-
type: "select",
|
|
39
|
-
defaultValue: "none",
|
|
40
|
-
options: [
|
|
41
|
-
{ value: "none", label: "None" },
|
|
42
|
-
{ value: "normal", label: "Stacked" },
|
|
43
|
-
{ value: "percent", label: "Stacked 100%" }
|
|
44
|
-
],
|
|
45
|
-
description: "How to stack multiple bar series"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
key: "target",
|
|
49
|
-
label: "Target Values",
|
|
50
|
-
type: "string",
|
|
51
|
-
placeholder: "e.g., 100 or 50,75 for spread",
|
|
52
|
-
description: "Single value or comma-separated values to spread across X-axis"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
key: "leftYAxisFormat",
|
|
56
|
-
label: "Left Y-Axis Format",
|
|
57
|
-
type: "axisFormat",
|
|
58
|
-
description: "Number formatting for left Y-axis"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
key: "rightYAxisFormat",
|
|
62
|
-
label: "Right Y-Axis Format",
|
|
63
|
-
type: "axisFormat",
|
|
64
|
-
description: "Number formatting for right Y-axis"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
i as barChartConfig
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=chart-barchart-config-iniz62ni.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-barchart-config-iniz62ni.js","sources":["../../../src/client/components/charts/BarChart.config.tsx"],"sourcesContent":["import type { ChartTypeConfig } from '../../charts/chartConfigs'\nimport { getChartTypeIcon } from '../../icons'\n\n/**\n * Configuration for the bar chart type\n */\nexport const barChartConfig: ChartTypeConfig = {\n icon: getChartTypeIcon('bar'),\n description: 'Compare values across categories',\n useCase: 'Best for comparing discrete categories, showing rankings, or displaying changes over time',\n dropZones: [\n {\n key: 'xAxis',\n label: 'X-Axis (Categories)',\n description: 'Dimensions and time dimensions for grouping',\n mandatory: false,\n acceptTypes: ['dimension', 'timeDimension'],\n emptyText: 'Drop dimensions & time dimensions here'\n },\n {\n key: 'yAxis',\n label: 'Y-Axis (Values)',\n description: 'Measures for bar heights',\n mandatory: true,\n acceptTypes: ['measure'],\n emptyText: 'Drop measures here',\n enableDualAxis: true\n },\n {\n key: 'series',\n label: 'Series (Split into Multiple Series)',\n description: 'Dimensions to create separate data series',\n mandatory: false,\n acceptTypes: ['dimension'],\n emptyText: 'Drop dimensions here to split data into series'\n }\n ],\n displayOptions: ['showLegend', 'showGrid', 'showTooltip', 'hideHeader'],\n displayOptionsConfig: [\n {\n key: 'stackType',\n label: 'Stacking',\n type: 'select',\n defaultValue: 'none',\n options: [\n { value: 'none', label: 'None' },\n { value: 'normal', label: 'Stacked' },\n { value: 'percent', label: 'Stacked 100%' }\n ],\n description: 'How to stack multiple bar series'\n },\n {\n key: 'target',\n label: 'Target Values',\n type: 'string',\n placeholder: 'e.g., 100 or 50,75 for spread',\n description: 'Single value or comma-separated values to spread across X-axis'\n },\n {\n key: 'leftYAxisFormat',\n label: 'Left Y-Axis Format',\n type: 'axisFormat',\n description: 'Number formatting for left Y-axis'\n },\n {\n key: 'rightYAxisFormat',\n label: 'Right Y-Axis Format',\n type: 'axisFormat',\n description: 'Number formatting for right Y-axis'\n }\n ]\n}"],"names":["barChartConfig","getChartTypeIcon"],"mappings":";AA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
|
|
1
|
-
import { jsx as y, jsxs as te } from "react/jsx-runtime";
|
|
2
|
-
import Ae, { useSyncExternalStore as Fe, useCallback as we, useRef as ne, useState as oe, useMemo as Se, useLayoutEffect as ve, useEffect as ce } from "react";
|
|
3
|
-
import { g as de, s as ze, w as Te, u as $e, b as D, c as Ne, d as ue, i as ke, p as me, C as xe, l as fe, e as ye, h as Ye, m as Re, q as Ve, j as he, o as pe, a as se, k as ge, n as be, f as N } from "./chart-activitygridchart-BSA93MaS.js";
|
|
4
|
-
const H = {
|
|
5
|
-
listeners: /* @__PURE__ */ new Set(),
|
|
6
|
-
subscribe(w) {
|
|
7
|
-
return this.listeners.add(w), () => this.listeners.delete(w);
|
|
8
|
-
},
|
|
9
|
-
notify() {
|
|
10
|
-
this.listeners.forEach((w) => w());
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
Te(() => {
|
|
14
|
-
H.notify();
|
|
15
|
-
});
|
|
16
|
-
function Be() {
|
|
17
|
-
const w = Fe(
|
|
18
|
-
H.subscribe.bind(H),
|
|
19
|
-
de,
|
|
20
|
-
// Client-side snapshot
|
|
21
|
-
de
|
|
22
|
-
// Server-side snapshot (SSR)
|
|
23
|
-
), p = we((r) => {
|
|
24
|
-
ze(r), H.notify();
|
|
25
|
-
}, []);
|
|
26
|
-
return { theme: w, setTheme: p };
|
|
27
|
-
}
|
|
28
|
-
const Le = Ae.memo(function({
|
|
29
|
-
data: p,
|
|
30
|
-
chartConfig: r,
|
|
31
|
-
displayConfig: i = {},
|
|
32
|
-
queryObject: E,
|
|
33
|
-
height: q = "100%",
|
|
34
|
-
colorPalette: M
|
|
35
|
-
}) {
|
|
36
|
-
const U = ne(null), S = ne(null), [k, j] = oe({ width: 0, height: 0 }), [Y, W] = oe(!1), { theme: re } = Be(), g = $e(), s = Se(() => ({
|
|
37
|
-
showLegend: i?.showLegend ?? !0,
|
|
38
|
-
showGrid: i?.showGrid ?? !0,
|
|
39
|
-
showTooltip: i?.showTooltip ?? !0,
|
|
40
|
-
minBubbleSize: i?.minBubbleSize ?? 5,
|
|
41
|
-
maxBubbleSize: i?.maxBubbleSize ?? 50,
|
|
42
|
-
bubbleOpacity: i?.bubbleOpacity ?? 0.7,
|
|
43
|
-
xAxisFormat: i?.xAxisFormat,
|
|
44
|
-
leftYAxisFormat: i?.leftYAxisFormat
|
|
45
|
-
}), [
|
|
46
|
-
i?.showLegend,
|
|
47
|
-
i?.showGrid,
|
|
48
|
-
i?.showTooltip,
|
|
49
|
-
i?.minBubbleSize,
|
|
50
|
-
i?.maxBubbleSize,
|
|
51
|
-
i?.bubbleOpacity,
|
|
52
|
-
i?.xAxisFormat,
|
|
53
|
-
i?.leftYAxisFormat
|
|
54
|
-
]);
|
|
55
|
-
return ve(() => {
|
|
56
|
-
let a = 0;
|
|
57
|
-
const d = 10;
|
|
58
|
-
let u, m;
|
|
59
|
-
const n = () => {
|
|
60
|
-
if (S.current) {
|
|
61
|
-
const { width: b, height: o } = S.current.getBoundingClientRect();
|
|
62
|
-
if (b > 0 && o > 0)
|
|
63
|
-
return j({ width: b, height: o }), W(!0), !0;
|
|
64
|
-
}
|
|
65
|
-
return !1;
|
|
66
|
-
};
|
|
67
|
-
if (!n() && a < d) {
|
|
68
|
-
const b = () => {
|
|
69
|
-
!n() && a < d && (a++, m = setTimeout(() => {
|
|
70
|
-
u = requestAnimationFrame(b);
|
|
71
|
-
}, 50 * a));
|
|
72
|
-
};
|
|
73
|
-
u = requestAnimationFrame(b);
|
|
74
|
-
}
|
|
75
|
-
return () => {
|
|
76
|
-
u && cancelAnimationFrame(u), m && clearTimeout(m);
|
|
77
|
-
};
|
|
78
|
-
}, []), ce(() => {
|
|
79
|
-
let a = null;
|
|
80
|
-
const d = () => {
|
|
81
|
-
if (S.current) {
|
|
82
|
-
const { width: u, height: m } = S.current.getBoundingClientRect();
|
|
83
|
-
u > 0 && m > 0 && (j({ width: u, height: m }), Y || W(!0));
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
return S.current && (a = new ResizeObserver((u) => {
|
|
87
|
-
for (const m of u) {
|
|
88
|
-
const { width: n, height: v } = m.contentRect;
|
|
89
|
-
n > 0 && v > 0 && (j({ width: n, height: v }), Y || W(!0));
|
|
90
|
-
}
|
|
91
|
-
}), a.observe(S.current), d()), window.addEventListener("resize", d), () => {
|
|
92
|
-
a && a.disconnect(), window.removeEventListener("resize", d);
|
|
93
|
-
};
|
|
94
|
-
}, [Y]), ce(() => {
|
|
95
|
-
if (!p || p.length === 0 || !U.current || !Y || k.width === 0 || (D(U.current).selectAll("*").remove(), !r?.xAxis || !r?.yAxis || !r?.series))
|
|
96
|
-
return;
|
|
97
|
-
const a = Array.isArray(r.xAxis) ? r.xAxis[0] : r.xAxis, d = Array.isArray(r.yAxis) ? r.yAxis[0] : r.yAxis, u = Array.isArray(r.series) ? r.series[0] : r.series, m = Array.isArray(r.sizeField) ? r.sizeField[0] : r.sizeField || d, n = Array.isArray(r.colorField) ? r.colorField[0] : r.colorField;
|
|
98
|
-
if (!a || !d || !u || !m)
|
|
99
|
-
return;
|
|
100
|
-
const v = Ne(E, a), b = E?.timeDimensions?.some(
|
|
101
|
-
(e) => e.dimension === a
|
|
102
|
-
) || !1, o = p.map((e) => {
|
|
103
|
-
const t = e[a];
|
|
104
|
-
let l, x;
|
|
105
|
-
if (b && t) {
|
|
106
|
-
const c = String(t);
|
|
107
|
-
let h;
|
|
108
|
-
if (c.match(/^\d{4}-\d{2}-\d{2}[T ]/)) {
|
|
109
|
-
let F = c;
|
|
110
|
-
c.includes(" ") && (F = c.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !F.endsWith("Z") && !F.includes("+") && (F = F + "Z"), h = new Date(F);
|
|
111
|
-
} else
|
|
112
|
-
h = new Date(c);
|
|
113
|
-
l = isNaN(h.getTime()) ? parseFloat(c) : h.getTime(), x = ue(t, v);
|
|
114
|
-
} else {
|
|
115
|
-
const c = ue(t, v) || t;
|
|
116
|
-
l = typeof c == "string" ? parseFloat(c) : c, x = String(c);
|
|
117
|
-
}
|
|
118
|
-
const f = me(e[d]), $ = me(e[m]), B = e[u];
|
|
119
|
-
return {
|
|
120
|
-
x: l,
|
|
121
|
-
xLabel: x,
|
|
122
|
-
// Store formatted label for tooltip display
|
|
123
|
-
y: f,
|
|
124
|
-
// Type assertion: filter below ensures this is never null
|
|
125
|
-
size: $ !== null ? Math.abs($) : 0,
|
|
126
|
-
// Ensure positive size
|
|
127
|
-
color: n ? e[n] : B,
|
|
128
|
-
series: B,
|
|
129
|
-
label: `${B || "Unknown"}`,
|
|
130
|
-
isValid: ke(l) && f !== null && $ !== null && $ > 0
|
|
131
|
-
};
|
|
132
|
-
}).filter((e) => e.isValid && e.size > 0);
|
|
133
|
-
if (o.length === 0) return;
|
|
134
|
-
const R = {
|
|
135
|
-
...xe,
|
|
136
|
-
left: xe.left + 30,
|
|
137
|
-
// Add extra 30px left margin for Y-axis label
|
|
138
|
-
bottom: s.showLegend && n ? 100 : 40
|
|
139
|
-
// Add extra space for legend
|
|
140
|
-
}, L = k.width - R.left - R.right, z = k.height - R.top - R.bottom, le = D(U.current).attr("width", k.width).attr("height", k.height), T = le.append("g").attr("transform", `translate(${R.left},${R.top})`), I = fe().domain(ye(o, (e) => e.x)).range([0, L]).nice(), C = fe().domain(ye(o, (e) => e.y)).range([z, 0]).nice(), Z = Ye().domain([0, Re(o, (e) => e.size)]).range([s.minBubbleSize, s.maxBubbleSize]);
|
|
141
|
-
let V, O = !1, X = [];
|
|
142
|
-
if (n && o.length > 0) {
|
|
143
|
-
const e = o.map((t) => {
|
|
144
|
-
const l = t.color;
|
|
145
|
-
return typeof l == "string" ? parseFloat(l) : l;
|
|
146
|
-
}).filter((t) => !isNaN(t));
|
|
147
|
-
if (O = e.length === o.length && e.every((t) => typeof t == "number"), O) {
|
|
148
|
-
const t = Math.min(...e), l = Math.max(...e);
|
|
149
|
-
V = Ve().domain([t, l]).range(M?.gradient || he);
|
|
150
|
-
} else
|
|
151
|
-
X = [...new Set(o.map((t) => String(t.color)))], V = pe().domain(X).range(M?.colors || se);
|
|
152
|
-
} else
|
|
153
|
-
V = pe().domain(["default"]).range([se[0]]);
|
|
154
|
-
const Q = (e, t) => getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t, ie = re !== "light", A = ie ? Q("--dc-text-muted", "#cbd5e1") : Q("--dc-text-secondary", "#374151"), G = ie ? Q("--dc-border", "#475569") : "#9ca3af";
|
|
155
|
-
if (s.showGrid) {
|
|
156
|
-
const e = T.append("g").attr("class", "grid").attr("transform", `translate(0,${z})`).call(
|
|
157
|
-
ge(I).tickSize(-z).tickFormat(() => "")
|
|
158
|
-
);
|
|
159
|
-
e.selectAll("line").style("stroke", G).style("stroke-dasharray", "3,3").style("opacity", 0.3), e.select(".domain").style("stroke", "none");
|
|
160
|
-
const t = T.append("g").attr("class", "grid").call(
|
|
161
|
-
be(C).tickSize(-L).tickFormat(() => "")
|
|
162
|
-
);
|
|
163
|
-
t.selectAll("line").style("stroke", G).style("stroke-dasharray", "3,3").style("opacity", 0.3), t.select(".domain").style("stroke", "none");
|
|
164
|
-
}
|
|
165
|
-
const J = ge(I);
|
|
166
|
-
b ? J.tickFormat((e) => {
|
|
167
|
-
const t = new Date(e);
|
|
168
|
-
if (isNaN(t.getTime())) return String(e);
|
|
169
|
-
switch (v?.toLowerCase()) {
|
|
170
|
-
case "year":
|
|
171
|
-
return String(t.getUTCFullYear());
|
|
172
|
-
case "quarter": {
|
|
173
|
-
const l = Math.floor(t.getUTCMonth() / 3) + 1;
|
|
174
|
-
return `${t.getUTCFullYear()}-Q${l}`;
|
|
175
|
-
}
|
|
176
|
-
case "month":
|
|
177
|
-
return `${t.getUTCFullYear()}-${String(t.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
178
|
-
case "week":
|
|
179
|
-
case "day":
|
|
180
|
-
return `${t.getUTCFullYear()}-${String(t.getUTCMonth() + 1).padStart(2, "0")}-${String(t.getUTCDate()).padStart(2, "0")}`;
|
|
181
|
-
case "hour":
|
|
182
|
-
return `${String(t.getUTCMonth() + 1).padStart(2, "0")}-${String(t.getUTCDate()).padStart(2, "0")} ${String(t.getUTCHours()).padStart(2, "0")}:00`;
|
|
183
|
-
default:
|
|
184
|
-
return `${t.getUTCFullYear()}-${String(t.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
185
|
-
}
|
|
186
|
-
}) : s.xAxisFormat && J.tickFormat((e) => N(e, s.xAxisFormat));
|
|
187
|
-
const K = T.append("g").attr("transform", `translate(0,${z})`).call(J);
|
|
188
|
-
K.selectAll("text").style("fill", A), K.selectAll("line, path").style("stroke", G), K.append("text").attr("x", L / 2).attr("y", 35).attr("fill", A).style("text-anchor", "middle").style("font-size", "12px").text(s.xAxisFormat?.label || g(a));
|
|
189
|
-
const ae = be(C);
|
|
190
|
-
s.leftYAxisFormat && ae.tickFormat((e) => N(e, s.leftYAxisFormat));
|
|
191
|
-
const P = T.append("g").call(ae);
|
|
192
|
-
P.selectAll("text").style("fill", A), P.selectAll("line, path").style("stroke", G), P.append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -z / 2).attr("fill", A).style("text-anchor", "middle").style("font-size", "12px").text(s.leftYAxisFormat?.label || g(d));
|
|
193
|
-
const _ = D("body").append("div").attr("class", "bubble-chart-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), ee = T.selectAll(".bubble").data(o).enter().append("circle").attr("class", "bubble").attr("cx", (e) => I(e.x)).attr("cy", (e) => C(e.y)).attr("r", (e) => Z(e.size)).style("fill", (e) => n && e.color !== void 0 ? V(O ? e.color : String(e.color)) : se[0]).style("opacity", s.bubbleOpacity).style("stroke", "#fff").style("stroke-width", 1).style("cursor", "pointer");
|
|
194
|
-
if (s.showTooltip && ee.on("mouseover", function(e, t) {
|
|
195
|
-
D(this).transition().duration(200).style("opacity", 1).attr("r", Z(t.size) * 1.1);
|
|
196
|
-
const l = [
|
|
197
|
-
`<strong>${t.series || "Unknown"}</strong>`,
|
|
198
|
-
`${g(a)}: ${t.xLabel || (s.xAxisFormat ? N(t.x, s.xAxisFormat) : t.x)}`,
|
|
199
|
-
`${g(d)}: ${s.leftYAxisFormat ? N(t.y, s.leftYAxisFormat) : t.y}`,
|
|
200
|
-
`${g(m)}: ${s.leftYAxisFormat ? N(t.size, s.leftYAxisFormat) : t.size}`,
|
|
201
|
-
n && t.color ? `${g(n)}: ${t.color}` : ""
|
|
202
|
-
].filter(Boolean).join("<br>");
|
|
203
|
-
_.html(l).style("left", e.pageX + 10 + "px").style("top", e.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
|
|
204
|
-
}).on("mousemove", function(e) {
|
|
205
|
-
_.style("left", e.pageX + 10 + "px").style("top", e.pageY - 10 + "px");
|
|
206
|
-
}).on("mouseout", function(e, t) {
|
|
207
|
-
D(this).transition().duration(200).style("opacity", s.bubbleOpacity).attr("r", Z(t.size)), _.transition().duration(200).style("opacity", 0);
|
|
208
|
-
}), s.showLegend && n)
|
|
209
|
-
if (O) {
|
|
210
|
-
const l = Math.min(...o.map((h) => h.color)), x = Math.max(...o.map((h) => h.color)), f = T.append("g").attr("class", "color-legend").attr("transform", `translate(${L / 2 - 200 / 2}, ${z + 60})`), B = le.append("defs").append("linearGradient").attr("id", "color-scale-gradient").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%"), c = M?.gradient || he;
|
|
211
|
-
c.forEach((h, F) => {
|
|
212
|
-
B.append("stop").attr("offset", `${F / (c.length - 1) * 100}%`).attr("stop-color", h);
|
|
213
|
-
}), f.append("rect").attr("width", 200).attr("height", 20).style("fill", "url(#color-scale-gradient)").style("stroke", "#ccc").style("stroke-width", 1), f.append("text").attr("x", 0).attr("y", 35).attr("text-anchor", "start").style("font-size", "11px").style("fill", A).text(s.leftYAxisFormat ? N(l, s.leftYAxisFormat) : l.toFixed(2)), f.append("text").attr("x", 200).attr("y", 35).attr("text-anchor", "end").style("font-size", "11px").style("fill", A).text(s.leftYAxisFormat ? N(x, s.leftYAxisFormat) : x.toFixed(2)), f.append("text").attr("x", 200 / 2).attr("y", -5).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", A).text(g(n));
|
|
214
|
-
} else {
|
|
215
|
-
const e = X;
|
|
216
|
-
if (e.length > 0) {
|
|
217
|
-
const l = T.append("g").attr("class", "legend").attr("transform", `translate(${L / 2 - e.length * 80 / 2}, ${z + 60})`).selectAll(".legend-item").data(e).enter().append("g").attr("class", "legend-item").attr("transform", (x, f) => `translate(${f * 80}, 0)`).style("cursor", "pointer");
|
|
218
|
-
l.append("circle").attr("cx", 5).attr("cy", 5).attr("r", 5).style("fill", (x) => V(x)).style("opacity", s.bubbleOpacity), l.append("text").attr("x", 15).attr("y", 5).attr("dy", ".35em").style("font-size", "11px").style("fill", A).text((x) => String(x)), l.on("mouseover", function(x, f) {
|
|
219
|
-
ee.transition().duration(200).style("opacity", ($) => n && String($.color) === f ? 1 : 0.2);
|
|
220
|
-
}).on("mouseout", function() {
|
|
221
|
-
ee.transition().duration(200).style("opacity", s.bubbleOpacity);
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
return () => {
|
|
226
|
-
_.remove();
|
|
227
|
-
};
|
|
228
|
-
}, [p, r, s, E, k, Y, M, re, g]), !p || p.length === 0 ? /* @__PURE__ */ y("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: q }, children: /* @__PURE__ */ te("div", { className: "text-center", children: [
|
|
229
|
-
/* @__PURE__ */ y("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
|
|
230
|
-
/* @__PURE__ */ y("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in bubble chart" })
|
|
231
|
-
] }) }) : r?.xAxis && r?.yAxis && r?.series ? /* @__PURE__ */ y("div", { className: "w-full flex-1 flex flex-col relative", style: { height: q, minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ te("div", { ref: S, className: "w-full h-full relative", children: [
|
|
232
|
-
/* @__PURE__ */ y("svg", { ref: U, className: "w-full h-full" }),
|
|
233
|
-
!Y && /* @__PURE__ */ y("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ y("div", { className: "text-dc-text-muted text-sm", children: "Measuring chart dimensions..." }) })
|
|
234
|
-
] }) }) : /* @__PURE__ */ y("div", { className: "flex items-center justify-center w-full text-dc-warning", style: { height: q }, children: /* @__PURE__ */ te("div", { className: "text-center", children: [
|
|
235
|
-
/* @__PURE__ */ y("div", { className: "text-sm font-semibold mb-1", children: "Configuration Required" }),
|
|
236
|
-
/* @__PURE__ */ y("div", { className: "text-xs", children: "Bubble chart requires xAxis, yAxis, series, and sizeField dimensions" }),
|
|
237
|
-
/* @__PURE__ */ y("div", { className: "text-xs mt-1", children: "Optional: colorField for bubble coloring" })
|
|
238
|
-
] }) });
|
|
239
|
-
}), Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
240
|
-
__proto__: null,
|
|
241
|
-
default: Le
|
|
242
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
243
|
-
export {
|
|
244
|
-
Ge as B,
|
|
245
|
-
Be as u
|
|
246
|
-
};
|
|
247
|
-
//# sourceMappingURL=chart-bubblechart-DaFSD3dc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-bubblechart-DaFSD3dc.js","sources":["../../../src/client/hooks/useTheme.ts","../../../src/client/components/charts/BubbleChart.tsx"],"sourcesContent":["/**\n * useTheme - External Theme State Hook\n *\n * Uses React 18's useSyncExternalStore to prevent parent component re-renders.\n * The theme state is stored externally and changes are propagated through\n * a subscribe/notify pattern.\n *\n * This prevents the ThemeToggle component from causing Layout re-renders.\n */\n\nimport { useSyncExternalStore, useCallback } from 'react'\nimport { getTheme, setTheme as setThemeUtil, watchThemeChanges, type Theme } from '../theme'\n\n// External store for theme state\nconst themeStore = {\n listeners: new Set<() => void>(),\n\n subscribe(listener: () => void) {\n this.listeners.add(listener)\n return () => this.listeners.delete(listener)\n },\n\n notify() {\n this.listeners.forEach(listener => listener())\n }\n}\n\n// Watch theme changes from DOM/system and notify subscribers\nwatchThemeChanges(() => {\n themeStore.notify()\n})\n\n/**\n * Hook to access and update theme\n *\n * Returns current theme and a setter function.\n * Only components using this hook will re-render on theme changes.\n */\nexport function useTheme() {\n // Subscribe to external theme store\n const theme = useSyncExternalStore(\n themeStore.subscribe.bind(themeStore),\n getTheme, // Client-side snapshot\n getTheme // Server-side snapshot (SSR)\n )\n\n // Stable setter function\n const setTheme = useCallback((newTheme: Theme) => {\n setThemeUtil(newTheme)\n themeStore.notify()\n }, [])\n\n return { theme, setTheme }\n}\n","import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'\nimport { select, scaleLinear, scaleSqrt, scaleOrdinal, scaleQuantize, extent, max, axisBottom, axisLeft, type ScaleOrdinal, type ScaleQuantize } from 'd3'\nimport { CHART_COLORS, CHART_COLORS_GRADIENT, CHART_MARGINS } from '../../utils/chartConstants'\nimport { formatTimeValue, getFieldGranularity, parseNumericValue, isValidNumericValue, formatAxisValue } from '../../utils/chartUtils'\nimport { useCubeFieldLabel } from '../../hooks/useCubeFieldLabel'\nimport { useTheme } from '../../hooks/useTheme'\nimport type { ChartProps } from '../../types'\n\ninterface BubbleData {\n x: number\n xLabel?: string // Formatted label for time dimensions\n y: number\n size: number\n color?: string | number\n label: string\n series?: string\n}\n\nconst BubbleChart = React.memo(function BubbleChart({\n data,\n chartConfig,\n displayConfig = {},\n queryObject,\n height = \"100%\",\n colorPalette\n}: ChartProps) {\n const svgRef = useRef<SVGSVGElement | null>(null)\n const containerRef = useRef<HTMLDivElement | null>(null)\n const [dimensions, setDimensions] = useState({ width: 0, height: 0 })\n const [dimensionsReady, setDimensionsReady] = useState(false)\n const { theme } = useTheme()\n const getFieldLabel = useCubeFieldLabel()\n\n // Memoize safeDisplayConfig to prevent unnecessary re-renders\n const safeDisplayConfig = useMemo(() => ({\n showLegend: displayConfig?.showLegend ?? true,\n showGrid: displayConfig?.showGrid ?? true,\n showTooltip: displayConfig?.showTooltip ?? true,\n minBubbleSize: displayConfig?.minBubbleSize ?? 5,\n maxBubbleSize: displayConfig?.maxBubbleSize ?? 50,\n bubbleOpacity: displayConfig?.bubbleOpacity ?? 0.7,\n xAxisFormat: displayConfig?.xAxisFormat,\n leftYAxisFormat: displayConfig?.leftYAxisFormat\n }), [\n displayConfig?.showLegend,\n displayConfig?.showGrid,\n displayConfig?.showTooltip,\n displayConfig?.minBubbleSize,\n displayConfig?.maxBubbleSize,\n displayConfig?.bubbleOpacity,\n displayConfig?.xAxisFormat,\n displayConfig?.leftYAxisFormat\n ])\n\n // Enhanced dimension measurement with retry mechanism\n useLayoutEffect(() => {\n let retryCount = 0\n const maxRetries = 10\n let rafId: number\n let timeoutId: ReturnType<typeof setTimeout>\n \n const updateDimensions = () => {\n if (containerRef.current) {\n const { width, height } = containerRef.current.getBoundingClientRect()\n \n if (width > 0 && height > 0) {\n setDimensions({ width, height })\n setDimensionsReady(true)\n return true\n }\n }\n return false\n }\n \n // Immediate measurement\n const success = updateDimensions()\n \n if (!success && retryCount < maxRetries) {\n // Retry with requestAnimationFrame\n const retryWithRaf = () => {\n const rafSuccess = updateDimensions()\n \n if (!rafSuccess && retryCount < maxRetries) {\n retryCount++\n // Use setTimeout for additional retries with increasing delays\n timeoutId = setTimeout(() => {\n rafId = requestAnimationFrame(retryWithRaf)\n }, 50 * retryCount) // Increasing delay: 50ms, 100ms, 150ms, etc.\n }\n }\n \n rafId = requestAnimationFrame(retryWithRaf)\n }\n \n return () => {\n if (rafId) cancelAnimationFrame(rafId)\n if (timeoutId) clearTimeout(timeoutId)\n }\n }, [])\n\n // Enhanced ResizeObserver for dynamic resizing with immediate initialization\n useEffect(() => {\n let resizeObserver: ResizeObserver | null = null\n \n const updateDimensions = () => {\n if (containerRef.current) {\n const { width, height } = containerRef.current.getBoundingClientRect()\n if (width > 0 && height > 0) {\n setDimensions({ width, height })\n if (!dimensionsReady) {\n setDimensionsReady(true)\n }\n }\n }\n }\n \n // Initialize ResizeObserver immediately\n if (containerRef.current) {\n resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const { width, height } = entry.contentRect\n if (width > 0 && height > 0) {\n setDimensions({ width, height })\n if (!dimensionsReady) {\n setDimensionsReady(true)\n }\n }\n }\n })\n \n resizeObserver.observe(containerRef.current)\n \n // Also try immediate measurement as fallback\n updateDimensions()\n }\n\n // Window resize as additional fallback\n window.addEventListener('resize', updateDimensions)\n \n return () => {\n if (resizeObserver) {\n resizeObserver.disconnect()\n }\n window.removeEventListener('resize', updateDimensions)\n }\n }, [dimensionsReady])\n\n useEffect(() => {\n if (!data || data.length === 0 || !svgRef.current || !dimensionsReady || dimensions.width === 0) {\n return\n }\n\n // Clear previous chart\n select(svgRef.current).selectAll('*').remove()\n\n\n // Validate chartConfig - only new format supported\n if (!chartConfig?.xAxis || !chartConfig?.yAxis || !chartConfig?.series) {\n return\n }\n\n const xAxisField = Array.isArray(chartConfig.xAxis) ? chartConfig.xAxis[0] : chartConfig.xAxis\n const yAxisField = Array.isArray(chartConfig.yAxis) ? chartConfig.yAxis[0] : chartConfig.yAxis\n const seriesField = Array.isArray(chartConfig.series) ? chartConfig.series[0] : chartConfig.series\n const sizeFieldName = Array.isArray(chartConfig.sizeField) ? chartConfig.sizeField[0] : chartConfig.sizeField || yAxisField\n const colorFieldName = Array.isArray(chartConfig.colorField) ? chartConfig.colorField[0] : chartConfig.colorField\n\n\n if (!xAxisField || !yAxisField || !seriesField || !sizeFieldName) {\n return\n }\n\n // Transform data for bubble chart\n // Null handling: Filter out bubbles where x, y, or size are null\n const xGranularity = getFieldGranularity(queryObject, xAxisField)\n\n // Check if x-axis field is a time dimension\n const isTimeDimension = queryObject?.timeDimensions?.some(\n (td: { dimension: string }) => td.dimension === xAxisField\n ) || false\n\n const bubbleData: BubbleData[] = data\n .map(item => {\n const rawXValue = item[xAxisField]\n let xNum: number\n let xLabel: string\n\n if (isTimeDimension && rawXValue) {\n // For time dimensions, convert to timestamp for proper numeric positioning\n const dateStr = String(rawXValue)\n // Try to parse as date - handle ISO format and PostgreSQL format\n let date: Date\n if (dateStr.match(/^\\d{4}-\\d{2}-\\d{2}[T ]/)) {\n // Full timestamp format\n let isoStr = dateStr\n if (dateStr.includes(' ')) {\n isoStr = dateStr.replace(' ', 'T').replace('+00', 'Z').replace(/\\+\\d{2}:\\d{2}$/, 'Z')\n }\n if (!isoStr.endsWith('Z') && !isoStr.includes('+')) {\n isoStr = isoStr + 'Z'\n }\n date = new Date(isoStr)\n } else {\n date = new Date(dateStr)\n }\n\n xNum = isNaN(date.getTime()) ? parseFloat(dateStr) : date.getTime()\n xLabel = formatTimeValue(rawXValue, xGranularity)\n } else {\n // Non-time value - use as-is\n const formattedValue = formatTimeValue(rawXValue, xGranularity) || rawXValue\n xNum = typeof formattedValue === 'string' ? parseFloat(formattedValue) : formattedValue\n xLabel = String(formattedValue)\n }\n\n const yValue = parseNumericValue(item[yAxisField])\n const sizeValue = parseNumericValue(item[sizeFieldName])\n const seriesValue = item[seriesField]\n\n return {\n x: xNum,\n xLabel, // Store formatted label for tooltip display\n y: yValue as number, // Type assertion: filter below ensures this is never null\n size: sizeValue !== null ? Math.abs(sizeValue) : 0, // Ensure positive size\n color: colorFieldName ? item[colorFieldName] : seriesValue,\n series: seriesValue,\n label: `${seriesValue || 'Unknown'}`,\n isValid: isValidNumericValue(xNum) && yValue !== null && sizeValue !== null && sizeValue > 0\n }\n })\n .filter(d => d.isValid && d.size > 0) // Filter out bubbles with invalid coordinates or no size\n\n if (bubbleData.length === 0) return\n\n const margin = { \n ...CHART_MARGINS, \n left: CHART_MARGINS.left + 30, // Add extra 30px left margin for Y-axis label\n bottom: (safeDisplayConfig.showLegend && colorFieldName) ? 100 : 40 // Add extra space for legend\n }\n const width = dimensions.width - margin.left - margin.right\n const chartHeight = dimensions.height - margin.top - margin.bottom\n\n const svg = select(svgRef.current)\n .attr('width', dimensions.width)\n .attr('height', dimensions.height)\n\n const g = svg.append('g')\n .attr('transform', `translate(${margin.left},${margin.top})`)\n\n // Set up scales\n const xScale = scaleLinear()\n .domain(extent(bubbleData, d => d.x) as [number, number])\n .range([0, width])\n .nice()\n\n const yScale = scaleLinear()\n .domain(extent(bubbleData, d => d.y) as [number, number])\n .range([chartHeight, 0])\n .nice()\n\n const sizeScale = scaleSqrt()\n .domain([0, max(bubbleData, d => d.size) as number])\n .range([safeDisplayConfig.minBubbleSize, safeDisplayConfig.maxBubbleSize])\n\n // Set up color scale\n let colorScale: ScaleOrdinal<string, string> | ScaleQuantize<string>\n let isNumericColorField = false\n let uniqueColors: string[] = []\n \n if (colorFieldName && bubbleData.length > 0) {\n // Check if color field is numeric for color scaling (same logic as TreeMapChart)\n const colorValues = bubbleData.map(item => {\n const value = item.color\n return typeof value === 'string' ? parseFloat(value) : value\n }).filter((val): val is number => !isNaN(val as number))\n \n isNumericColorField = colorValues.length === bubbleData.length && colorValues.every(val => typeof val === 'number')\n \n if (isNumericColorField) {\n // Use D3 quantize scale for better color distribution with small ranges\n const minValue = Math.min(...colorValues)\n const maxValue = Math.max(...colorValues)\n \n // Create D3 quantize color scale - maps continuous data to discrete color bands\n colorScale = scaleQuantize<string>()\n .domain([minValue, maxValue])\n .range(colorPalette?.gradient || CHART_COLORS_GRADIENT)\n } else {\n // Categorical color field - use series colors\n uniqueColors = [...new Set(bubbleData.map(d => String(d.color)))]\n colorScale = scaleOrdinal<string>()\n .domain(uniqueColors)\n .range(colorPalette?.colors || CHART_COLORS)\n }\n } else {\n // Single color for all bubbles\n colorScale = scaleOrdinal<string>()\n .domain(['default'])\n .range([CHART_COLORS[0]])\n }\n\n // Get theme colors from CSS variables\n const getThemeColor = (varName: string, fallback: string) => {\n const value = getComputedStyle(document.documentElement).getPropertyValue(varName).trim()\n return value || fallback\n }\n\n const isDark = theme !== 'light'\n const textColor = isDark\n ? getThemeColor('--dc-text-muted', '#cbd5e1') // Lighter text for dark mode\n : getThemeColor('--dc-text-secondary', '#374151') // Darker text for light mode\n const gridColor = isDark\n ? getThemeColor('--dc-border', '#475569') // Lighter grid for dark mode\n : '#9ca3af' // Much darker gray for light mode visibility\n\n // Add grid\n if (safeDisplayConfig.showGrid) {\n // X-axis grid\n const xGrid = g.append('g')\n .attr('class', 'grid')\n .attr('transform', `translate(0,${chartHeight})`)\n .call(axisBottom(xScale)\n .tickSize(-chartHeight)\n .tickFormat(() => '')\n )\n\n xGrid.selectAll('line')\n .style('stroke', gridColor)\n .style('stroke-dasharray', '3,3')\n .style('opacity', 0.3)\n\n xGrid.select('.domain')\n .style('stroke', 'none')\n\n // Y-axis grid\n const yGrid = g.append('g')\n .attr('class', 'grid')\n .call(axisLeft(yScale)\n .tickSize(-width)\n .tickFormat(() => '')\n )\n\n yGrid.selectAll('line')\n .style('stroke', gridColor)\n .style('stroke-dasharray', '3,3')\n .style('opacity', 0.3)\n\n yGrid.select('.domain')\n .style('stroke', 'none')\n }\n\n // Add X axis with proper time formatting if needed\n const xAxisGenerator = axisBottom(xScale)\n\n // If it's a time dimension, format the tick labels\n if (isTimeDimension) {\n xAxisGenerator.tickFormat((d) => {\n const date = new Date(d as number)\n if (isNaN(date.getTime())) return String(d)\n\n // Format based on granularity\n switch (xGranularity?.toLowerCase()) {\n case 'year':\n return String(date.getUTCFullYear())\n case 'quarter': {\n const q = Math.floor(date.getUTCMonth() / 3) + 1\n return `${date.getUTCFullYear()}-Q${q}`\n }\n case 'month':\n return `${date.getUTCFullYear()}-${String(date.getUTCMonth() + 1).padStart(2, '0')}`\n case 'week':\n case 'day':\n return `${date.getUTCFullYear()}-${String(date.getUTCMonth() + 1).padStart(2, '0')}-${String(date.getUTCDate()).padStart(2, '0')}`\n case 'hour':\n return `${String(date.getUTCMonth() + 1).padStart(2, '0')}-${String(date.getUTCDate()).padStart(2, '0')} ${String(date.getUTCHours()).padStart(2, '0')}:00`\n default:\n return `${date.getUTCFullYear()}-${String(date.getUTCMonth() + 1).padStart(2, '0')}`\n }\n })\n } else if (safeDisplayConfig.xAxisFormat) {\n // Apply custom formatting for non-time X-axis\n xAxisGenerator.tickFormat((d) => formatAxisValue(d as number, safeDisplayConfig.xAxisFormat))\n }\n\n const xAxis = g.append('g')\n .attr('transform', `translate(0,${chartHeight})`)\n .call(xAxisGenerator)\n\n xAxis.selectAll('text')\n .style('fill', textColor)\n\n xAxis.selectAll('line, path')\n .style('stroke', gridColor)\n\n xAxis.append('text')\n .attr('x', width / 2)\n .attr('y', 35)\n .attr('fill', textColor)\n .style('text-anchor', 'middle')\n .style('font-size', '12px')\n .text(safeDisplayConfig.xAxisFormat?.label || getFieldLabel(xAxisField))\n\n // Add Y axis with optional formatting\n const yAxisGenerator = axisLeft(yScale)\n if (safeDisplayConfig.leftYAxisFormat) {\n yAxisGenerator.tickFormat((d) => formatAxisValue(d as number, safeDisplayConfig.leftYAxisFormat))\n }\n const yAxis = g.append('g')\n .call(yAxisGenerator)\n\n yAxis.selectAll('text')\n .style('fill', textColor)\n\n yAxis.selectAll('line, path')\n .style('stroke', gridColor)\n\n yAxis.append('text')\n .attr('transform', 'rotate(-90)')\n .attr('y', -35)\n .attr('x', -chartHeight / 2)\n .attr('fill', textColor)\n .style('text-anchor', 'middle')\n .style('font-size', '12px')\n .text(safeDisplayConfig.leftYAxisFormat?.label || getFieldLabel(yAxisField))\n\n // Create tooltip\n const tooltip = select('body').append('div')\n .attr('class', 'bubble-chart-tooltip')\n .style('position', 'absolute')\n .style('padding', '8px')\n .style('background', 'rgba(0, 0, 0, 0.8)')\n .style('color', 'white')\n .style('border-radius', '4px')\n .style('font-size', '12px')\n .style('pointer-events', 'none')\n .style('opacity', 0)\n .style('z-index', 1000)\n\n // Add bubbles\n const bubbles = g.selectAll('.bubble')\n .data(bubbleData)\n .enter().append('circle')\n .attr('class', 'bubble')\n .attr('cx', d => xScale(d.x))\n .attr('cy', d => yScale(d.y))\n .attr('r', d => sizeScale(d.size))\n .style('fill', d => {\n if (colorFieldName && d.color !== undefined) {\n return isNumericColorField\n ? (colorScale as ScaleQuantize<string>)(d.color as number)\n : (colorScale as ScaleOrdinal<string, string>)(String(d.color))\n }\n return CHART_COLORS[0]\n })\n .style('opacity', safeDisplayConfig.bubbleOpacity)\n .style('stroke', '#fff')\n .style('stroke-width', 1)\n .style('cursor', 'pointer')\n\n // Add hover effects\n if (safeDisplayConfig.showTooltip) {\n bubbles\n .on('mouseover', function(event, d) {\n select(this)\n .transition()\n .duration(200)\n .style('opacity', 1)\n .attr('r', sizeScale(d.size) * 1.1)\n\n const tooltipContent = [\n `<strong>${d.series || 'Unknown'}</strong>`,\n `${getFieldLabel(xAxisField)}: ${d.xLabel || (safeDisplayConfig.xAxisFormat ? formatAxisValue(d.x, safeDisplayConfig.xAxisFormat) : d.x)}`,\n `${getFieldLabel(yAxisField)}: ${safeDisplayConfig.leftYAxisFormat ? formatAxisValue(d.y, safeDisplayConfig.leftYAxisFormat) : d.y}`,\n `${getFieldLabel(sizeFieldName)}: ${safeDisplayConfig.leftYAxisFormat ? formatAxisValue(d.size, safeDisplayConfig.leftYAxisFormat) : d.size}`,\n colorFieldName && d.color ? `${getFieldLabel(colorFieldName)}: ${d.color}` : ''\n ].filter(Boolean).join('<br>')\n\n tooltip\n .html(tooltipContent)\n .style('left', (event.pageX + 10) + 'px')\n .style('top', (event.pageY - 10) + 'px')\n .transition()\n .duration(200)\n .style('opacity', 1)\n })\n .on('mousemove', function(event) {\n tooltip\n .style('left', (event.pageX + 10) + 'px')\n .style('top', (event.pageY - 10) + 'px')\n })\n .on('mouseout', function(_event, d) {\n select(this)\n .transition()\n .duration(200)\n .style('opacity', safeDisplayConfig.bubbleOpacity)\n .attr('r', sizeScale(d.size))\n\n tooltip\n .transition()\n .duration(200)\n .style('opacity', 0)\n })\n }\n\n // Add legend if needed\n if (safeDisplayConfig.showLegend && colorFieldName) {\n if (isNumericColorField) {\n // Create gradient legend for numeric color field\n const legendWidth = 200\n const legendHeight = 20\n const minValue = Math.min(...bubbleData.map(d => d.color as number))\n const maxValue = Math.max(...bubbleData.map(d => d.color as number))\n \n const legend = g.append('g')\n .attr('class', 'color-legend')\n .attr('transform', `translate(${width / 2 - legendWidth / 2}, ${chartHeight + 60})`)\n\n // Create gradient definition\n const defs = svg.append('defs')\n const gradient = defs.append('linearGradient')\n .attr('id', 'color-scale-gradient')\n .attr('x1', '0%')\n .attr('y1', '0%')\n .attr('x2', '100%')\n .attr('y2', '0%')\n\n // Add color stops for the gradient\n const gradientColors = colorPalette?.gradient || CHART_COLORS_GRADIENT\n gradientColors.forEach((color, i) => {\n gradient.append('stop')\n .attr('offset', `${(i / (gradientColors.length - 1)) * 100}%`)\n .attr('stop-color', color)\n })\n\n // Add the gradient rectangle\n legend.append('rect')\n .attr('width', legendWidth)\n .attr('height', legendHeight)\n .style('fill', 'url(#color-scale-gradient)')\n .style('stroke', '#ccc')\n .style('stroke-width', 1)\n\n // Add min value label\n legend.append('text')\n .attr('x', 0)\n .attr('y', legendHeight + 15)\n .attr('text-anchor', 'start')\n .style('font-size', '11px')\n .style('fill', textColor)\n .text(safeDisplayConfig.leftYAxisFormat ? formatAxisValue(minValue, safeDisplayConfig.leftYAxisFormat) : minValue.toFixed(2))\n\n // Add max value label\n legend.append('text')\n .attr('x', legendWidth)\n .attr('y', legendHeight + 15)\n .attr('text-anchor', 'end')\n .style('font-size', '11px')\n .style('fill', textColor)\n .text(safeDisplayConfig.leftYAxisFormat ? formatAxisValue(maxValue, safeDisplayConfig.leftYAxisFormat) : maxValue.toFixed(2))\n\n // Add field name label\n legend.append('text')\n .attr('x', legendWidth / 2)\n .attr('y', -5)\n .attr('text-anchor', 'middle')\n .style('font-size', '12px')\n .style('font-weight', 'bold')\n .style('fill', textColor)\n .text(getFieldLabel(colorFieldName))\n\n } else {\n // Original categorical legend\n const legendItems = uniqueColors\n\n if (legendItems.length > 0) {\n const legend = g.append('g')\n .attr('class', 'legend')\n .attr('transform', `translate(${width / 2 - (legendItems.length * 80) / 2}, ${chartHeight + 60})`)\n\n const legendItem = legend.selectAll('.legend-item')\n .data(legendItems)\n .enter().append('g')\n .attr('class', 'legend-item')\n .attr('transform', (_d, i) => `translate(${i * 80}, 0)`)\n .style('cursor', 'pointer')\n\n legendItem.append('circle')\n .attr('cx', 5)\n .attr('cy', 5)\n .attr('r', 5)\n .style('fill', d => (colorScale as ScaleOrdinal<string, string>)(d as string))\n .style('opacity', safeDisplayConfig.bubbleOpacity)\n\n legendItem.append('text')\n .attr('x', 15)\n .attr('y', 5)\n .attr('dy', '.35em')\n .style('font-size', '11px')\n .style('fill', textColor)\n .text(d => String(d))\n\n // Legend hover effects\n legendItem\n .on('mouseover', function(_event, legendKey) {\n // Highlight matching bubbles\n bubbles\n .transition()\n .duration(200)\n .style('opacity', d => {\n const matches = colorFieldName && String(d.color) === legendKey\n return matches ? 1 : 0.2\n })\n })\n .on('mouseout', function() {\n // Reset all bubbles\n bubbles\n .transition()\n .duration(200)\n .style('opacity', safeDisplayConfig.bubbleOpacity)\n })\n }\n }\n }\n\n // Cleanup function\n return () => {\n tooltip.remove()\n }\n }, [data, chartConfig, safeDisplayConfig, queryObject, dimensions, dimensionsReady, colorPalette, theme, getFieldLabel])\n\n if (!data || data.length === 0) {\n return (\n <div className=\"flex items-center justify-center w-full text-dc-text-muted\" style={{ height }}>\n <div className=\"text-center\">\n <div className=\"text-sm font-semibold mb-1\">No data available</div>\n <div className=\"text-xs text-dc-text-secondary\">No data points to display in bubble chart</div>\n </div>\n </div>\n )\n }\n\n // Validate that we have required fields\n const hasValidConfig = chartConfig?.xAxis && chartConfig?.yAxis && chartConfig?.series\n if (!hasValidConfig) {\n return (\n <div className=\"flex items-center justify-center w-full text-dc-warning\" style={{ height }}>\n <div className=\"text-center\">\n <div className=\"text-sm font-semibold mb-1\">Configuration Required</div>\n <div className=\"text-xs\">Bubble chart requires xAxis, yAxis, series, and sizeField dimensions</div>\n <div className=\"text-xs mt-1\">Optional: colorField for bubble coloring</div>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"w-full flex-1 flex flex-col relative\" style={{ height, minHeight: '250px', overflow: 'hidden' }}>\n <div ref={containerRef} className=\"w-full h-full relative\">\n <svg ref={svgRef} className=\"w-full h-full\" />\n {!dimensionsReady && (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"text-dc-text-muted text-sm\">Measuring chart dimensions...</div>\n </div>\n )}\n </div>\n </div>\n )\n})\n\nexport default BubbleChart"],"names":["themeStore","listener","watchThemeChanges","useTheme","theme","useSyncExternalStore","getTheme","setTheme","useCallback","newTheme","setThemeUtil","BubbleChart","React","data","chartConfig","displayConfig","queryObject","height","colorPalette","svgRef","useRef","containerRef","dimensions","setDimensions","useState","dimensionsReady","setDimensionsReady","getFieldLabel","useCubeFieldLabel","safeDisplayConfig","useMemo","useLayoutEffect","retryCount","maxRetries","rafId","timeoutId","updateDimensions","width","retryWithRaf","useEffect","resizeObserver","entries","entry","select","xAxisField","yAxisField","seriesField","sizeFieldName","colorFieldName","xGranularity","getFieldGranularity","isTimeDimension","td","bubbleData","item","rawXValue","xNum","xLabel","dateStr","date","isoStr","formatTimeValue","formattedValue","yValue","parseNumericValue","sizeValue","seriesValue","isValidNumericValue","d","margin","CHART_MARGINS","chartHeight","svg","g","xScale","scaleLinear","extent","yScale","sizeScale","scaleSqrt","max","colorScale","isNumericColorField","uniqueColors","colorValues","value","val","minValue","maxValue","scaleQuantize","CHART_COLORS_GRADIENT","scaleOrdinal","CHART_COLORS","getThemeColor","varName","fallback","isDark","textColor","gridColor","xGrid","axisBottom","yGrid","axisLeft","xAxisGenerator","q","formatAxisValue","xAxis","yAxisGenerator","yAxis","tooltip","bubbles","event","tooltipContent","_event","legend","gradient","gradientColors","color","i","legendItems","legendItem","_d","legendKey","jsx","jsxs"],"mappings":";;;AAcA,MAAMA,IAAa;AAAA,EACjB,+BAAe,IAAA;AAAA,EAEf,UAAU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AU,2DAA0D,OAAO,EAAE,QAAA1G,EAAA,GAChF,UAAA,gBAAA2G,GAAC,OAAA,EAAI,WAAU,eACb,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,8BAA6B,UAAA,0BAAsB;AAAA,IAClE,gBAAAA,EAAC,OAAA,EAAI,WAAU,WAAU,UAAA,wEAAoE;AAAA,IAC7F,gBAAAA,EAAC,OAAA,EAAI,WAAU,gBAAe,UAAA,2CAAA,CAAwC;AAAA,EAAA,EAAA,CACxE,EAAA,CACF;AAgBN,CAAC;;;;"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { g as e } from "./chart-activitygridchart-config-AVBoHdRn.js";
|
|
2
|
-
const a = {
|
|
3
|
-
icon: e("bubble"),
|
|
4
|
-
description: "Compare three dimensions of data",
|
|
5
|
-
useCase: "Best for showing relationships between three variables (X, Y, and size), market analysis",
|
|
6
|
-
dropZones: [
|
|
7
|
-
{
|
|
8
|
-
key: "xAxis",
|
|
9
|
-
label: "X-Axis",
|
|
10
|
-
description: "Horizontal axis position",
|
|
11
|
-
mandatory: !0,
|
|
12
|
-
maxItems: 1,
|
|
13
|
-
acceptTypes: ["dimension", "timeDimension", "measure"],
|
|
14
|
-
emptyText: "Drop a field for X-axis position"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
key: "yAxis",
|
|
18
|
-
label: "Y-Axis",
|
|
19
|
-
description: "Vertical axis position",
|
|
20
|
-
mandatory: !0,
|
|
21
|
-
maxItems: 1,
|
|
22
|
-
acceptTypes: ["measure"],
|
|
23
|
-
emptyText: "Drop a measure for Y-axis position"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
key: "sizeField",
|
|
27
|
-
label: "Bubble Radius",
|
|
28
|
-
description: "Size of bubbles based on this measure",
|
|
29
|
-
mandatory: !0,
|
|
30
|
-
maxItems: 1,
|
|
31
|
-
acceptTypes: ["measure"],
|
|
32
|
-
emptyText: "Drop a measure for bubble size"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: "series",
|
|
36
|
-
label: "Bubble Labels",
|
|
37
|
-
description: "Field to use for bubble labels and identification",
|
|
38
|
-
mandatory: !0,
|
|
39
|
-
maxItems: 1,
|
|
40
|
-
acceptTypes: ["dimension"],
|
|
41
|
-
emptyText: "Drop a dimension for bubble labels"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
key: "colorField",
|
|
45
|
-
label: "Bubble Colour",
|
|
46
|
-
description: "Color bubbles by this field (optional)",
|
|
47
|
-
mandatory: !1,
|
|
48
|
-
maxItems: 1,
|
|
49
|
-
acceptTypes: ["dimension", "measure"],
|
|
50
|
-
emptyText: "Drop a field for bubble color (optional)"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
displayOptions: ["showLegend", "showGrid", "showTooltip", "minBubbleSize", "maxBubbleSize", "bubbleOpacity", "hideHeader"],
|
|
54
|
-
displayOptionsConfig: [
|
|
55
|
-
{
|
|
56
|
-
key: "xAxisFormat",
|
|
57
|
-
label: "X-Axis Format",
|
|
58
|
-
type: "axisFormat",
|
|
59
|
-
description: "Number formatting for X-axis"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
key: "leftYAxisFormat",
|
|
63
|
-
label: "Y-Axis Format",
|
|
64
|
-
type: "axisFormat",
|
|
65
|
-
description: "Number formatting for Y-axis and values"
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
};
|
|
69
|
-
export {
|
|
70
|
-
a as bubbleChartConfig
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=chart-bubblechart-config-yLq2oyR3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-bubblechart-config-yLq2oyR3.js","sources":["../../../src/client/components/charts/BubbleChart.config.tsx"],"sourcesContent":["import type { ChartTypeConfig } from '../../charts/chartConfigs'\nimport { getChartTypeIcon } from '../../icons'\n\n/**\n * Configuration for the bubble chart type\n */\nexport const bubbleChartConfig: ChartTypeConfig = {\n icon: getChartTypeIcon('bubble'),\n description: 'Compare three dimensions of data',\n useCase: 'Best for showing relationships between three variables (X, Y, and size), market analysis',\n dropZones: [\n {\n key: 'xAxis',\n label: 'X-Axis',\n description: 'Horizontal axis position',\n mandatory: true,\n maxItems: 1,\n acceptTypes: ['dimension', 'timeDimension', 'measure'],\n emptyText: 'Drop a field for X-axis position'\n },\n {\n key: 'yAxis',\n label: 'Y-Axis', \n description: 'Vertical axis position',\n mandatory: true,\n maxItems: 1,\n acceptTypes: ['measure'],\n emptyText: 'Drop a measure for Y-axis position'\n },\n {\n key: 'sizeField',\n label: 'Bubble Radius',\n description: 'Size of bubbles based on this measure',\n mandatory: true,\n maxItems: 1,\n acceptTypes: ['measure'],\n emptyText: 'Drop a measure for bubble size'\n },\n {\n key: 'series',\n label: 'Bubble Labels',\n description: 'Field to use for bubble labels and identification',\n mandatory: true,\n maxItems: 1,\n acceptTypes: ['dimension'],\n emptyText: 'Drop a dimension for bubble labels'\n },\n {\n key: 'colorField',\n label: 'Bubble Colour',\n description: 'Color bubbles by this field (optional)',\n mandatory: false,\n maxItems: 1,\n acceptTypes: ['dimension', 'measure'],\n emptyText: 'Drop a field for bubble color (optional)'\n }\n ],\n displayOptions: ['showLegend', 'showGrid', 'showTooltip', 'minBubbleSize', 'maxBubbleSize', 'bubbleOpacity', 'hideHeader'],\n displayOptionsConfig: [\n {\n key: 'xAxisFormat',\n label: 'X-Axis Format',\n type: 'axisFormat',\n description: 'Number formatting for X-axis'\n },\n {\n key: 'leftYAxisFormat',\n label: 'Y-Axis Format',\n type: 'axisFormat',\n description: 'Number formatting for Y-axis and values'\n }\n ]\n}"],"names":["bubbleChartConfig","getChartTypeIcon"],"mappings":";AAMO,MAAMA,IAAqC;AAAA,EAChD,MAAMC,EAAiB,QAAQ;AAAA,EAC/B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AAAA,IACT;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,aAAa;AAAA,MACb,WAAW;AAAA,MACX,UAAU;AAAA,MACV,aAAa,CAAC,aAAa,iBAAiB,SAAS;AAAA,MACrD,WAAW;AAAA,IAAA;AAAA,IAEb;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,aAAa;AAAA,MACb,WAAW;AAAA,MACX,UAAU;AAAA,MACV,aAAa,CAAC,SAAS;AAAA,MACvB,WAAW;AAAA,IAAA;AAAA,IAEb;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,aAAa;AAAA,MACb,WAAW;AAAA,MACX,UAAU;AAAA,MACV,aAAa,CAAC,SAAS;AAAA,MACvB,WAAW;AAAA,IAAA;AAAA,IAEb;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,aAAa;AAAA,MACb,WAAW;AAAA,MACX,UAAU;AAAA,MACV,aAAa,CAAC,WAAW;AAAA,MACzB,WAAW;AAAA,IAAA;AAAA,IAEb;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,aAAa;AAAA,MACb,WAAW;AAAA,MACX,UAAU;AAAA,MACV,aAAa,CAAC,aAAa,SAAS;AAAA,MACpC,WAAW;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,gBAAgB,CAAC,cAAc,YAAY,eAAe,iBAAiB,iBAAiB,iBAAiB,YAAY;AAAA,EACzH,sBAAsB;AAAA,IACpB;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,IAAA;AAAA,IAEf;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as v, useState as m, useLayoutEffect as y } from "react";
|
|
3
|
-
import { ResponsiveContainer as x } from "recharts";
|
|
4
|
-
const b = {
|
|
5
|
-
sm: "h-6 w-6",
|
|
6
|
-
md: "h-8 w-8",
|
|
7
|
-
lg: "h-12 w-12"
|
|
8
|
-
};
|
|
9
|
-
function g({
|
|
10
|
-
size: l = "md",
|
|
11
|
-
className: i = ""
|
|
12
|
-
}) {
|
|
13
|
-
return /* @__PURE__ */ e(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
className: `animate-spin rounded-full border-b-2 ${b[l]} ${i}`,
|
|
17
|
-
style: { borderBottomColor: "var(--dc-primary)" },
|
|
18
|
-
role: "status",
|
|
19
|
-
"aria-label": "Loading"
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
function z({ children: l, height: i = "100%" }) {
|
|
24
|
-
const t = v(null), [o, h] = m(!1), [r, f] = m({ width: 0, height: 0 });
|
|
25
|
-
y(() => {
|
|
26
|
-
let n = !0, a = null;
|
|
27
|
-
const w = () => {
|
|
28
|
-
if (!n || !t.current) return;
|
|
29
|
-
const c = t.current.getBoundingClientRect(), d = Math.max(t.current.clientWidth, c.width), s = Math.max(t.current.clientHeight, c.height);
|
|
30
|
-
d > 0 && s > 0 && (f({ width: d, height: s }), h(!0));
|
|
31
|
-
};
|
|
32
|
-
return a = new ResizeObserver((c) => {
|
|
33
|
-
for (const d of c) {
|
|
34
|
-
const { width: s, height: u } = d.contentRect;
|
|
35
|
-
s > 0 && u > 0 && (f({ width: s, height: u }), o || h(!0));
|
|
36
|
-
}
|
|
37
|
-
}), t.current && (a.observe(t.current), w()), () => {
|
|
38
|
-
n = !1, a?.disconnect();
|
|
39
|
-
};
|
|
40
|
-
}, [o]);
|
|
41
|
-
try {
|
|
42
|
-
if (i === "100%")
|
|
43
|
-
return /* @__PURE__ */ e(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
ref: t,
|
|
47
|
-
className: "w-full h-full flex-1 flex flex-col relative",
|
|
48
|
-
style: { minHeight: "250px", minWidth: "100px", overflow: "hidden" },
|
|
49
|
-
children: o && r.width > 0 && r.height > 0 ? /* @__PURE__ */ e(
|
|
50
|
-
x,
|
|
51
|
-
{
|
|
52
|
-
width: r.width,
|
|
53
|
-
height: r.height - 16,
|
|
54
|
-
debounce: 100,
|
|
55
|
-
style: { marginTop: "16px" },
|
|
56
|
-
children: l
|
|
57
|
-
}
|
|
58
|
-
) : /* @__PURE__ */ e("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ e(g, { size: "sm" }) })
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
const n = {
|
|
62
|
-
height: typeof i == "number" ? `${i}px` : i,
|
|
63
|
-
width: "100%",
|
|
64
|
-
minHeight: "200px",
|
|
65
|
-
minWidth: "100px"
|
|
66
|
-
};
|
|
67
|
-
return /* @__PURE__ */ e(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
ref: t,
|
|
71
|
-
className: "w-full flex flex-col relative",
|
|
72
|
-
style: { ...n, overflow: "hidden" },
|
|
73
|
-
children: o && r.width > 0 && r.height > 0 ? /* @__PURE__ */ e(
|
|
74
|
-
x,
|
|
75
|
-
{
|
|
76
|
-
width: r.width,
|
|
77
|
-
height: r.height - 16,
|
|
78
|
-
debounce: 100,
|
|
79
|
-
style: { marginTop: "16px" },
|
|
80
|
-
children: l
|
|
81
|
-
}
|
|
82
|
-
) : /* @__PURE__ */ e("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ e(g, { size: "sm" }) })
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
} catch (n) {
|
|
86
|
-
return /* @__PURE__ */ p(
|
|
87
|
-
"div",
|
|
88
|
-
{
|
|
89
|
-
className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border border-dashed rounded-lg",
|
|
90
|
-
style: { height: i, borderColor: "var(--dc-border)", backgroundColor: "var(--dc-surface)" },
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ e("div", { className: "text-sm font-semibold mb-1 text-dc-text-muted", children: "Unable to display chart" }),
|
|
93
|
-
/* @__PURE__ */ e("div", { className: "text-xs text-dc-text-secondary", children: n instanceof Error ? n.message : "Failed to create responsive container" })
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
export {
|
|
100
|
-
z as C,
|
|
101
|
-
g as L
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=chart-chartcontainer-CdwzIKP1.js.map
|