{"id":19014233,"url":"https://github.com/spritejs/cat-charts-react","last_synced_at":"2025-11-11T13:32:05.382Z","repository":{"id":39511075,"uuid":"191728811","full_name":"spritejs/cat-charts-react","owner":"spritejs","description":"A visulization library based on spritejs , qcharts and React","archived":false,"fork":false,"pushed_at":"2022-12-10T01:00:35.000Z","size":7656,"stargazers_count":4,"open_issues_count":28,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-08T23:11:18.388Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.spritejs.com/cat-charts-react/","language":"Vue","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/spritejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-06-13T09:06:16.000Z","updated_at":"2023-08-29T08:19:48.000Z","dependencies_parsed_at":"2022-08-27T21:41:53.421Z","dependency_job_id":null,"html_url":"https://github.com/spritejs/cat-charts-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fcat-charts-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fcat-charts-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fcat-charts-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fcat-charts-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spritejs","download_url":"https://codeload.github.com/spritejs/cat-charts-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240052872,"owners_count":19740583,"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":[],"created_at":"2024-11-08T19:28:27.173Z","updated_at":"2025-11-11T13:32:05.341Z","avatar_url":"https://github.com/spritejs.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cat-charts-react\n\n\u003e 基于 QCharts 封装的 React 图表组件库。使用上基本与 \u003ca target=\"_blank\" href=\"https://www.spritejs.com/q-charts/\"\u003eQCharts\u003c/a\u003e 一致。 \u003ca target=\"_blank\" href=\"https://www.spritejs.com/cat-charts-react/\"\u003e→ 详细文档\u003c/a\u003e\n\n## 安装\n\n### npm\n\n```shell\nnpm i spritejs @qcharts/core cat-charts-react\n```\n\n### CDN\n\n在 HTML 文件依次引入 `spritejs`、`@qcharts/core` 和 `cat-charts-react`\n\n```html\n\u003cscript src=\"https://unpkg.com/spritejs/dist/spritejs.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/@qcharts/core/lib/index.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/cat-charts-react/lib/index.js\"\u003e\u003c/script\u003e\n```\n\n## 绘制\n\n```javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { Chart, Bar, Axis } from 'cat-charts-react'\n\nfunction App() {\n  const data = [\n    { value: 6100, label: 'TOP1' },\n    { value: 5200, label: 'TOP2' },\n    { value: 4400, label: 'TOP3' },\n    { value: 3700, label: 'TOP4' },\n    { value: 2800, label: 'TOP5' },\n    { value: 2000, label: 'TOP6' },\n    { value: 1300, label: 'TOP7' },\n    { value: 400, label: 'TOP8' }\n  ]\n  const dataFields = {\n    row: '*',\n    value: 'value',\n    text: 'label'\n  }\n\n  return (\n    \u003cChart data={data} dataFields={dataFields} forceFit={true}\u003e\n      \u003cBar /\u003e\n      \u003cAxis /\u003e\n      \u003cAxis orient={'left'} /\u003e\n    \u003c/Chart\u003e\n  )\n}\n\nReactDOM.render(\u003cApp /\u003e, document.querySelector('#app'))\n```\n\nDemo：\u003ca target=\"_blank\" href=\"https://github.com/justemit/cat-charts-react-demo\"\u003eQuickstart\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspritejs%2Fcat-charts-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspritejs%2Fcat-charts-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspritejs%2Fcat-charts-react/lists"}