Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ $ npm install rc-echarts

```js
import Chart from 'rc-echarts';
import React from 'react';
import React, {createClass} from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = createClass({
ready(echart) {
console.log(echart);
echart.on('click', (params)=>{
Expand All @@ -44,10 +44,10 @@ ReactDOM.render(<myChart />, container);
*折线图*
```js
import Chart from 'rc-echarts';
import React from 'react';
import React, {createClass} from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = createClass({
render() {
<Chart {...options} >
<Chart.Line {...series} />
Expand All @@ -62,10 +62,10 @@ ReactDOM.render(<myChart />, container);
*柱状图*
```js
import Chart from 'rc-echarts';
import React from 'react';
import React, {createClass} from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = createClass({
render() {
<Chart {...options} >
<Chart.Bar {...series} />
Expand All @@ -78,10 +78,10 @@ ReactDOM.render(<myChart />, container);
*饼图*
```js
import Chart from 'rc-echarts';
import React from 'react';
import React, {createClass} from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = createClass({
render() {
<Chart {...options} >
<Chart.Pie {...series} />
Expand All @@ -94,10 +94,10 @@ ReactDOM.render(<myChart />, container);
*标签云图*
```js
import Chart from 'rc-echarts';
import React from 'react';
import React, {createClass} from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = createClass({
render() {
<Chart {...options} >
<Chart.Cloud {...series} />
Expand All @@ -110,10 +110,10 @@ ReactDOM.render(<myChart />, container);
*地图*
```js
import Chart from 'rc-echarts';
import React from 'react';
import React, {createClass} from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = createClass({
render() {
<Chart {...options} >
<Chart.Map {...series} />
Expand All @@ -128,10 +128,10 @@ ReactDOM.render(<myChart />, container);

```js
import Chart from 'rc-echarts';
import React from 'react';
import React, { createClass } from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = createClass({
render() {
<Chart {...options} >
<Chart.Series {...series} type="line" />
Expand All @@ -150,7 +150,7 @@ import Chart from 'rc-echarts';
import React from 'react';
import ReactDOM from 'react-dom';

const myChart = React.creatClass({
const myChart = React.createClass({
ready(chart) {
chart.on('click', ()=>{
alert('click');
Expand Down