On Thu, 29 Apr 2010 18:39:47 -0700, aaron brick wrote:
> hi all,
> i was shocked to see that noone has been discussing the amazing new
> canvas terminal on the mailing list this month! let's start.
> i have a web page which displays the canvas plot and mousing panel
> correctly, having loaded the several JS and CSS files which are
> provided with gnuplot 4.4.0. the JS executes without errors;
> mouse_update() and getMouseCoordsWithinTarget() run, but there are no
> updates to the panel, clicking on the buttons similarly does nothing,
> and there are no labels drawn on the graph when i click it like the
> demo. the only value i've seen panel show for X and Y both is
> 3.258e+8. well, OK.
> what i really want is to make datapoints in the picture clickable.
> should i be modifying the emitted HTML to add my own mouseover and
> click events to the canvas element? has anyone successfully adapted
> the provided JS to do something similar?
I think the current implementation might not be complete. I
once wanted to put several mouse-able plots in one page, so
I tried to modify the javascript bundled with gnuplot. I
have a test page on
http://xiaoyong.unixcab.org/gptest/plot_sin.xhtml
I haven't finished polishing the code, because I soon
realized some of my audiences use IE exclusively. The code
should be able to do everything promised in the gnuplot menu
page and you can put several mouse-able plots in one page.
I don't have time to finish the code and integrate it back
into gnuplot. I hope someone find it useful and wish to do
the hard work to get it included in the main gnuplot
distribution.
The code is a derived work, so shares the same copyright as
gnuplot. All I did is enclosing all the functions and
variables in reasonably separated closures. I would like to
help to get it integrated into the main gnuplot
distribution. I don't know too much about the internals of
gnuplot, but if anyone has question about the bits of
javascript I wrote, please feel free to ask.
> cheers,
> aaron.
cheers,
Xiao-Yong
--
J c/* __o/*
X <\ * (__
Y */\ <
|