fix(style): chart style

This commit is contained in:
jialin
2026-05-18 20:14:28 +08:00
committed by jialin
parent abc3c2c25a
commit bcea46fa8f
10 changed files with 208 additions and 99 deletions
+14 -2
View File
@@ -1,7 +1,7 @@
import useCoolColors from '@/hooks/use-cool-colors';
import { Chart } from '@gpustack/core-ui';
import { formatLargeNumber } from '@gpustack/core-ui/utils';
import { theme } from 'antd';
import { Empty, theme } from 'antd';
import _ from 'lodash';
import React, { useEffect, useMemo, useRef } from 'react';
@@ -254,7 +254,19 @@ const BarChart: React.FC<BarChartProps> = (props) => {
}, [legendIsolate, seriesData, legendData]);
if (!seriesData.length) {
return <div style={{ width: width || '100%', height }} />;
return (
<div
style={{
width: width || '100%',
height,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}
>
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
</div>
);
}
return (