Graphics Reference
In-Depth Information
Figure
.
.
Tooltip example
function causes the tooltip to disappear (the
visibility
property of the
style
attribute of the tooltip is set to
hidden
).
he
ZoomControl
function is called from the
onzoom
attribute of the
<svg>
element; this function executes when zooming is required in the SVG viewer. he
script-revising
scale
property (which depends on the degree of zoom) of the
transform
attribute of the tooltip is specified, so that the tooltip is not magnified
excessively when zooming is requested.
Switching Layer
Displaying related information on statistical graphs and maps is an effective means
to perform visual analysis. However, this approach may actually be disadvantageous
at times, since there may be too much information displayed at any one time. here-
fore, functions that control whether information is displayed or not are necessary in
visual analysis. Such a function can easily be realized in SVG using JavaScript. Ob-
jects that may or may not be displayed are first gathered into one
<g>
element, and
the
visibility
property is set in the
style
attribute. Code to set whether the
itemisvisibleorhiddenisprovidedinascriptcalledfromanevent.