Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircularHeatChart - Global Maximum and Minimum #122

Open
NRN13 opened this issue Mar 21, 2016 · 2 comments
Open

CircularHeatChart - Global Maximum and Minimum #122

NRN13 opened this issue Mar 21, 2016 · 2 comments

Comments

@NRN13
Copy link

NRN13 commented Mar 21, 2016

The current CircularHeatChart uses color scales on a category basis (i.e. max and min of each layer get the lightest and darkest color for that layer).
how can i alter the code to allow for a absolute maximum and a minimum such that the absolute minimum gets the lightest color and the absolute maximum get the darkest.
Thank you in advance for your help!!

@ffniu
Copy link
Contributor

ffniu commented Mar 22, 2016

1.Enable Code of Line 307:
color.domain([d.minPrice, d.maxPrice]);
to determine the minimum and maximum values.

2.And Enable code of Line 247, and disable code of Line 248:
color = d3.scale.linear().range(['#c7f918', '#4a5a11']),
// color = d3.scale.category20();
to set customized threshold color, instead of using a category basis color.

Then you could get the absolute minimum gets the lightest color and the maximum gets the darkest.

@NRN13
Copy link
Author

NRN13 commented Mar 22, 2016

My apologies for leaving that part out. I had already changed those two codes you suggested in order to get the same colour group.
untitled
as you can see they are the same shade, however i want 99.3 to be alot lighter, even though it is the smallest number in it's layer and 97.1 is the absolute min so it should be alot darker. I hope this makes my question more clear.

Thank you in advance

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

No branches or pull requests

2 participants