Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
AngularJS Chart Exporter not working
-
Jared, when I try to save a chart as a pdf. Im getting this error.
Regex
Hide network messages
All
Errors
Warnings
Info
Logs
Debug
Handled
pdfmake.min.js:11 Uncaught TypeError: Cannot read property 'Roboto-Regular.ttf' of undefined
r.readFileSync @ pdfmake.min.js:11
t.open @ pdfmake.min.js:14
t @ pdfmake.min.js:13
font @ pdfmake.min.js:13
r.getFont @ pdfmake.min.js:9
r.widthOfString @ pdfmake.min.js:9
(anonymous function) @ pdfmake.min.js:9
h @ pdfmake.min.js:9
n.buildInlines @ pdfmake.min.js:9
r.measureLeaf @ pdfmake.min.js:9
(anonymous function) @ pdfmake.min.js:9
n.auto @ pdfmake.min.js:9
r.measureNode @ pdfmake.min.js:9
r.measureVerticalContainer @ pdfmake.min.js:9
(anonymous function) @ pdfmake.min.js:9
n.auto @ pdfmake.min.js:9
r.measureNode @ pdfmake.min.js:9
r.measureDocument @ pdfmake.min.js:9
i.tryLayoutDocument @ pdfmake.min.js:9
i.layoutDocument @ pdfmake.min.js:9
r.createPdfKitDocument @ pdfmake.min.js:7
r._createDoc @ pdfmake.min.js:1
r.getDataUrl @ pdfmake.min.js:1
toPDF @ export.js:1798
(anonymous function) @ export.js:2577
handleCallback @ export.js:2146
(anonymous function) -
@atkins-chrisw
It seems to be related to the order the pdfmake JS files are loaded. I'll fix it in the next release. In the mean time you can change /dashboards/web/js/loaderConfig.js so that in the shim section theamcharts/plugins/export/export
part changes to'amcharts/plugins/export/export': { deps: ['amcharts/amcharts', 'amcharts/plugins/export/libs/blob.js/blob', 'amcharts/plugins/export/libs/fabric.js/fabric.min', 'amcharts/plugins/export/libs/FileSaver.js/FileSaver.min', 'amcharts/plugins/export/libs/jszip/jszip.min', 'amcharts/plugins/export/libs/pdfmake/vfs_fonts', 'amcharts/plugins/export/libs/xlsx/xlsx.min'] }, 'amcharts/plugins/export/libs/pdfmake/vfs_fonts': { deps: ['amcharts/plugins/export/libs/pdfmake/pdfmake.min'] },