{"id":26180323,"url":"https://github.com/twp0217/ngx-echarts","last_synced_at":"2025-04-14T22:43:57.459Z","repository":{"id":57168435,"uuid":"86155027","full_name":"twp0217/ngx-echarts","owner":"twp0217","description":"Apache ECharts component for Angular（基于 Angular 的 Apache ECharts 组件）","archived":false,"fork":false,"pushed_at":"2021-10-12T10:08:05.000Z","size":2841,"stargazers_count":82,"open_issues_count":0,"forks_count":25,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-16T05:30:50.110Z","etag":null,"topics":["apache-echarts","echarts","echarts-ng2","ng","ng2","ngx","ngx-echarts"],"latest_commit_sha":null,"homepage":"https://twp0217.github.io/ngx-echarts/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twp0217.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-25T12:15:00.000Z","updated_at":"2023-12-17T09:27:53.000Z","dependencies_parsed_at":"2022-08-29T02:11:57.159Z","dependency_job_id":null,"html_url":"https://github.com/twp0217/ngx-echarts","commit_stats":null,"previous_names":["twp0217/echarts-ng2"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-echarts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-echarts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-echarts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-echarts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twp0217","download_url":"https://codeload.github.com/twp0217/ngx-echarts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975293,"owners_count":21192198,"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":["apache-echarts","echarts","echarts-ng2","ng","ng2","ngx","ngx-echarts"],"created_at":"2025-03-11T21:55:27.812Z","updated_at":"2025-04-14T22:43:57.441Z","avatar_url":"https://github.com/twp0217.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngx-echarts\n\n## 简介\n\nApache ECharts component for Angular（基于 Angular 的 Apache ECharts 组件）\n\n## 安装\n\n```bash\nnpm install echarts @twp0217/ngx-echarts --save\n```\n\n## 使用\n- 安装依赖包：`echarts` 和 `@twp0217/ngx-echarts`\n\n```bash\nnpm install echarts @twp0217/ngx-echarts --save\n```\n\n- 在module导入`NgxEchartsModule`\n\n```typescript\nimport { NgxEchartsModule } from '@twp0217/ngx-echarts';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    FormsModule,\n    NgxEchartsModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n- 准备图表数据\n\n```typescript\noption = {\n  title: {\n    text: 'ECharts 入门示例'\n  },\n  tooltip: {},\n  legend: {\n    data: ['销量']\n  },\n  xAxis: {\n    data: [\"衬衫\", \"羊毛衫\", \"雪纺衫\", \"裤子\", \"高跟鞋\", \"袜子\"]\n  },\n  yAxis: {},\n  series: [{\n    name: '销量',\n    type: 'bar',\n    data: [5, 20, 36, 10, 10, 20]\n  }]\n};\n```\n\n- 在模板页面使用\n\n```html\n\u003cngx-echarts [option]=\"option\"\u003e\u003c/ngx-echarts\u003e\n```\n\n## API\n\n\n| 名称          | 说明                                                         | 类型                                          | 默认值  |\n| ------------- | ------------------------------------------------------------ | --------------------------------------------- | ------- |\n| `[option]`        | 图表的配置项和数据                                           | EChartsOption                                 | -       |\n| `[theme]`         | [应用的主题](https://echarts.apache.org/zh/api.html#echarts.init) | EChartsTheme                                  | -       |\n| `[initOpts]`      | [初始化附加参数](https://echarts.apache.org/zh/api.html#echarts.init) | EChartsInitOpts                               | -       |\n| `[setOptionOpts]` | [设置图表的配置项和数据附加参数](https://echarts.apache.org/zh/api.html#echartsInstance.setOption) | EChartsSetOptionOpts                          | -       |\n| `[autoResize]`    | 自适应图表                                                   | boolean                                       | `false` |\n| `[loading]`       | 是否显示加载动画                                             | boolean                                       | -       |\n| `[loadingConfig]` | [加载动画配置](https://echarts.apache.org/zh/api.html#echartsInstance.showLoading) | EChartsLoadingConfig                          | -       |\n| `[group]` | 图表的分组，用于[联动](https://echarts.apache.org/zh/api.html#echarts.connect) | string | - |\n| `(onChartInit)` | 图表初始化时的回调                                           | (echartsInstance: EchartsInstance) =\u003e void    | -       |\n| `[onEvents]`      | [图表事件](https://echarts.apache.org/zh/api.html#events)    | EchartsOnEvents | -       |\n\n## 支持\n\n- 如果项目对你有帮助，请点颗星:star:，谢谢。\n- 如果你对项目有想法、问题、BUG，欢迎讨论。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwp0217%2Fngx-echarts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwp0217%2Fngx-echarts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwp0217%2Fngx-echarts/lists"}