no message

Former-commit-id: 8a753edd42d69a67a150f6bc7a6f86758b3e5bd6
Former-commit-id: e0dfdff9c10fd4aefae8ecaf8a4f6a5dbc51ba00
Former-commit-id: 70688bf6cb4637de4c6dc82d40a4307924eba73a
This commit is contained in:
李杨
2018-02-18 22:28:29 +08:00
parent 1f0d5ce882
commit 61f3ab6a75

View File

@@ -26,16 +26,12 @@ export default {
},
// 初始化图表
init () {
console.log('pie base')
// mixin 中提供 creatChart
this.creatChart()
// 本组件的特殊设置
this.chart.source(this.dvMaker(), {
percent: {
formatter: val => {
val = (val * 100).toFixed(2) + '%'
return val
}
formatter: val => (val * 100).toFixed(2) + '%'
}
})
this.chart.coord('theta', {
@@ -49,17 +45,12 @@ export default {
.position('percent')
.color('item')
.label('percent', {
formatter: (val, item) => {
return item.point.item + ': ' + val
}
})
.tooltip('item*percent', (item, percent) => {
percent = (percent * 100).toFixed(2) + '%'
return {
name: item,
value: percent
}
formatter: (val, item) => item.point.item + ': ' + val
})
.tooltip('item*percent', (item, percent) => ({
name: item,
value: (percent * 100).toFixed(2) + '%'
}))
.style({
lineWidth: 1,
stroke: '#fff'