Quarter scale View

Hie,

I don’t find a way to have a quarter scale with two head-line :

  • one with quarters : for example Jan-Mar in one cell
  • one with months : for example january + february + march in 3 cells.

Is it possible ?

Thanks

Hello,
such scale can be defined with ‘unit’ and ‘step’ options of the scale confugration.
Check this example (you can find one in your gantt package)
docs.dhtmlx.com/gantt/samples/03 … _year.html

Related docs:
docs.dhtmlx.com/gantt/desktop__c … ofthescale
docs.dhtmlx.com/gantt/desktop__c … alesformat
docs.dhtmlx.com/gantt/desktop__second_scale.html

Hi,
In this example http://docs.dhtmlx.com/gantt/samples/03_scales/03_full_year.html, is there a way to hide the first line with year values ?

Thanks

Hello,
you can simply remove it from the configuration. Gantt requires one scale to be defined in gantt.config.scale_unit settings, and allows any number of additional scales defined in gantt.config.subscales array.
So you can define only two scales - month in gantt.config.scale_unit and quarter in gantt.config.subscales:[code] gantt.config.scale_unit = “month”;
gantt.config.step = 1;
gantt.config.date_scale = “%M”;
gantt.config.min_column_width = 50;

gantt.config.scale_height = 60;

var monthScaleTemplate = function(date){
	var dateToStr = gantt.date.date_to_str("%M");
	var endDate = gantt.date.add(date, 2, "month");
	return dateToStr(date) + " - " + dateToStr(endDate);
};

gantt.config.subscales = [
	{unit:"month", step:3, template:monthScaleTemplate}
];[/code]

ok thanks, it’s perfect.

HI,

When we export to PDF in Gantt charts. the quarters scale is not displayed in the pdf.
Any suggestion.

Hello Anuj,
You need to export the data with the raw: true parameter.
Here is an example of how it works:
http://snippet.dhtmlx.com/5c93e3b75

Hello I want change “quarter” is for “Four months” not “Three Months” how can do this…?

Hello Shivam,
You need to use a custom scale unit and add your logic for calculating the dates:
https://docs.dhtmlx.com/gantt/desktop__configuring_time_scale.html#customtimeunits
Here is an example of how it might be implemented:
http://snippet.dhtmlx.com/5/a53c6315b