Skip to content
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

plotly-express - Update chart colors when theme changes #199

Closed
bmingles opened this issue Jan 10, 2024 · 2 comments
Closed

plotly-express - Update chart colors when theme changes #199

bmingles opened this issue Jan 10, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bmingles
Copy link
Contributor

Charts rendered by Plotly express plugin should update their colors when theme selection changes. We should be able to use the useTheme hook to subscribe to theme changes.

@bmingles bmingles added enhancement New feature or request triage labels Jan 10, 2024
@vbabich vbabich added this to the January 2024 milestone Jan 16, 2024
@vbabich vbabich removed the triage label Jan 16, 2024
@mofojed mofojed modified the milestones: January 2024, February 2024 Feb 13, 2024
@mofojed mofojed modified the milestones: February 2024, March 2024 Mar 18, 2024
@mofojed mofojed modified the milestones: March 2024, April 2024 Apr 15, 2024
@mofojed mofojed assigned AkshatJawne and unassigned bmingles May 21, 2024
@AkshatJawne
Copy link
Contributor

@mofojed Did some digging, found a couple of things
a. In the snippet you provided in the team channel, it sets color = "species", if that is removed, then the colors are correctly switching based on switching the theme. This does make sense, given if the user sets a color, even if they change their theme, the color should be the same? At least that is what I gathered from reading deephaven/web-client-ui#1772 and #251 , maybe @bmingles could further clarify this

b. In the model, at this line

, we use removeColorsFromData , in the definition for that function, there is a comment that "There are multiple datatypes in plotly and some don't contain marker or marker.color", which may mean that the theme cannot adjust for certain graphs that don't have the marker or marker.color , the snippet where the colors are switching is a Bar Chart, but maybe in the snippet you had provided (which is a scatter plot), there is no marker or marker.color

@AkshatJawne
Copy link
Contributor

After testing and discussion with @bmingles and @mofojed , it appears that the issue that this ticket was aiming to solve has already been solved by deephaven/web-client-ui#1772 , so closing this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants