mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
vmui: fixed yaxis labels (#2448)
This commit is contained in:
parent
7f83dc06c4
commit
c4d2cd8336
@ -29,10 +29,7 @@ export const defaultOptions = {
|
||||
};
|
||||
|
||||
export const formatTicks = (u: uPlot, ticks: number[], unit = ""): string[] => {
|
||||
return ticks.map(v => {
|
||||
const n = Math.abs(v);
|
||||
return `${n > 1e-3 && n < 1e4 ? v.toString() : v.toExponential(1)} ${unit}`;
|
||||
});
|
||||
return ticks.map(v => `${v.toLocaleString()} ${unit}`);
|
||||
};
|
||||
|
||||
interface AxisExtend extends Axis {
|
||||
|
Loading…
Reference in New Issue
Block a user