Skip to content

Add number type to annotations.text chart schema #2523

Closed

Description

Similar to #2519 , in plotly/plotly.py#942 we're updating plotly.py's validation logic to automatically use the plotly.js schema.

Annotations allow numbers as text (https://codepen.io/chriddyp/pen/WzgxwK) and it's a pretty common use case in the Python library to directly pass data into the text field.

Could we add number to the valid types in the annotations schema? It's currently:

                                "text": {
                                    "valType": "string",
                                    "role": "info",
                                    "editType": "calc",
                                    "description": "Sets the text associated with this annotation. Plotly uses a subset of HTML tags to do things like newline (<br>), bold (<b></b>), italics (<i></i>), hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub> <span> are also supported."
                                },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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