Hi!
So, i want to get an array back from clicking on a certain square in a Heatmap…
The issue i have is that i want to retrieve the value in an external cell and not the same graph cell because i want to use it as a global value (or something like that for usage in other cells)!
For that i have tried to create a variable in a separate cell as such:
val = data (where data is my original data so val is like a copy to not affect it)
And in my heatmap cell code i have an onclick as such:
combi.on(‘click’, function (d) {
d3.select(this).select(“rect”).selectAll(function() {
val.value = exp
}) });
In this example i was just trying to change the value to another array that i have (exp) when activating the click function but the ‘val’ didn’t change…
In another way, i have seen something as “mutable” and even when i used it nothing changed.
So, here’s the thing again:
- how to change a value from a different cell?
- how to retrieve the value from the clicked cell (unlike the simple change of ‘val’ in example)?
I’m quite sure the function is quite wrong so excuse me for that