-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(data-warehouse): Select color of series on a query visualization #25909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one change, then this is good - top stuff! 🚀
@@ -668,6 +668,7 @@ export interface ChartSettingsFormatting { | |||
} | |||
|
|||
export interface ChartSettingsDisplay { | |||
color?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a backend equivalent for this - generate it with pnpm schema:build
command. Without it, I think saving an insight with a color will get rejected by the backend (I think)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, I hadn't tested saving an insight. Will try what you said 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should be fixed now
1f89827
to
326d6ae
Compare
Size Change: 0 B Total Size: 1.15 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
Problem
At the moment it is not possible to change the color of a series on a query visualization.
Changes
UX
Adds a color picker (the same one as for conditional formatting, thanks Tom!) to the series display options tab. See screen recording below.
Screen.Recording.2024-10-30.at.17.21.54.mov
Code
ColorPickerButton
into its own file since it is now used in 2 different places (I also renamed itColourPickerButton
->ColorPickerButton
since we use the American spelling in most places and thought it best to be consistent).colorChoices
prop so that for the series color we can pass in the set of colors currently used for series (this is different from the color palette used for conditional formatting)Limitations
I thought about doing the same - I think it would require us to move the colour glyph out of the select to a separate button on the left (see below). The only thing is that there is then even less space to display the label, unless we change the layout a bit, so not sure whether to proceed with this or not?
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
I presume so.
How did you test this code?
Local testing