|
@@ -102,8 +102,15 @@ export default {
|
|
|
|
|
|
|
|
option.title.textStyle.fontSize = this.fontSize
|
|
option.title.textStyle.fontSize = this.fontSize
|
|
|
option.xAxis.data = xData
|
|
option.xAxis.data = xData
|
|
|
- option.series[0].data = yData
|
|
|
|
|
|
|
+ let type = item.series[0]['type']
|
|
|
|
|
+ option.series[0].data = yData.map((item, index) => ({
|
|
|
|
|
+ value: item,
|
|
|
|
|
+ label: {
|
|
|
|
|
+ position: (index % 2 == 0 || type == 'bar') ? 'top' : 'bottom'
|
|
|
|
|
+ }
|
|
|
|
|
+ }))
|
|
|
option.series[0].label.show = true
|
|
option.series[0].label.show = true
|
|
|
|
|
+ // option.series[0].label.rotate = '45'
|
|
|
option.series[0].type = item.series[0]['type']
|
|
option.series[0].type = item.series[0]['type']
|
|
|
option.series[0].name = item.title
|
|
option.series[0].name = item.title
|
|
|
option.series[0].markLine = item.series[0].markLine
|
|
option.series[0].markLine = item.series[0].markLine
|