TimeSeries: Fix y-axis Yes/No and On/Off boolean units (#61207)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -73,7 +73,7 @@ export function getDisplayProcessor(options?: DisplayProcessorOptions): DisplayP
|
||||
}
|
||||
|
||||
const hasCurrencyUnit = unit?.startsWith('currency');
|
||||
const hasBoolUnit = unit === 'bool';
|
||||
const hasBoolUnit = isBooleanUnit(unit);
|
||||
const isNumType = field.type === FieldType.number;
|
||||
const isLocaleFormat = unit === 'locale';
|
||||
const canTrimTrailingDecimalZeros =
|
||||
|
||||
@@ -130,6 +130,7 @@ export class UPlotAxisBuilder extends PlotConfigBuilder<AxisProps, Axis> {
|
||||
|
||||
const gridColor = theme.isDark ? 'rgba(240, 250, 255, 0.09)' : 'rgba(0, 10, 23, 0.09)';
|
||||
|
||||
// TODO: this is pretty flimsy now that scaleKey is composed from multiple parts :/
|
||||
if (isBooleanUnit(scaleKey)) {
|
||||
splits = [0, 1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user