|
|
|
@ -1,7 +1,8 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px'}">
|
|
|
|
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px'}">
|
|
|
|
<NodeResizer @resizeEnd="(e) => $emit('resize', e)" color="#fff" v-if="!props.isView && !props.isHideHandle && props.selected" @resize="resize" />
|
|
|
|
<NodeResizer @resizeEnd="(e) => $emit('resize', e)" color="#fff"
|
|
|
|
|
|
|
|
v-if="!props.isView && !props.isHideHandle && props.selected" @resize="resize" />
|
|
|
|
|
|
|
|
|
|
|
|
<div class="custom-node"
|
|
|
|
<div class="custom-node"
|
|
|
|
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px',pointerEvents:props.isView?'auto': 'none'}">
|
|
|
|
:style="{width:props.dimensions.width*props.ratioWidth+'px',height:props.dimensions.height*props.ratioHeight+'px',pointerEvents:props.isView?'auto': 'none'}">
|
|
|
|
@ -58,9 +59,7 @@ const props = defineProps({
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const chartRef = ref();
|
|
|
|
const chartRef = ref();
|
|
|
|
let chart = null;
|
|
|
|
let chart = null;
|
|
|
|
const colorList = ['#9E87FF', '#73DDFF', '#fe9a8b', '#F56948', '#9E87FF'];
|
|
|
|
|
|
|
|
const getOption = () => {
|
|
|
|
const getOption = () => {
|
|
|
|
console.log(props.inputData?.x1);
|
|
|
|
|
|
|
|
const chartOption = {
|
|
|
|
const chartOption = {
|
|
|
|
title: {
|
|
|
|
title: {
|
|
|
|
text: props.data.options.title || '',
|
|
|
|
text: props.data.options.title || '',
|
|
|
|
@ -107,7 +106,7 @@ const getOption = () => {
|
|
|
|
extraCssText: 'box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)'
|
|
|
|
extraCssText: 'box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
radar: {
|
|
|
|
radar: {
|
|
|
|
center: ["30%", "50%"],
|
|
|
|
center: ['30%', '50%'],
|
|
|
|
radius: '40%',
|
|
|
|
radius: '40%',
|
|
|
|
shape: 'circle',
|
|
|
|
shape: 'circle',
|
|
|
|
splitNumber: 1,
|
|
|
|
splitNumber: 1,
|
|
|
|
@ -128,12 +127,12 @@ const getOption = () => {
|
|
|
|
rotation: 90,
|
|
|
|
rotation: 90,
|
|
|
|
rotate: 90,
|
|
|
|
rotate: 90,
|
|
|
|
fontSize: 8,
|
|
|
|
fontSize: 8,
|
|
|
|
color: '#ddd',
|
|
|
|
color: '#ddd'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
indicator: (props.inputData?.x1 || [' ']).map(e => {
|
|
|
|
indicator: (props.inputData?.x1 || [' ']).map(e => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
name: e
|
|
|
|
name: e
|
|
|
|
}
|
|
|
|
};
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// indicator:[
|
|
|
|
// indicator:[
|
|
|
|
// {name: '产品1', max: 100},
|
|
|
|
// {name: '产品1', max: 100},
|
|
|
|
@ -154,7 +153,7 @@ const getOption = () => {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
lineStyle: {
|
|
|
|
lineStyle: {
|
|
|
|
color: '#478EEE',
|
|
|
|
color: '#478EEE',
|
|
|
|
width: 1,
|
|
|
|
width: 1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -171,7 +170,7 @@ const getOption = () => {
|
|
|
|
{ offset: 0, color: '#fff0' },
|
|
|
|
{ offset: 0, color: '#fff0' },
|
|
|
|
{ offset: 1, color: '#4C92F266' }
|
|
|
|
{ offset: 1, color: '#4C92F266' }
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
@ -180,7 +179,6 @@ const getOption = () => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
let xData = [props.inputData?.x1 || []];
|
|
|
|
let xData = [props.inputData?.x1 || []];
|
|
|
|
let yData = [props.inputData?.y1 || []];
|
|
|
|
let yData = [props.inputData?.y1 || []];
|
|
|
|
console.log(chartOption);
|
|
|
|
|
|
|
|
let length = Math.min(...xData.map(e => e.length), ...yData.map(e => e.length));
|
|
|
|
let length = Math.min(...xData.map(e => e.length), ...yData.map(e => e.length));
|
|
|
|
let source = [['product', ...[props.data.options?.yNames?.[0] || ' ']]];
|
|
|
|
let source = [['product', ...[props.data.options?.yNames?.[0] || ' ']]];
|
|
|
|
Array(length).fill(0).forEach((_, i) => {
|
|
|
|
Array(length).fill(0).forEach((_, i) => {
|
|
|
|
|