* Update chart color scale to match woocommerce/woocommerce-admin#375

* Avoid useless calls to 'getColor'
This commit is contained in:
Albert Juhé Lluveras 2019-03-05 10:44:29 +01:00 committed by GitHub
parent 27acab72b8
commit 584f0f26f0
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ export const colorScales = [
[],
[ 0.5 ],
[ 0.333, 0.667 ],
[ 0.25, 0.50, 0.75 ],
[ 0.20, 0.40, 0.60, 0.80 ],
[ 0.16, 0.32, 0.48, 0.64, 0.80 ],
[ 0.2, 0.50, 0.8 ],
[ 0.12, 0.375, 0.625, 0.88 ],
[ 0, 0.25, 0.5, 0.75, 1 ],
];

View File

@ -114,7 +114,7 @@ class D3Legend extends Component {
'woocommerce-legend__item-checkmark-checked': row.visible,
} ) }
id={ row.key }
style={ { color: getColor( keys, colorScheme )( row.key ) } }
style={ row.visible ? { color: getColor( keys, colorScheme )( row.key ) } : null }
/>
<span className="woocommerce-legend__item-title" id={ row.key }>
{ row.key }