-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsimplegraph.css
More file actions
102 lines (79 loc) · 2.5 KB
/
simplegraph.css
File metadata and controls
102 lines (79 loc) · 2.5 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/* SimpleGraph — base styles
Data-ink ratio first. Minimal decoration. Let the data speak.
Variables can be set on any ancestor element (container div, body, :root).
Theme files set them on wrapper classes like .sg-midnight.
Defaults are provided via var() fallbacks — no redefinition on .sg. */
/* ── Labels ── */
.sg text {
font-family: var(--sg-font, system-ui, -apple-system, sans-serif);
font-size: var(--sg-label-size, 11px);
fill: var(--sg-muted, #999);
}
.sg .sg-y-caption {
font-size: var(--sg-caption-size, 10px);
}
/* ── Grid — recede, don't compete ── */
.sg .sg-grid line {
stroke: var(--sg-grid, #e8e8e8);
stroke-width: 1;
}
/* ── Data — the only thing that matters ── */
.sg .sg-line {
fill: none;
stroke-linejoin: round;
stroke-linecap: round;
}
.sg .sg-fill {
stroke: none;
opacity: var(--sg-fill-opacity, 0.12);
}
.sg .sg-point {
stroke: var(--sg-point-stroke, #fff);
stroke-width: 1.5;
}
.sg .sg-bar {
rx: 1;
}
/* Series colors */
.sg .sg-series-0 .sg-line { stroke: var(--sg-series-0, #333); }
.sg .sg-series-0 .sg-fill { fill: var(--sg-series-0, #333); }
.sg .sg-series-0 .sg-point { fill: var(--sg-series-0, #333); }
.sg .sg-series-0 .sg-bar { fill: var(--sg-series-0, #333); }
.sg .sg-series-1 .sg-line { stroke: var(--sg-series-1, #888); }
.sg .sg-series-1 .sg-fill { fill: var(--sg-series-1, #888); }
.sg .sg-series-1 .sg-point { fill: var(--sg-series-1, #888); }
.sg .sg-series-1 .sg-bar { fill: var(--sg-series-1, #888); }
.sg .sg-series-2 .sg-line { stroke: var(--sg-series-2, #bbb); }
.sg .sg-series-2 .sg-fill { fill: var(--sg-series-2, #bbb); }
.sg .sg-series-2 .sg-point { fill: var(--sg-series-2, #bbb); }
.sg .sg-series-2 .sg-bar { fill: var(--sg-series-2, #bbb); }
/* ── Hit areas — invisible interaction targets ── */
.sg .sg-hit {
fill: transparent;
cursor: crosshair;
}
/* ── Tooltip ── */
.sg .sg-tooltip {
opacity: 0;
transition: opacity 0.15s ease;
}
.sg .sg-tooltip--visible {
opacity: 1;
}
.sg .sg-tooltip-bg {
fill: var(--sg-tooltip-bg, #fff);
stroke: var(--sg-tooltip-border, #ddd);
stroke-width: 1;
filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}
.sg .sg-tooltip-value {
font-family: var(--sg-font, system-ui, -apple-system, sans-serif);
font-size: 12px;
font-weight: 600;
fill: var(--sg-tooltip-text, #333);
}
.sg .sg-tooltip-label {
font-family: var(--sg-font, system-ui, -apple-system, sans-serif);
font-size: 10px;
fill: var(--sg-tooltip-label, #999);
}