Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Chart visualization for Dash/Kaleido #49

Closed
kMutagene opened this issue Sep 1, 2020 · 2 comments
Closed

Adapt Chart visualization for Dash/Kaleido #49

kMutagene opened this issue Sep 1, 2020 · 2 comments

Comments

@kMutagene
Copy link
Member

kMutagene commented Sep 1, 2020

Description

Currently, The (single) GenericChart type is a tuple of data, layout, and config. Different endpoints such as the Dash Graph component or Kaleido that accept plotly graphs in JSON format however expect these to be fields of the same object, e.g.

{
    "data" : ... , 
    "layout": ..., 
    "config": ...
}

or at least

{
    "data" : ... , 
    "layout": ..., 
}

with the config object being separate

We should adapt the type accordingly, either by making both Union cases of GenericChart inherit from DynObj or abstracting Chart/MultiChart as record types. Additionally, we should adapt the html scaffold for displaying Charts to render plotly graphs directly from that Json instead of declaring data/layout/config objects in a script tag.

@kMutagene
Copy link
Member Author

Reference docs from plotly.py specifies the top level fields of the figure object as data, layout, and frames. As frames is needed for animations, which are currently not supported by this library, the first step is supporting data and layout and omitting frames until animations are supported.

@kMutagene
Copy link
Member Author

Converting the cahrt to the figure type (918adc2) is not perfect but will do for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant