mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-04 02:20:39 +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: {
|
ticks: {
|
||||||
// Include a dollar sign in the ticks
|
// Include a dollar sign in the ticks
|
||||||
callback(value) {
|
callback(value) {
|
||||||
return getYAxisFormattedValue(
|
return getYAxisFormattedValue(parseFloat(value.toString()), yAxisUnit);
|
||||||
parseInt(value.toString(), 10),
|
|
||||||
yAxisUnit,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -6,7 +6,7 @@ export const getYAxisFormattedValue = (
|
|||||||
): string => {
|
): string => {
|
||||||
try {
|
try {
|
||||||
return formattedValueToString(
|
return formattedValueToString(
|
||||||
getValueFormat(format)(value, undefined, undefined, undefined),
|
getValueFormat(format)(value, 1, undefined, undefined),
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user