boost.d.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. * Returns true if the chart is in series boost mode.
  19. *
  20. * @param chart
  21. * the chart to check
  22. *
  23. * @return true if the chart is in series boost mode
  24. */
  25. isChartSeriesBoosting(chart: Chart): boolean;
  26. }
  27. interface Series {
  28. /**
  29. * If implemented in the core, parts of this can probably be shared with
  30. * other similar methods in Highcharts.
  31. */
  32. destroyGraphics(): void;
  33. /**
  34. * Enter boost mode and apply boost-specific properties.
  35. */
  36. enterBoost(): void;
  37. /**
  38. * Exit from boost mode and restore non-boost properties.
  39. */
  40. exitBoost(): void;
  41. /**
  42. * Return a full Point object based on the index. The boost module uses
  43. * stripped point objects for performance reasons.
  44. *
  45. * @param boostPoint
  46. * A stripped-down point object
  47. *
  48. * @return A Point object as per
  49. * https://api.highcharts.com/highcharts#Point
  50. */
  51. getPoint(boostPoint: (object|Point)): Point;
  52. }
  53. /**
  54. * Initialize the canvas boost.
  55. */
  56. function initCanvasBoost(): void;
  57. }
  58. export default factory;
  59. export let Highcharts: typeof _Highcharts;