Package Exports
- @google-web-components/google-chart
- @google-web-components/google-chart/google-chart.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@google-web-components/google-chart) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
google-chart
Google Charts API web components.
See: Documentation
Usage
Installation
npm i @google-web-components/google-chartIn HTML file
<html>
<head>
<script type="module">
import '@google-web-components/google-chart';
</script>
</head>
<body>
<google-chart data='[["Month", "Days"], ["Jan", 31]]'></google-chart>
</body>
</html>In a LitElement
import {LitElement, html, customElement} from 'lit-element';
import '@google-web-components/google-chart';
@customElement('new-element')
export class NewElement extends LitElement {
render() {
return html`
<google-chart data='[["Month", "Days"], ["Jan", 31]]'></google-chart>
`;
}
}In a Polymer 3 element
import {PolymerElement, html} from '@polymer/polymer';
import '@google-web-components/google-chart';
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-cliRunning the demo locally
polymer serve --openand visit http://127.0.0.1:8081/components/@google-web-components/google-chart/demo/.
Running the tests
polymer test --npm