在小程序里折线图 在iphone6与iphone6s上无法显示legend 点击应该出现的空白区域 当剩余两个时 就会出现了
配置项如下
option = {
title: {
text: '本月出勤率折线图',
top: "bottom",
left: 'center'
},
legend: {
// data: [{ name: '总体', icon: 'circle' },
// { name: '一部门', icon: 'circle' },
// { name: '二部门', icon: 'circle' },
// { name: '三部门', icon: 'circle' }
// ],//分别修改legend格式
right: '10',
top: '10'
},
color: ['#8CC34B', '#2DA0FA', '#FF9800', '#E61E23'],
grid: {
top: "30%",
left: '3%',
right: '4%',
bottom: '15%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value',
min: 'dataMin'
},
series: [{
name: '总体',
type: 'line',
data: ['90', '92', '93', '92', '93', '89', '95']
},
{
name: '一部门',
type: 'line',
data: ['5', '5', '5', '5', '5', '5', '5']
},
{
name: '二部门',
type: 'line',
data: ['1', '2', '1', '2', '1', '3', '0']
},
{
name: '三部门',
type: 'line',
data: ['4', '1', '1', '1', '1', '3', '0']
},
],
};