no message
Former-commit-id: 88c69754ac3ee8d4b76569a6989d61c5e8c3eeb3 Former-commit-id: 6167da8f6c6af6f0315cf1da94a1cc328b3cb07f Former-commit-id: 92dc7e3c0491eaa857d4d42665bafc2daa3b8061
This commit is contained in:
@@ -17,14 +17,18 @@ export default {
|
|||||||
// 本组件的特殊设置
|
// 本组件的特殊设置
|
||||||
this.chart.source(this.data)
|
this.chart.source(this.data)
|
||||||
this.chart.coord('polar')
|
this.chart.coord('polar')
|
||||||
this.chart.legend({
|
|
||||||
position: 'right',
|
|
||||||
offsetY: 0,
|
|
||||||
offsetX: -140
|
|
||||||
})
|
|
||||||
this.chart.axis(false)
|
this.chart.axis(false)
|
||||||
|
// tooltip 设置
|
||||||
|
this.chart.tooltip({
|
||||||
|
showTitle: false,
|
||||||
|
itemTpl: '<li><span style="background-color:{color}" class="g2-tooltip-marker"></span>{name}: {value}</li>'
|
||||||
|
})
|
||||||
|
// 创建图形
|
||||||
this.chart.interval().position('item*count')
|
this.chart.interval().position('item*count')
|
||||||
.color('item', this.G2.Global.colors_pie_16)
|
.color('item', this.G2.Global.colors_pie_16)
|
||||||
|
.label('count', {
|
||||||
|
formatter: (val, item) => item.point.item + ': ' + val
|
||||||
|
})
|
||||||
.style({
|
.style({
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
stroke: '#fff'
|
stroke: '#fff'
|
||||||
|
|||||||
Reference in New Issue
Block a user