ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Tooltip & colored areas
Posted by Sergey on Aug-24-2015 20:11
Attachments:
Hi Peter,

How to implement a conclusion tooltip when you hover the mouse over the colored areas (MFC)?
markzone2.jpg

  Re: Tooltip & colored areas
Posted by Peter Kwan on Aug-25-2015 03:03
Hi Sergey,

You can simply create an image map entry for the region. For example:

.... create chart as usual .....
.... after makeChart or displaying the chart, generate the image map as follows ....

// Create the image map entry for the x-zone from 18 to 20
char buffer[8192];
sprintf(buffer, "<area shape='rect' coords='%d,%d,%d,%d' title='abc 123 xyz'>",
c->getXCoor(18), c->getPlotArea()->getTopY(), c->getXCoor(20), c->getPlotArea()-
>getBottomY());

// Use the image map
m_ChartViewer.setImageMap(buffer);

If you also have other image map entries, please append the image maps together before
passing it to the m_ChartViewer.

Hope this can help.

Regards
Peter Kwan

  Re: Tooltip & colored areas
Posted by Sergey on Aug-25-2015 21:12
Thanks Peter, it works wonderfully!