I'm using gnuplot 5.2 patch 2, on Debian unstable, viewing HTML files rendered from the canvas terminal in Firefox 57.0.4 (64-bit).
Firstly, I assume that it is intentional that titles placed to mark points by clicking the mouse in the HTML5 canvas terminal stay around - in contrast to the SVG terminal in which clicking just turns on/off a title that follows the pointer.
On that basis, there appears to be a problem in the canvas's interaction between these points and tooltips created by "hyperlink point". If you do as follows:
- Have a canvas
- Click to mark one or more points
- Move over a hyperlink point
- Wait for the tooltip to appear
- The marked points are still there
- Move off the hyperlink point
Then the marked points disappear along with the tooltip. I would expect this not to happen; it seems potentially disruptive to workflow that we can't check the tooltip of some point without then losing our marked points unexpectedly.
Instead, I would think that the marked points should stick around, until we click the mouse with the alternate button, which is how to clear them normally. I don't see why tooltips should interact at all.
Thanks!
Diff:
You said you are new to gnuplot so you probably have not compared the behaviour of all the various interactive terminals. Mousing necessarily works a little differently on x11/wxt/qt/windows/svg/canvas/... because the various platforms or language specs provide different capabilities. With regard to the canvas terminal (and svg for that matter) it is further complicated by the separation in time and context between creating the plot by running code in gnuplot and viewing the plot afterwards by using a web browser or some other independent program. While gnuplot can directly control what appears on the screen during, say, x11 or qt sessions, that is obviously not possible when you are viewing files after the fact in a separate program.
So anyhow, plot elements that gnuplot writes into output plot file (foo.html or foo.js or foo.svg) are permanent. Mouse interaction does not change the content of the file, although you can toggle certain things on/off. The display of hypertext as a tooltip is an example of toggling on/off something that is already in the file. One the other hand the echo-back of current mouse coordinates is obviously not something that is stored in the file. Instead it is a transient display created by javascript code running in the browser. Mouse movement or click triggers a routine that writes the current coordinates on the screen. There is currently no provision in the javascript code for saving a history of these events, so if the screen display is over-written by something else they are just gone. There isn't any way to later redraw a previous set of mouse coordinates.
That gets us the same issue hit by your other bug report. The canvas terminal is in serious need of an update or overhaul. If you find you need some additional mechanism or capability in the canvas terminal, I encourage you to describe what you need precisely enough that it can be added to the wish-list of feature requests.