This commit is contained in:
archer
2023-07-13 15:17:01 +08:00
parent b4d46ff34d
commit 726de0396b
6 changed files with 13 additions and 16 deletions

View File

@@ -110,8 +110,6 @@ const TokenUsage = ({ appId }: { appId: string }) => {
},
yAxis: {
type: 'value',
boundaryGap: false,
splitNumber: 5,
max: Math.max(...data.map((item) => item.tokenLen)),
min: 0
},
@@ -180,12 +178,6 @@ const TokenUsage = ({ appId }: { appId: string }) => {
myChart.current.setOption(option);
}, [data, option]);
// limit changed, update
useEffect(() => {
if (!myChart.current || !myChart?.current?.getOption()) return;
myChart.current.setOption(option);
}, [option]);
// resize chart
useEffect(() => {
if (!myChart.current || !myChart.current.getOption()) return;