arunghosh/react-heatmap-grid

highlight all non-zero values

Closed this issue · 1 comments

Hi,
great work with this heatmap grid component. But I have run into small issue caused by my specific case.

Let's say, I have data grid like:
[[2,30000,0][0,900000,9]]

Zero value, small value, and very big value. Problem is, that when rendered the 0 and 2 are both rendered as the same (empty) as the 2 is soo small in compare to 900000. What I would like is another color step for all non-zero values that are small and are currently rendered as zero.

This is very specific to my use-case. I can overcome this by processing the values before passing to your component so they always have values 0-10 (or so).

@soukupl Thank you for the feedback.

I think the best will be to, as you mentioned, normalize the data. Since it is a heatmap we cannot modify the gradient behavior as it may break things for the existing users.