Reference > Structures > HotspotInfo Struct

HotspotInfo Struct

This structure is used to pass details of chart hotspots between various utilities in the PageMap class. It is likely that a programmer will find it very helpful when debugging a Gui application to have the contents written to the console to check that the mouse really did hit the expected series item.

For advanced applications (for example graphical editing by dragging markers or bars) it holds the detail necessary for developing an appropriate Gui front end. For simple applications, it will identify which item in the data series the user clicked on, which could be used to drill to appropriate detail, or simply highlight the point.

public struct HotspotInfo

Example

  pm = sp.RenderPageMap();
  int hix = pm.FindHotspot(200,120);
  HotspotInfo hi = pm.GetHotspotInfo(hix);
  System.Console.WriteLine(hi.ToString());

Chart=Bar1, Series=Hats, Item=2, Shape=Bar, Locator=186.9 52 216 193.2 0

HotspotInfo Properties (all Readonly)

Chart
Name of chart (set by SetChartName or auto-generated) as a string
Series
Name of series (set by SetSeriesNames or auto-generated) as a string
Item
Index of selected data item (1-origin) in the series
Locator
Array of numbers (depending on item shape) which define it on the page
Shape
Enumeration giving the item shape – typically 1=point, 2=rectangle, 3=wedge or zero if no hotspot detected

For a point-marker, the Locator gives 6 numbers – the (x,y) location of the marker and of its immediate neighbours (or of itself again if it is the first or last of the set). For a rectangle it gives the bounding box as (x,y,x,y) lower-left, top-right. For a pie-wedge it gives (x,y,radius,startangle,endangle) where the angles measure in degrees anticlockwise from the 3:00 line.

All text-based hotspots (headings, axis-labels) are type=2 and have a bounding rectangle, so the user can click anywhere in the region containing the text.

See also ...

HotspotType Enumeration | PageMap Class – Introduction


Send comments on this topic
© Dyalog Ltd 2013