{"id":13531465,"url":"https://github.com/somonus/react-echarts","last_synced_at":"2026-01-12T05:37:35.384Z","repository":{"id":65411566,"uuid":"47682260","full_name":"somonus/react-echarts","owner":"somonus","description":"React  echarts","archived":false,"fork":false,"pushed_at":"2020-08-26T08:49:56.000Z","size":46,"stargazers_count":129,"open_issues_count":10,"forks_count":34,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-09-15T09:59:42.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/somonus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-12-09T09:42:32.000Z","updated_at":"2025-03-14T15:49:06.000Z","dependencies_parsed_at":"2023-01-23T10:54:59.892Z","dependency_job_id":null,"html_url":"https://github.com/somonus/react-echarts","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/somonus/react-echarts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somonus%2Freact-echarts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somonus%2Freact-echarts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somonus%2Freact-echarts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somonus%2Freact-echarts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somonus","download_url":"https://codeload.github.com/somonus/react-echarts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somonus%2Freact-echarts/sbom","scorecard":{"id":837569,"data":{"date":"2025-08-11","repo":{"name":"github.com/somonus/react-echarts","commit":"90cf72c5aaf0e92873a557267d46516a5ac4f1da"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T19:32:43.273Z","repository_id":65411566,"created_at":"2025-08-23T19:32:43.273Z","updated_at":"2025-08-23T19:32:43.273Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-01T07:01:03.212Z","updated_at":"2026-01-12T05:37:35.359Z","avatar_url":"https://github.com/somonus.png","language":"JavaScript","funding_links":[],"categories":["Frameworks"],"sub_categories":["React Component"],"readme":"# rc-echarts\n\n[![NPM Version](https://img.shields.io/npm/v/rc-echarts.svg?style=flat)](https://www.npmjs.org/package/rc-echarts)\n  [![npm](https://img.shields.io/npm/dm/rc-echarts.svg?style=flat)](https://www.npmjs.org/package/rc-echarts)\n  \n## install\n\n$ npm install rc-echarts\n\n## Usage\n\n###用法一\n\n完全和echarts一致，将echarts的options传给组件。通过onReady能获取到echarts对象，从而进行绑定事件等一系列操作。\n\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  ready(echart) {\n    console.log(echart);\n    echart.on('click', (params)=\u003e{\n      console.log(params);\n      alert(\"click\");\n    });\n  }\n\n  render() {\n    \u003cChart options={ options } onReady={this.ready} /\u003e\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n\n```\n\n###用法二\n\n将options中的series抽离成单独的react组件。\n\n注：以下示例中，options为echarts官方的options除了series的所有选项，详见[文档](http://echarts.baidu.com/option.html)。series为echarts官方series的选项，详见[文档](http://echarts.baidu.com/option.html#series)\n\n*折线图*\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  render() {\n    \u003cChart {...options} \u003e\n        \u003cChart.Line {...series} /\u003e\n        \u003cChart.Line {...series1} /\u003e\n    \u003c/Chart\u003e\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n\n```\n\n*柱状图*\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  render() {\n    \u003cChart {...options} \u003e\n        \u003cChart.Bar {...series} /\u003e\n    \u003c/Chart\u003e\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n```\n\n*饼图*\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  render() {\n    \u003cChart {...options} \u003e\n        \u003cChart.Pie {...series} /\u003e\n    \u003c/Chart\u003e\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n```\n\n*标签云图*\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  render() {\n    \u003cChart {...options} \u003e\n        \u003cChart.Cloud {...series} /\u003e\n    \u003c/Chart\u003e\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n```\n\n*地图*\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  render() {\n    \u003cChart {...options} \u003e\n        \u003cChart.Map {...series} /\u003e\n    \u003c/Chart\u003e\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n```\n*未指定类型的series*\n\n如果想要导入非前面几种类型的图表，可使用Chart.Series。自己指定类型。\n\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  render() {\n    \u003cChart {...options} \u003e\n        \u003cChart.Series {...series} type=\"line\" /\u003e\n    \u003c/Chart\u003e\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n```\n\n*获取echarts对象*\n\n可使用onReady属性来获取echarts对象，对其进行官方提供的各种操作，如绑定事件等。\n\n```js\nimport Chart from 'rc-echarts';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst myChart = React.creatClass({\n  ready(chart) {\n    chart.on('click', ()=\u003e{\n      alert('click');\n    });\n  }\n\n  render() {\n    const options = {\n      legend: {\n        data: ['最高气温', '最低气温'],\n      },\n      xAxis: [{\n        type: 'category',\n        boundaryGap: false,\n        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],\n      }],\n      yAxis: [{\n        type: 'value',\n        axisLabel: {\n          formatter: '{value} °C'\n        }\n      }],\n    };\n    return (\n      \u003cChart {...options} onReady={this.ready}\u003e\n        \u003cChart.Line\n          name=\"最高气温\"\n          data={[11, 11, 15, 13, 12, 13, 10]}/\u003e\n        \u003cChart.Line\n          name=\"最低气温\"\n          data={[1, -2, 2, 5, 3, 2, 0]}/\u003e\n      \u003c/Chart\u003e\n    );\n  }\n})\nReactDOM.render(\u003cmyChart /\u003e, container);\n```\n\n##Example\n\n*run demo*\n\n```\nnpm install\nnpm start\n```\nopen [http://localhost:8080/](http://localhost:8080/)\n\n## License\n\nrc-echart is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomonus%2Freact-echarts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomonus%2Freact-echarts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomonus%2Freact-echarts/lists"}