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

new(vx-legend): add Line, legendLabelProps, more props in renderShape #749

Merged
merged 3 commits into from
Jun 18, 2020

Conversation

williaster
Copy link
Collaborator

🚀 Enhancements

This adds some additional features + hooks to @vx/legend which were needed for me to integrate the Legend component in the XYChart POC.

  • Add Line shape (now have Line, Rect, and Circle)
  • Add legendLabelProps to Legend to support customization of label styles (and integration of the XYChart theme)
  • Pass item + itemIndex in RenderShapeProvidedProps; it currently passes label which doesn't help if your logic is based off of the Legend scale domain

image

@hshoff @kristw

@williaster williaster added this to the 0.0.198 milestone Jun 17, 2020
@williaster williaster requested a review from hshoff June 17, 2020 19:19
@@ -122,6 +127,7 @@ export default function Legend<Datum, Output, Scale = ScaleType<Datum, Output>>(
flex={labelFlex}
margin={labelMargin}
align={labelAlign}
{...legendLabelProps}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously this couldn't be customized at all

@williaster
Copy link
Collaborator Author

#751 should fix the CI on this

@hshoff hshoff linked an issue Jun 17, 2020 that may be closed by this pull request
@williaster williaster merged commit a0bff5f into master Jun 18, 2020
@williaster williaster deleted the chris--legend-enhancements branch June 18, 2020 20:34
@williaster williaster mentioned this pull request Jun 18, 2020
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@vx/legend: LegendLabel not customizable with className or style props
2 participants