Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

De-circularize plotly.js require statements #236

Copy link
Copy link
Closed
@etpinard

Description

@etpinard
Issue body actions

@mdtusz

Latest list of circular dependencies:

  • Plots < --- > Annotations
  • Plots < --- > Legend
  • Plots < --- > Axes (the only Plots calls in axes.js are traceIs)
  • 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 a draw method and possible and init method.
  • Use a more OO pattern (in the long term). Attach relayout and restyle to a plot object so that files requiring plot_api.js (e.g Annotations, Shapes and Fx) can use gd.relayout() instead of plotApi.relayout(gd, ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.