plost
plost copied to clipboard
color attribute not supported
In the current version of plost 0.2.5, color attribute of every chart type is not supported.
Looking in the code, there seem to be a lack of passing through the value of the color argument.
One easy fix is to replace every
spec = D(
mark=D(type='circle', tooltip=True),
encoding=D(
x=_clean_encoding(data, x),
y=y_enc,
color=color_enc,
size=_clean_encoding(data, size, legend=legend),
opacity=_clean_encoding(data, opacity, legend=legend),
),
selection=_get_selection(pan_zoom),
)
by
spec = D(
mark=D(type='circle', tooltip=True),
encoding=D(
x=_clean_encoding(data, x),
y=y_enc,
color=_clean_encoding(data, color),
size=_clean_encoding(data, size, legend=legend),
opacity=_clean_encoding(data, opacity, legend=legend),
),
selection=_get_selection(pan_zoom),
)
The change is in the line color=color_enc to color=_clean_encoding(data, color).