-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add group sum labels for the horizontal stacked bar #1634
Add group sum labels for the horizontal stacked bar #1634
Conversation
size-limit report 📦
|
@@ -147,6 +185,17 @@ export function HorizontalStackedBars({ | |||
</Fragment> | |||
); | |||
})} | |||
{!isSimple && ( |
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 spit balling here, I wonder if we still want a way to show/hide labels even for non-simple charts.
What do you 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.
@envex I do think we should be able to hide these labels. If the x-axis labels are displayed and we also have the group labels, it becomes overwhelming.
I will look into adding this functionality.
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.
@envex I added an option to the Theme
that supports hiding group labels.
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.
Sorry, It looks like a UI test was broken: https://shopify.chromatic.com/test?appId=6062ad4a2d14cd0021539c1b&id=65e24099b59ea560c35266e0
Can you take a peek?
af48f49
to
208b1c1
Compare
208b1c1
to
61df7a0
Compare
What does this implement/fix?
While transitioning our reports to MAAPI, we needed to update the stacked horizontal bar chart to support group sum labels, a similar approach to what we have in the Simple Bar Chart.
Does this close any currently open issues?
Resolves https://github.com/Shopify/core-issues/issues/67692
What do the changes look like?
In our planned usage of this chart for UA, we will not display X-axis labels with vertical grid lines.
Storybook link
Stacked Horizontal Bar
Stacked Horizontal Bar With No Group Labels
Simple Bar Chart
Before merging
Check your changes on a variety of browsers and devices.
Update the Changelog's Unreleased section with your changes.
Update relevant documentation, tests, and Storybook.
Make sure you're exporting any new shared Components, Types and Utilities from the top level index file of the package