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

Responsive charts #56

Open
mg1075 opened this issue Mar 28, 2015 · 3 comments
Open

Responsive charts #56

mg1075 opened this issue Mar 28, 2015 · 3 comments

Comments

@mg1075
Copy link

mg1075 commented Mar 28, 2015

There is an "Advanced" example on the dimple website for responsive charts, and also a closed issue in Github. Is there a plan to add responsive features to this project?

@mg1075
Copy link
Author

mg1075 commented Mar 28, 2015

The comment in the dimple responsive example has:

                // Add a method to draw the chart on resize of the window
                window.onresize = function () {
                    // As of 1.1.0 the second parameter here allows you to draw
                    // without reprocessing data.  This saves a lot on performance
                    // when you know the data won't have changed.
                    chart.draw(0, true);
                };

I think this should be made available to angular-dimple.graph in the directive, at least as an option to pass via attrs. Probably want to have the second parameter be an option, too.

@jasoncmcg
Copy link

This method is responsive and doesn't require redrawing on resize:
http://jsfiddle.net/jasoncmcg/gkxrnonk/

@paulcpederson
Copy link
Owner

#61 by @danielmcquillen adds an attribute you can add to the chart called autoresize. This just got merged and hasn't been released yet, but after the next release you should be able to just add autoresize="true" and have it scale to the screen size.

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

No branches or pull requests

3 participants