Make graph less smooth. Hide empty value. Closes https://github.com/owncast/owncast/issues/379

This commit is contained in:
Gabe Kangas 2020-11-17 22:54:57 -08:00
parent 8787e3421b
commit ff955c7ac8

View file

@ -73,9 +73,9 @@ export default function Chart({ data, title, color, unit, dataCollections }: Cha
}); });
} }
const line = data ? ( const line = data && data?.length > 0 ? (
<Line <Line
type="natural" type="basis"
dataKey="value" dataKey="value"
stroke={color} stroke={color}
dot={null} dot={null}
@ -112,7 +112,7 @@ export default function Chart({ data, title, color, unit, dataCollections }: Cha
data={s.data} data={s.data}
name={s.name} name={s.name}
key={s.name} key={s.name}
type="natural" type="basis"
stroke={s.color} stroke={s.color}
dot={null} dot={null}
strokeWidth={3} strokeWidth={3}