实现效果:
调试地址: https://echarts.apache.org/examples/zh/editor.html?c=line-simple
源码:
option = {
title: {
left: 'center',
top: '0',
text: '2022-05月 制造产量 达成情况(单位: 吨) (图1)\n\n集团目标产量: 106,675吨 集团实际产量: 2,636吨',
textStyle:{
fontSize:20
},
subtext: '达成率: 2.5%',
subtextStyle:{
fontSize:22
},
itemGap: 20
},tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
//color: '#999'
}
}
},
grid: {
top: '200',
left: '100',
right: '12',
bottom: '90',
containLabel: true
},
legend: [
{
//textStyle: { color: },
data: ['目标产量', '实际产量', '达成率'],
bottom: 30,
left: 30
},
{
align: 'right',
itemGap: 10,//这里是调整底部 底部表格 字段说明的间距
orient: 'vertical',
textStyle: { color: '' },