fix
This commit is contained in:
parent
5f19682bab
commit
e0423a6fc3
@ -1,5 +1,3 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useCesium } from "resium";
|
||||
import ChartPanel from "@/components/common/ChartPanel";
|
||||
|
||||
const years = [];
|
||||
@ -29,20 +27,6 @@ const laBrudata = [
|
||||
];
|
||||
|
||||
function CustomChartPanel() {
|
||||
const { viewer } = useCesium();
|
||||
const [isHighlight, setIsHighlight] = useState(false);
|
||||
|
||||
const { shouldAnimate } = viewer.clock;
|
||||
|
||||
useEffect(() => {
|
||||
if (shouldAnimate) {
|
||||
setIsHighlight(true);
|
||||
setTimeout(() => {
|
||||
setIsHighlight(false);
|
||||
}, 3000);
|
||||
}
|
||||
}, [shouldAnimate]);
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
// text: "Stacked Line",
|
||||
@ -54,8 +38,8 @@ function CustomChartPanel() {
|
||||
data: ["拉布拉多海夏季海温(异常值)", "高原夏季气温(异常值)"],
|
||||
textStyle: { color: "#04fbfd", cursor: "point", fontSize: 20 },
|
||||
},
|
||||
animationDuration: years.length * 1000,
|
||||
animationEasing: "cubicInOut",
|
||||
// animationDuration: years.length * 1000,
|
||||
// animationEasing: "cubicInOut",
|
||||
grid: {
|
||||
left: "3%",
|
||||
right: "4%",
|
||||
@ -115,6 +99,9 @@ function CustomChartPanel() {
|
||||
itemStyle: {
|
||||
color: "red",
|
||||
},
|
||||
animationDelay: 5 * 1000,
|
||||
animationDuration: 30 * 1000,
|
||||
animationEasing: "cubicInOut",
|
||||
},
|
||||
{
|
||||
name: "高原夏季气温(异常值)",
|
||||
@ -131,6 +118,9 @@ function CustomChartPanel() {
|
||||
type: "dashed",
|
||||
width: 2,
|
||||
},
|
||||
animationDelay: 25 * 1000,
|
||||
animationDuration: 10 * 1000,
|
||||
animationEasing: "cubicInOut",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user