-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
utils.ts
37 lines (34 loc) 路 925 Bytes
/
utils.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import type { Config as VegaConfig } from "vega";
export const dark = "#e2e8f0";
export const light = "#111827";
export function create_config(darkmode: boolean): VegaConfig {
return {
axis: {
labelFont: "sans-serif",
labelColor: darkmode ? dark : light,
titleFont: "sans-serif",
titleColor: darkmode ? dark : light,
tickColor: "#aaa",
gridColor: "#aaa",
titleFontWeight: "normal",
labelFontWeight: "normal"
},
legend: {
labelColor: darkmode ? dark : light,
labelFont: "sans-serif",
titleColor: darkmode ? dark : light,
titleFont: "sans-serif",
titleFontWeight: "normal",
labelFontWeight: "normal"
},
title: {
color: darkmode ? dark : light,
font: "sans-serif",
fontWeight: "normal",
anchor: "middle"
}
};
}
export function bar_plot_header_encoding(darkmode: boolean): Object {
return { labelFont: "sans-serif", labelColor: darkmode ? dark : light };
}