forked from phoenixframework/phoenix_live_dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_charts.scss
More file actions
139 lines (116 loc) · 2.72 KB
/
_charts.scss
File metadata and controls
139 lines (116 loc) · 2.72 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Charts page layout
.charts-col {
margin-bottom: 2rem;
.card {
padding: 0.5rem;
.hint {
position: absolute;
right: 14px;
}
.uplot {
font-family: 'LiveDashboardFont';
max-width: 100%;
&.summary {
.legend {
tr:nth-child(n+3) {
display: table-row;
}
}
}
.title {
font-weight: 900;
margin-bottom: 0.75rem;
}
.legend {
margin-top: 1.75rem;
font-size: 0.75rem;
width: 100%;
table-layout: fixed;
.labels {
background-color: $color-gray-100;
color: $color-gray-800;
th {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
min-width: 0;
text-align: center;
/* this padding is missing from uPlot css */
padding: 4px;
}
}
.series {
th {
text-align: left;
}
td {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
min-width: 0;
}
}
&.inline {
display: flex;
flex-wrap: wrap;
text-align: left;
margin-top: 0;
.series {
display: flex;
flex-basis: 45%;
order: 10;
th {
align-items: center;
display: flex;
flex-basis: 55px;
}
&:first-child {
background-color: $color-gray-100;
color: $color-gray-800;
flex-basis: 100%;
margin: 1.75rem 0 0.5rem 0;
order: 1;
text-align: center;
display: inline-block;
th {
display: inline-block;
}
.ident {
display: none;
}
}
&:nth-child(2) {
order: 2;
}
&:nth-child(5) {
order: 4;
}
&:nth-child(3) {
order: 3;
}
}
}
}
}
}
}
/* Override uPlot styles */
/* Avoid wrapping for long legend titles when data is shown for that row on hover, changes the legend heights */
.u-series {
th {
text-wrap: nowrap;
}
}
/* Avoid block styles for legends, leads to chart card size updates and hopping on hover */
.u-inline {
display: flex;
flex-direction: column;
}
@media (min-width: map-get($grid-breakpoints, xxl)) {
[data-phx-view="LiveDashboard.MetricsLive"] #main.container{
max-width: 95%;
.charts-nav {
max-width: map-get($container-max-widths, xl);
}
}
}