Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

add getDimension static method for VictoryLegend #325

Merged
merged 1 commit into from
Jan 16, 2018

Conversation

boygirl
Copy link
Contributor

@boygirl boygirl commented Jan 16, 2018

adds the static method getDimension(props) which return an object with the calculated width and height for the legend

closes FormidableLabs/victory#898
closes FormidableLabs/victory#854

@boygirl boygirl merged commit bd55d9c into master Jan 16, 2018
@boygirl boygirl deleted the feature/legend-get-dimension branch January 16, 2018 06:11
@ghost
Copy link

ghost commented Jun 28, 2019

@boygirl Could you explain how to use this?

I try to use it in the following fiddle but I am getting a width: NaN, height: NaN

https://jsfiddle.net/803xmr24/4/

@joeyzhousherwin
Copy link

Hey @boygirl, I'm trying to understand this as well, how can i use this getDimensions? Thanks

@joeyzhousherwin
Copy link

@bgold0 If you are still wondering, i figured out. you need to pass in the font size.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants