Echarts的基础配置
1.color:调色盘颜色列表
color设置线条的颜色,它是一个数组
color:['pink','red','green','blue'];
2.title:标题组件
title设置图表的标题,包含主标题和副标题
2.1.设置图表的标题
title{
text:"折线图堆叠"
}
2.2.同时主标题和副标题(了解)
title: {
//显示策略,默认值true,可选为:true(显示) | false(隐藏)
show: true,
//主标题文本,'\n'指定换行
text: "主标题",
//主标题文本超链接,默认值true
link: 'http://www.baidu.com',
//指定窗口打开主标题超链接,支持'self' | 'blank',不指定等同为'blank'(新窗口)
target: "self",
//副标题文本,'\n'指定换行
subtext: '副标题',
//副标题文本超链接
sublink: '',
//指定窗口打开副标题超链接,支持'self' | 'blank',不指定等同为'blank'(新窗口)
subtarget: null,
//水平安放位置,默认为'left',可选为:'center' | 'left' | 'right' | {number}(x坐标,单位px)
x: 'center',
//垂直安放位置,默认为top,可选为:'top' | 'bottom' | 'center' | {number}(y坐标,单位px)
y: 'bottom',
//标题背景颜色,默认'rgba(0,0,0,0)'透明
backgroundColor: 'red',
//标题边框线宽,单位px,默认为0(无边框)
borderWidth: 5,
//标题边框颜色,默认'#ccc'
borderColor: '#ccffee',
//标题内边距,单位px,默认各方向内边距为5,接受数组分别设定上右下左边距
padding: 5,
//主副标题纵向间隔,单位px,默认为10
itemGap: 10,
textStyle: {
//主标题文本样式{"fontSize": 18,"fontWeight": "bolder","