score:2

Accepted answer

Here, I have fixed it for you. Here is a saved image:

Exported ImageFollowing changes have been done:

  1. Added a redraw event to your exportchart

    redraw: function () {
        $("#test_text").remove() ;
        draw_labels(this);
    }
    
  2. Changed this line in afterSetExtremes

    $('[id="test_text"]').remove();
    

    to

    $("#test_text").remove() ;
    

    Earlier one was not working as expected, so I had to change it.

score:0

Problem with disappearing text is related with id, when I removed it, label appears. But then I came across second issue, wrong y position. So i declare global variable, then when you call your function, set position of label, and use in chart exporting this variable. As a result label is exported correct.

http://jsfiddle.net/UGbpJ/11/


Related Articles