{"id":14990385,"url":"https://github.com/googlewebcomponents/google-chart","last_synced_at":"2025-05-14T17:02:36.361Z","repository":{"id":16599955,"uuid":"19354498","full_name":"GoogleWebComponents/google-chart","owner":"GoogleWebComponents","description":"Google Charts API web components","archived":false,"fork":false,"pushed_at":"2025-04-09T13:01:07.000Z","size":2784,"stargazers_count":363,"open_issues_count":35,"forks_count":132,"subscribers_count":34,"default_branch":"main","last_synced_at":"2025-04-13T01:58:28.442Z","etag":null,"topics":["api","google","polymer","visualizations","webcomponents"],"latest_commit_sha":null,"homepage":"https://www.webcomponents.org/element/@google-web-components/google-chart/elements/google-chart","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleWebComponents.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-05-01T19:03:53.000Z","updated_at":"2025-04-07T09:49:50.000Z","dependencies_parsed_at":"2022-08-29T05:40:42.849Z","dependency_job_id":"7ea35f93-6e95-4be5-b1fe-3a5863813ce6","html_url":"https://github.com/GoogleWebComponents/google-chart","commit_stats":{"total_commits":231,"total_committers":37,"mean_commits":6.243243243243243,"dds":0.5974025974025974,"last_synced_commit":"3f7c65357d8574934fd2dfad1ad10234884fe36f"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleWebComponents%2Fgoogle-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleWebComponents%2Fgoogle-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleWebComponents%2Fgoogle-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleWebComponents%2Fgoogle-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleWebComponents","download_url":"https://codeload.github.com/GoogleWebComponents/google-chart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654048,"owners_count":21140235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","google","polymer","visualizations","webcomponents"],"created_at":"2024-09-24T14:20:01.330Z","updated_at":"2025-04-13T01:58:34.491Z","avatar_url":"https://github.com/GoogleWebComponents.png","language":"TypeScript","readme":"# google-chart\n\n[Google Charts API](https://developers.google.com/chart/) web components.\n\nSee: [Documentation](https://www.webcomponents.org/element/@google-web-components/google-chart)\n\n[![Published on NPM](https://img.shields.io/npm/v/@google-web-components/google-chart.svg)](https://www.npmjs.com/package/@google-web-components/google-chart) [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/@google-web-components/google-chart)\n\n## Usage\n\n### Installation\n\n```sh\nnpm i @google-web-components/google-chart\n```\n\n### In HTML file\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript type=\"module\"\u003e\n      import '@google-web-components/google-chart';\n    \u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cgoogle-chart data='[[\"Month\", \"Days\"], [\"Jan\", 31]]'\u003e\u003c/google-chart\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### In a LitElement\n\n```typescript\nimport {LitElement, html} from 'lit';\nimport {customElement} from 'lit/decorators.js';\nimport '@google-web-components/google-chart';\n\n@customElement('new-element')\nexport class NewElement extends LitElement {\n  render() {\n    return html`\n      \u003cgoogle-chart data='[[\"Month\", \"Days\"], [\"Jan\", 31]]'\u003e\u003c/google-chart\u003e\n    `;\n  }\n}\n```\n\n### In a Polymer 3 element\n\n```javascript\nimport {PolymerElement, html} from '@polymer/polymer';\nimport '@google-web-components/google-chart';\n\nclass NewElement extends PolymerElement {\n  static get template() {\n    return html`\n      \u003cgoogle-chart data='[[\"Month\", \"Days\"], [\"Jan\", 31]]'\u003e\u003c/google-chart\u003e\n    `;\n  }\n}\ncustomElements.define('new-element', NewElement);\n```\n\n### More usage examples\n\nSee examples in the demo or try this live [JS bin](https://jsbin.com/zitotejimi/edit?html,output).\n\n## Uprading from 3.x\n\nThe component has been migrated to LitElement and uses TypeScript now. This migration introduced two breaking changes.\n\n### Removed Polymer-specific `selection-changed` event\n\nThe Polymer-specific `selection-changed` event commonly used for 2-way bindings has been removed.\nThere were previously two events for observing chart selection changes: `google-chart-select` and the Polymer-generated `selection-changed`.\nFor consistency with other events (e.g. `google-chart-ready`), we keep only `google-chart-select`.\n\nPolymer components using this feature must be updated to explicitly name the selection event ([details](https://polymer-library.polymer-project.org/3.0/docs/devguide/data-binding#two-way-native)).\nIn the example below, note the addition of `::google-chart-select`.\n\n```diff\n- \u003cgoogle-chart selection=\"{{chartSelection}}\"\u003e\u003c/google-chart\u003e\n+ \u003cgoogle-chart selection=\"{{chartSelection::google-chart-select}}\"\u003e\u003c/google-chart\u003e\n```\n\nLitElement components using the `selection-changed` event must be updated in a similar fashion:\n\n```diff\n- \u003cgoogle-chart .selection=\"${chartSelection}\" @selection-changed=\"${reactToChartSelection}\"\u003e\u003c/google-chart\u003e\n+ \u003cgoogle-chart .selection=\"${chartSelection}\" @google-chart-select=\"${reactToChartSelection}\"\u003e\u003c/google-chart\u003e\n```\n\n### Removed `google-chart-loader` component\n\nIts functionality can be imported from the `loader.js` module:\n\n```javascript\nimport {dataTable, load} from '@google-web-components/google-chart/loader.js';\n```\n\nor you may instead choose to use `google.visualization.ChartWrapper` directly ([example](https://developers.google.com/chart/interactive/docs/reference#chartwrapper-class)).\n\n## Contributing\n\nInstructions for running the tests and demo locally:\n\n### Installation\n\n```sh\ngit clone https://github.com/GoogleWebComponents/google-chart.git\ncd google-chart\nnpm install\n```\n\n### Running the demo locally\n\n```sh\nnpm start\n```\n\nThe browser will open automatically.\n\n### Running the tests\n\n```sh\nnpm test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglewebcomponents%2Fgoogle-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglewebcomponents%2Fgoogle-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglewebcomponents%2Fgoogle-chart/lists"}