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

Getting error while downloading a range image

Asked by Bikram Jeet Singh
1 year ago.

Hello,

I am currently working on a project where I was exporting the Gantt View. For viewport/full area, it is working fine, but when I use the range area, the image is not downloading.
I also implemented the pdf export where I used the "range" for exporting each month on each page, it worked fine.
Only the download option is not working, getting the error in the attachments.
The plannedStartDate and plannedEndDate are between the Gantt start and end.

Used this code for export:
  private exportRangeView(typeOfExport: "svg" | "png" | "jpeg"){
    const options = {
      area: "range",
      dateFrom: new DayPilot.Date(this.state.PlannedStartDate, true),
      dateTo: new DayPilot.Date(this.state.PlannedEndDate, true),
    }

    const image = this.dp.exportAs(typeOfExport, options )

    image.download(`Dev-range.${typeOfExport}`)
  }
Answer posted by Dan Letecky [DayPilot]
1 year ago.

This issue should be fixed now in the latest sandbox build (2023.1.5540):
https://release.daypilot.org/changes/js/

Please let me know if the problem persists.

Comment posted by Bikram Jeet Singh
1 year ago.

Not getting the error now. But the download is not still not working for both svg/png.

Comment posted by Dan Letecky [DayPilot]
1 year ago.

Is there any other other error in the JavaScript console?

The SVG export demo now includes a "range" example and it seems to work fine:
https://javascript.daypilot.org/sandbox/gantt/exportsvg.html

If it doesn't work as expected, could you please try to create a sample with configuration and data that reproduce the problem? You can generate a blank Gantt chart project at https://builder.daypilot.org.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.