Giter Club home page Giter Club logo

Comments (3)

buyitnexttime avatar buyitnexttime commented on June 25, 2024 2

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.

Natanael1234 avatar Natanael1234 commented on June 25, 2024

Same problem since Ionic 2.

from angular2-google-chart.

cetinahmetemre avatar cetinahmetemre commented on June 25, 2024

could you solve this problem?

from angular2-google-chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.