Skip to content

Pie-chart: adding custom colors#220

Open
ArifaMujawar wants to merge 4 commits intointermine:devfrom
ArifaMujawar:feature/131-own-color-palette-for-pie-chart
Open

Pie-chart: adding custom colors#220
ArifaMujawar wants to merge 4 commits intointermine:devfrom
ArifaMujawar:feature/131-own-color-palette-for-pie-chart

Conversation

@ArifaMujawar
Copy link

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

@ArifaMujawar
Copy link
Author

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
Copy link
Member

heralden commented Dec 1, 2020

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! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants