search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Problems when exporting Gantt as jpeg

Asked by Anonymous
3 years ago.

When exporting the Gantt chart as a jpeg the "text" value of the task is printed inside the box. Is there any way to show an empty task box in the exported image?

Also when exporting the grid on the background of the gantt (showing the weekend day cells in gray) disappears and everything turns white. Is there a way to show the grid in the exported image?

Thanks in advance

Answer posted by Dan Letecky [DayPilot]
3 years ago.

You can customize the image export using the onBeforeEventExport method of the internal scheduler object:
https://api.daypilot.org/daypilot-scheduler-onbeforeeventexport/

For cells, use the onBeforeCellExport method:
https://api.daypilot.org/daypilot-scheduler-onbeforecellexport/

Example:

const dp = new DayPilot.Gantt(....);

dp.scheduler.onBeforeEventExport = args => {
  args.text = "";
};
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.