[R-SIG-Finance] SVG device with tooltips

Armstrong, Whit whit.armstrong at hcmny.com
Thu Feb 15 23:40:38 CET 2007


cool. thanks. 

will check it out.

> -----Original Message-----
> From: Tony Plate [mailto:tplate at acm.org] 
> Sent: Thursday, February 15, 2007 5:33 PM
> To: R-sig-finance
> Cc: Armstrong, Whit; Dirk Eddelbuettel; Tony Plate
> Subject: SVG device with tooltips
> 
> I put experimental SVG device package, which includes the 
> ability to have popup tooltips, at
> 
> http://www.cybermesa.com/~champagne/RSVGwTips/RSVGwTipsDevice_
> 0.6.1.tar.gz
> (source)
> http://www.cybermesa.com/~champagne/RSVGwTips/RSVGwTipsDevice_
> 0.6.1.zip
> (windows binary package)
> 
> Examples of the plots produced are at:
> 
> http://www.cybermesa.com/~champagne/RSVGwTips/svgplot1.svg
> http://www.cybermesa.com/~champagne/RSVGwTips/svgplot2.svg
> http://www.cybermesa.com/~champagne/RSVGwTips/svgplot3.svg
> 
> (These are the first 3 examples produced by the code in the 
> help file -- I've just put them here so that people can see 
> the SVG output without having to get, compile and install the 
> package.)
> 
> This SVG device is called RSVGwTipsDevice, and is based on 
> the RSvgDevice package written by T Jake Luciani 
> <jakeluciani at yahoo.com> (who did express mild interest in 
> these modifications, but didn't have time to look at them or 
> comment on them.)
> 
> Limitations/features are:
> 
> * standard graphics primitives are used (points(), rect(), 
> etc), and the
>   same code should work with any device (for other devices, 
> the calls that specify tooltips should have no effect.)
> * tooltips are attached to shapes: e.g., the output of 
> points(), rect(), and polygon(), but not lines()
> * the tooltip is specified in a separate call to the drawing function
> * only the first shape produced by an R drawing function will 
> have a tooltip (so, if you want each point to have a tooltip, 
> each must be drawn separately)
> * the tooltips that have a title + 2 lines of text probably 
> use non-standard SVG code -- I wrote the SVG code by trial 
> and error and it's probably not correct.  These tooltips 
> display fine in Firefox, but the Batik standalone SVG viewer 
> doesn't like them.
> 
> One possible approach to get around the limitation that 
> vectorized calls to points() (etc) only have a tooltip on the 
> first point is to allow specifying in advance a vector of 
> tooltip text.  However, the whole approach of having to 
> supply the tooltip text in advance is not very nice -- though 
> it was the only way I could think of making the standard 
> graphics primitives work with tooltips (because the standard 
> graphics primitives don't allow optional extra arguments).
> 
> If you try this out, please bear in mind that this really is 
> experimental code.  Comments/suggestions/contributions are 
> welcome (especially from SVG experts!)
> 
> It's probably reasonably easy to add other dynamic graphics 
> features such as zooming and x/y location readout.  I just 
> haven't tried, but if anyone is inspired and comes up with 
> something, I'm happy to try to integrate it!
> 
> -- Tony Plate
> 




This e-mail message is intended only for the named recipient(s) above. It may contain confidential information. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and delete the message and any attachment(s) from your system. Thank you.



More information about the R-SIG-Finance mailing list