|
Alternative to Image Map |
Posted by Travis on Aug-28-2016 00:01 |
|
Hi Peter,
I have a web page where I'm showing up to 20 different stock charts. Everything renders great. However, when I allow my users to show dividends and splits I utilize a scatter layer where I insert small images onto the chart representing the dividends and splits. Then I setup the imagemap to facilitate showing a small textbox about the dividend or split (webViewer.ImageMap = c.getHTMLImageMap())
Although all of this is works, the creation of the image map dramatically increases the amount of data sent to the client's browser and makes the page appear very sluggish.
Is there an alternative to the imagemap? Or, is there a way to generate an image map for only the scatter layer's data with the goal of making the imagemap much smaller? When I've examined the imagemaps on the client side, they appear to contain <area> tags for everything on the stock chart, not just the dividends and splits on the scatter layer.
Thanks. |
Re: Alternative to Image Map |
Posted by Peter Kwan on Aug-30-2016 03:38 |
|
Hi Travis,
Yes, you can use Layer.getHTMLImageMap to create an image map for just the scatter layer.
For example, consider the "Finance Chart Custom Symbols" sample code:
http://www.advsofteng.com/doc/cdnet.htm#financesymbols.htm
You can create an image map for the two scatter layers for the buy and sell symbols as follows:
WebChartViewer1.ImageMap = sellLayer.getHTMLImageMap("", "", "title='Sell: {value}'", mainChart.getAbsOffsetX(), mainChart.getAbsOffsetY()) & _
buyLayer.getHTMLImageMap("", "", "title='Buy: {value}'", mainChart.getAbsOffsetX(), mainChart.getAbsOffsetY())
Hope this can help.
Regards
Peter Kwan |
Re: Alternative to Image Map |
Posted by Travis on Aug-31-2016 04:16 |
|
Thanks Peter! |
|