趋势对比线条颜色修改
This commit is contained in:
@@ -68,7 +68,6 @@
|
|||||||
width: prop.width,
|
width: prop.width,
|
||||||
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px)`
|
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px)`
|
||||||
}"
|
}"
|
||||||
v-if="showEchart"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -116,8 +115,6 @@ const indicatorList = ref()
|
|||||||
|
|
||||||
const echartList = ref()
|
const echartList = ref()
|
||||||
|
|
||||||
const showEchart = ref(true)
|
|
||||||
|
|
||||||
const headerHeight = ref(57)
|
const headerHeight = ref(57)
|
||||||
|
|
||||||
// 监测对象
|
// 监测对象
|
||||||
@@ -200,6 +197,8 @@ const setEchart = () => {
|
|||||||
const phaseName = phase === 'default' ? '' : `${phase}相`
|
const phaseName = phase === 'default' ? '' : `${phase}相`
|
||||||
const color = phaseColors[phase] || config.layout.elementUiPrimary[0]
|
const color = phaseColors[phase] || config.layout.elementUiPrimary[0]
|
||||||
|
|
||||||
|
console.log(color,'89089900')
|
||||||
|
|
||||||
series.push({
|
series.push({
|
||||||
name: `治理前${phaseName}`,
|
name: `治理前${phaseName}`,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@@ -209,13 +208,7 @@ const setEchart = () => {
|
|||||||
data: beforeGroupedByPhase[phase],
|
data: beforeGroupedByPhase[phase],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: function (params: any) {
|
color: color
|
||||||
if (params.value[1] == 0 || params.value[1] == 3.14159) {
|
|
||||||
return '#ccc'
|
|
||||||
} else {
|
|
||||||
return color
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@@ -240,13 +233,7 @@ const setEchart = () => {
|
|||||||
data: afterGroupedByPhase[phase],
|
data: afterGroupedByPhase[phase],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: function (params: any) {
|
color:color
|
||||||
if (params.value[1] == 0 || params.value[1] == 3.14159) {
|
|
||||||
return '#ccc'
|
|
||||||
} else {
|
|
||||||
return color
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@@ -371,8 +358,6 @@ const tableStore: any = new TableStore({
|
|||||||
chartsListBefore.value = tableStore.table.data.before
|
chartsListBefore.value = tableStore.table.data.before
|
||||||
chartsListAfter.value = tableStore.table.data.after
|
chartsListAfter.value = tableStore.table.data.after
|
||||||
setEchart()
|
setEchart()
|
||||||
} else if (tableStore.table.data) {
|
|
||||||
showEchart.value = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user