Do I need to instantiate 4 timeline views for each scale(day, week, month, year) ? How do I switch between these scales, so that primary and secondary scales are rendered correctly (height problems…)?
Try to use the sample for solving your issue. docs.dhtmlx.com/scheduler/snippet/bf00efa0
Please, give more info about functionality you want to implement, if the problem still occurs for you.
Hi Polina, this is exactly what I was talking about. It works nicely on primary+second scale.
I was thinking to remove the second scale, when ‘Day scale’ is clicked, no need to display the date twice: header+primary scale. Is this possible? When putting timeline.second_scale = false; the scale height does not adjust docs.dhtmlx.com/scheduler/snippet/7f4ad846
Yes, it’s possible.
You need to recalculate the height of the X-Axis using scheduler.xy.scale_height (docs.dhtmlx.com/scheduler/api__s … other.html) and to create new second_scales where it’s needed:
timeline.second_scale = { … );
A have another question. After choosing ‘Month’ scale the start date shifts, I presume due to timeline.x_size=30
In month scale I’d like to show all days of the selected month. For example:
1 Jul 2009 – 31 Jul 2009 (not 1 Jul 2009 – 30 Jul 2009, not 31 Jul 2009 – 29 Aug 2009)
And when clicking previous/next button full month should appear (not shifted). For example:
1 Jan 2016 – 31 Jan 2016
1 Feb 2016 – 29 Feb 2016
1 Mar 2016 – 31 Mar 2016
1 Apr 2016 – 30 Apr 2016
etc.
Is there a simple way to choose ‘Full month’ timeline? Thanks.