Calculate columns count for rightside task text

When each task on the gantt timeline has a right-side text I want to be able based on the scale unit to calculate how many columns are needed to fix the text.

So basically I need to change the gantt.config.end_date so the LONGEST right-side text WIDTH of the very task fits the timeline.

Hi @Nikolai_Dimentiev,
For now, gantt calculating offset using start/end dates and doesn’t counts leftside/rightside text, and unfortunately there is no built-in way to change this behavior.
As a workaround solution, I could advise you to move aside content from right to left of the task, if it is not enough space to display it, like in this example:
http://snippet.dhtmlx.com/993693a3f
Where I use gantt.config.font_width_ratio to calculate the width of the aside content and check if it is enough space to place in after this inside the getTaskFitValue function.