TimeSeries: Fix y-axis Yes/No and On/Off boolean units (#61207)
This commit is contained in:
1 parent
da18c89e91
commit
a1609230f8
3 files changed
+664
-227
No files matched your search
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