Can not exporting renderer shapes added in callback function in highcharts / highstock

后端 未结 2 1070
半阙折子戏
半阙折子戏 2020-12-22 05:33

I want to dynamically added several primitive shapes like text and images into highcharts / highstock.

Please see this fiddle.

$(function () {
    v         


        
2条回答
  •  被撕碎了的回忆
    2020-12-22 05:45

    You can use chart.exportChart() function to achieve that: http://jsfiddle.net/B6s7V/38/

    The same solution as here.

    $("#export").click(function () {
        chart.exportChart(null, {
            chart: {
                events: {
                    load: function () {
                        this.renderer.image('http://highcharts.com/demo/gfx/sun.png', 100, 100, 30, 30).add();
                    }
                }
            }
        });
    });
    

提交回复
热议问题