Skip to content
Snippets Groups Projects
Commit 1b7e99ed authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Merge pull request #2938 from metabase/reinstate-color-harmony

use color harmony for more than 5 slices
parents d90ffa9f a43946af
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,8 @@ export default class PieChart extends Component {
let total = data.rows.reduce((sum, row) => sum + row[1], 0);
let sliceColors = Object.values(colors.normal);
// use standard colors for up to 5 values otherwise use color harmony to help differentiate slices
let sliceColors = Object.values(data.rows.length > 5 ? colors.harmony : colors.normal);
let [slices, others] = _.chain(data.rows)
.map(([key, value], index) => ({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment