style: user rank chart

This commit is contained in:
jialin
2025-12-25 17:57:11 +08:00
parent 9dcdb6b6e7
commit 9b25cc51e4
6 changed files with 55 additions and 13 deletions
+6 -2
View File
@@ -9,10 +9,11 @@ import echarts, { ECOption } from '.';
const Chart: React.FC<{
options: ECOption;
chartHeight?: number;
height: number | string;
width: number | string;
ref?: any;
}> = forwardRef(({ options, width, height }, ref) => {
}> = forwardRef(({ options, width, height, chartHeight }, ref) => {
const container = useRef<HTMLDivElement>(null);
const chart = useRef<echarts.EChartsType>();
const resizeable = useRef(false);
@@ -138,7 +139,10 @@ const Chart: React.FC<{
return (
<div className="chart-wrapper" style={{ width: width, height }}>
<div ref={container} style={{ width: width, height }}></div>
<div
ref={container}
style={{ width: width, height: chartHeight || height }}
></div>
</div>
);
});