You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. import Element from '../core/core.element.js';
  2. import type { ArcOptions, Point } from '../types/index.js';
  3. export interface ArcProps extends Point {
  4. startAngle: number;
  5. endAngle: number;
  6. innerRadius: number;
  7. outerRadius: number;
  8. circumference: number;
  9. }
  10. export default class ArcElement extends Element<ArcProps, ArcOptions> {
  11. static id: string;
  12. static defaults: {
  13. borderAlign: string;
  14. borderColor: string;
  15. borderJoinStyle: any;
  16. borderRadius: number;
  17. borderWidth: number;
  18. offset: number;
  19. spacing: number;
  20. angle: any;
  21. circular: boolean;
  22. };
  23. static defaultRoutes: {
  24. backgroundColor: string;
  25. };
  26. circumference: number;
  27. endAngle: number;
  28. fullCircles: number;
  29. innerRadius: number;
  30. outerRadius: number;
  31. pixelMargin: number;
  32. startAngle: number;
  33. constructor(cfg: any);
  34. inRange(chartX: number, chartY: number, useFinalPosition: boolean): boolean;
  35. getCenterPoint(useFinalPosition: boolean): {
  36. x: number;
  37. y: number;
  38. };
  39. tooltipPosition(useFinalPosition: boolean): {
  40. x: number;
  41. y: number;
  42. };
  43. draw(ctx: CanvasRenderingContext2D): void;
  44. }