Skip to content

selector should accept integers and strings, for all functions accepting the selector argument #2891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicholas-esterer opened this issue Nov 11, 2020 · 0 comments · Fixed by #2894
Assignees

Comments

@nicholas-esterer
Copy link
Contributor

Example functions are update_trace, for_each_shape, etc.

If the selector keyword argument is an integer, it should behave as follows:

  • If row and col aren't specified, it should act as an index into fig.data, i.e., fig.data[selector]
  • If they are, then it acts as an index into the objects on that subplot, e.g., list(fig.select_traces(row=r,col=c))[selector])

If the selector keyword argument is a string, it should create a dictionary whose sole key is type and selector is the value at the key, e.g., if type(selector) == type(str()): selector = dict(type=selector).

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 a pull request may close this issue.

1 participant