Vega add static field to data

Viewed 70

I'm aiming to create a data table with specific color for each line in vega.

Actually i manage to do it like that

My problem is : when I click on a rectangle, it change the color of all the rectangle not only the one I clicked on.

I did not found a way to make my signals values dependent on each of my row so i decided to add a data to each row. At first i tried to use an aggregation but none of the aggregation i found allow me to set a static value in a field. Then i thought a calculate could do it but it results in a Property calculate is not allowed Right now I'm stuck and I don't know at all how i could do so.

If anyone has an idea on how I could do it, I would really appreciate. Thanks by advance

0 Answers
Related