fix:修改新增图表 每次的随机色都是一样的问题
This commit is contained in:
@@ -80,7 +80,7 @@ export default {
|
|||||||
initChart (chartOption) {
|
initChart (chartOption) {
|
||||||
const self = this
|
const self = this
|
||||||
this.legends = []
|
this.legends = []
|
||||||
chartOption.series = this.initPieData(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends
|
chartOption.series = this.initBarData(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends
|
||||||
chartOption.xAxis.data = chartOption.series.data.map(item => item.name)
|
chartOption.xAxis.data = chartOption.series.data.map(item => item.name)
|
||||||
chartOption.axisLabel = {
|
chartOption.axisLabel = {
|
||||||
margin: 8,
|
margin: 8,
|
||||||
|
|||||||
@@ -361,6 +361,7 @@ export default {
|
|||||||
/* 图表相关操作--start */
|
/* 图表相关操作--start */
|
||||||
addChart () {
|
addChart () {
|
||||||
this.chart = this.newChart()
|
this.chart = this.newChart()
|
||||||
|
this.chart.param.thresholds = [{ value: undefined, color: randomcolor() }]
|
||||||
this.chart.panelId = this.showPanel.id
|
this.chart.panelId = this.showPanel.id
|
||||||
this.chart.panelName = this.showPanel.name
|
this.chart.panelName = this.showPanel.name
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user