Closed
Description
Latest list of circular dependencies:
- Plots < --- > Annotations
- Plots < --- > Legend
- Plots < --- > Axes (the only
Plots
calls inaxes.js
aretraceIs
) - Plots < --- > plotApi
- plotApi < --- > Annotations
- plotApi < --- > Shapes
- plotApi < --- > Titles
- plotApi < --- > Fx
- plotApit < --- > Legend
Possible partial solutions:
- Make a component registry and register the components (e.g. Annotations, Shapes, Titles, Fx, Legend), so
plot_api.js
doesn't have to require the full component modules (similar to trace and subplot modules). Blocking: we'll need a centralized api for the component module, e.g. all component modules should have adraw
method and possible andinit
method. - Use a more OO pattern (in the long term). Attach
relayout
andrestyle
to a plot object so that files requiringplot_api.js
(e.g Annotations, Shapes and Fx) can usegd.relayout()
instead ofplotApi.relayout(gd, ...)
.
Metadata
Metadata
Assignees
Labels
No labels