echarts图表 分割线 辅助线的问题

何庆同 发布于 2015/01/11 09:14
阅读 9K+
收藏 0


echarts图表 辅助线的问题 如何默认一个固定的分割线,就像上图59那样加一条分割线。

我的echarts如下代码:

var myChart = ec.init(document.getElementById('main'));
                myChart.setOption({
                    title: {
                        text: 'ECharts',
                        subtext: '纯属虚构'
                    },
                    tooltip: {
                        trigger: 'item'
                    },
                    toolbox: {
                        show: true,
                        feature: {
                            magicType: { show: true, type: ['line', 'bar'] },
                            dataView: { show: true, readOnly: false },
                            restore: { show: true }
                        }
                    },
                    legend: {
                        data: ['降水量']
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            name: '水量',
                            axisLabel: {
                                formatter: '{value} '
                            }
                        }
                    ],
                    series: [
                        {
                            name: '降水量',
                            type: 'bar',
                            data: [1500, 1500, 4000, 123.2, 325.6, 476.7, 1135.6],
                        }     
                    ]
                });

比如在2100处加分割线 如何写代码,求帮助,不胜感激


加载中
0
何庆同
何庆同
markLine 具体怎么写的,小弟笨拙,能给具体代码吗
0
v
victoryhf
您好,请问你这个实现了吗?我也想知道下呢
0
c
chd100981
http://echarts.baidu.com/doc/doc.html#SeriesMarkLine
返回顶部
顶部