gantt.d.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 Point {
  17. /**
  18. * The ending X value of the range point.
  19. */
  20. x2?: number;
  21. }
  22. interface PointOptionsObject {
  23. /**
  24. * The ending X value of the range point.
  25. */
  26. x2?: number;
  27. }
  28. /**
  29. * Gantt-optimized chart. Use Chart for common charts.
  30. */
  31. class GanttChart extends Chart {
  32. /**
  33. * Initializes the chart. The constructor's arguments are passed on
  34. * directly.
  35. *
  36. * @param userOptions
  37. * Custom options.
  38. *
  39. * @param callback
  40. * Function to run when the chart has loaded and and all external
  41. * images are loaded.
  42. *
  43. * @fires Highcharts.GanttChart#init
  44. * @fires Highcharts.GanttChart#afterInit
  45. */
  46. init(userOptions: Options, callback?: Function): void;
  47. }
  48. /**
  49. * The factory function for creating new gantt charts. Creates a new
  50. * GanttChart object with different default options than the basic Chart.
  51. *
  52. * @param renderTo
  53. * The DOM element to render to, or its id.
  54. *
  55. * @param options
  56. * The chart options structure.
  57. *
  58. * @param callback
  59. * Function to run when the chart has loaded and and all external
  60. * images are loaded. Defining a chart.events.load handler is
  61. * equivalent.
  62. *
  63. * @return Returns the Chart object.
  64. */
  65. function ganttChart(renderTo: (string|HTMLDOMElement), options: Options, callback?: ChartCallbackFunction): GanttChart;
  66. /**
  67. * When we have vertical scrollbar, rifles and arrow in buttons should be
  68. * rotated. The same method is used in Navigator's handles, to rotate them.
  69. *
  70. * @param path
  71. * Path to be rotated.
  72. *
  73. * @param vertical
  74. * If vertical scrollbar, swap x-y values.
  75. *
  76. * @return Rotated path.
  77. */
  78. function swapXY(path: SVGPathArray, vertical?: boolean): SVGPathArray;
  79. }
  80. export default factory;
  81. export let Highcharts: typeof _Highcharts;