changing plot options of a series in drop down menu of Settings does not work
I can't change the plot options color and lineWidth after the plot is made.
I want to change
s1 = dict(name='List data', data=[1,2,5,9,6,3,4,8])
to
s1 = dict(name='List data', data=[1,2,5,9,6,3,4,8], color='#2b908f', lineWidth=4)
in the settings.
I want to do this because I use pd.DataFrames as input data, so I can't modify color= and lineWidth=
I could work around this if I convert the DataFrame to a dictionary first Which function is used to convert a DataFrame to the dictionary you use to plot?
I found the function for the workaround.
from charts import core
series=core.df_to_series(df) column_dict = {v:i for i,v in enumerate(df)} column = 'Tz_ref' series[column_dict[column]]['color']='#2b908f' series[column_dict[column]]['lineWidth']=10
charts.plot(series)
@matsvandecavey With the current implementation this is the only way to do it. To be able to dynamically update the colors would require some javascript coding.