From 5f156e193a16db00e25e116c4d36e4ca10923bce Mon Sep 17 00:00:00 2001 From: DaneEveritt Date: Mon, 27 Jun 2022 19:59:36 -0400 Subject: [PATCH] Improve the graph display; hide the bottom bar when no data exists. --- resources/scripts/components/server/console/chart.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/scripts/components/server/console/chart.ts b/resources/scripts/components/server/console/chart.ts index 4a2cbbd98..9733dbeaf 100644 --- a/resources/scripts/components/server/console/chart.ts +++ b/resources/scripts/components/server/console/chart.ts @@ -65,7 +65,7 @@ const options: ChartOptions<'line'> = { radius: 0, }, line: { - tension: 0.3, + tension: 0.15, }, }, }; @@ -90,7 +90,7 @@ function getEmptyData(label: string, sets = 1, callback?: ChartDatasetCallback | { fill: true, label, - data: Array(20).fill(0), + data: Array(20).fill(-5), borderColor: theme('colors.cyan.400'), backgroundColor: hexToRgba(theme('colors.cyan.700'), 0.5), }, @@ -129,7 +129,7 @@ function useChart(label: string, opts?: UseChartOptions) { merge(state, { datasets: state.datasets.map((value) => ({ ...value, - data: Array(20).fill(0), + data: Array(20).fill(-5), })), }) );