mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 09:34:06 +08:00
Various Panels: Add ability to toggle legend with keyboard shortcut (#52241)
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import { FieldColorModeId, FieldConfigProperty, PanelPlugin } from '@grafana/data';
|
||||
import { LegendDisplayMode } from '@grafana/schema';
|
||||
import { commonOptionsBuilder } from '@grafana/ui';
|
||||
|
||||
import { addStandardDataReduceOptions } from '../stat/common';
|
||||
@ -70,7 +69,7 @@ export const plugin = new PanelPlugin<PieChartOptions>(PieChartPanel)
|
||||
{ value: PieChartLegendValues.Value, label: 'Value' },
|
||||
],
|
||||
},
|
||||
showIf: (c) => c.legend.displayMode !== LegendDisplayMode.Hidden,
|
||||
showIf: (c) => c.legend.showLegend !== false,
|
||||
});
|
||||
})
|
||||
.setSuggestionsSupplier(new PieChartSuggestionsSupplier());
|
||||
|
Reference in New Issue
Block a user