src-d / sourced-ui

source{d} UI
https://sourced.tech
Apache License 2.0
7 stars 15 forks source link

Heatmap colors #311

Open EgorBu opened 4 years ago

EgorBu commented 4 years ago

Hello,

I noticed that heatmap color scheme is not applied correctly to data: Screenshot from 2019-10-22 18-02-45

Values in the table lie in range [0, 1]. I put value baunds to [-1, 1] - so all zero values should have green color. But they are still rendered as white - somehow color scheme is not applied to them.

dpordomingo commented 4 years ago

Could you help me to reproduce this chart? Which query, chart and palette did you use?

EgorBu commented 4 years ago

Here it's the file - dates are x-axis, repos are y-axis: tensorflow_heatmap.txt

Visualization type - heatmap Color scheme - any - I tried many of them but this bug is consistent

dpordomingo commented 4 years ago

I don't get your point.

Values in the table lie in range [0, 1]. I put value baunds to [-1, 1] - so all zero values should have green color. But they are still rendered as white - somehow color scheme is not applied to them.

Let's asume you choose the greens linear palette:

Then 0 is lightGreen, and 1 is darkGreen Missing items, are not colored

So we can see that the color scheme is applied to each value.

Question:

when you say "zero values should have green color", do you mean that nonexisting items should be considered as "zero value"?

If so, I'm not sure that Heatmap visualization lets you do it. I'd say that it could be workarounded if we could define the background color of the chart.

EgorBu commented 4 years ago

Sorry for the confusion! Can you put range of values from -1 to 1? Screenshot from 2019-10-23 14-36-21 And then it's still showing zero values with white color Screenshot from 2019-10-23 14-37-40

dpordomingo commented 4 years ago

I still have not a clear idea if when saying zero values you mean values that don't exist. Because values that don't exist are not displayed in the heatmap charts, no matter you change the value bounds or you don't. Value bounds only apply when calculating the color for real values, so not applying to missing ones.

EgorBu commented 4 years ago

CSV file has 125829 rows (1 header + 125828 value rows). For each repository (83 repos in total) there are 1516 values per each day since the creation of the first repository. Each 0 value is presented - it's not a sparse matrix, it's a dense matrix. 0 value means that nothing happened on this particular day. But the value is in the CSV. Like: repo, day, 0 Somehow 0 values are rendered with white color instead of color from color scheme

dpordomingo commented 4 years ago

I'll review this, considering your last message, that helped me to understand the problem.

dpordomingo commented 4 years ago

It seems to be a problem with the amount of data to be rendered.

I tried with only the last and a half year (~45k values) and I could. image

Then I tried with the last two years (~60k values), and I could not. image