| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Class SharpPlot Properties SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Reference SharpLeaf Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpPlot Reference > SharpPlot Methods > RenderImageMap Method SharpPlot.RenderImageMap MethodReturn tags to make an HTML imagemap for completed chart. Examplestring map = sp.RenderImageMap(72); Return ValueThe result of this call is a string containing an HTML client-side imagemap. This is designed to accompany a Bitmap, and is scaled by default to match a 96dpi rendering. This may be written to a webpage to allow hyperlinks and simple JavaScript calls to work with images as well as VML or SVG pages. Note that the Chart Name is used as the reference for the image, so it would be helpful for readability to use a non-default name here. Note also that the order of the area tags is intentionally reversed, so that the items drawn last get precedence in the map. OverloadsExampleA typical imagemap for a 3-sector piechart would look like: <map id=tutor2b> <area shape="poly" coords="216,174, ... ,71" href="http://www.causeway.co.uk" /> <area shape="poly" coords="216,174, ... ,259" href="http://www.grapl.net" /> <area shape="poly" coords="216,174, ... ,93" href="http://www.sharpplot.com" /> </map> Here, polygons are used to approximate the outline of each pie sector. For a scatterplot, circles would be drawn around each point (4 pixel radius) and for barcharts rectangles are used to match the outline of each bar. See also ...SharpPlot Members | SharpPlot.RenderBitmap Method | SharpPlot.SetChartName Method |