index.d.ts 955 B

123456789101112131415161718192021222324252627282930313233
  1. import { GUI } from '../../core';
  2. import { Group } from '../../shapes';
  3. import type { SparklineOptions, SparklineStyleProps } from './types';
  4. export type { SparklineStyleProps, SparklineOptions };
  5. export declare class Sparkline extends GUI<SparklineStyleProps> {
  6. static tag: string;
  7. private container;
  8. private spark;
  9. /**
  10. * 将data统一格式化为数组形式
  11. * 如果堆叠,则生成堆叠数据
  12. */
  13. private get rawData();
  14. private get data();
  15. private get scales();
  16. /**
  17. * 基准线,默认为 0
  18. */
  19. private get baseline();
  20. private get containerShape();
  21. private get linesStyle();
  22. private get columnsStyle();
  23. constructor(options: SparklineOptions);
  24. render(attributes: Required<SparklineStyleProps>, container: Group): void;
  25. /**
  26. * 根据数据索引获取color
  27. */
  28. private getColor;
  29. /**
  30. * 根据数据生成scale
  31. */
  32. private createScales;
  33. }