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

Chart height definition inside the component #18

Closed
strebl opened this issue Nov 23, 2016 · 1 comment
Closed

Chart height definition inside the component #18

strebl opened this issue Nov 23, 2016 · 1 comment

Comments

@strebl
Copy link

strebl commented Nov 23, 2016

Hi @apertureless

Thanks for your great work!

I have a question. Can I set the height within the component itself?
I can't set this.height = 200 because you can't modify a prop inside a component.
I know about the container option and the prop. But I'd like to set the height of the chart depending of the data it has.
Sure I can calculate that in the prop, but I think the logic should be in my component.

@apertureless
Copy link
Owner

Hi @strebl ,

mh I guess it is not really possible. You could try to overwrite the props default value. Because you're extending the component, you have actually access to the props and data. So it could be possible to overwrite the default value of the height.

However this would be only a static change. For one of your components. You could not change it dynamically, based on the data you feed it.

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

No branches or pull requests

2 participants