Skip to content

Adapt Chart visualization for Dash/Kaleido #49

Closed

Description

@kMutagene

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.

Activity

  1. added this to the 2.0 milestone on Sep 1, 2020
  2. kMutagene commented on Sep 14, 2020

    @kMutagene
    CollaboratorAuthor

    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.

  3. added a commit that references this issue on Sep 14, 2020
  4. kMutagene commented on Sep 23, 2020

    @kMutagene
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions