You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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."
},
The text was updated successfully, but these errors were encountered:
Better: you can look at whether the attribute includes strict: true - if it does, the value must be explicitly a string, and numbers will be rejected. If it does not, we accept numbers (and ONLY numbers - not booleans or any other types) and will coerce them to strings during supplyDefaults.
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 thetext
field.Could we add
number
to the valid types in the annotations schema? It's currently:The text was updated successfully, but these errors were encountered: