-
Notifications
You must be signed in to change notification settings - Fork 14k
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
[SIP-5] Refactor and improve histogram #5758
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5758 +/- ##
=========================================
- Coverage 63.83% 63.8% -0.04%
=========================================
Files 364 365 +1
Lines 23100 23111 +11
Branches 2587 2600 +13
=========================================
Hits 14745 14745
- Misses 8340 8351 +11
Partials 15 15
Continue to review full report at Codecov.
|
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.
LGTM!!! excited this seems to have worked smoothly, still curious how it sizes correctly with the legend 🍀
<LegendOrdinal | ||
scale={colorScale} | ||
direction="row" | ||
shape="rect" |
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.
I could see rect
being better than circles given that bars are rectangle. If you do want them to render as rects, you can do something like (example here / storybook).
tldr
shape={({ fill, width, height }) => (
<svg width={width} height={height}>
<rect width={width} height={height} fill={fill} />
</svg>
)}
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.
Hah. nice.
Let me hold this one a bit. May wrap the legend and chart in flexbox to make sure. I feel that magic layout is too good to be true. |
8532991
to
bd31e29
Compare
I write a layout component called
p.s. The |
this My only comment would be on aesthetics for the |
bd31e29
to
aa8f7d2
Compare
* Extract slice and formData * indent * update data proptype * enable theme * remove legacy code * rename file * Add legend * Implement WithLegend * align legend items to the right for bottom position * add line at end of file * fix linting issues
* Extract slice and formData * indent * update data proptype * enable theme * remove legacy code * rename file * Add legend * Implement WithLegend * align legend items to the right for bottom position * add line at end of file * fix linting issues
@data-ui/histogram
@vx/legend
for legendslice
andformData
Before
After
@williaster @conglei