in one file I have a bunch of charts of different types, with the data for the charts coming from a time series df
In bokeh 2 I could use this at the bottom of the file to collect the series names used in all the charts
> fig_list = []
>
> for obj in gc.get_objects():
> if isinstance(obj, figure):
> fig_list.append(obj)
>
> fig_names = [fig.name for fig in fig_list if fig.name]
> renderer_list = [renderer for fig in fig_list if fig.name == chart_name for renderer in fig.renderers]
> variables = []
>
> for renderer in renderer_list:
> if hasattr(renderer.glyph, 'y'):
> variables.append(renderer.glyph.y)
> elif hasattr(renderer.glyph, 'top'):
> top = renderer.glyph.top
> if isinstance(top, str):
> variables.append(top)
> elif 'expr' in top:
> variables.extend(top['expr'].fields)
The second part of that block collected the column headers used in stacker charts. In bokeh 3 this part of the code fails, because the names/formats used for renderers seem to have changed. What’s the right way to access the column names now?
thanks