• motiosw

    (@motiosw)


    Is it possible to output a chart as an image?
    I am trying to implement Charts into an PDF Export for a pdf report. Unfortunately javascript can’t be shown in that export. So maybe you know a way to have the output as an image (in some kind of way)?

    Do you have maybe an example for that or could give me a hint how to solve this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author martynasma

    (@martynasma)

    Thread Starter motiosw

    (@motiosw)

    If I try save it in a variable, than I get always [object Promise] as result.
    var imgData = chart.exporting.getImage(“png”);
    let imgData = await chart.exporting.getImage(“png”);

    With the following method, the image is shown. But the script is executed so late, that the picture isn’t shown in the export.
    chart.exporting.getImage(“png”).then(function(imgData) {
    var codeBlock = ‘‘ ;
    document.getElementById(“wrapper”).innerHTML = codeBlock
    });

    Do you have an example how to show the image (static) instead of the dynamic chart?
    Thank you for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Output as an Image’ is closed to new replies.