Hi Webix Team,
Resources diagram in gantt has 2 display modes “Hours per day” and “Tasks per day”.
Is it possible to set “Tasks per day” by default? and is it possible hide this radio view (changing modes)?
Thank you!
BR, Arkadiy
Hello user095,
To hide radio buttons you need to customize the gantt view. For that create you own classes (CustomRadio, CustomTree, CustomDiagram) by inheriting them from gantt.views[“rdiagram”], gantt.views[“rdiagram/tree”], gantt.views[“rdiagram/diagram”] respectively as the logic of the radio buttons is connected with that views.
In the CustomRadio you need to override the config() method by accessing the toolbar and hiding it:
const toolbar = ui.rows[0];
toolbar.hidden = true;
In the CustomTree you just need to call this.ShowInUnits("tasks");
with the hardcoded tasks parameter. This method shows total workload in tasks or hours depending on the parameter.
And in the CustomDiagram you need to set this.Unit = "tasks";
as well to apply task unit in the diagram and after that render the bars: this.Bars.render();
Please take a look at the example: Code Snippet
Hello, Natalia
Thank you! All works fine for me.
BR, Arkadiy