style / chart axis updates

This commit is contained in:
Henry Dollman
2024-07-23 14:48:33 -04:00
parent 5ba7568acf
commit c5776541a0
4 changed files with 20 additions and 14 deletions

View File

@@ -47,7 +47,13 @@ export default function BandwidthChart({
<YAxis
className="tracking-tighter"
width={75}
domain={[0, (max: number) => (max < 0.4 ? 0.4 : Math.ceil(max))]}
domain={[0, (max: number) => (max <= 0.4 ? 0.4 : Math.ceil(max))]}
tickFormatter={(value) => {
if (value >= 100) {
return value.toFixed(0)
}
return value.toFixed((value * 100) % 1 === 0 ? 1 : 2)
}}
tickLine={false}
axisLine={false}
unit={' MB/s'}