Reduce padding in energy charts and align unit (#24095)

This commit is contained in:
Petar Petrov 2025-02-06 10:36:58 +02:00 committed by Bram Kragten
parent 0ae6fa0763
commit bf962b29af
2 changed files with 11 additions and 7 deletions

View File

@ -72,7 +72,10 @@ export function getCommonOptions(
yAxis: { yAxis: {
type: "value", type: "value",
name: unit, name: unit,
nameGap: 5, nameGap: 2,
nameTextStyle: {
align: "left",
},
axisLabel: { axisLabel: {
formatter: (value: number) => formatNumber(Math.abs(value), locale), formatter: (value: number) => formatNumber(Math.abs(value), locale),
}, },
@ -81,10 +84,10 @@ export function getCommonOptions(
}, },
}, },
grid: { grid: {
top: 35, top: 15,
bottom: 10, bottom: 0,
left: 10, left: 1,
right: 10, right: 1,
containLabel: true, containLabel: true,
}, },
tooltip: { tooltip: {

View File

@ -193,9 +193,10 @@ export class HuiEnergyDevicesDetailGraphCard
icon: "circle", icon: "circle",
}, },
grid: { grid: {
top: 45,
bottom: 0, bottom: 0,
left: 5, left: 1,
right: 5, right: 1,
containLabel: true, containLabel: true,
}, },
}; };