Our pure JavaScript Scheduler component


Post by davegould41 »

Hi team,

I am receiving the same issue that I'm seeing in the following two threads:

I would like to try the workaround mentioned here

But its not clear where the renderer & customRenderer should be set/unSet before and after the export call

Can you please provide a complete sample?

Also, completely unrelated, other libraries offer a platform for the community to create samples and deeplink them into threads like this to better showcase bugs, and sample fixes, similar to codepen. Have you guys thought of adding that? It would really make this interactivity shine


Post by alex.l »

Hi davegould41,

Not sure about complete sample for that, I would need to write renderers which are not important here, you can share your code and we will adjust it. But all you need to do, is replace renderer before export and turn it back after.
As example, here https://bryntum.com/products/gantt/docs/api/Gantt/feature/export/PdfExport#event-beforePdfExport
https://bryntum.com/products/gantt/docs/api/Gantt/feature/export/PdfExport#event-pdfExport

Pseudo code

// ...
gantt.on('beforePdfExport', ({ config }) => { 
     nameCustom.renderer = newRenderer.bind(nameCustom);
});
gantt.on('pdfExport', ({ response, error }) => { 
    // move it back after 
    nameCustom.renderer = NameColumn.prototype.treeRenderer.bind(nameCustom);
});


All the best,
Alex


Post by khattakdev »

Hey,

Also, completely unrelated, other libraries offer a platform for the community to create samples and deeplink them into threads like this to better showcase bugs, and sample fixes, similar to codepen. Have you guys thought of adding that? It would really make this interactivity shine

Great question, we will set something like that in the future. In case you want to keep an eye on the progress, you can subscribe to the GitHub ticket: https://github.com/bryntum/support/issues/9799

Arsalan
Developer Advocate


Post Reply