@lightdash/common 0.2143.3 → 0.2144.1
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/visualizations/helpers/styles/valueLabelStyles.d.ts +4 -4
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.js +4 -4
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.d.ts +4 -4
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.js +4 -4
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.d.ts +4 -4
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.js +4 -4
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { type Series } from '../../../types/savedCharts';
|
|
2
2
|
/**
|
|
3
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
|
|
5
|
-
* Outside: gray.9 text with colored border matching series, weight
|
|
4
|
+
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight 500
|
|
5
|
+
* Outside: gray.9 text with colored border matching series, weight 600
|
|
6
6
|
* Size: 11px
|
|
7
7
|
* @param position - Label position relative to data point
|
|
8
8
|
* @param type - Series type
|
|
9
9
|
*/
|
|
10
10
|
export declare const getValueLabelStyle: (position: "left" | "right" | "top" | "bottom" | "inside" | undefined, type: Series["type"]) => {
|
|
11
11
|
readonly fontSize: 11;
|
|
12
|
-
readonly fontWeight: "500";
|
|
12
|
+
readonly fontWeight: "500" | "400";
|
|
13
13
|
} | {
|
|
14
14
|
textBorderColor: string;
|
|
15
15
|
textBorderWidth: number;
|
|
16
16
|
textBorderType: string;
|
|
17
17
|
fontSize: 11;
|
|
18
|
-
fontWeight: "500";
|
|
18
|
+
fontWeight: "500" | "400";
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=valueLabelStyles.d.ts.map
|
|
@@ -5,8 +5,8 @@ const savedCharts_1 = require("../../../types/savedCharts");
|
|
|
5
5
|
const themeColors_1 = require("./themeColors");
|
|
6
6
|
/**
|
|
7
7
|
* Get value label styling for any chart series (line, bar, area, scatter, etc.)
|
|
8
|
-
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight
|
|
9
|
-
* Outside: gray.9 text with colored border matching series, weight
|
|
8
|
+
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight 500
|
|
9
|
+
* Outside: gray.9 text with colored border matching series, weight 600
|
|
10
10
|
* Size: 11px
|
|
11
11
|
* @param position - Label position relative to data point
|
|
12
12
|
* @param type - Series type
|
|
@@ -15,7 +15,7 @@ const getValueLabelStyle = (position, type) => {
|
|
|
15
15
|
const isInside = position === 'inside';
|
|
16
16
|
const base = {
|
|
17
17
|
fontSize: 11,
|
|
18
|
-
fontWeight: '500',
|
|
18
|
+
fontWeight: isInside ? '400' : '500',
|
|
19
19
|
};
|
|
20
20
|
if (
|
|
21
21
|
// inside labels for line and area series should have a white border - similar way to bar series for legibility
|
|
@@ -24,7 +24,7 @@ const getValueLabelStyle = (position, type) => {
|
|
|
24
24
|
return {
|
|
25
25
|
...base,
|
|
26
26
|
textBorderColor: themeColors_1.WHITE,
|
|
27
|
-
textBorderWidth:
|
|
27
|
+
textBorderWidth: 1.5,
|
|
28
28
|
textBorderType: 'solid',
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueLabelStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/valueLabelStyles.ts"],"names":[],"mappings":";;;AAAA,4DAA8E;AAC9E,+CAAsC;AAEtC;;;;;;;GAOG;AACI,MAAM,kBAAkB,GAAG,CAC9B,QAAoE,EACpE,IAAoB,EACtB,EAAE;IACA,MAAM,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC;IAEvC,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"valueLabelStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/valueLabelStyles.ts"],"names":[],"mappings":";;;AAAA,4DAA8E;AAC9E,+CAAsC;AAEtC;;;;;;;GAOG;AACI,MAAM,kBAAkB,GAAG,CAC9B,QAAoE,EACpE,IAAoB,EACtB,EAAE;IACA,MAAM,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC;IAEvC,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;KAC9B,CAAC;IAEX;IACI,+GAA+G;IAC/G,QAAQ;QACR,CAAC,IAAI,KAAK,iCAAmB,CAAC,IAAI,IAAI,IAAI,KAAK,iCAAmB,CAAC,IAAI,CAAC,EAC1E,CAAC;QACC,OAAO;YACH,GAAG,IAAI;YACP,eAAe,EAAE,mBAAK;YACtB,eAAe,EAAE,GAAG;YACpB,cAAc,EAAE,OAAO;SAC1B,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAzBW,QAAA,kBAAkB,sBAyB7B"}
|