|
|
|
|
@ -9,13 +9,32 @@ import echarts from "@/utils/echarts.min.js";
|
|
|
|
|
import "./index.less";
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
Electricity: any;
|
|
|
|
|
matrixElectricity: any;
|
|
|
|
|
facialMaskConnectStatus: any;
|
|
|
|
|
EchartsData:any
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Index() {
|
|
|
|
|
|
|
|
|
|
function Index({
|
|
|
|
|
EchartsData
|
|
|
|
|
}:Props) {
|
|
|
|
|
let type =0
|
|
|
|
|
switch(EchartsData.modeName) {
|
|
|
|
|
case '基础班脸部':
|
|
|
|
|
type=37
|
|
|
|
|
break;
|
|
|
|
|
case '基础版眼部':
|
|
|
|
|
type=25
|
|
|
|
|
break;
|
|
|
|
|
case '法令纹Pro':
|
|
|
|
|
type=25
|
|
|
|
|
break;
|
|
|
|
|
case '下颌线Pro':
|
|
|
|
|
type=19
|
|
|
|
|
break;
|
|
|
|
|
case '抬头纹Pro':
|
|
|
|
|
type=13
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const echartsRef = useRef<EchartsHandle>(null);
|
|
|
|
|
function generateColorArray(startColor, endColor, steps) {
|
|
|
|
|
var startRGB = hexToRgb(startColor);
|
|
|
|
|
@ -50,31 +69,20 @@ function Index() {
|
|
|
|
|
|
|
|
|
|
const startColor = "#FFFF00"; // 黄色
|
|
|
|
|
const endColor = "#FF0000"; // 红色
|
|
|
|
|
const steps = 80; // 80个颜色
|
|
|
|
|
const steps = 81; // 80个颜色
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const colors = generateColorArray(startColor, endColor, steps);
|
|
|
|
|
const xList = [...new Array(37).fill(0).map((item, key) => key)];
|
|
|
|
|
const seriesData = [
|
|
|
|
|
...xList.map((item) => {
|
|
|
|
|
return Math.random() * 80;
|
|
|
|
|
}),
|
|
|
|
|
];
|
|
|
|
|
// let seriesData=[
|
|
|
|
|
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3,
|
|
|
|
|
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3,
|
|
|
|
|
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,8,5,1,2,3,
|
|
|
|
|
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
|
|
|
|
|
// ]
|
|
|
|
|
// console.log(seriesData,'seriesData',xList);
|
|
|
|
|
const xList = [...new Array(type).fill(0).map((item, key) => key)];
|
|
|
|
|
let seriesData:any =[]
|
|
|
|
|
seriesData = EchartsData?.data?.groupedAa
|
|
|
|
|
// const xList = [...new Array(37).fill(0).map((item, key) => key)];
|
|
|
|
|
// const seriesData = [
|
|
|
|
|
// ...xList.map((item) => {
|
|
|
|
|
// return Math.random() * 80;
|
|
|
|
|
// }),
|
|
|
|
|
// ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const option: EChartOption ={
|
|
|
|
|
grid: {
|
|
|
|
|
@ -90,8 +98,6 @@ const seriesData = [
|
|
|
|
|
axisLabel: {
|
|
|
|
|
interval: 5,
|
|
|
|
|
formatter: function (value, index) {
|
|
|
|
|
console.log(value,'查看');
|
|
|
|
|
|
|
|
|
|
return value * 10 + 's';
|
|
|
|
|
},
|
|
|
|
|
textStyle: {
|
|
|
|
|
@ -170,7 +176,7 @@ const seriesData = [
|
|
|
|
|
// isPage={false}
|
|
|
|
|
// style自定义设置echarts宽高
|
|
|
|
|
// style={{ width: "100%", height: "100%" }}
|
|
|
|
|
style={{ width: "630rpx", height: "260rpx" }}
|
|
|
|
|
style={{ width: "670rpx", height: "260rpx" }}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/* <View className="box">
|
|
|
|
|
|