Bjorn Vdkerckhove
Bjorn Vdkerckhove

Reputation: 745

Export chart with image not working

i have a website where a create a chart with highcharts. Now i wanted to add our logo in the middle of the chart. Looks great now, but the export fails with the image i added. When i remove the logo, the export works again. Is there a workaround or is this a bug? Someone else had this problem?

This is my code:

 $(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();}
                },
            },

Upvotes: 0

Views: 1689

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

Try to use full path, for example: http://jsfiddle.net/F4qS8/704/ this works fine.

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

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

Upvotes: 2

Related Questions