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

Added materialDesign attribute to enable new charts. #77

Closed
wants to merge 1 commit into from

Conversation

zmoshansky
Copy link

#30 implementation for the charts that have a Material Design Beta version. (This is an updated #39 PR.)

All original charts work fine.

The new material-design charts on the demo page sometime have an issue rendering. This can be resolved by chart._chartObject = null && chart.drawChart(). I believe it's an issue with the timing of the loading, but since the code is obfuscated there's nothing a community contribution can do.

Anecdotally, using just a couple material-design charts on a single page of an SPA renders correctly every time. (#ItWorksOnMyMachine)

Given that these are marked as BETA, it would be great if people could opt-in to using the feature and the known hiccups until someone with access to the source can diagnose the root cause of the issue.

@wesalvaro
Copy link
Member

So I tried attacking this tonight but it seems that the google.load result for the new packages isn't right as I was unable to get the charts to render correctly or consistently in the demo.

Using the new recommended loader google.charts.load from https://www.gstatic.com/charts/loader.js works, but cannot be called more than once (?) so it requires loading all of the chart packages for our purposes.

I'll try to track down a better solution, but it's a bummer.

@rslawik
Copy link
Contributor

rslawik commented Nov 21, 2019

I believe the material design charts are available with type="md-bar" or type="md-line".
JS bin demo

@rslawik rslawik closed this Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants