Assign scale steps to PDF/ PNG export

Hi,

first of all, dhtmlxGantt is truly a weapon!

For optimized visuals we enabled several scales like hourly scale with a step of 2 hours and subscales day and month. This works fine in the browser. When exporting to PDF or PNG the date of the day is displayed in where the hours should be like 0/ 2/ 4/ … The days and months are displayed correctly.

Is this normal behaviour?

Thanks!

Andy

Hi,

Try to use gantt.exportToPNG({ raw:true });
By default, export can’t include custom templates for scales. In raw mode, export must be exactly the same as Gantt in a browser.

Hi,

thanks forthe hint. We will try this.

Andy

Hi, exporting by using gantt.exportToPNG({raw:true}) produces an empty image. This is the same for exportToPDF. I really appreciate a solution to export displaying the step width correctly.

Thx!

Andy

Hello,

Could you provide with the demo link, where this problem can be reproduced?

I will setup a demo account to be provided and post it here, I think tomorrow.

You can find a demo under following link: demo2.owncollab.com/

user and pw are both the same: demo

I applied raw: true to the export as PNG.

  1. export functionality can be found in a side bar on the rigth side by clicking the menu button on the top right side

  1. scale can be adjusted by using the slider in the bottom right

Replace /apps/owncollab_chart/js/commercial/api.js with a content of export.dhtmlx.com/gantt/api.js
You are using an old version of api.js which doesn’t support raw mode, updating to new js file must resolve the issue.

Hi, thank you!

we will check that.

Andy