Hello.
Is there any way to export Chart component as a pdf file?
I haven't found any method on the Cart itself. There's nothing close to "saveAsPDF".
I tried following way:
import { ChartComponent } from '@progress/kendo-angular-charts';
import { drawDOM, exportPDF, pdf } from '@progress/kendo-drawing';
drawDOM(kendoChart.element.nativeElement, {
paperSize: 'auto',
margin: { left: '1cm', top: '1cm', right: '1cm', bottom: '1cm' }
})
.then(function (group) {
pdf.saveAs(group, 'SomeFile.pdf');
});
When I render a chart as a canvas, it works fine, but the chart itself doesn't look great in the browser. When I render the chart in svg mode, I get an empty pdf document.
Could you give me a hint on how to resolve this problem? I need svg Chart exported to .pdf.