HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.44k stars 526 forks source link

Selection area on zoom is not plotting the x and y axis co-ordinates correctly on the chart #317

Open iamnaveenchandra opened 7 years ago

iamnaveenchandra commented 7 years ago

Hi,

We have implemented Flotr2 charting framework in our application and running into below issue(in IE browser (edge by default)) on zooming the chart using selector.

Refer to images for more details.

on chrome before zooming: image After zooming: image

Zooming 2nd time b/w 1000-2000 (x-axis) final result on chrome: image

on IE before zooming:

image

After zooming for 2nd time on IE:

image

Final result on IE: (You can see that co-ordinates on final zoom are going beyond the selection area)

image

Below is the selection code

function drawGraph (opts) { var o = Flotr..extend(Flotr..clone(settings), opts || {}); return Flotr.draw(container, data, o); } var graph = drawGraph(); Flotr.EventAdapter.observe(container, 'flotr:select', function (area) { graph = drawGraph( { xaxis: {min:area.x1, max:area.x2}, yaxis: {min:area.y1, max:area.y2}, }); }); Flotr.EventAdapter.observe(container, 'flotr:click', function () { drawGraph(); });
})

Please help me in resolving this issue (intermittently observed in chrome where as in IE(Edge by default selected) it is always observed).

Thanks, Naveen