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

Ability to control immediate, sequential resize/redraw attempts #12

Open
git-ashish opened this issue Mar 5, 2018 · 3 comments · May be fixed by #13
Open

Ability to control immediate, sequential resize/redraw attempts #12

git-ashish opened this issue Mar 5, 2018 · 3 comments · May be fixed by #13

Comments

@git-ashish
Copy link

Currently, if responsive feature is enabled on a chart, chart's responsive redrawing is directly proportional to number of resize events triggered on the chart's container element. This can be synthetically controlled if the developer has the control over the chart's container element. This is demonstrated in AmCharts codepen https://codepen.io/team/amcharts/pen/QwgEKQ. It employs enabling the animation property of resizable jQuery plugin.

There are use cases where the developer may not have control over the chart's container. In such cases, the chart can redraw many times and adversely affects the performance as well as user experience. It can be seen in this modified version of above codepen https://codepen.io/git-ashish/full/oERQBg/

Try to resize the container using container handles. You will observe that the chart redraws on every resize event.

This could be easily solved by providing a simple timeout property to control the redrawing.

chart.addListener( "resized", checkRules );

Looking forward to thoughts.

@martynasma
Copy link
Collaborator

That makes sense.

Would you be willing to contribute a PR?

@git-ashish
Copy link
Author

Sounds good.

Sure, I can do that. The usual fork and pull or do you have any other guidelines?

@martynasma
Copy link
Collaborator

Thanks! Usual fork/PR will do.

@git-ashish git-ashish linked a pull request Mar 15, 2018 that will close this issue
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