文章详情页
html5 - echarts折线图 markline 数值怎么设置 不想用默认的average
问题描述
如图所示的 145.29 这条线怎么设置//代码如下series: [{
name: ’邮件营销’,type: ’line’,stack: ’总量’,symbol: ’none’,markLine: { data: [{type: ’average’,name: ’平均值’ }]},label:{ normal:{show:true,position:’top’,formatter:’{c}%’ }},itemStyle : { normal: {label : {show: true}}},data: [120, 132, 101, 134, 90, 230, 210] }]
问题解答
回答1:方法一: markLine: { data:[[ {name:’两点之间的线’,coord:[0,120] },{coord:[6, 500] }] ]}, 方法二: markLine: { data:[[ {name: ’两个屏幕坐标之间的标线’,x: 100,y: 100 }, {x: 500,y: 200 }] ]},
注:coord:[x,y],其中x是Xaxis值的下标值,y是Yaxis的值;参考api
标签:
Html5
相关文章:
1. objective-c - 类似微信单聊的功能,想把聊天记录直接存入Sqlite,怎么建表.2. mysql中的全文索引支持词根检索吗?3. 为什么HTML5规范中会包含一些和html无关的东西?如本地存储等。4. javascript - 百度echarts图表如何修改5. javascript - 百度地图一开始设置了中心点,怎么通过按钮在调转到对应的中心点????6. 前端 - 怎么用 css3实现波浪底纹效果?7. javascript - Tomcat突然就报错了,解析不了java文件,试过几个百度的解决方法,没解决。8. python - 《flask web开发》中为什么发不出确认邮件?9. chrome浏览器怎么使用10. css - 关于图标字体
排行榜