Skip to content
Snippets Groups Projects
Commit a43946af authored by Kyle Doherty's avatar Kyle Doherty
Browse files

use color harmony for more than 5 slices

parent 8f1a2874
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