project init
This commit is contained in:
@@ -19,7 +19,8 @@ function initPieChart(canvas, width, height, dpr) {
|
||||
radius: ['0%', '70%'],
|
||||
data: [{
|
||||
value: 55,
|
||||
name: '数码产品'
|
||||
name: '数码产品',
|
||||
id: 1
|
||||
}, {
|
||||
value: 20,
|
||||
name: '零食'
|
||||
@@ -35,8 +36,10 @@ function initPieChart(canvas, width, height, dpr) {
|
||||
}]
|
||||
}]
|
||||
};
|
||||
|
||||
chart.setOption(option);
|
||||
chart.on('click', 'series.pie', function(param) {
|
||||
console.log(param.data)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user