intermine / im-tables

Dynamic Result Table Library
Other
9 stars 27 forks source link

Pie-chart: adding custom colors #220

Open ArifaMujawar opened 4 years ago

ArifaMujawar commented 4 years ago

Work in progress. This PR has been created not to merge but to ask for directions.

ArifaMujawar commented 4 years ago

Screenshot of output. pie-chart

I tried adding custom colors by specifying them in an array. I also wanted to go further by adding colors in a separate less file and using them in coffee files. But unfortunately, support for d3 version3 is limited.

The project can be re-implemented using latest technologies which may result in light weight.

heralden commented 3 years ago

I apologise for the very late feedback!

This looks like a good working approach. I understand that using Less variables would be much more complex, and the changes introduced by this PR is already a decent improvement from using the category10 d3 colors.

As it's been a while since this PR last saw activity, I will take the liberty of adding more colors to the array, and still allow it to be defined as a function or string (the commented out part), then merge it.

Thank you for your work! :rocket: