Google Charts API web components

google-chart

Google Charts API web components.

See: Documentation

Build Status Published on NPM Published on webcomponents.org

Usage

Installation

npm i @google-web-components/google-chart

In HTML file

<html>
  <head>
    <script type="module">
      import '@google-web-components/google-chart/google-chart.js';
    </script>
  </head>
  <body>
    <google-chart data='[["Month", "Days"], ["Jan", 31]]'></google-chart>
  </body>
</html>

In a Polymer 3 element

import {PolymerElement, html} from '@polymer/polymer';
import '@google-web-components/google-chart/google-chart.js';

class NewElement extends PolymerElement {
  static get template() {
    return html`
      <google-chart data='[["Month", "Days"], ["Jan", 31]]'></google-chart>
    `;
  }
}
customElements.define('new-element', NewElement);

More usage examples

See examples in the demo or try this live JS bin.

Contributing

Instructions for running the tests and demo locally:

Installation

git clone https://github.com/GoogleWebComponents/google-chart.git
cd google-chart
npm install
npm install -g polymer-cli

Running the demo locally

polymer serve --open

and visit http://127.0.0.1:8081/components/@google-web-components/google-chart/demo/.

Running the tests

polymer test --npm

Install

Link to this version
ImportedReleased 08 March 2019Apache License 2.0
Framework Support
Polymer 3.0+
Also supported:
Polymer 1 (1.1.2)Polymer 2 (2.0.1)
Browser Independent
Install with
npm install @google-web-components/google-chart"@3.0.4"
Run the above npm command in your project folder. If you have any issues installing, please contact the author.
Release notes - Version 3.0.4

Dependencies

  • @polymer/iron-ajax#^3.0.0-pre.18
  • @polymer/polymer#^3.0.0