Skip to content

Commit

Permalink
Make srcdMain the default palette for SUPERSET_DEFAULT key
Browse files Browse the repository at this point in the history
Superset is using 'SUPERSET_DEFAULT' as the default CategoricalScheme key
i.e. https://github.com/apache-superset/superset-ui/blob/master/packages/superset-ui-color/src/CategoricalSchemeRegistrySingleton.ts
This commit assigns 'srcdMain' palette for 'SUPERSET_DEFAULT' key

Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
  • Loading branch information
dpordomingo committed Aug 7, 2019
1 parent 3c4c93c commit 9889bf4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions srcd/superset/assets/src/customization/index.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { getCategoricalSchemeRegistry } from '@superset-ui/color';
import srcdColors from './srcdColors';

export const defaultScheme = 'SUPERSET_DEFAULT';

const srcdPaletteId = 'srcdMain';

function setupColors() {
const categoricalSchemeRegistry = getCategoricalSchemeRegistry();
[srcdColors].forEach((group) => {
group.forEach((scheme) => {
categoricalSchemeRegistry.registerValue(scheme.id, scheme);
if (scheme.id === srcdPaletteId) {
categoricalSchemeRegistry.registerValue(defaultScheme, scheme);
}
});
});
}
Expand Down

0 comments on commit 9889bf4

Please sign in to comment.