稳态综合评估
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div ref='chartRef' class='my-chart' />
|
||||
<div ref="chartRef" class="my-chart" />
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { onBeforeUnmount, onMounted, ref, defineExpose, watch } from 'vue'
|
||||
// import echarts from './echarts'
|
||||
import * as echarts from 'echarts' // 全引入
|
||||
import 'echarts-gl'
|
||||
import 'echarts/lib/component/dataZoom'
|
||||
import { color, gradeColor } from './color'
|
||||
import { color, gradeColor3 } from './color'
|
||||
|
||||
const chartRef = ref<HTMLDivElement>()
|
||||
|
||||
@@ -112,7 +112,9 @@ const handlerBar = (options: any) => {
|
||||
if (params.value == 0 || params.value == 3.14159) {
|
||||
return '#ccc'
|
||||
} else {
|
||||
return color[params.seriesIndex]
|
||||
return props.options.color
|
||||
? props.options.color[params.seriesIndex]
|
||||
: color[params.seriesIndex]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -212,7 +214,7 @@ watch(
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
.my-chart {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user