DayPilot.Gantt.onBeforeTimeHeaderExport

The onBeforeTimeHeaderExport event is fired during image export. It allows you to provide alternative text for the Gantt Chart time header (image export doesn't support HTML).

This event is available since version 2023.1.5529.

Declaration

DayPilot.Gantt.onBeforeTimeHeaderExport(args);

Parameters

  • args.header.start - cell start (DayPilot.Date)
  • args.header.end - cell end (DayPilot.Date)
  • args.header.level - header level (integer, zero-based index)
  • args.header.text - default text (string)
  • args.header.html - customized HTML (string)
  • args.text (string) - exported text (by default set to customized HTML)
  • args.backColor (string) - background color of the time header cell
  • args.fontColor (string)
  • args.fontFamily (string)
  • args.fontSize (string)
  • args.fontStyle ("normal" | "italic" | "bold")

Example

Uses the original cell text instead of HTML:

dp.onBeforeTimeHeaderExport = function(args) {
  args.text = args.header.text;
};