echart line issue

2018-07-18 18:00:51 +08:00
 luofan004

想要条水平线,死活出不来,大兄弟些帮帮忙~~ option = { color: ['#339933', '#1da0df', '#1da0df'], title: { text: '生产力及指标分析 - 招商' }, legend: { data:['平均指标', '平均生产力'] }, xAxis: { type: 'category', name: '达成率(数值)', nameLocation: 'start', nameGap: 20, data: ["\u003c0.8", "0.8-0.9", "0.9-1.0", "1.0-1.1", "1.1-1.2", "1.2-1.3", "1.3-1.4", "1.4-1.5", "1.5-1.8", "\u003e=1.8"] }, yAxis: { type: 'value', axisLabel: { formatter: '{value}' }, name: '生产力(支)' }, series: [ { data: [42945, 55953, 38627, 74886, 92295, 82662, 117989, 97478, 61983, 47599], type: 'bar', label: { normal: { show: true, position: 'top', formatter: function(a) { return a.value.toLocaleString(); } } }, }, { data: [21627, 46799, 38550, 78722, 106078, 102884, 157919, 141994, 99011, 101340], type: 'bar', label: { normal: { show: true, position: 'top', formatter: function(a) { return a.value.toLocaleString(); } } }, }, { type: 'line', name: '平均指标', lineStyle:{ color: 'red' }, markline: { data:[ {name: '平均指标', yAxis: 76222.65}, ] } } ], };

1287 次点击
所在节点    程序员
2 条回复
charexcalibur
2018-07-18 18:20:56 +08:00
先花 5 分钟学一下 markdown 语法吧。
luofan004
2018-07-19 16:39:49 +08:00
解决了哈,大小写拼错了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/472074

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX