mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSeries: Fix y-axis Yes/No and On/Off boolean units (#61207)
This commit is contained in:
parent
da18c89e91
commit
a1609230f8
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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user