mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 14:42:01 +08:00
Merge pull request #1071 from pranshuchittora/pranshuchittora/fix/chart-y-axis-zero-values
fix: chart y-axis values not showing for values < 1
This commit is contained in:
commit
ca4ce0d380
@ -160,10 +160,7 @@ function Graph({
|
||||
ticks: {
|
||||
// Include a dollar sign in the ticks
|
||||
callback(value) {
|
||||
return getYAxisFormattedValue(
|
||||
parseInt(value.toString(), 10),
|
||||
yAxisUnit,
|
||||
);
|
||||
return getYAxisFormattedValue(parseFloat(value.toString()), yAxisUnit);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -6,7 +6,7 @@ export const getYAxisFormattedValue = (
|
||||
): string => {
|
||||
try {
|
||||
return formattedValueToString(
|
||||
getValueFormat(format)(value, undefined, undefined, undefined),
|
||||
getValueFormat(format)(value, 1, undefined, undefined),
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user