Skip to content

Commit

Permalink
Replace hardcoded default colors with defaults in setupColors.js (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored Nov 7, 2019
1 parent ec476fc commit 397e1e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/assets/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export const controls = {
choices: () => sequentialSchemeRegistry
.values()
.map(value => [value.id, value.label]),
default: 'blue_white_yellow',
default: sequentialSchemeRegistry.getDefaultKey(),
clearable: false,
description: '',
renderTrigger: true,
Expand Down Expand Up @@ -2066,7 +2066,7 @@ export const controls = {
color_scheme: {
type: 'ColorSchemeControl',
label: t('Color Scheme'),
default: 'bnbColors',
default: categoricalSchemeRegistry.getDefaultKey(),
renderTrigger: true,
choices: () => categoricalSchemeRegistry.keys().map(s => ([s, s])),
description: t('The color scheme for rendering chart'),
Expand Down
1 change: 1 addition & 0 deletions superset/assets/src/setup/setupColors.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ export default function setupColors() {
sequentialSchemeRegistry.registerValue(scheme.id, scheme);
});
});
sequentialSchemeRegistry.setDefaultKey('blue_white_yellow');
}

0 comments on commit 397e1e3

Please sign in to comment.