glue-viz / glue-plotly

Experimental plot.ly plugin for glue
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

Initialize all trace metadata IDs #62

Closed Carifio24 closed 5 months ago

Carifio24 commented 5 months ago

This PR updates the viewer layer artists to initialize all of the fields used for trace UUIDs when the layer artist is created. Currently these values are left as None until the relevant trace type is created. This causes a problem for any tools that create traces on the figure that don't have a meta field set: trace-getting methods such as e.g. _get_lines in the scatter layer artist can then pick up these traces in their results if _lines_id is still None. While all of the traces in glue-plotly have use the meta field of the trace, it's obviously better to make things more robust here rather than demand that any possible tool obey the same pattern.