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

Feature Request: Ability to change color and order of series on bar chart #23093

Open
slshults opened this issue Jun 19, 2024 · 7 comments
Open
Labels
enhancement New feature or request feature/insights Feature Tag: Insights overall team/product-analytics

Comments

@slshults
Copy link
Contributor

Feature request

Is your feature request related to a problem?

On a dashboard with similar bar charts, the similar values for the series can be displayed in different order, with different colors, on the different charts.

For example, in the screenshots below, each of the charts show two feedback responses, a Positive series, and a Negative series, but the colors and positions are reversed in the first chart, as compared to the other charts.

The first of the charts shows the bars for Negative responses in blue, in the lower part of the chart:

CleanShot 2024-06-19 at 12 33 39@2x

However, for both of the other two charts, the bars for Negative responses appear in purple, in the top part of the chart:

CleanShot 2024-06-19 at 12 38 56@2x

CleanShot 2024-06-19 at 12 33 50@2x

Describe the solution you'd like

We'd like to be able to control the color and relative position of each series so that similar charts will appear similarly when displayed side-by-side in dashboards.

Additional context

From: https://posthoghelp.zendesk.com/agent/tickets/14758

Debug info

No response

@slshults slshults added enhancement New feature or request team/product-analytics feature/insights Feature Tag: Insights overall labels Jun 19, 2024
@niels-bosman
Copy link

Thanks for opening this! @slshults

@niels-bosman
Copy link

@pauldambra @Twixes Any chance this can get picked up? If not, maybe someone can guide me a little so I know how to contribute :)

@Twixes
Copy link
Member

Twixes commented Jun 24, 2024

Hi @niels-bosman – we haven't been able to prioritize this short-term, but definitely happy to take contributions!

If you'd like to contribute to PostHog, follow our "Developing locally" guide and skim through our "Engineering" handbook section overall (e.g. conventions).

As for concrete solutions here, I think a simple potential one could be a "Breakdown coloring" selector in visualization options (see screenshot below), with two values:

  • "By aggregate value"
  • "By name"
Screenshot 2024-06-24 at 16 49 35

@MarconLP
Copy link
Member

MarconLP commented Jul 2, 2024

related ticket: #17593

@slshults
Copy link
Contributor Author

+1 #23093

@sumtzehern
Copy link
Contributor

sumtzehern commented Aug 1, 2024

@Twixes, I am interested in adding this feature that allowed user to change color for the graph. This way user could have the ability to choose the color for the charts.

My current implementation is to show the series name on the option dropdown and make a drop down that have color options, I have created a prototype UI that looks as below,

light dark

Based on my current understanding, selecting a color would updates the graph's color and reflects this change on the dashboard. Any thoughts and suggestions on how to update the color for each charts after a color is selected. Any relevant files or methods would be helpful.

From my observations, it seems the the color option are defined in the colors.ts and updating the charts might need to be manually applied to each charts.

@Hronom
Copy link

Hronom commented Dec 3, 2024

When you think it will be done?

This will allow us to have same color in all bar charts and basically standardize colors in one dashboard.
So for example, for Channel type series, when you check Organic Search, Paid Search etc, all series will have same color in chart based on whenever it Organic Search, Paid Search etc. So easy to compare between bar charts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature/insights Feature Tag: Insights overall team/product-analytics
Projects
None yet
Development

No branches or pull requests

6 participants