javascript - Highcharts Redrawing images based off of chart width -


i'm drawing redraw images on highcharts based off of width. ive made progress still cant redraw these images within values stay on chart.

http://jsfiddle.net/jimbob25/v446c/

i've attached fiddle shows problem. code below part of solution far.

//line 18 redraw: function () { //gets called when chart resizes                 var offset = (750 - chart.chartwidth);                 initdrawing(chart, offset);                 console.log(offset);             }   //line 96  call initdrawing function on initial load draws arrows  var offset = (750 - chart.chartwidth);   initdrawing(chart, offset);  //line 99, have call init drwaing , pass in offset know how far redraw. have remove each of arrows after each redraw.     function initdrawing(chart, offset) {      var renderer = chart.renderer;     $("#goal1").remove();     $("#goal2").remove(); 

here's version of code instead of doing calculations , trying place images using chart.renderer, adds them customer marker scatter plot. way highcharts positioning math , it's lot easier maintain:

series: [{         name: null,         data: [100, 100, 100, 100],         color: "#e9e9e9"     },{         type: 'scatter',         data: [[0,75], [1,50], [2,35], [3,65]],         marker: {             symbol: 'url(http://i.imgur.com/42p7k7o.png?1)'         }             }]   

updated fiddle here.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -