Skip to content

Introducing Templates/Themes #425

Closed
Closed
@tarzzz

Description

@tarzzz

Going through the discussion in this thread: #217

We can add template functionality to the API Libraries. Some pointers:

  • py.plot(fig, template='ggplot'). Template can be a keyword ( 'ggplot', 'seaborn' etc.) or a Figure instance. This way a user can copy the theme from an existing chart the user has access to (which many people have been asking about, in support queries).
  • Copying the template from an existing Plotly chart will only work in online mode (inbuilt template can be used offline as well).
  • saving user's custom templates as JSON in .plotly/user_templates directory, and built-in templates in .plotly/plotly_templates directory.
  • Adding new built-in templates will require a valid template.json and a reference in a templates.py file.
  • A Template Parser, which will load template files, and convert them to Figure or Layout objects (basically deserialize them).
  • A deep update method, which can work on Plotly's Graph Objects (as a utility method).

@cldougl @jackparmer @theengineear : please provide comments/suggestions ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions