refactor: update scroll modal

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent 29b74f85c5
commit 55b0a20a4a
17 changed files with 340 additions and 163 deletions
+2 -2
View File
@@ -151,7 +151,7 @@ export default function useChartConfig() {
progress: {
show: true,
roundCap: false,
width: 12
width: 10
},
pointer: {
length: '80%',
@@ -163,7 +163,7 @@ export default function useChartConfig() {
axisLine: {
roundCap: false,
lineStyle: {
width: 12,
width: 10,
color: [
[0.5, 'rgba(84, 204, 152, 80%)'],
[0.8, 'rgba(250, 173, 20, 80%)'],
+9 -4
View File
@@ -22,13 +22,18 @@ const GaugeChart: React.FC<Omit<ChartProps, 'seriesData' | 'xAxisData'>> = (
title: titleConfig,
chartColorMap
} = useChartConfig();
const { value, height, width, labelFormatter, title, color } = props;
const { value, height, width, labelFormatter, title, color, gaugeConfig } =
props;
if (!value && value !== 0) {
return <EmptyData height={height} title={title}></EmptyData>;
}
const setDataOptions = () => {
const colorValue = color || strokeColorFunc(value);
const combineGaugeConfig = {
...gaugeItemConfig,
...gaugeConfig
};
return {
title: {
...titleConfig,
@@ -38,11 +43,11 @@ const GaugeChart: React.FC<Omit<ChartProps, 'seriesData' | 'xAxisData'>> = (
},
series: [
{
...gaugeItemConfig,
...combineGaugeConfig,
axisLine: {
...gaugeItemConfig.axisLine,
...combineGaugeConfig.axisLine,
lineStyle: {
...gaugeItemConfig.axisLine.lineStyle,
...combineGaugeConfig.axisLine.lineStyle,
color: [
[value / 100, colorValue],
[1, chartColorMap.gaugeBgColor]
+6
View File
@@ -13,6 +13,12 @@ export interface ChartProps {
smooth?: boolean;
color?: string;
yAxisName?: string;
gaugeConfig?: {
radius?: string;
center?: string[];
startAngle?: number;
endAngle?: number;
};
}
export interface AreaChartItemProps {