line.d.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. import type { Point } from '../../types';
  2. import { CrosshairBase } from './base';
  3. import type { LineCrosshairOptions, LineCrosshairStyleProps } from './types';
  4. export type { LineCrosshairStyleProps, LineCrosshairOptions };
  5. export declare class LineCrosshair extends CrosshairBase<Required<LineCrosshairStyleProps>> {
  6. static tag: string;
  7. protected static defaultOptions: {
  8. style: Partial<LineCrosshairStyleProps>;
  9. };
  10. protected get crosshairPath(): any[];
  11. /**
  12. * 获得 pointer 的相对坐标
  13. */
  14. protected get localPointer(): number[];
  15. private get isVertical();
  16. private get tagShapeSpace();
  17. constructor(options: LineCrosshairOptions);
  18. update(cfg: Partial<LineCrosshairStyleProps>): void;
  19. /**
  20. * 将线移动至对应位置
  21. */
  22. setPointer(pointer: Point): void;
  23. setText(text: string): void;
  24. protected adjustLayout(): void;
  25. /**
  26. * 调整this位置
  27. */
  28. private adjustPosition;
  29. /**
  30. * 调整tag位置
  31. */
  32. private adjustTag;
  33. private getOrientVal;
  34. }