path.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import type { Data, Line, Scales } from './types';
  2. /**
  3. * 根据数据获得每条线各点x,y值
  4. */
  5. export declare function dataToLines(data: Data, scales: Scales): Line[];
  6. /**
  7. * 根据线的点数据生成折线path
  8. */
  9. export declare function lineToLinePath(line: Line, reverse?: boolean): any[];
  10. /**
  11. * 根据点数据生成曲线path
  12. * @param points 点数据
  13. * @param reverse 是否倒序生成
  14. */
  15. export declare function lineToCurvePath(line: Line, reverse?: boolean): any[];
  16. /**
  17. * 根据baseline将path闭合
  18. */
  19. export declare function closePathByBaseLine(path: any[], width: number, baseline: number): any;
  20. /**
  21. * 将多条线的点数据生成区域path
  22. * 可以是折线或曲线
  23. */
  24. export declare function linesToAreaPaths(lines: Line[], smooth: boolean, width: number, baseline: number): any[];
  25. /**
  26. * 生成折线堆叠区域封闭图形路径
  27. */
  28. export declare function linesToStackAreaPaths(lines: Line[], width: number, baseline: number): any[][];
  29. /**
  30. * 生成曲线堆叠区域封闭图形路径
  31. */
  32. export declare function linesToStackCurveAreaPaths(lines: Line[], width: number, baseline: number): any[][];