@lightdash/common 0.2129.1 → 0.2131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/index.d.ts +10 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +10 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/visualizations/CartesianChartDataModel.d.ts +1 -1
- package/dist/cjs/visualizations/CartesianChartDataModel.d.ts.map +1 -1
- package/dist/cjs/visualizations/CartesianChartDataModel.js +147 -46
- package/dist/cjs/visualizations/CartesianChartDataModel.js.map +1 -1
- package/dist/cjs/visualizations/PieChartDataModel.d.ts.map +1 -1
- package/dist/cjs/visualizations/PieChartDataModel.js +26 -0
- package/dist/cjs/visualizations/PieChartDataModel.js.map +1 -1
- package/dist/cjs/visualizations/helpers/styles/axisStyles.d.ts +50 -0
- package/dist/cjs/visualizations/helpers/styles/axisStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/axisStyles.js +59 -0
- package/dist/cjs/visualizations/helpers/styles/axisStyles.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/barChartStyles.d.ts +81 -0
- package/dist/cjs/visualizations/helpers/styles/barChartStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/barChartStyles.js +336 -0
- package/dist/cjs/visualizations/helpers/styles/barChartStyles.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/gridStyles.d.ts +21 -0
- package/dist/cjs/visualizations/helpers/styles/gridStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/gridStyles.js +27 -0
- package/dist/cjs/visualizations/helpers/styles/gridStyles.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/legendStyles.d.ts +49 -0
- package/dist/cjs/visualizations/helpers/styles/legendStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/legendStyles.js +38 -0
- package/dist/cjs/visualizations/helpers/styles/legendStyles.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/pieChartStyles.d.ts +49 -0
- package/dist/cjs/visualizations/helpers/styles/pieChartStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/pieChartStyles.js +58 -0
- package/dist/cjs/visualizations/helpers/styles/pieChartStyles.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/referenceLineStyles.d.ts +31 -0
- package/dist/cjs/visualizations/helpers/styles/referenceLineStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/referenceLineStyles.js +43 -0
- package/dist/cjs/visualizations/helpers/styles/referenceLineStyles.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/themeColors.d.ts +18 -0
- package/dist/cjs/visualizations/helpers/styles/themeColors.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/themeColors.js +23 -0
- package/dist/cjs/visualizations/helpers/styles/themeColors.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/tooltipStyles.d.ts +53 -0
- package/dist/cjs/visualizations/helpers/styles/tooltipStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/tooltipStyles.js +147 -0
- package/dist/cjs/visualizations/helpers/styles/tooltipStyles.js.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.d.ts +20 -0
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.js +34 -0
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.js.map +1 -0
- package/dist/cjs/visualizations/{chartTransformations.d.ts → helpers/tooltipFormatter.d.ts} +53 -20
- package/dist/cjs/visualizations/helpers/tooltipFormatter.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/tooltipFormatter.js +510 -0
- package/dist/cjs/visualizations/helpers/tooltipFormatter.js.map +1 -0
- package/dist/cjs/visualizations/helpers/valueFormatter.d.ts +7 -0
- package/dist/cjs/visualizations/helpers/valueFormatter.d.ts.map +1 -0
- package/dist/cjs/visualizations/helpers/valueFormatter.js +13 -0
- package/dist/cjs/visualizations/helpers/valueFormatter.js.map +1 -0
- package/dist/cjs/visualizations/types/index.d.ts +84 -1
- package/dist/cjs/visualizations/types/index.d.ts.map +1 -1
- package/dist/cjs/visualizations/types/index.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.d.ts +10 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +10 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/visualizations/CartesianChartDataModel.d.ts +1 -1
- package/dist/esm/visualizations/CartesianChartDataModel.d.ts.map +1 -1
- package/dist/esm/visualizations/CartesianChartDataModel.js +146 -45
- package/dist/esm/visualizations/CartesianChartDataModel.js.map +1 -1
- package/dist/esm/visualizations/PieChartDataModel.d.ts.map +1 -1
- package/dist/esm/visualizations/PieChartDataModel.js +26 -0
- package/dist/esm/visualizations/PieChartDataModel.js.map +1 -1
- package/dist/esm/visualizations/helpers/styles/axisStyles.d.ts +50 -0
- package/dist/esm/visualizations/helpers/styles/axisStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/axisStyles.js +51 -0
- package/dist/esm/visualizations/helpers/styles/axisStyles.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/barChartStyles.d.ts +81 -0
- package/dist/esm/visualizations/helpers/styles/barChartStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/barChartStyles.js +326 -0
- package/dist/esm/visualizations/helpers/styles/barChartStyles.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/gridStyles.d.ts +21 -0
- package/dist/esm/visualizations/helpers/styles/gridStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/gridStyles.js +22 -0
- package/dist/esm/visualizations/helpers/styles/gridStyles.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/legendStyles.d.ts +49 -0
- package/dist/esm/visualizations/helpers/styles/legendStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/legendStyles.js +34 -0
- package/dist/esm/visualizations/helpers/styles/legendStyles.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/pieChartStyles.d.ts +49 -0
- package/dist/esm/visualizations/helpers/styles/pieChartStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/pieChartStyles.js +51 -0
- package/dist/esm/visualizations/helpers/styles/pieChartStyles.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/referenceLineStyles.d.ts +31 -0
- package/dist/esm/visualizations/helpers/styles/referenceLineStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/referenceLineStyles.js +39 -0
- package/dist/esm/visualizations/helpers/styles/referenceLineStyles.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/themeColors.d.ts +18 -0
- package/dist/esm/visualizations/helpers/styles/themeColors.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/themeColors.js +20 -0
- package/dist/esm/visualizations/helpers/styles/themeColors.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/tooltipStyles.d.ts +53 -0
- package/dist/esm/visualizations/helpers/styles/tooltipStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/tooltipStyles.js +136 -0
- package/dist/esm/visualizations/helpers/styles/tooltipStyles.js.map +1 -0
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.d.ts +20 -0
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.js +30 -0
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.js.map +1 -0
- package/dist/esm/visualizations/{chartTransformations.d.ts → helpers/tooltipFormatter.d.ts} +53 -20
- package/dist/esm/visualizations/helpers/tooltipFormatter.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/tooltipFormatter.js +502 -0
- package/dist/esm/visualizations/helpers/tooltipFormatter.js.map +1 -0
- package/dist/esm/visualizations/helpers/valueFormatter.d.ts +7 -0
- package/dist/esm/visualizations/helpers/valueFormatter.d.ts.map +1 -0
- package/dist/esm/visualizations/helpers/valueFormatter.js +8 -0
- package/dist/esm/visualizations/helpers/valueFormatter.js.map +1 -0
- package/dist/esm/visualizations/types/index.d.ts +84 -1
- package/dist/esm/visualizations/types/index.d.ts.map +1 -1
- package/dist/esm/visualizations/types/index.js +1 -1
- package/dist/esm/visualizations/types/index.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +10 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +10 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/visualizations/CartesianChartDataModel.d.ts +1 -1
- package/dist/types/visualizations/CartesianChartDataModel.d.ts.map +1 -1
- package/dist/types/visualizations/CartesianChartDataModel.js +146 -45
- package/dist/types/visualizations/CartesianChartDataModel.js.map +1 -1
- package/dist/types/visualizations/PieChartDataModel.d.ts.map +1 -1
- package/dist/types/visualizations/PieChartDataModel.js +26 -0
- package/dist/types/visualizations/PieChartDataModel.js.map +1 -1
- package/dist/types/visualizations/helpers/styles/axisStyles.d.ts +50 -0
- package/dist/types/visualizations/helpers/styles/axisStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/axisStyles.js +51 -0
- package/dist/types/visualizations/helpers/styles/axisStyles.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/barChartStyles.d.ts +81 -0
- package/dist/types/visualizations/helpers/styles/barChartStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/barChartStyles.js +326 -0
- package/dist/types/visualizations/helpers/styles/barChartStyles.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/gridStyles.d.ts +21 -0
- package/dist/types/visualizations/helpers/styles/gridStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/gridStyles.js +22 -0
- package/dist/types/visualizations/helpers/styles/gridStyles.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/legendStyles.d.ts +49 -0
- package/dist/types/visualizations/helpers/styles/legendStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/legendStyles.js +34 -0
- package/dist/types/visualizations/helpers/styles/legendStyles.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/pieChartStyles.d.ts +49 -0
- package/dist/types/visualizations/helpers/styles/pieChartStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/pieChartStyles.js +51 -0
- package/dist/types/visualizations/helpers/styles/pieChartStyles.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/referenceLineStyles.d.ts +31 -0
- package/dist/types/visualizations/helpers/styles/referenceLineStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/referenceLineStyles.js +39 -0
- package/dist/types/visualizations/helpers/styles/referenceLineStyles.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/themeColors.d.ts +18 -0
- package/dist/types/visualizations/helpers/styles/themeColors.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/themeColors.js +20 -0
- package/dist/types/visualizations/helpers/styles/themeColors.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/tooltipStyles.d.ts +53 -0
- package/dist/types/visualizations/helpers/styles/tooltipStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/tooltipStyles.js +136 -0
- package/dist/types/visualizations/helpers/styles/tooltipStyles.js.map +1 -0
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.d.ts +20 -0
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.js +30 -0
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.js.map +1 -0
- package/dist/types/visualizations/{chartTransformations.d.ts → helpers/tooltipFormatter.d.ts} +53 -20
- package/dist/types/visualizations/helpers/tooltipFormatter.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/tooltipFormatter.js +502 -0
- package/dist/types/visualizations/helpers/tooltipFormatter.js.map +1 -0
- package/dist/types/visualizations/helpers/valueFormatter.d.ts +7 -0
- package/dist/types/visualizations/helpers/valueFormatter.d.ts.map +1 -0
- package/dist/types/visualizations/helpers/valueFormatter.js +8 -0
- package/dist/types/visualizations/helpers/valueFormatter.js.map +1 -0
- package/dist/types/visualizations/types/index.d.ts +84 -1
- package/dist/types/visualizations/types/index.d.ts.map +1 -1
- package/dist/types/visualizations/types/index.js +1 -1
- package/dist/types/visualizations/types/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/visualizations/chartTransformations.d.ts.map +0 -1
- package/dist/cjs/visualizations/chartTransformations.js +0 -112
- package/dist/cjs/visualizations/chartTransformations.js.map +0 -1
- package/dist/esm/visualizations/chartTransformations.d.ts.map +0 -1
- package/dist/esm/visualizations/chartTransformations.js +0 -107
- package/dist/esm/visualizations/chartTransformations.js.map +0 -1
- package/dist/types/visualizations/chartTransformations.d.ts.map +0 -1
- package/dist/types/visualizations/chartTransformations.js +0 -107
- package/dist/types/visualizations/chartTransformations.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get grid line styling for line charts
|
|
3
|
+
*/
|
|
4
|
+
export declare const getLineChartGridStyle: () => {
|
|
5
|
+
show: boolean;
|
|
6
|
+
lineStyle: {
|
|
7
|
+
color: string;
|
|
8
|
+
type: "solid";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Get grid line styling for bar charts
|
|
13
|
+
*/
|
|
14
|
+
export declare const getBarChartGridStyle: () => {
|
|
15
|
+
show: boolean;
|
|
16
|
+
lineStyle: {
|
|
17
|
+
color: string;
|
|
18
|
+
type: readonly [3, 3];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=gridStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridStyles.d.ts","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/gridStyles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAMhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;CAM/B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBarChartGridStyle = exports.getLineChartGridStyle = void 0;
|
|
4
|
+
const themeColors_1 = require("./themeColors");
|
|
5
|
+
/**
|
|
6
|
+
* Get grid line styling for line charts
|
|
7
|
+
*/
|
|
8
|
+
const getLineChartGridStyle = () => ({
|
|
9
|
+
show: true,
|
|
10
|
+
lineStyle: {
|
|
11
|
+
color: themeColors_1.GRAY_1,
|
|
12
|
+
type: 'solid',
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
exports.getLineChartGridStyle = getLineChartGridStyle;
|
|
16
|
+
/**
|
|
17
|
+
* Get grid line styling for bar charts
|
|
18
|
+
*/
|
|
19
|
+
const getBarChartGridStyle = () => ({
|
|
20
|
+
show: true,
|
|
21
|
+
lineStyle: {
|
|
22
|
+
color: themeColors_1.GRAY_2,
|
|
23
|
+
type: [3, 3], // [dash length, gap length]
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
exports.getBarChartGridStyle = getBarChartGridStyle;
|
|
27
|
+
//# sourceMappingURL=gridStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/gridStyles.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAE/C;;GAEG;AACI,MAAM,qBAAqB,GAAG,GAAG,EAAE,CAAC,CAAC;IACxC,IAAI,EAAE,IAAI;IACV,SAAS,EAAE;QACP,KAAK,EAAE,oBAAM;QACb,IAAI,EAAE,OAAgB;KACzB;CACJ,CAAC,CAAC;AANU,QAAA,qBAAqB,yBAM/B;AAEH;;GAEG;AACI,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE,IAAI;IACV,SAAS,EAAE;QACP,KAAK,EAAE,oBAAM;QACb,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAU,EAAE,4BAA4B;KACtD;CACJ,CAAC,CAAC;AANU,QAAA,oBAAoB,wBAM9B"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
type LegendIconType = 'line' | 'square';
|
|
2
|
+
export declare const getLegendStyle: (iconType?: LegendIconType) => {
|
|
3
|
+
textStyle: {
|
|
4
|
+
color: string;
|
|
5
|
+
fontSize: number;
|
|
6
|
+
fontWeight: number;
|
|
7
|
+
padding: number[];
|
|
8
|
+
};
|
|
9
|
+
pageButtonItemGap: number;
|
|
10
|
+
pageButtonGap: number;
|
|
11
|
+
pageTextStyle: {
|
|
12
|
+
color: string;
|
|
13
|
+
fontSize: number;
|
|
14
|
+
fontWeight: number;
|
|
15
|
+
};
|
|
16
|
+
pageIconColor: string;
|
|
17
|
+
pageIconInactiveColor: string;
|
|
18
|
+
pageIconSize: number;
|
|
19
|
+
icon: string;
|
|
20
|
+
itemWidth: number;
|
|
21
|
+
itemHeight: number;
|
|
22
|
+
itemGap: number;
|
|
23
|
+
} | {
|
|
24
|
+
textStyle: {
|
|
25
|
+
color: string;
|
|
26
|
+
fontSize: number;
|
|
27
|
+
fontWeight: number;
|
|
28
|
+
padding: number[];
|
|
29
|
+
};
|
|
30
|
+
pageButtonItemGap: number;
|
|
31
|
+
pageButtonGap: number;
|
|
32
|
+
pageTextStyle: {
|
|
33
|
+
color: string;
|
|
34
|
+
fontSize: number;
|
|
35
|
+
fontWeight: number;
|
|
36
|
+
};
|
|
37
|
+
pageIconColor: string;
|
|
38
|
+
pageIconInactiveColor: string;
|
|
39
|
+
pageIconSize: number;
|
|
40
|
+
icon: string;
|
|
41
|
+
itemStyle: {
|
|
42
|
+
borderRadius: number;
|
|
43
|
+
};
|
|
44
|
+
itemWidth: number;
|
|
45
|
+
itemHeight: number;
|
|
46
|
+
itemGap: number;
|
|
47
|
+
};
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=legendStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legendStyles.d.ts","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/legendStyles.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC;AAMxC,eAAO,MAAM,cAAc,cAAc,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLegendStyle = void 0;
|
|
4
|
+
const themeColors_1 = require("./themeColors");
|
|
5
|
+
// looks like -o-
|
|
6
|
+
const lineSeriesLegendIcon = 'path://M0,5 L5,5 L5,7 L0,7 Z M13,5 L18,5 L18,7 L13,7 Z M9,2 A4,4 0 1,1 9,10 A4,4 0 1,1 9,2 Z';
|
|
7
|
+
const getLegendStyle = (iconType = 'square') => ({
|
|
8
|
+
itemWidth: iconType === 'line' ? 18 : 12,
|
|
9
|
+
itemHeight: 12,
|
|
10
|
+
itemGap: 16,
|
|
11
|
+
...(iconType === 'line'
|
|
12
|
+
? {
|
|
13
|
+
icon: lineSeriesLegendIcon,
|
|
14
|
+
}
|
|
15
|
+
: {
|
|
16
|
+
icon: 'roundRect',
|
|
17
|
+
itemStyle: { borderRadius: 3 },
|
|
18
|
+
}),
|
|
19
|
+
textStyle: {
|
|
20
|
+
color: themeColors_1.GRAY_7,
|
|
21
|
+
fontSize: 12,
|
|
22
|
+
fontWeight: 500,
|
|
23
|
+
padding: [0, 0, 0, 2],
|
|
24
|
+
},
|
|
25
|
+
// Navigation controls (for scrollable legends)
|
|
26
|
+
pageButtonItemGap: 16, // Space between left arrow, page text, and right arrow
|
|
27
|
+
pageButtonGap: 8, // Space between legend items and navigation controls
|
|
28
|
+
pageTextStyle: {
|
|
29
|
+
color: themeColors_1.GRAY_7,
|
|
30
|
+
fontSize: 12,
|
|
31
|
+
fontWeight: 500,
|
|
32
|
+
},
|
|
33
|
+
pageIconColor: themeColors_1.GRAY_7, // Active chevron color
|
|
34
|
+
pageIconInactiveColor: themeColors_1.GRAY_3, // Inactive chevron color
|
|
35
|
+
pageIconSize: 12,
|
|
36
|
+
});
|
|
37
|
+
exports.getLegendStyle = getLegendStyle;
|
|
38
|
+
//# sourceMappingURL=legendStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legendStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/legendStyles.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAI/C,iBAAiB;AACjB,MAAM,oBAAoB,GACtB,8FAA8F,CAAC;AAE5F,MAAM,cAAc,GAAG,CAAC,WAA2B,QAAQ,EAAE,EAAE,CAAC,CAAC;IACpE,SAAS,EAAE,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;IACxC,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,EAAE;IACX,GAAG,CAAC,QAAQ,KAAK,MAAM;QACnB,CAAC,CAAC;YACI,IAAI,EAAE,oBAAoB;SAC7B;QACH,CAAC,CAAC;YACI,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;SACjC,CAAC;IACR,SAAS,EAAE;QACP,KAAK,EAAE,oBAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KACxB;IACD,+CAA+C;IAC/C,iBAAiB,EAAE,EAAE,EAAE,uDAAuD;IAC9E,aAAa,EAAE,CAAC,EAAE,qDAAqD;IACvE,aAAa,EAAE;QACX,KAAK,EAAE,oBAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,GAAG;KAClB;IACD,aAAa,EAAE,oBAAM,EAAE,uBAAuB;IAC9C,qBAAqB,EAAE,oBAAM,EAAE,yBAAyB;IACxD,YAAY,EAAE,EAAE;CACnB,CAAC,CAAC;AA7BU,QAAA,cAAc,kBA6BxB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get pie slice styling
|
|
3
|
+
*/
|
|
4
|
+
export declare const getPieSliceStyle: (isDonut: boolean) => {
|
|
5
|
+
itemStyle: {
|
|
6
|
+
borderRadius: number;
|
|
7
|
+
borderColor: string;
|
|
8
|
+
borderWidth: number;
|
|
9
|
+
};
|
|
10
|
+
} | {
|
|
11
|
+
itemStyle?: undefined;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Get external label styling for pie charts
|
|
15
|
+
*/
|
|
16
|
+
export declare const getPieExternalLabelStyle: () => {
|
|
17
|
+
fontSize: number;
|
|
18
|
+
lineHeight: number;
|
|
19
|
+
rich: {
|
|
20
|
+
name: {
|
|
21
|
+
color: string;
|
|
22
|
+
fontWeight: number;
|
|
23
|
+
fontSize: number;
|
|
24
|
+
lineHeight: number;
|
|
25
|
+
};
|
|
26
|
+
value: {
|
|
27
|
+
color: string;
|
|
28
|
+
fontWeight: number;
|
|
29
|
+
fontSize: number;
|
|
30
|
+
lineHeight: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get label line (connector) styling for pie chart external labels
|
|
36
|
+
*/
|
|
37
|
+
export declare const getPieLabelLineStyle: () => {
|
|
38
|
+
lineStyle: {
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Get internal label styling for pie charts (labels inside slices)
|
|
44
|
+
*/
|
|
45
|
+
export declare const getPieInternalLabelStyle: () => {
|
|
46
|
+
fontWeight: number;
|
|
47
|
+
fontSize: number;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=pieChartStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pieChartStyles.d.ts","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/pieChartStyles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAa,OAAO;;;;;;;;CASrC,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAkBnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;CAI/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;CAGnC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPieInternalLabelStyle = exports.getPieLabelLineStyle = exports.getPieExternalLabelStyle = exports.getPieSliceStyle = void 0;
|
|
4
|
+
const themeColors_1 = require("./themeColors");
|
|
5
|
+
/**
|
|
6
|
+
* Get pie slice styling
|
|
7
|
+
*/
|
|
8
|
+
const getPieSliceStyle = (isDonut) => isDonut
|
|
9
|
+
? {
|
|
10
|
+
itemStyle: {
|
|
11
|
+
borderRadius: 4,
|
|
12
|
+
borderColor: themeColors_1.WHITE,
|
|
13
|
+
borderWidth: 2,
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
: {};
|
|
17
|
+
exports.getPieSliceStyle = getPieSliceStyle;
|
|
18
|
+
/**
|
|
19
|
+
* Get external label styling for pie charts
|
|
20
|
+
*/
|
|
21
|
+
const getPieExternalLabelStyle = () => ({
|
|
22
|
+
fontSize: 12,
|
|
23
|
+
lineHeight: 18,
|
|
24
|
+
// Rich text styles for different parts of the label
|
|
25
|
+
rich: {
|
|
26
|
+
name: {
|
|
27
|
+
color: themeColors_1.GRAY_6,
|
|
28
|
+
fontWeight: 500,
|
|
29
|
+
fontSize: 12,
|
|
30
|
+
lineHeight: 18,
|
|
31
|
+
},
|
|
32
|
+
value: {
|
|
33
|
+
color: themeColors_1.GRAY_7,
|
|
34
|
+
fontWeight: 600,
|
|
35
|
+
fontSize: 12,
|
|
36
|
+
lineHeight: 18,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
exports.getPieExternalLabelStyle = getPieExternalLabelStyle;
|
|
41
|
+
/**
|
|
42
|
+
* Get label line (connector) styling for pie chart external labels
|
|
43
|
+
*/
|
|
44
|
+
const getPieLabelLineStyle = () => ({
|
|
45
|
+
lineStyle: {
|
|
46
|
+
color: themeColors_1.GRAY_3,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
exports.getPieLabelLineStyle = getPieLabelLineStyle;
|
|
50
|
+
/**
|
|
51
|
+
* Get internal label styling for pie charts (labels inside slices)
|
|
52
|
+
*/
|
|
53
|
+
const getPieInternalLabelStyle = () => ({
|
|
54
|
+
fontWeight: 500,
|
|
55
|
+
fontSize: 12,
|
|
56
|
+
});
|
|
57
|
+
exports.getPieInternalLabelStyle = getPieInternalLabelStyle;
|
|
58
|
+
//# sourceMappingURL=pieChartStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pieChartStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/pieChartStyles.ts"],"names":[],"mappings":";;;AAAA,+CAA8D;AAE9D;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,OAAgB,EAAE,EAAE,CACjD,OAAO;IACH,CAAC,CAAC;QACI,SAAS,EAAE;YACP,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,mBAAK;YAClB,WAAW,EAAE,CAAC;SACjB;KACJ;IACH,CAAC,CAAC,EAAE,CAAC;AATA,QAAA,gBAAgB,oBAShB;AAEb;;GAEG;AACI,MAAM,wBAAwB,GAAG,GAAG,EAAE,CAAC,CAAC;IAC3C,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,EAAE;IACd,oDAAoD;IACpD,IAAI,EAAE;QACF,IAAI,EAAE;YACF,KAAK,EAAE,oBAAM;YACb,UAAU,EAAE,GAAG;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;SACjB;QACD,KAAK,EAAE;YACH,KAAK,EAAE,oBAAM;YACb,UAAU,EAAE,GAAG;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;SACjB;KACJ;CACJ,CAAC,CAAC;AAlBU,QAAA,wBAAwB,4BAkBlC;AAEH;;GAEG;AACI,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CAAC;IACvC,SAAS,EAAE;QACP,KAAK,EAAE,oBAAM;KAChB;CACJ,CAAC,CAAC;AAJU,QAAA,oBAAoB,wBAI9B;AAEH;;GAEG;AACI,MAAM,wBAAwB,GAAG,GAAG,EAAE,CAAC,CAAC;IAC3C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,EAAE;CACf,CAAC,CAAC;AAHU,QAAA,wBAAwB,4BAGlC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get reference line styling
|
|
3
|
+
*/
|
|
4
|
+
export declare const getReferenceLineStyle: (lineColor?: string) => {
|
|
5
|
+
emphasis: {
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
};
|
|
8
|
+
lineStyle: {
|
|
9
|
+
color: string;
|
|
10
|
+
type: readonly [2, 3];
|
|
11
|
+
width: number;
|
|
12
|
+
};
|
|
13
|
+
label: {
|
|
14
|
+
show: boolean;
|
|
15
|
+
position: "start";
|
|
16
|
+
distance: number;
|
|
17
|
+
formatter: (params: {
|
|
18
|
+
name?: string;
|
|
19
|
+
value?: number | string;
|
|
20
|
+
}) => string;
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
color: string;
|
|
23
|
+
borderWidth: number;
|
|
24
|
+
borderColor: string;
|
|
25
|
+
padding: number[];
|
|
26
|
+
borderRadius: number;
|
|
27
|
+
fontSize: number;
|
|
28
|
+
fontWeight: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=referenceLineStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenceLineStyles.d.ts","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/referenceLineStyles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,qBAAqB,eAAgB,MAAM;;;;;;;;;;;;;4BAgBxB;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE;;;;;;;;;;CAkBzE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReferenceLineStyle = void 0;
|
|
4
|
+
const themeColors_1 = require("./themeColors");
|
|
5
|
+
/**
|
|
6
|
+
* Get reference line styling
|
|
7
|
+
*/
|
|
8
|
+
const getReferenceLineStyle = (lineColor) => {
|
|
9
|
+
const defaultLineColor = lineColor || themeColors_1.GRAY_9;
|
|
10
|
+
return {
|
|
11
|
+
emphasis: {
|
|
12
|
+
disabled: true,
|
|
13
|
+
},
|
|
14
|
+
lineStyle: {
|
|
15
|
+
color: defaultLineColor,
|
|
16
|
+
type: [2, 3], // Dotted: 2px dash, 3px gap
|
|
17
|
+
width: 2,
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
show: true,
|
|
21
|
+
position: 'start', // Start position (left side) to avoid right-edge clipping
|
|
22
|
+
distance: -4, // Negative distance moves label into chart area
|
|
23
|
+
formatter: (params) => {
|
|
24
|
+
const text = params.name || String(params.value || '');
|
|
25
|
+
// Simple truncation - ECharts doesn't handle wrapping well for mark line labels
|
|
26
|
+
const maxChars = 15;
|
|
27
|
+
return text.length > maxChars
|
|
28
|
+
? `${text.substring(0, maxChars)}...`
|
|
29
|
+
: text;
|
|
30
|
+
},
|
|
31
|
+
backgroundColor: themeColors_1.GRAY_7,
|
|
32
|
+
color: themeColors_1.WHITE,
|
|
33
|
+
borderWidth: 1,
|
|
34
|
+
borderColor: themeColors_1.GRAY_8,
|
|
35
|
+
padding: [2, 4],
|
|
36
|
+
borderRadius: 4,
|
|
37
|
+
fontSize: 11,
|
|
38
|
+
fontWeight: 500,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
exports.getReferenceLineStyle = getReferenceLineStyle;
|
|
43
|
+
//# sourceMappingURL=referenceLineStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenceLineStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/referenceLineStyles.ts"],"names":[],"mappings":";;;AAAA,+CAA8D;AAE9D;;GAEG;AACI,MAAM,qBAAqB,GAAG,CAAC,SAAkB,EAAE,EAAE;IACxD,MAAM,gBAAgB,GAAG,SAAS,IAAI,oBAAM,CAAC;IAE7C,OAAO;QACH,QAAQ,EAAE;YACN,QAAQ,EAAE,IAAI;SACjB;QACD,SAAS,EAAE;YACP,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAU,EAAE,4BAA4B;YACnD,KAAK,EAAE,CAAC;SACX;QACD,KAAK,EAAE;YACH,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,OAAgB,EAAE,0DAA0D;YACtF,QAAQ,EAAE,CAAC,CAAC,EAAE,gDAAgD;YAC9D,SAAS,EAAE,CAAC,MAAkD,EAAE,EAAE;gBAC9D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;gBACvD,gFAAgF;gBAChF,MAAM,QAAQ,GAAG,EAAE,CAAC;gBACpB,OAAO,IAAI,CAAC,MAAM,GAAG,QAAQ;oBACzB,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK;oBACrC,CAAC,CAAC,IAAI,CAAC;YACf,CAAC;YACD,eAAe,EAAE,oBAAM;YACvB,KAAK,EAAE,mBAAK;YACZ,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,oBAAM;YACnB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACf,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,GAAG;SAClB;KACJ,CAAC;AACN,CAAC,CAAC;AAlCW,QAAA,qBAAqB,yBAkChC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme color constants for ECharts styling
|
|
3
|
+
* Centralizes color usage across all chart style utilities
|
|
4
|
+
* Using Mantine default color palette
|
|
5
|
+
*/
|
|
6
|
+
export declare const GRAY_0 = "#f8f9fa";
|
|
7
|
+
export declare const GRAY_1 = "#f1f3f5";
|
|
8
|
+
export declare const GRAY_2 = "#e9ecef";
|
|
9
|
+
export declare const GRAY_3 = "#dee2e6";
|
|
10
|
+
export declare const GRAY_4 = "#ced4da";
|
|
11
|
+
export declare const GRAY_5 = "#adb5bd";
|
|
12
|
+
export declare const GRAY_6 = "#868e96";
|
|
13
|
+
export declare const GRAY_7 = "#495057";
|
|
14
|
+
export declare const GRAY_8 = "#343a40";
|
|
15
|
+
export declare const GRAY_9 = "#212529";
|
|
16
|
+
export declare const WHITE = "#FFFFFF";
|
|
17
|
+
export declare const AXIS_TITLE_COLOR = "#747B83";
|
|
18
|
+
//# sourceMappingURL=themeColors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeColors.d.ts","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/themeColors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAChC,eAAO,MAAM,MAAM,YAAY,CAAC;AAGhC,eAAO,MAAM,KAAK,YAAY,CAAC;AAG/B,eAAO,MAAM,gBAAgB,YAAY,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Theme color constants for ECharts styling
|
|
4
|
+
* Centralizes color usage across all chart style utilities
|
|
5
|
+
* Using Mantine default color palette
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.AXIS_TITLE_COLOR = exports.WHITE = exports.GRAY_9 = exports.GRAY_8 = exports.GRAY_7 = exports.GRAY_6 = exports.GRAY_5 = exports.GRAY_4 = exports.GRAY_3 = exports.GRAY_2 = exports.GRAY_1 = exports.GRAY_0 = void 0;
|
|
9
|
+
exports.GRAY_0 = '#f8f9fa'; // theme.colors.gray[0]
|
|
10
|
+
exports.GRAY_1 = '#f1f3f5'; // theme.colors.gray[1]
|
|
11
|
+
exports.GRAY_2 = '#e9ecef'; // theme.colors.gray[2]
|
|
12
|
+
exports.GRAY_3 = '#dee2e6'; // theme.colors.gray[3]
|
|
13
|
+
exports.GRAY_4 = '#ced4da'; // theme.colors.gray[4]
|
|
14
|
+
exports.GRAY_5 = '#adb5bd'; // theme.colors.gray[5]
|
|
15
|
+
exports.GRAY_6 = '#868e96'; // theme.colors.gray[6]
|
|
16
|
+
exports.GRAY_7 = '#495057'; // theme.colors.gray[7]
|
|
17
|
+
exports.GRAY_8 = '#343a40'; // theme.colors.gray[8]
|
|
18
|
+
exports.GRAY_9 = '#212529'; // theme.colors.gray[9]
|
|
19
|
+
// White
|
|
20
|
+
exports.WHITE = '#FFFFFF';
|
|
21
|
+
// Axis title (legacy hardcoded color - between gray 5 and gray 6)
|
|
22
|
+
exports.AXIS_TITLE_COLOR = '#747B83';
|
|
23
|
+
//# sourceMappingURL=themeColors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeColors.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/themeColors.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAC3C,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,uBAAuB;AAExD,QAAQ;AACK,QAAA,KAAK,GAAG,SAAS,CAAC;AAE/B,kEAAkE;AACrD,QAAA,gBAAgB,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get base tooltip styling
|
|
3
|
+
*/
|
|
4
|
+
export declare const getTooltipStyle: () => {
|
|
5
|
+
padding: number;
|
|
6
|
+
borderColor: string;
|
|
7
|
+
borderWidth: number;
|
|
8
|
+
borderRadius: number;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
textStyle: {
|
|
11
|
+
color: string;
|
|
12
|
+
fontSize: number;
|
|
13
|
+
};
|
|
14
|
+
extraCssText: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Format a tooltip value with pill styling (e.g. "100% - $100")
|
|
18
|
+
*/
|
|
19
|
+
export declare const formatTooltipValue: (value: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Format tooltip header (e.g. "Total Sales")
|
|
22
|
+
*/
|
|
23
|
+
export declare const formatTooltipHeader: (header: string) => string;
|
|
24
|
+
/**
|
|
25
|
+
* Get tooltip divider
|
|
26
|
+
*/
|
|
27
|
+
export declare const getTooltipDivider: () => string;
|
|
28
|
+
/**
|
|
29
|
+
* Format a color indicator (square) for tooltip (e.g. a color block)
|
|
30
|
+
*/
|
|
31
|
+
export declare const formatColorIndicator: (color: string) => string;
|
|
32
|
+
/**
|
|
33
|
+
* Format a simple text label for tooltip (e.g. series name or category)
|
|
34
|
+
* Color: gray.7, Font size: 11px
|
|
35
|
+
*/
|
|
36
|
+
export declare const formatTooltipLabel: (text: string) => string;
|
|
37
|
+
/**
|
|
38
|
+
* Format a tooltip row with color indicator, label, and value (stacked layout)
|
|
39
|
+
* Used for pie charts and other single-row tooltip formats
|
|
40
|
+
* @param colorIndicator - HTML string for color indicator (from formatColorIndicator)
|
|
41
|
+
* @param label - HTML string for label (from formatTooltipLabel)
|
|
42
|
+
* @param value - HTML string for value (from formatTooltipValue)
|
|
43
|
+
*/
|
|
44
|
+
export declare const formatTooltipRow: (colorIndicator: string, label: string, value: string) => string;
|
|
45
|
+
/**
|
|
46
|
+
* Format a cartesian chart tooltip row with color indicator, series name, and value (inline layout)
|
|
47
|
+
* Used for bar/line/area charts where all elements are in a single horizontal row
|
|
48
|
+
* @param colorIndicator - HTML string for color indicator (from formatColorIndicator)
|
|
49
|
+
* @param seriesName - Series name text
|
|
50
|
+
* @param valuePill - HTML string for formatted value pill (from formatTooltipValue)
|
|
51
|
+
*/
|
|
52
|
+
export declare const formatCartesianTooltipRow: (colorIndicator: string, seriesName: string, valuePill: string) => string;
|
|
53
|
+
//# sourceMappingURL=tooltipStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltipStyles.d.ts","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/tooltipStyles.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;CAY1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,UAAW,MAAM,KAAG,MAYlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,MAQpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAO,MAOpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAW,MAAM,KAAG,MAUpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,SAAU,MAAM,KAAG,MAMjD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,mBACT,MAAM,SACf,MAAM,SACN,MAAM,KACd,MAWF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,mBAClB,MAAM,cACV,MAAM,aACP,MAAM,KAClB,MAiBF,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatCartesianTooltipRow = exports.formatTooltipRow = exports.formatTooltipLabel = exports.formatColorIndicator = exports.getTooltipDivider = exports.formatTooltipHeader = exports.formatTooltipValue = exports.getTooltipStyle = void 0;
|
|
4
|
+
const themeColors_1 = require("./themeColors");
|
|
5
|
+
/**
|
|
6
|
+
* Helper to convert style object to CSS string
|
|
7
|
+
* We need this because ECharts doesn't support style objects directly
|
|
8
|
+
*/
|
|
9
|
+
const stylesToString = (styles) => Object.entries(styles)
|
|
10
|
+
.map(([key, value]) => {
|
|
11
|
+
// Convert camelCase to kebab-case
|
|
12
|
+
const kebabKey = key.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
13
|
+
return `${kebabKey}: ${value}`;
|
|
14
|
+
})
|
|
15
|
+
.join('; ');
|
|
16
|
+
/**
|
|
17
|
+
* Get base tooltip styling
|
|
18
|
+
*/
|
|
19
|
+
const getTooltipStyle = () => ({
|
|
20
|
+
padding: 8,
|
|
21
|
+
borderColor: themeColors_1.GRAY_3,
|
|
22
|
+
borderWidth: 1,
|
|
23
|
+
borderRadius: 8,
|
|
24
|
+
backgroundColor: themeColors_1.WHITE,
|
|
25
|
+
textStyle: {
|
|
26
|
+
color: themeColors_1.GRAY_7,
|
|
27
|
+
fontSize: 12,
|
|
28
|
+
},
|
|
29
|
+
extraCssText: 'box-shadow: 0px 8px 8px 0px rgba(0, 0, 0, 0.08), 0px 0px 1px 0px rgba(0, 0, 0, 0.25);',
|
|
30
|
+
});
|
|
31
|
+
exports.getTooltipStyle = getTooltipStyle;
|
|
32
|
+
/**
|
|
33
|
+
* Format a tooltip value with pill styling (e.g. "100% - $100")
|
|
34
|
+
*/
|
|
35
|
+
const formatTooltipValue = (value) => {
|
|
36
|
+
const styles = stylesToString({
|
|
37
|
+
display: 'inline-block',
|
|
38
|
+
backgroundColor: themeColors_1.GRAY_0,
|
|
39
|
+
border: `1px solid ${themeColors_1.GRAY_1}`,
|
|
40
|
+
color: themeColors_1.GRAY_7,
|
|
41
|
+
padding: '2px 8px',
|
|
42
|
+
borderRadius: '6px',
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
fontSize: '12px',
|
|
45
|
+
});
|
|
46
|
+
return `<span style="${styles}">${value}</span>`;
|
|
47
|
+
};
|
|
48
|
+
exports.formatTooltipValue = formatTooltipValue;
|
|
49
|
+
/**
|
|
50
|
+
* Format tooltip header (e.g. "Total Sales")
|
|
51
|
+
*/
|
|
52
|
+
const formatTooltipHeader = (header) => {
|
|
53
|
+
const styles = stylesToString({
|
|
54
|
+
color: themeColors_1.GRAY_7,
|
|
55
|
+
fontWeight: 500,
|
|
56
|
+
fontSize: '13px',
|
|
57
|
+
paddingBottom: '8px',
|
|
58
|
+
});
|
|
59
|
+
return `<div style="${styles}">${header}</div>`;
|
|
60
|
+
};
|
|
61
|
+
exports.formatTooltipHeader = formatTooltipHeader;
|
|
62
|
+
/**
|
|
63
|
+
* Get tooltip divider
|
|
64
|
+
*/
|
|
65
|
+
const getTooltipDivider = () => {
|
|
66
|
+
const styles = stylesToString({
|
|
67
|
+
height: '1px',
|
|
68
|
+
backgroundColor: themeColors_1.GRAY_1,
|
|
69
|
+
marginBottom: '4px',
|
|
70
|
+
});
|
|
71
|
+
return `<div style="${styles}"></div>`;
|
|
72
|
+
};
|
|
73
|
+
exports.getTooltipDivider = getTooltipDivider;
|
|
74
|
+
/**
|
|
75
|
+
* Format a color indicator (square) for tooltip (e.g. a color block)
|
|
76
|
+
*/
|
|
77
|
+
const formatColorIndicator = (color) => {
|
|
78
|
+
const styles = stylesToString({
|
|
79
|
+
display: 'inline-block',
|
|
80
|
+
width: '10px',
|
|
81
|
+
height: '10px',
|
|
82
|
+
backgroundColor: color,
|
|
83
|
+
borderRadius: '2px',
|
|
84
|
+
verticalAlign: 'middle',
|
|
85
|
+
});
|
|
86
|
+
return `<span style="${styles}"></span>`;
|
|
87
|
+
};
|
|
88
|
+
exports.formatColorIndicator = formatColorIndicator;
|
|
89
|
+
/**
|
|
90
|
+
* Format a simple text label for tooltip (e.g. series name or category)
|
|
91
|
+
* Color: gray.7, Font size: 11px
|
|
92
|
+
*/
|
|
93
|
+
const formatTooltipLabel = (text) => {
|
|
94
|
+
const styles = stylesToString({
|
|
95
|
+
color: themeColors_1.GRAY_7,
|
|
96
|
+
fontSize: '11px',
|
|
97
|
+
});
|
|
98
|
+
return `<span style="${styles}">${text}</span>`;
|
|
99
|
+
};
|
|
100
|
+
exports.formatTooltipLabel = formatTooltipLabel;
|
|
101
|
+
/**
|
|
102
|
+
* Format a tooltip row with color indicator, label, and value (stacked layout)
|
|
103
|
+
* Used for pie charts and other single-row tooltip formats
|
|
104
|
+
* @param colorIndicator - HTML string for color indicator (from formatColorIndicator)
|
|
105
|
+
* @param label - HTML string for label (from formatTooltipLabel)
|
|
106
|
+
* @param value - HTML string for value (from formatTooltipValue)
|
|
107
|
+
*/
|
|
108
|
+
const formatTooltipRow = (colorIndicator, label, value) => {
|
|
109
|
+
const rowStyles = stylesToString({
|
|
110
|
+
display: 'flex',
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
gap: '8px',
|
|
113
|
+
});
|
|
114
|
+
const valueContainerStyles = stylesToString({
|
|
115
|
+
marginTop: '2px',
|
|
116
|
+
marginLeft: '16px',
|
|
117
|
+
});
|
|
118
|
+
return `<div style="${rowStyles}">${colorIndicator}${label}</div><div style="${valueContainerStyles}">${value}</div>`;
|
|
119
|
+
};
|
|
120
|
+
exports.formatTooltipRow = formatTooltipRow;
|
|
121
|
+
/**
|
|
122
|
+
* Format a cartesian chart tooltip row with color indicator, series name, and value (inline layout)
|
|
123
|
+
* Used for bar/line/area charts where all elements are in a single horizontal row
|
|
124
|
+
* @param colorIndicator - HTML string for color indicator (from formatColorIndicator)
|
|
125
|
+
* @param seriesName - Series name text
|
|
126
|
+
* @param valuePill - HTML string for formatted value pill (from formatTooltipValue)
|
|
127
|
+
*/
|
|
128
|
+
const formatCartesianTooltipRow = (colorIndicator, seriesName, valuePill) => {
|
|
129
|
+
const rowStyles = stylesToString({
|
|
130
|
+
display: 'flex',
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
gap: '8px',
|
|
133
|
+
marginBottom: '2px',
|
|
134
|
+
});
|
|
135
|
+
const seriesNameStyles = stylesToString({
|
|
136
|
+
color: themeColors_1.GRAY_7,
|
|
137
|
+
flex: '1',
|
|
138
|
+
fontSize: '12px',
|
|
139
|
+
});
|
|
140
|
+
return `<div style="${rowStyles}">
|
|
141
|
+
${colorIndicator}
|
|
142
|
+
<span style="${seriesNameStyles}">${seriesName}</span>
|
|
143
|
+
${valuePill}
|
|
144
|
+
</div>`;
|
|
145
|
+
};
|
|
146
|
+
exports.formatCartesianTooltipRow = formatCartesianTooltipRow;
|
|
147
|
+
//# sourceMappingURL=tooltipStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltipStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/tooltipStyles.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Series } from '../../../types/savedCharts';
|
|
2
|
+
/**
|
|
3
|
+
* Get value label styling for any chart series (line, bar, area, scatter, etc.)
|
|
4
|
+
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight 400
|
|
5
|
+
* Outside: gray.9 text with colored border matching series, weight 500
|
|
6
|
+
* Size: 11px
|
|
7
|
+
* @param position - Label position relative to data point
|
|
8
|
+
* @param type - Series type
|
|
9
|
+
*/
|
|
10
|
+
export declare const getValueLabelStyle: (position: "left" | "right" | "top" | "bottom" | "inside" | undefined, type: Series["type"]) => {
|
|
11
|
+
readonly fontSize: 11;
|
|
12
|
+
readonly fontWeight: "500";
|
|
13
|
+
} | {
|
|
14
|
+
textBorderColor: string;
|
|
15
|
+
textBorderWidth: number;
|
|
16
|
+
textBorderType: string;
|
|
17
|
+
fontSize: 11;
|
|
18
|
+
fontWeight: "500";
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=valueLabelStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valueLabelStyles.d.ts","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/valueLabelStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAG9E;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,aACjB,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,QAC9D,MAAM,CAAC,MAAM,CAAC;;;;;;;;;CAuBvB,CAAC"}
|