导出图表时图像不起作用

时间:2013-06-26 08:08:18

标签: highcharts highstock

我有一个网站,其中创建一个图表与highcharts。现在我想在图表中间添加我们的徽标。现在看起来很棒,但导出失败了我添加的图像。当我删除徽标时,导出再次起作用。有解决方法还是这个错误?有人有这个问题吗?

这是我的代码:

 $(document).ready(function () {

        $('#container').highcharts({

            chart: {
                height: $(window).innerHeight() * 0.98,
                type: 'scatter',
                zoomType: 'xy',
                backgroundColor: 'transparent',
                events: {
                    load: function() {
                        this.renderer.image('/Content/PPC2012/Images/Charts/logoopacity.png', this.plotLeft + (this.plotWidth  * 0.5) - (729  * 0.5) - 75, this.plotTop  + (this.plotHeight * 0.5) - (450 * 0.5) - 50, this.plotLeft + (this.plotWidth  * 0.5) + (729  * 0.5) - 75, this.plotTop  + (this.plotHeight * 0.5) + (450 * 0.5) - 50).attr({'zIndex' : 10}).add();}
                },
            },

1 个答案:

答案 0 :(得分:2)

尝试使用完整路径,例如:http://jsfiddle.net/F4qS8/704/这样可以正常工作。

chart: {
    renderTo: 'container',
    events: {
        load: function () {

            this.renderer.image('http://highcharts.com/demo/gfx/sun.png', 100, 100, 30, 30)
                .add();
        }
    }
},
相关问题