Search code examples
highchartsrenderer

How to render image on Yaxis in highcharts


I want to use chart.renderer.image to put a image on Yaxis. Please see this fiddle

Is there a easy way to put the image on Yaxis? For example I want to put the image on Yaxis [0,100]. It is very difficult to using the following way to do that.

chart.renderer.image('http://highcharts.com/demo/gfx/sun.png', 0, 10, 30, 30)
    .add(); 

Solution

  • In this line:

     chart.renderer.image('http://highcharts.com/demo/gfx/sun.png', 20, 50, 30, 30)
        .add();   
    

    first two parameters are responsible for position (x,y). So you should modify it to position object in yAxis, like in the example: http://jsfiddle.net/F4qS8/701/