| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <template>
- <Echart
- :options="options"
- id="centreRight2Chart1" style="width: 300px; height: 280px;position: absolute; left: 20%;"
- ></Echart>
- </template>
- <script>
- import Echart from '@/common/echart'
- export default {
- data () {
- return {
- options: {},
- };
- },
- components: {
- Echart,
- },
- props: {
- cdata: {
- type: Object,
- default: () => ({})
- },
- },
- watch: {
- cdata: {
- handler (newData) {
- // 固定样式数据
- let lineStyle = {
- normal: {
- width: 1,
- opacity: 0.5
- }
- };
- this.options = {
- radar: {
- indicator: newData.indicatorData,
- shape: "circle",
- splitNumber: 5,
- radius: ["0%", "40%"],
- name: {
- textStyle: {
- color: "rgb(238, 197, 102)"
- }
- },
- splitLine: {
- lineStyle: {
- color: [
- "rgba(238, 197, 102, 0.1)",
- "rgba(238, 197, 102, 0.2)",
- "rgba(238, 197, 102, 0.4)",
- "rgba(238, 197, 102, 0.6)",
- "rgba(238, 197, 102, 0.8)",
- "rgba(238, 197, 102, 1)"
- ].reverse()
- }
- },
- splitArea: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: "rgba(238, 197, 102, 0.5)"
- }
- },
- nameGap: 18
- },
- series: [
- {
- name: "",
- type: "radar",
- lineStyle: lineStyle,
- data: newData.dataRadius,
- symbol: "circle",
- label: {
- show: true,
- offset: [0, 3],
- },
- itemStyle: {
- normal: {
- color: "#F9713C"
- }
- },
- areaStyle: {
- normal: {
- opacity: 0.1
- }
- }
- },
- ],
- title: {
- text: '工序投产良率分析',
- textStyle: {
- color: '#fff', // 白色字体
- fontSize: 16,
- },
- top: '0%',
- left: 'center' // 垂直居中
- }
- }
- },
- immediate: true,
- deep: true
- }
- }
- };
- </script>
|