DayPilot.Gantt.onBeforeCellExport

The onBeforeCellExport event is fired during image export. It allows you to provide alternative text for the Gantt Chart grid cells (image export doesn't support HTML in grid cells).

Available since version 2023.1.5529.

Declaration

DayPilot.Gantt.onBeforeCellExport(args);

Parameters

  • args.areas - an array of active areas (areas defined using onBeforeCellRender are copied)
  • args.cell - exported grid cell object (read-only)
  • args.fontColor - font color
  • args.fontFamily - font family
  • args.fontSize - font size
  • args.fontStyle -font style
  • args.text - exported text
  • args.horizontalAlignment - "left" | "center" | "right"
  • args.backColor - background color

Example

Basic HTML to text conversion - replaces line breaks:

dp.onBeforeEventExport = function(args) {
  args.text = args.e.client.html().replace("<br>", "\n");
};