Skip to content

Commit

Permalink
Referring to Issue tipsy#119
Browse files Browse the repository at this point in the history
The colour schema on the pie chart isn't that accurate in nature. 
Hence a new colour schema has been provided.

The issue with the old colour schema was that beyond a certain number of values the thing got looped and the same colours were used over and over again. Hence making a colour schema which is accurate was of utmost importance and making this thing usable to everyone in a very simpler way. 

Note to devs - Do lemme know what do think about it
  • Loading branch information
ChintzRuparel committed Oct 10, 2022
1 parent 9013797 commit 6a48d74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/vue/components/_charts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
});
function createColorArray(length) {
const colors = ["#54ca76", "#f5c452", "#f2637f", "#9261f3", "#31a4e6", "#55cbcb"];
const colors = ["#ff0000", "#ff7300", "#feaf01", "#9261f3", "#ffed00", "#d6f210", "#53d729", "#1ca92f", "#2bcc75", "#22d8ae", "#5fb7d4", "#007ed7"];
let array = [...Array(length).keys()].map(i => colors[i % colors.length]);
// avoid first and last colors being the same
if (length % colors.length === 1) {
Expand Down

0 comments on commit 6a48d74

Please sign in to comment.