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

Construct Chart Label #1038

Merged
merged 2 commits into from
Nov 17, 2018
Merged

Construct Chart Label #1038

merged 2 commits into from
Nov 17, 2018

Conversation

mcnuttandrew
Copy link
Contributor

Sometimes the title prop on the axes component leaves something to be desired, so this PR adds a customizable label that you place where ever:

Before
screen shot 2018-11-13 at 4 28 03 pm

After
screen shot 2018-11-13 at 4 27 51 pm

@mcnuttandrew
Copy link
Contributor Author

Addresses #883 and #542

@mcnuttandrew mcnuttandrew requested a review from jckr November 14, 2018 00:23
@mcnuttandrew
Copy link
Contributor Author

Bump for review? @benshope

Copy link
Contributor

@benshope benshope left a comment

Choose a reason for hiding this comment

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

Looks good! Ship it


import PropTypes from 'prop-types';

class ChartLabel extends React.PureComponent {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't wait to bump this to 16.6 so we can use React.memo for this!

@JelleBlaauw
Copy link

Please add support for x and y (in pixels) instead of percentages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants