annotations.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*!*
  2. *
  3. * Copyright (c) Highsoft AS. All rights reserved.
  4. *
  5. *!*/
  6. import * as globals from "../globals";
  7. import * as _Highcharts from "../highcharts";
  8. /**
  9. * Adds the module to the imported Highcharts namespace.
  10. *
  11. * @param highcharts
  12. * The imported Highcharts namespace to extend.
  13. */
  14. export function factory(highcharts: typeof Highcharts): void;
  15. declare module "../highcharts" {
  16. interface Chart {
  17. /**
  18. * Add an annotation to the chart after render time.
  19. *
  20. * @param options
  21. * The annotation options for the new, detailed annotation.
  22. *
  23. * @return - The newly generated annotation.
  24. */
  25. addAnnotation(options: AnnotationsOptions, redraw?: boolean): Annotation;
  26. /**
  27. * Remove an annotation from the chart.
  28. *
  29. * @param idOrAnnotation
  30. * The annotation's id or direct annotation object.
  31. */
  32. removeAnnotation(idOrAnnotation: (number|string|Annotation)): void;
  33. }
  34. interface Point {
  35. /**
  36. * Indicates if this is a mock point for an annotation.
  37. */
  38. mock?: boolean;
  39. }
  40. }
  41. export default factory;
  42. export let Highcharts: typeof _Highcharts;