{"id":26630809,"url":"https://github.com/ashubham/highcharts-webcomponent","last_synced_at":"2025-04-10T17:07:01.342Z","repository":{"id":57264094,"uuid":"226396017","full_name":"ashubham/highcharts-webcomponent","owner":"ashubham","description":"Highcharts Web Component usable with any Framework","archived":false,"fork":false,"pushed_at":"2019-12-09T21:50:34.000Z","size":201,"stargazers_count":25,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T16:49:45.934Z","etag":null,"topics":["custom-elements","highcharts","lit-element","lit-html","webcomponents"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashubham.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}},"created_at":"2019-12-06T19:31:11.000Z","updated_at":"2024-07-10T11:50:29.000Z","dependencies_parsed_at":"2022-08-25T02:51:57.545Z","dependency_job_id":null,"html_url":"https://github.com/ashubham/highcharts-webcomponent","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashubham%2Fhighcharts-webcomponent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashubham%2Fhighcharts-webcomponent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashubham%2Fhighcharts-webcomponent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashubham%2Fhighcharts-webcomponent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashubham","download_url":"https://codeload.github.com/ashubham/highcharts-webcomponent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248260637,"owners_count":21074214,"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":["custom-elements","highcharts","lit-element","lit-html","webcomponents"],"created_at":"2025-03-24T14:21:21.813Z","updated_at":"2025-04-10T17:07:01.320Z","avatar_url":"https://github.com/ashubham.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Highcharts WebComponent \u003cimg src=\"https://github.com/ashubham/highcharts-webcomponent/raw/master/assets/highcharts-wc-2.png\" align=\"right\" alt=\"highcharts-wc\" /\u003e\n\n[![npm version](https://badge.fury.io/js/highcharts-webcomponent.svg)](https://badge.fury.io/js/highcharts-webcomponent)\n\nHighcharts WebComponent wrapper.\n- Usable with any Framework.\n- Or without any.\n\n## Installing\n\n```\nnpm install highcharts-webcomponent\n```\nIf Highcharts is not already installed, get the package with Highcharts:\n```\nnpm install highcharts highcharts-webcomponent\n```\n\n## Demo\n\nLive Example: https://webcomponents.dev/edit/ObQbCXjw2znEukL93AU3\n\n\n## Using\n\n### Basic usage example\n\n1. Import into your project:\n\n```js\nimport 'highcharts-webcomponent';\n\nOR\n\n\u003cscript type=\"module\" src=\"node_modules/highcharts-webcomponent/build/highcharts-wc.js\"\u003e\u003c/script\u003e\n```\n\n2. Start using it with any framework\n```js\nconst options = {\n  title: {\n    text: 'My chart'\n  },\n  series: [{\n    data: [1, 2, 3]\n  }]\n}\n```\n- LitHTML\n```js\nhtml`\n\u003chighcharts-chart .options=${options} @load=${this.onChartLoad}\u003e\n\u003c/highcharts-chart\u003e`\n```\n\n- Vue\n```html\n\u003chighcharts-chart :options=\"options\" @load=\"onChartLoad\"\u003e\n\u003c/highcharts-chart\u003e\n```\n\n- Angular\n```html\n\u003chighcharts-chart [options]=\"options\" (load)=\"onChartLoad()\"\u003e\n\u003c/highcharts-chart\u003e\n```\n\n- React\n```js\nrender() {\n    return (\n        \u003chighcharts-chart ref=\"chart\"\u003e\u003c/highcharts-chart\u003e\n    );\n}\n\n// Notice that we added ref attributes for the component.\n// This enables us to reference the components in the next step.\n\ncomponentDidMount() {\n    this.refs.chart.options = options;\n    this.refs.chart.addEventListener('load', this.onChartLoad);\n}\n```\n\n- AngularJS\n```html\n\u003chighcharts-chart ng-prop-options=\"options\" ng-on-load=\"onChartLoad\"\u003e\n\u003c/highcharts-chart\u003e\n```\n\n## Properties \u0026 Events\n\n### Properties\n\n| Property           | Attribute          | Type           | Default      | Description                                      |\n|----------------|----------------|--------------------|------------|--------------------------------------------------|\n| `allowChartUpdate` | `allowChartUpdate` | `boolean`                                        | true         | This wrapper uses chart.update() method to apply new options\u003cbr /\u003eto the chart when changing the parent component.\u003cbr /\u003eThis option allow to turn off the updating. |\n| `constructorType`  | `constructorType`  | `'chart' | 'stockChart' | 'mapChart' | 'ganttChart'`                      | 'chart'      | String for constructor method. Official constructors:\u003cbr /\u003e  - 'chart' for Highcharts charts\u003cbr /\u003e  - 'stockChart' for Highstock charts\u003cbr /\u003e  - 'mapChart' for Highmaps charts\u003cbr /\u003e  - 'ganttChart' for Gantt charts |\n| `highcharts`       |                    | |              | Used to pass the Highcharts instance after modules are initialized.\u003cbr /\u003eIf not set the component will try to get the Highcharts from window. |\n| `immutable`        | `immutable`        | `boolean`                                        | false        | Reinitialises the chart on prop update (as oppose to chart.update())\u003cbr /\u003euseful in some cases but slower than a regular update. |\n| `options`          |                    | `Object`                                         | **required** | Highcharts chart configuration object.\u003cbr /\u003ePlease refer to the Highcharts [API documentation](https://api.highcharts.com/highcharts/). |\n| `updateArgs`       |                    | `[boolean, boolean, boolean]`                    |     `[true, true, true]`         | Array of update()'s function optional arguments.\u003cbr /\u003eParameters should be defined in the same order like in\u003cbr /\u003enative Highcharts function: [redraw, oneToOne, animation]. \u003cbr /\u003e[Here](https://api.highcharts.com/class-reference/Highcharts.Chart#update) is a more specific description of the parameters. |\n\n### Events\n\n| Event  | Description                                      |\n|--------|--------------------------------------------------|\n| `load` | Event fired after the chart is created. The `detail` arg will hold the created chart |\n\n\u003cbr/\u003e\n\n#### Copyright\n- The Highcharts logo is a property of Highsoft AS, Norway.\n- The Webcomponents logo is a property of Webcomponents.org\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashubham%2Fhighcharts-webcomponent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashubham%2Fhighcharts-webcomponent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashubham%2Fhighcharts-webcomponent/lists"}