• Recent
    • Tags
    • Popular
    • Register
    • Login

    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.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    AngularJS Chart Exporter not working

    Dashboard Designer & Custom AngularJS Pages
    2
    2
    2.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      atkins.chrisw
      last edited by

      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)

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        @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 the amcharts/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']
                },
        

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • First post
          Last post