| ||
Introducing SharpPlot Your First Chart Recent Updates Sample Charts Tutorials General Tutorials Chart Tutorials SharpPlot Class Properties Methods Enumerations Style examples Glossaries Active Charts VectorMath Class DBUtil Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Reference > Structures > HotspotInfo Struct HotspotInfo StructThis 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 Examplepm = 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)
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 |