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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -