echarts折线图,如何在每一个拐折点上添加文字

markPoint 吧,它有个 {Object} itemStyle 属性,可以通过设置 label.formatter 属性来设置显示格式。示例如下:

 itemStyle: {
                normal: {
                    label: {
                        show: true,
                        formatter: "{b}: {c}",
                      textStyle: {
        color: '#000'
    }
                    },
                  textColor : '#000'

                },
                emphasis: {
                    label: {
                        show: true
                    }

markPoint 文档链接:http://echarts.baidu.com/doc/doc.html#SeriesMarkPoint
itemStyle 文档链接:http://echarts.baidu.com/doc/doc.html#ItemStyle

你可能感兴趣的:(程序人生)