Selaa lähdekoodia

📝 docs(basic-charts): 更新函数参数文档注释

- 将 `getLineDataPoints` 函数的 `chartProcess` 参数描述从“未使用,保留用于兼容性”更新为“动画进度(默认为1)”
- 将 `getColumnDataPoints` 函数的 `chartProcess` 参数描述从“未使用,保留用于兼容性”更新为“动画进度(默认为1)”
- 确保文档准确反映函数参数的实际用途和默认值
yourname 3 viikkoa sitten
vanhempi
sitoutus
6d8fa9d2d8

+ 4 - 4
mini-ui-packages/mini-charts/src/lib/charts-data/basic-charts.ts

@@ -254,7 +254,7 @@ export function getDataPoints(
  * @param opts - 图表配置
  * @param config - uCharts配置
  * @param lineOption - 折线动画选项
- * @param chartProcess - 动画进度(未使用,保留用于兼容性
+ * @param process - 动画进度(默认为1
  * @returns 数据点数组
  */
 export function getLineDataPoints(
@@ -266,7 +266,7 @@ export function getLineDataPoints(
   opts: ChartOptions,
   config: UChartsConfig,
   lineOption: LineOption,
-  chartProcess: number
+  process = 1
 ): (DataPoint | null)[] {
   let boundaryGap = opts.xAxis?.boundaryGap || 'center';
   let points: (DataPoint | null)[] = [];
@@ -330,7 +330,7 @@ export function getLineDataPoints(
  * @param opts - 图表配置
  * @param config - uCharts配置
  * @param zeroPoints - 零点(未使用,保留用于兼容性)
- * @param chartProcess - 动画进度(未使用,保留用于兼容性
+ * @param process - 动画进度(默认为1
  * @returns 数据点数组
  */
 export function getColumnDataPoints(
@@ -342,7 +342,7 @@ export function getColumnDataPoints(
   opts: ChartOptions,
   config: UChartsConfig,
   zeroPoints: number[],
-  chartProcess: number
+  process = 1
 ): (DataPoint | null)[] {
   let points: (DataPoint | null)[] = [];
   let validHeight = opts.height - opts.area[0] - opts.area[2];