JQplot canvas overlay

1,139 views
Skip to first unread message

danny pearson

unread,
Apr 25, 2012, 5:16:28 AM4/25/12
to jqplot-users
HI all,
I'm trying to get 3 coloured "zones" to plot an x,y series in front of
green, amber and red rectangles to indicate whether my points are out
of range.
Has anyone any ideas about how to send the canvas overlay behind the
plotted series? Tried setting alpha but canvas overlay still in front
of series. Also tried adding 2 straight line series and filling under
each to get these coloured zones but these are still in front of my
initial series. Tried moving series to front based on series index but
no luck. Is there a hook to call as it brings this series to the front
when it is highlighted on mouse over but i need to call this function
on initialisation. Also tried setting z-index of everything in css but
sends it behind the actual grid.
Any help would be appreciated.
Thanks

katya

unread,
May 3, 2012, 10:46:12 AM5/3/12
to jqplot-users
Maybe this wiil help:


.jqplot.postDrawHooks.push(function(){
$(".jqplot-overlayCanvas-canvas").css('z-index', '0');//send
overlay canvas to back
$(".jqplot-series-canvas").css('z-index', '1');//send series
canvas to front
});


and my case on stackoverflow that was solved:

http://stackoverflow.com/questions/10426192/jqplot-how-to-change-opacity-or-z-index-of-canvasoverlay

danny pearson

unread,
May 4, 2012, 8:51:00 AM5/4/12
to jqplot-users
Thanks, i'll check it out.

On May 3, 3:46 pm, katya <buzyo...@gmail.com> wrote:
> Maybe this wiil help:
>
> .jqplot.postDrawHooks.push(function(){
>     $(".jqplot-overlayCanvas-canvas").css('z-index', '0');//send
> overlay canvas to back
>     $(".jqplot-series-canvas").css('z-index', '1');//send series
> canvas to front
>
> });
>
> and my case on stackoverflow that was solved:
>
> http://stackoverflow.com/questions/10426192/jqplot-how-to-change-opac...
>
> On Apr 25, 12:16 pm, danny pearson <dmjpear...@googlemail.com> wrote:
>
>
>
> > HI all,
> > I'm trying to get 3 coloured "zones" to plot an x,y series in front of
> > green, amber and red rectangles to indicate whether my points are out
> > of range.
> > Has anyone any ideas about how to send the canvas overlay behind the
> > plotted series? Tried setting alpha but canvas overlay still in front
> > of series. Also tried adding 2 straight line series and filling under
> > each to get these coloured zones but these are still in front of my
> > initial series. Tried moving series to front based on series index but
> > no luck. Is there a hook to call as it brings this series to the front
> > when it is highlighted on mouse over but i need to call this function
> > on initialisation. Also tried setting z-index of everything in css but
> > sends it behind the actual grid.
> > Any help would be appreciated.
> > Thanks- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages