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.

177 lines
5.2 KiB

var dataList=[
{ value: 1650245, name: "女性",color:'#0084FF'},
{ value: 1650245, name: "未知" ,color:'#20CC62'},
{ value: 3307418, name: "男性" ,color:'#FFBF00'},
]
Component({
data: {
dataList:dataList,
// regionList:[
// {
// district:'广东',
// value:10
// },
// {
// district:'河南',
// value:10
// },
// {
// district:'江苏',
// value:10
// },
// {
// district:'浙江',
// value:10
// },
// {
// district:'安徽',
// value:10
// },
// {
// district:'安徽',
// value:10
// },
// {
// district:'安徽',
// value:10
// },{
// district:'安徽',
// value:10
// },
// {
// district:'安徽',
// value:10
// },{
// district:'安徽',
// value:10
// },
// ],
showChart: true,
sexOption: {
tooltip: {
trigger: 'item'
},
// 注释字体样式
// legend: {
// orient: 'vertical',
// top:16,
// left:170,
// itemWidth: 10,//data图标大小
// itemHeight: 10,
// itemGap: 50//图标之间间距
// },
// 环形统计图样式
series: [
{
// bottom:68,
// right:6,
name: 'Access From',
type: 'pie',
radius: ['66', '40'],
avoidLabelOverlap: false,
itemStyle: {
// borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
// 点击弹出提示位置
label: {
show: false,
position: 'center'
},
color:['#0084FF','#20CC62','#FFBF00'],
//点击弹出提示样式
// emphasis: {
// label: {
// show: true,
// fontSize: '40',
// fontWeight: 'bold'
// }
// },
labelLine: {
show: false
},
// 环形数据
data: dataList
}
]
},
regionOption:{
tooltip: {
},
xAxis: {
show:false,
type:'value'
},
yAxis:
{
data: ['四川', '广东', '浙江', '北京','江西',],
inverse: true,
axisTick: { show: false },
axisLine: { show: false },
axisLabel: {
margin: 10,
color: '#333333',
fontSize: 12
}
},
grid: {
// top: 'center',
bottom:20,
height:186,
width:48,
left: 40,
},
series: [
{
itemStyle:{
normal:{
color:'#0084FF',
barBorderRadius:12
},
},
// current data
type: 'bar',
barWidth:10,
data:[30, 40, 66, 10,30],
label: {
show: true,
formatter: function (params) {
return ((params.value / 100) * 100).toFixed(1) + ' %';
},
// position: 'right',
// offset: [20, 0],
color: '#333333',
fontSize: 12,
position:[60,-4]
},
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
},
markLine: {
symbol: 'none',
},
},
]
},
},
onShow() {
this.getTabBar().init();
},
methods: {
priceSel(e){
this.setData({
intervalSel: e.currentTarget.dataset.index,
})
}
}
})