You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.8 KiB

3 years ago
const datas=[
{ value: 1650245, name: '女性' },
{ value: 1650245, name: '未知' },
{ value: 3307418, name: '男性' },
]
3 years ago
Component({
data: {
showChart: true,
3 years ago
sexOption: {
3 years ago
tooltip: {
3 years ago
trigger: 'item'
3 years ago
},
3 years ago
// 注释字体样式
3 years ago
legend: {
3 years ago
// type: 'scroll',
orient: 'vertical',
right: 140,
3 years ago
// top:'center',
bottom: '100',
itemWidth: 10,//data图标大小
itemHeight: 10,
itemGap: 45//图标之间间距
3 years ago
},
3 years ago
// 环形统计图样式
3 years ago
series: [
{
3 years ago
// bottom:68,
// right:200,
3 years ago
name: 'Access From',
type: 'pie',
radius: ['90%', '55%'],
avoidLabelOverlap: false,
3 years ago
itemStyle: {
3 years ago
// borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
// 点击弹出提示位置
label: {
show: false,
position: 'center'
},
//点击弹出提示样式
emphasis: {
label: {
3 years ago
show: true,
3 years ago
fontSize: '40',
fontWeight: 'bold'
3 years ago
}
},
3 years ago
labelLine: {
show: false
},
// 环形数据
3 years ago
data: datas
3 years ago
}
]
3 years ago
}
3 years ago
},
onShow() {
this.getTabBar().init();
},
methods: {
priceSel(e){
this.setData({
intervalSel: e.currentTarget.dataset.index
})
}
}
})