mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Improve categorical color management (#5815)
* Create new classes for handling categorical colors * verify to pass existing unit tests * separate logic for forcing color and getting color * replace getColorFromScheme with CategoricalColorManager * organize static functions * migrate to new function * Remove ALL_COLOR_SCHEMES * move sequential colors to another file * extract categorical colors to separate file * move airbnb and lyft colors to separate files * fix missing toFunction() * Rewrite to support local and global force items, plus namespacing. * fix references * revert nvd3 * update namespace api * Update the visualizations * update usage with static functions * update unit test * add unit test * rename default namespace * add unit test for color namespace * add unit test for namespace * start unit test for colorschememanager * add unit tests for color scheme manager * check returns for chaining * complete unit test for the new classes * fix color tests * update unit tests * update unit tests * move color scheme registration to common * update unit test * rename sharedForcedColors to parentForcedColors * remove import
This commit is contained in:
committed by
Chris Williams
parent
bec0b4cc37
commit
f482a6cf99
@@ -7,10 +7,10 @@ import { Creatable } from 'react-select';
|
||||
|
||||
import ColorSchemeControl from
|
||||
'../../../../src/explore/components/controls/ColorSchemeControl';
|
||||
import { ALL_COLOR_SCHEMES } from '../../../../src/modules/colors';
|
||||
import { getAllSchemes } from '../../../../src/modules/ColorSchemeManager';
|
||||
|
||||
const defaultProps = {
|
||||
options: Object.keys(ALL_COLOR_SCHEMES).map(s => ([s, s])),
|
||||
options: Object.keys(getAllSchemes()).map(s => ([s, s])),
|
||||
};
|
||||
|
||||
describe('ColorSchemeControl', () => {
|
||||
|
||||
Reference in New Issue
Block a user