Heatmap: fix color scheme reversal (#56227)

This commit is contained in:
Leon Sorokin 2022-10-04 02:17:58 -05:00 committed by GitHub
parent f7c6fe0c97
commit eeb31c2901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,13 +97,16 @@ export function quantizeScheme(opts: HeatmapColorOptions, theme: GrafanaTheme2):
}
if (
opts.reverse ||
scheme.invert === 'always' ||
(scheme.invert === 'dark' && theme.isDark) ||
(scheme.invert === 'light' && theme.isLight)
) {
palette.reverse();
}
if (opts.reverse) {
palette.reverse();
}
}
return palette;