view1.point().position('name*ratio').color('#33BBFF').style({
stroke: '#33BBFF',
fill: '#33BBFF'
}).label('name*ratio', function () {
return {
useHtml: true,
htmlTemplate: function htmlTemplate(text, item) {
var d = item.point;
return (
`<span class="g2-label" style="color:rgba(255,255,255,.5)";font-size:12px" >` +
d.ratio + '%' +
"</span > "
)
},
offsetY: 5,//偏移量
}
}).tooltip('name*ratio*openTime', function (name, ratio, openTime) {
return {
time: openTime,
}
})