Skip to content

Commit d3cfaef

Browse files
committed
fix: yet more chart layout tweaks
1 parent f01116d commit d3cfaef

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

plugins/plugin-codeflare/src/components/Chart.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default class BaseChart extends React.PureComponent<Props> {
7474

7575
public static readonly padding = {
7676
bottom: BaseChart.fontSize * 1.5,
77-
top: BaseChart.fontSize * 4,
77+
top: BaseChart.fontSize * 5,
7878
left: BaseChart.fontSize * 4.5,
7979
right: BaseChart.fontSize * 4.5,
8080
}
@@ -147,7 +147,7 @@ export default class BaseChart extends React.PureComponent<Props> {
147147
left: BaseChart.padding.left - BaseChart.tickLabelFontSize * 4,
148148
right: BaseChart.dimensions.width - BaseChart.tickLabelFontSize * 1.5,
149149
},
150-
y: BaseChart.padding.top - BaseChart.fontSize * 2,
150+
y: BaseChart.padding.top - BaseChart.fontSize * 1.5,
151151
}
152152

153153
private static readonly formatters = {
@@ -236,23 +236,23 @@ export default class BaseChart extends React.PureComponent<Props> {
236236
}
237237
}
238238

239-
private areaStyle(stroke: string, fill: string, strokeWidth = 1.25, fillOpacity = 0.1): ChartAreaProps["style"] {
239+
private areaStyle(stroke: string, fill: string, strokeWidth = 2.5, fillOpacity = 0.1): ChartAreaProps["style"] {
240240
return { data: { stroke, strokeWidth, fill, fillOpacity } }
241241
}
242242

243-
private lineStyle(stroke: string, strokeDasharray = "", strokeWidth = 1.25): ChartLineProps["style"] {
243+
private lineStyle(stroke: string, strokeDasharray = "", strokeWidth = 2.5): ChartLineProps["style"] {
244244
return { data: { stroke, strokeWidth, strokeDasharray } }
245245
}
246246

247247
private lineDashStyle(stroke: string): ChartLineProps["style"] {
248-
return this.lineStyle(stroke, "3,0.5", 2)
248+
return this.lineStyle(stroke, "3,0.5", 3)
249249
}
250250

251251
private title(chart: BaseChartProps) {
252252
return (
253253
<ChartLabel
254254
x={BaseChart.titlePosition.x.left}
255-
y={BaseChart.fontSize / 2}
255+
y={BaseChart.fontSize}
256256
style={BaseChart.titleStyle()}
257257
text={chart.title}
258258
/>

plugins/plugin-codeflare/web/scss/components/Dashboard/Charts.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@include ChartGrid {
2020
display: grid;
2121
grid-gap: 0.6875em;
22-
padding: 1em;
22+
padding: 2em;
2323
grid-template-columns: repeat(4, 1fr);
2424
grid-auto-rows: minmax(300px, max-content);
2525

plugins/plugin-codeflare/web/scss/components/Dashboard/_index.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929

3030
@include TopLevelTab {
3131
@include Split(3) {
32-
@include Rows(7);
32+
/* @include Rows(7); */
3333
@include Columns(13);
34+
grid-template-rows: repeat(3, minmax(9vmax, auto)) repeat(4, auto);
3435
grid-template-areas:
3536
"T1 T1 T1 T3 T3 T3 T3 T3 T3 T3 T3 T3 T3"
3637
"T1 T1 T1 T3 T3 T3 T3 T3 T3 T3 T3 T3 T3"

0 commit comments

Comments
 (0)