DataViewsJS and Gantt chart options

Posted by: it on 10 February 2021, 11:00 pm EST

    • Post Options:
    • Link

    Posted 10 February 2021, 11:00 pm EST

    I have created a Gantt chart following this example and everything is working fine.

    Now I am trying to make the TimeLineScale customizable but I cannot find any example on how to use IGanttOptions or how to create a Gantt object.

    I have tried this without success:

    const dataView = new DataView(document.getElementById(this.ganttId), data, columns, new GridLayout{...});
    let g = new Gantt(dataView, { timeLineScale : "month" });
    g.timeLineScale = "month";

    Can you advice how to solve this?

    Thank you

  • Posted 11 February 2021, 9:59 pm EST

    I have found the solution. The problem was that the TimeLineScale of the Gantt is defined in the column definition and not in the DataView properties.

    let columns = [{
        id: 'gantt',
        ganttColumn: {
    	[b]timeLineScale: timeScale[/b],
    	scale: 300,
    	start: 'start',
    	end: 'end',
    	text: 'description'
        width: '*'
  • Posted 22 February 2021, 5:53 pm EST


    We are glad to know that you were able to find the solution, also thank you for sharing the solution with the community.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels