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 static functions to getDimensions of components #898

Closed
rudasoftware opened this issue Jan 10, 2018 · 0 comments · Fixed by FormidableLabs/victory-core#325
Closed

Add static functions to getDimensions of components #898

rudasoftware opened this issue Jan 10, 2018 · 0 comments · Fixed by FormidableLabs/victory-core#325

Comments

@rudasoftware
Copy link
Contributor

When assembling a more complex chart (with multiple titles/labels not derived directly from data, legends that can appear in different places depending on user input, etc.), increasingly complicated layout calculations are necessary to keep everything aligned.

I really dislike hard-coding magic values. When something changes on my end (e.g. different font size or padding) or on the users' end (e.g. string of a longer length than previously encountered), the rounds of manual tuning are tedious and discourage rapid iteration.

It would be amazing to have static methods to call (perhaps accepting relevant component prop values) to pre-calculate the size (if only the bounding box) of components like VictoryLegend or a VictoryAxis including its tickLabels

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.

1 participant