BarChart: Skip formatting null-valued ticks (#94935)
Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
This commit is contained in:
co-authored by
Ihor Yeromin
parent
5c06bbf8cf
commit
594e9b1b73
@@ -168,7 +168,13 @@ export class UPlotAxisBuilder extends PlotConfigBuilder<AxisProps, Axis> {
|
||||
} else if (formatValue) {
|
||||
config.values = (u: uPlot, splits, axisIdx, tickSpace, tickIncr) => {
|
||||
let decimals = guessDecimals(roundDecimals(tickIncr, 6));
|
||||
return splits.map((v) => formatValue!(v, decimals > 0 ? decimals : undefined));
|
||||
return splits.map((v) => {
|
||||
if (v == null) {
|
||||
return null;
|
||||
} else {
|
||||
return formatValue!(v, decimals > 0 ? decimals : undefined);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user