mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Panel: Disable legends when showLegend is false prior to schema v37 (#55126)
This commit is contained in:
parent
4503e0f417
commit
bed531f5fb
@ -793,7 +793,11 @@ export class DashboardMigrator {
|
||||
|
||||
if (oldVersion < 37) {
|
||||
panelUpgrades.push((panel: PanelModel) => {
|
||||
if (panel.options?.legend && panel.options.legend.displayMode === 'hidden') {
|
||||
if (
|
||||
panel.options?.legend &&
|
||||
// There were two ways to hide the legend, this normalizes to `legend.showLegend`
|
||||
(panel.options.legend.displayMode === 'hidden' || panel.options.legend.showLegend === false)
|
||||
) {
|
||||
panel.options.legend.displayMode = 'list';
|
||||
panel.options.legend.showLegend = false;
|
||||
} else if (panel.options?.legend) {
|
||||
|
Loading…
Reference in New Issue
Block a user