Skip to content

Commit

Permalink
Heatmap: fix color scheme reversal (#56227) (#56233)
Browse files Browse the repository at this point in the history
(cherry picked from commit eeb31c2)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
  • Loading branch information
grafanabot and leeoniya committed Oct 4, 2022
1 parent 983850e commit af9bde9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion public/app/plugins/panel/heatmap/palettes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit af9bde9

Please sign in to comment.