var Hello = ({
componentDidMount:function(){
(this.);
this.drawCharts(this.);
},
drawCharts:function(dataSet){
var myChart = (('charts'));
// Specify the configuration items and data of the chart
var option = {
title: {
text: 'Edit for ECharts'
},
tooltip: {},
legend: {
data:['Sales']
},
xAxis: {
data: ["shirt","Cardwasher","Chiffon shirt","Pants","High heel","sock"]
},
yAxis: {},
series: [{
name: 'Sales',
type: 'bar',
data: dataSet
}]
};
// Use the configuration items and data you just specified to display the chart
(option);
},
/*Note that the js after return will be added automatically; the habit*/
render: function() {
return <div>
<h1>Hello {this.}</h1>
<div id="charts" data={dataSet}></div>
</div>;
}
});
/*props are passed to the component inside*/
var dataSet=[100,20,30,0,0,0];
(
<Hello name="World"data={dataSet}/>,
('example')
);