echarts标记线的样式_echarts 设置折线颜色 标题线颜色 折线点颜色等

echarts 设置折线颜色 标题线颜色 折线点颜色等

option = {

tooltip: {

trigger: 'axis'

},

color:["red","green","blue","black"],//对应线的颜色 以及以下图标的颜色

legend: {

icon: 'circle',//circle 是圆形  rect 是矩形  标题的图标设置

itemWidth: 20,

itemHeight: 10,

itemGap: 10,

data: ['工地', '平均值','北京','东城'],

"textStyle": {            //标题的文字样式

"fontSize": 16,

//"color": "red",

"text-align": "left",

//"margin-left": "-100px"

}

},

toolbox: {

show: true,

feature: {

mark: { show: true },

dataView: { show: true, readOnly: false },

magicType: { show: true, type: ['line', 'bar'] },

restore: { show: true },

saveAsImage: { show: true }

}

},

calculable: true,

xAxis: [

{

type: 'category',

boundaryGap: false,

data: hourlist

}

],

yAxis: [

{

type: 'value',

axisLabel: {

formatter: '{value}'

}

}

],

grid: {

//show: true,

//borderColor: '#2C2D49',//区域边框颜色

x: 40,//距离左边 单位为px

x2: 30,//距离右边 单位为px

y: 40,//上下距离 单位为px

//height: 100//区域高度 单位为px 最好不设  会自动适配

},

series: [

{

name: '工地',

type: 'line',

data: yinshulist,

itemStyle: {

normal: {

lineStyle: {

color: 'red',

width: 2

}

}

}

},

{

name: '平均值',

type: 'line',

data: yinshulist1,

itemStyle: {

normal: {

lineStyle: {

color: 'green',

width: 2

}

}

}

}

,

{

name: '北京',

type: 'line',

data: yinshulist2,

itemStyle: {

normal: {

lineStyle: {

color: 'blue',//折线条的颜色

width: 2,

lineStyle:{

color:'#03242d'//折线点的颜色

}

}

}

}

},

{

name: '东城',

type: 'line',

data: yinshulist3,

itemStyle: {

normal: {

lineStyle: {

color: 'black',

width: 2

}

}

}

}

]

};

本文为若言博客网(http://www.blog520.com)原创作品,版权所有,欢迎转载,转载请注明原文出处,不注明作者和原文出处若言博客网有权追究其法律责任。原文链接:http://www.blog520.com/Article/10232.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值