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

Add ability to set VictoryLegend symbol size via theme propery #736

Closed
danny-andrews opened this issue Sep 1, 2017 · 2 comments · Fixed by FormidableLabs/victory-core#294

Comments

@danny-andrews
Copy link

It looks like the size of the symbol in a VictoryLegend component is either derived from the font-size or from the symbol.size property of the datum. It would be nice if this was configurable via the VictoryTheme, as is symbol type.

Probably something as simple as:

legend: {
    style: {
      data: {
        type: 'square',
        size: 16,
      },
    },
  }

And then in victory-legend/helper-methods.js:

size: dataStyle.size || getSymbolSize(datum, fontSize),

I'd be happy to make a PR if this seems like a good approach.

@boygirl
Copy link
Contributor

boygirl commented Sep 1, 2017

@danny-andrews

Good timing. I'm actually in the middle of a big legend overhaul. I'll make sure this functionality gets in.

@danny-andrews
Copy link
Author

Splendid. :)

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 a pull request may close this issue.

2 participants