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

[legend][scale] add @vx/legend, add additional scales fixes #65 #67

Closed
wants to merge 3 commits into from

Conversation

hshoff
Copy link
Member

@hshoff hshoff commented Jun 15, 2017

⚠️ WIP

Adds:

  • @vx/scale
    • scaleQuantize()
    • scaleQuantile()
    • scaleThreshold()
  • @vx/legend
    • <LegendLinear />
    • <LegendOrdinal />
    • <LegendQuantile />
    • <LegendThreshold />

screen shot 2017-06-14 at 9 34 40 pm

view source

@vx/legend uses HTML instead of SVG. Benefits of HTML for legends includes using flexbox for layout and easy to add controls like checkboxes, sliders, selects, etc.

Need to add:

  • <LegendSize />
  • shape prop should be one of rect | circle | Element | function
  • pass additionalProps to LabelItem for click handlers, pass through props

fixes #65

@hshoff hshoff changed the title [legend][scale] add @vx/legend, add additional scales [legend][scale] add @vx/legend, add additional scales fixes #65 Jun 15, 2017
@hshoff hshoff added this to the v0.0.120 milestone Jun 15, 2017
<div
className={cx('vx-legend', className)}
style={style}
style={{
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if this is intentional but looks like the passed style would be overridden here? I think passing styles would be solid though, then you could flex-wrap vs not, etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

not intentional, i've got this fixed locally, just haven't pushed it yet. Good catch! 👍

@hshoff
Copy link
Member Author

hshoff commented Jun 20, 2017

Update:

<LegendSize />

screen shot 2017-06-20 at 8 13 29 am

custom shapes

screen shot 2017-06-20 at 8 13 11 am

Almost there.

@hshoff
Copy link
Member Author

hshoff commented Jun 28, 2017

closing in favor of #77

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.

[legend] add @vx/legend
2 participants