fix:修复类型提示错误
This commit is contained in:
@@ -78,14 +78,13 @@ const KLineChartView: React.FC<KLineChartViewProps> = ({
|
||||
},
|
||||
},
|
||||
candle: {
|
||||
type: 'line', // 使用折线图模式
|
||||
line: {
|
||||
upColor: themeColors.primary.gold,
|
||||
downColor: themeColors.primary.gold,
|
||||
style: 'solid',
|
||||
size: 2,
|
||||
type: 'area' as const, // 使用面积图模式
|
||||
area: {
|
||||
lineColor: themeColors.primary.gold,
|
||||
lineSize: 2,
|
||||
backgroundColor: [`${themeColors.primary.gold}30`, `${themeColors.primary.gold}05`],
|
||||
},
|
||||
},
|
||||
} as any,
|
||||
crosshair: {
|
||||
horizontal: {
|
||||
line: {
|
||||
@@ -148,7 +147,7 @@ const KLineChartView: React.FC<KLineChartViewProps> = ({
|
||||
.sort((a, b) => a.timestamp - b.timestamp);
|
||||
|
||||
// 设置数据
|
||||
chart?.applyNewData(chartData);
|
||||
(chart as any)?.applyNewData(chartData);
|
||||
|
||||
chartRef.current = chart;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user