@highcharts/dashboards
Version:
Highcharts Dashboards framework
75 lines (74 loc) • 2.37 kB
TypeScript
import type { HTMLDOMElement } from '../Renderer/DOMElementType';
import type Options from '../Options';
import Chart from './Chart.js';
declare module '../Options' {
interface Options {
isGantt?: boolean;
}
}
/**
* Gantt-optimized chart. Use {@link Highcharts.Chart|Chart} for common charts.
*
* @requires modules/gantt
*
* @class
* @name Highcharts.GanttChart
* @extends Highcharts.Chart
*/
declare class GanttChart extends Chart {
/**
* Initializes the chart. The constructor's arguments are passed on
* directly.
*
* @function Highcharts.GanttChart#init
*
* @param {Highcharts.Options} userOptions
* Custom options.
*
* @param {Function} [callback]
* Function to run when the chart has loaded and all external
* images are loaded.
*
*
* @emits Highcharts.GanttChart#event:init
* @emits Highcharts.GanttChart#event:afterInit
*/
init(userOptions: Partial<Options>, callback?: Chart.CallbackFunction): void;
}
declare namespace GanttChart {
/**
* The factory function for creating new gantt charts. Creates a new {@link
* Highcharts.GanttChart|GanttChart} object with different default options
* than the basic Chart.
*
* @example
* // Render a chart in to div#container
* let chart = Highcharts.ganttChart('container', {
* title: {
* text: 'My chart'
* },
* series: [{
* data: ...
* }]
* });
*
* @function Highcharts.ganttChart
*
* @param {string|Highcharts.HTMLDOMElement} renderTo
* The DOM element to render to, or its id.
*
* @param {Highcharts.Options} options
* The chart options structure.
*
* @param {Highcharts.ChartCallbackFunction} [callback]
* Function to run when the chart has loaded and all external
* images are loaded. Defining a
* [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)
* handler is equivalent.
*
* @return {Highcharts.GanttChart}
* Returns the Chart object.
*/
function ganttChart(a: (string | HTMLDOMElement | Options), b?: (Chart.CallbackFunction | Options), c?: Chart.CallbackFunction): GanttChart;
}
export default GanttChart;