Comments (3)
Short answer: no, I could not solve the problem so I am not using angular2-google-chart.
Long answer: I'm turned off to using projects that wrap existing javascript functionality for angular consumption. There seems to be this constant cat-and-mouse game of waiting for support after each release and then having to debug the inconsistencies myself. Even if everything works, libraries like Google Charts already have tons of great documentation with examples, but I can't use any of it until I figure out how to translate it for the wrapper library. I see some value in the wrappers, but if they don't work right away or impose too much deviation from the original library, I just fallback to using the straight javascript as I did in this case. I've included the snippets below for how to do that.
index.html
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
</script>
some-component.html
<div id="some-unique-id"></div>
some-component.ts
declare var google;
let chart = new google.visualization.ComboChart(document.getElementById('some-unique-id'));
chart.draw(data, options);
Admittedly, this could use some error handling for if Google Charts does not load in time (or ever).
from angular2-google-chart.
Same problem since Ionic 2.
from angular2-google-chart.
could you solve this problem?
from angular2-google-chart.
Related Issues (20)
- Google Calendar Chart HOT 1
- Unexpected value 'GoogleChart' declared by the module 'AppModule' HOT 1
- Unexpected value 'GoogleChart' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation. HOT 8
- how to use redraw method?
- Does angular2-google-chart works with angular4 cli? HOT 2
- Getting compiling error
- node_modules/angular2-google-chart/directives/angular2-google-chart.directive.ts(33,15): error TS7006: Parameter 'chartOptions' implicitly has an 'any' type
- How can i colered BarChart?
- Please add support for Angular 5 HOT 4
- compile error HOT 3
- angular2-google-chart
- node_modules\angular2-google-chart\directives\angular2-google-chart.directive.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. HOT 6
- Timline chart is not loading (Invalid visualization type: timeline)
- How to set colors in pie chart?
- Despite having container div set to width 100 %, chart is not filling up the container.
- how to change value in line chat right hand side value (0,400,8001200,1600) and change the symbol Sales and Expenses
- Incompatible data table: Error: Unknown address type. HOT 1
- angular2-google-chart.directive.ts is missing from the TypeScript compilation.
- Pie Chart - ERROR Error: Invalid column index null. Should be an integer in the range [0-1]
- Chart Background Color
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-google-chart.