export function getGanttVisDefinition()

in gantt-chart/public/gantt_vis_type.ts [94:143]


export function getGanttVisDefinition(dependencies: GanttVisDependencies) {
  const ganttRequestHandler = getGanttRequestHandler(dependencies);
  const ganttResponseHandler = getGanttResponseHandler();
  const ganttParams: GanttParams = {
    labelField: '',
    startTimeField: '',
    durationField: '',

    size: 10,
    timeFormat: 'hh:mm:ss.SSS A',

    yAxisPosition: 'left',
    yAxisShow: true,
    yAxisShowLine: true,
    yAxisShowTitle: true,
    yAxisTitle: '',

    xAxisPosition: 'bottom',
    xAxisType: 'linear',
    xAxisShow: true,
    xAxisShowLine: true,
    xAxisShowTitle: true,
    xAxisTitle: '',

    legendOrientation: 'v',
    showLegend: true,
    xAxisShowGrid: true,
    yAxisShowGrid: false,
    colors: '#6092C0',
  };

  return {
    name: 'gantt_vis',
    title: 'Gantt Chart',
    icon: 'visBarHorizontalStacked',
    description: 'This visualization allows you to create a Gantt chart.',
    visConfig: {
      component: GanttChart,
      defaults: ganttParams,
    },
    editorConfig: {
      optionTabs: [
        { name: 'gantt_chart_editor', title: 'Data', editor: GanttChartEditor },
        { name: 'options_editor', title: 'Panel settings', editor: OptionsEditor },
      ],
    },
    requestHandler: ganttRequestHandler,
    responseHandler: ganttResponseHandler,
  };
}