Installations
npm install react-echarts-v3
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.9.4
NPM Version
5.6.0
Score
54
Supply Chain
92.8
Quality
75.5
Maintenance
100
Vulnerability
98.9
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
107,980
Last Day
16
Last Week
87
Last Month
441
Last Year
6,993
GitHub Statistics
MIT License
51 Stars
83 Commits
3 Forks
1 Watchers
2 Branches
1 Contributors
Updated on Jan 11, 2025
Bundle Size
22.63 kB
Minified
7.43 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.19
Package Id
react-echarts-v3@1.0.19
Size
60.47 kB
NPM Version
5.6.0
Node Version
8.9.4
Total Downloads
Cumulative downloads
Total Downloads
107,980
Last Day
128.6%
16
Compared to previous day
Last Week
-12.1%
87
Compared to previous week
Last Month
40%
441
Compared to previous month
Last Year
-21.5%
6,993
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Peer Dependencies
4
react-echarts-v3
React.js component wrap for ECharts.js(v3.x+)
Feature
轻量,更高的效率,支持按需引入 ECharts 的图表和组件,配合react-grid-layout支持拖拽布局。
Installation
1$ npm install --save echarts react-echarts-v3
Usage
-
Change webpack config
For webpack 1.x:
1 { 2 test: /\.jsx?$/, 3 loader: 'babel', 4 include: [ 5- path.join(prjRoot, 'src') 6+ path.join(prjRoot, 'src'), 7+ path.join(prjRoot, 'node_modules/react-echarts-v3/src') 8 ], 9- exclude: /node_modules/ 10+ exclude: /node_modules(?![\\/]react-echarts-v3[\\/]src[\\/])/ 11 },
For webpack 2.x+:
1 { 2 test: /\.jsx?$/, 3 loader: 'babel-loader', 4- include: [resolve('src'), resolve('test')] 5+ include: [resolve('src'), resolve('test'), resolve('node_modules/react-echarts-v3/src')] 6 }
-
Import all charts and components
1import IEcharts from 'react-echarts-v3/src/full.js'; 2 3const option = { 4 title: { 5 text: 'ECharts 入门示例' 6 }, 7 tooltip: {}, 8 xAxis: { 9 data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"] 10 }, 11 yAxis: {}, 12 series: [{ 13 name: '销量', 14 type: 'bar', 15 data: [5, 20, 36, 10, 10, 20] 16 }] 17}; 18 19const onEvents = { 20 'click': function(params) { 21 // the 'this' variable can get echarts instance 22 console.log(params); 23 } 24}; 25 26return ( 27 <IEcharts option={option} onEvents={onEvents} /> 28);
-
Import ECharts.js modules manually to reduce bundle size
1import IEcharts from 'react-echarts-v3/src/lite.js'; 2 3// Import all charts and components 4// require('echarts/lib/chart/line'); 5require('echarts/lib/chart/bar'); 6// require('echarts/lib/chart/pie'); 7// require('echarts/lib/chart/scatter'); 8// require('echarts/lib/chart/radar'); 9 10// require('echarts/lib/chart/map'); 11// require('echarts/lib/chart/treemap'); 12// require('echarts/lib/chart/graph'); 13// require('echarts/lib/chart/gauge'); 14// require('echarts/lib/chart/funnel'); 15// require('echarts/lib/chart/parallel'); 16// require('echarts/lib/chart/sankey'); 17// require('echarts/lib/chart/boxplot'); 18// require('echarts/lib/chart/candlestick'); 19// require('echarts/lib/chart/effectScatter'); 20// require('echarts/lib/chart/lines'); 21// require('echarts/lib/chart/heatmap'); 22 23// require('echarts/lib/component/graphic'); 24// require('echarts/lib/component/grid'); 25// require('echarts/lib/component/legend'); 26// require('echarts/lib/component/tooltip'); 27// require('echarts/lib/component/polar'); 28// require('echarts/lib/component/geo'); 29// require('echarts/lib/component/parallel'); 30// require('echarts/lib/component/singleAxis'); 31// require('echarts/lib/component/brush'); 32 33// require('echarts/lib/component/title'); 34 35// require('echarts/lib/component/dataZoom'); 36// require('echarts/lib/component/visualMap'); 37 38// require('echarts/lib/component/markPoint'); 39// require('echarts/lib/component/markLine'); 40// require('echarts/lib/component/markArea'); 41 42// require('echarts/lib/component/timeline'); 43// require('echarts/lib/component/toolbox'); 44 45// require('zrender/lib/vml/vml'); 46 47 48const option = { 49 title: { 50 text: 'ECharts 入门示例' 51 }, 52 tooltip: {}, 53 xAxis: { 54 data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"] 55 }, 56 yAxis: {}, 57 series: [{ 58 name: '销量', 59 type: 'bar', 60 data: [5, 20, 36, 10, 10, 20] 61 }] 62}; 63 64return ( 65 <IEcharts option={option} /> 66);
propTypes
1 className: PropTypes.string, 2 style: PropTypes.object, 3 group: PropTypes.string, 4 theme: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), 5 initOpts: PropTypes.object, 6 option: PropTypes.object.isRequired, 7 notMerge: PropTypes.bool, 8 lazyUpdate: PropTypes.bool, 9 onReady: PropTypes.func, 10 onResize: PropTypes.func, 11 loading: PropTypes.bool, 12 resizable: PropTypes.bool, 13 optsLoading: PropTypes.object, 14 onEvents: PropTypes.object
defaultProps
1 className: 'react-echarts', 2 style: { width: '100%', height: '100%' }, 3 notMerge: false, 4 lazyUpdate: false, 5 onReady: function(instance) {}, 6 onResize: function(width, height) {}, 7 loading: false, 8 resizable: false, 9 optsLoading: { 10 text: 'loading', 11 color: '#c23531', 12 textColor: '#000', 13 maskColor: 'rgba(255, 255, 255, 0.8)', 14 zlevel: 0 15 }, 16 onEvents: {}
Demo
License
MIT

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
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
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
51 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More