Skip to content

Commit 5f156e1

Browse files
committed
Improve the graph display; hide the bottom bar when no data exists.
1 parent bf287c4 commit 5f156e1

File tree

1 file changed

+3
-3
lines changed
  • resources/scripts/components/server/console

1 file changed

+3
-3
lines changed

resources/scripts/components/server/console/chart.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const options: ChartOptions<'line'> = {
6565
radius: 0,
6666
},
6767
line: {
68-
tension: 0.3,
68+
tension: 0.15,
6969
},
7070
},
7171
};
@@ -90,7 +90,7 @@ function getEmptyData(label: string, sets = 1, callback?: ChartDatasetCallback |
9090
{
9191
fill: true,
9292
label,
93-
data: Array(20).fill(0),
93+
data: Array(20).fill(-5),
9494
borderColor: theme('colors.cyan.400'),
9595
backgroundColor: hexToRgba(theme('colors.cyan.700'), 0.5),
9696
},
@@ -129,7 +129,7 @@ function useChart(label: string, opts?: UseChartOptions) {
129129
merge(state, {
130130
datasets: state.datasets.map((value) => ({
131131
...value,
132-
data: Array(20).fill(0),
132+
data: Array(20).fill(-5),
133133
})),
134134
})
135135
);

0 commit comments

Comments
 (0)