Skip to content

Conversation

@my-tien
Copy link
Contributor

@my-tien my-tien commented Jan 12, 2026

Description

Update SubplotidValidator to handle arrays of values.

Additional fix for closing #5463.

Changes

  • Handle arrays in SubplotidValidator

  • Added array_ok tests

Testing

  • Be on main

  • Run the following code:

    import plotly.graph_objects as go
    
    pie = go.Pie(
        labels=["A", "B", "C"],
        values=[65, 15, 20],
        legend=["legend", "legend2"],
    )
    
    fig = go.Figure([pie], go.Layout())
    fig.show()
    
  • Note that a ValueError is raised

  • Switch to this branch

  • Run the same code again

  • Note that chart is rendered correctly

Disclaimer I am required to add that…

the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

@my-tien
Copy link
Contributor Author

my-tien commented Jan 12, 2026

FYI @camdecoster @emilykl

Copy link
Contributor

@camdecoster camdecoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but there a few small changes to make. Thanks for the PR!

- added missing arrayOk in docstring
- removed replaced description
- Fixed indentation
- return success instead of writing into passed array
@camdecoster camdecoster merged commit dad2520 into plotly:main Jan 14, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants