Hey there
I’m having a hard time with deck gl chart, the examples work just fine but as soon as I try to do something slightly more complex I stumble into problems. The documentation is not a big help either. I understand that this is probably due to the fact that this is a wrapper around a js library.
Anyway, my extremely simple problem is, how do I set the color of the dots on a scatter plot based on the value of a column?
I tried several combinations including the getColorR/G/B
property inside an encoding
dictionary as described in the docs but with no luck. E.g.
layers=[
{
"type": "ScatterplotLayer",
"data": df,
"encoding":{
"getColor": "colorR"
}
}
],
Where colorR
is an existing column on my df (tried with values from 0 to 1 and values from 0 to 255).
Can someone provide a working (even if simple) example?
Thank you in advance