Skip to content

Commit 6b5c337

Browse files
committed
🔨 Reformat chart components
1 parent 59fea62 commit 6b5c337

4 files changed

Lines changed: 52 additions & 45 deletions

File tree

src/charts/BarChart.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,14 @@ watch(
146146
.chart {
147147
display: flex;
148148
flex-flow: column;
149-
}
150-
.chart > h2,
151-
.chart > p {
152-
flex: 0 1 auto;
153-
}
154-
.chart > .chart-container {
155-
position: relative;
156-
flex: 1 1 auto;
149+
150+
> h2,
151+
> p {
152+
flex: 0 1 auto;
153+
}
154+
> .chart-container {
155+
position: relative;
156+
flex: 1 1 auto;
157+
}
157158
}
158159
</style>

src/charts/DoughnutChart.vue

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -107,25 +107,29 @@ watch(
107107
.chart {
108108
display: flex;
109109
flex-flow: column;
110-
}
111-
.chart > h2,
112-
.chart > p {
113-
flex: 0 1 auto;
114-
}
115-
.chart > .chart-container {
116-
position: relative;
117-
flex: 1 1 auto;
118-
}
119-
.chart > .chart-container .chart-info {
120-
position: absolute;
121-
bottom: 3rem;
122-
left: 50%;
123-
transform: translateX(-50%);
124-
text-align: center;
125-
}
126-
.chart > .chart-container .chart-info .featured {
127-
font-size: 3.25em;
128-
line-height: 1em;
129-
font-weight: 500;
110+
111+
> h2,
112+
> p {
113+
flex: 0 1 auto;
114+
}
115+
116+
> .chart-container {
117+
position: relative;
118+
flex: 1 1 auto;
119+
120+
.chart-info {
121+
position: absolute;
122+
bottom: 3rem;
123+
left: 50%;
124+
transform: translateX(-50%);
125+
text-align: center;
126+
127+
.chart-info .featured {
128+
font-size: 3.25em;
129+
line-height: 1em;
130+
font-weight: 500;
131+
}
132+
}
133+
}
130134
}
131135
</style>

src/charts/LineChart.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ watch(
161161
.chart {
162162
display: flex;
163163
flex-flow: column;
164-
}
165-
.chart > h2,
166-
.chart > p {
167-
flex: 0 1 auto;
168-
}
169-
.chart > .chart-container {
170-
position: relative;
171-
flex: 1 1 auto;
164+
165+
> h2,
166+
> p {
167+
flex: 0 1 auto;
168+
}
169+
> .chart-container {
170+
position: relative;
171+
flex: 1 1 auto;
172+
}
172173
}
173174
</style>

src/charts/MatrixChart.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,15 @@ watch(
176176
.chart.matrix-chart {
177177
display: flex;
178178
flex-flow: column;
179-
}
180-
.chart.matrix-chart > h2,
181-
.chart.matrix-chart > p {
182-
flex: 0 1 auto;
183-
}
184-
.chart.matrix-chart > .chart-container {
185-
position: relative;
186-
flex: 1 1 auto;
187-
min-height: 190px;
179+
180+
> h2,
181+
> p {
182+
flex: 0 1 auto;
183+
}
184+
> .chart-container {
185+
position: relative;
186+
flex: 1 1 auto;
187+
min-height: 190px;
188+
}
188189
}
189190
</style>

0 commit comments

Comments
 (0)