Mouse drag with filled lines

5 views
Skip to first unread message

Allan

unread,
Dec 11, 2009, 12:40:49 PM12/11/09
to Flotr Javascript Plotting Library
Hi,

copying from http://phenxdesign.net/projects/flotr/examples/prototype/mouse-drag.html
I have managed to get mouse dragging working well, but when filled
lines are on the graph and the graph is dragged beyond the largest x
value in the data set then the fill continues from the last point down
to the right hand corner of the chart, rather than dropping vertically
down to the x-axis.

You can see this in action if you add the line:

lines: {fill: true}

to the options in the above page (in the real code, not the code shown
as example!)

I have briefly looked at the code that controls the plotting but
cannot see where the change needs to be made though I suspect that at
line 2726 where it says:

ctx.lineTo(xa.d2p(xa.max), ya.d2p(bottom) + offset);

may be the problem...

Has anyone patched this already?

Allan

Allan

unread,
Jan 7, 2010, 3:29:27 PM1/7/10
to Flotr Javascript Plotting Library
Hi,

this is also an issue on non-draggable graphs where there is a filled
line graph that doesn't extend to xmax. The filled area under the line
extends diagonally from the last point to the bottom right corner of
the graph rather than descending vertically down from the point.

Allan

On Dec 11 2009, 11:40 am, Allan <allan.cochr...@gmail.com> wrote:
> Hi,
>
> copying fromhttp://phenxdesign.net/projects/flotr/examples/prototype/mouse-drag.html

Reply all
Reply to author
Forward
0 new messages