Skip to content

Commit

Permalink
add more colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerold Busch committed Apr 15, 2023
1 parent 7b840ae commit c073c0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ describe('getColorFunction()', () => {
countValues,
false,
);
expect(colorFunction(25)).toBeUndefined();
expect(colorFunction(50)).toEqual('#FF0000');
expect(colorFunction(75)).toEqual('#FF0000');
expect(colorFunction(100)).toEqual('#FF0000');
expect(colorFunction(125)).toBeUndefined();
});

it('getColorFunction BETWEEN_OR_LEFT_EQUAL', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default {
type: 'ConditionalFormattingControl',
renderTrigger: true,
label: t('Conditional Formatting'),
description: t('Apply conditional color formatting to metrics'),
description: t('Apply conditional color formatting to metric'),
shouldMapStateToProps() {
return true;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ const JustifyEnd = styled.div`
`;

const colorSchemeOptions = (theme: SupersetTheme) => [
{ value: theme.colors.success.light1, label: t('green') },
{ value: theme.colors.alert.light1, label: t('yellow') },
{ value: theme.colors.error.light1, label: t('red') },
{ value: theme.colors.success.light1, label: t('success') },
{ value: theme.colors.alert.light1, label: t('alert') },
{ value: theme.colors.error.light1, label: t('error') },
{ value: theme.colors.success.dark1, label: t('success dark') },
{ value: theme.colors.alert.dark1, label: t('alert dark') },
{ value: theme.colors.error.dark1, label: t('error dark') },
];

const operatorOptions = [
Expand Down

0 comments on commit c073c0b

Please sign in to comment.