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

Message ListMessage List     Post MessagePost Message

  Click HotSpot and Image Map Support In Finance Charts
Posted by Toni Solarin on Oct-30-2013 20:52
Hello, my experience so far with finance charts are that they are limited in comparison to XY charts. All my attempts to get ClickHotspot event and Image map to work with a finance chart failed and there is no example in the demo application. I would like to know if this functionality is possible with finance charts and how I can go about it.

Thanks in Advance.

  Re: Click HotSpot and Image Map Support In Finance Charts
Posted by Peter Kwan on Oct-31-2013 01:13
Hi Toni,

The image map works on FinanceChart the same way as it works in other ChartDirector chart types. The exact code depends on your progrmaming language and the application type (eg. a desktop and a web application are different in how mouse clicks are handled).

In the ASP/COM/VB, .NET, Java and C++ editions of ChartDirector, the desktop version of the "Interactive Financial Chart" sample code (in (VB6, Windows Forms, Java SWING, MFC, QT) includes hotspots. For example, when you move the mouse over a candlestick, you can see pop up tooltips. This shows that hot spots are available. If you attach a "ClickHotSpot" handler to the "ChartViewer" control (can be called ChartViewer, WinChartViewer, CChartViewer or QChartViewer depending on your programming framework), it will be triggered when the user clicks on a hot spot.

If you need more specific help, please kindly inform me which programming language you are using, and whether you are developing a web or desktop applicaiton.

Regards
Peter Kwan

  Re: Click HotSpot and Image Map Support In Finance Charts
Posted by Toni Solarin on Oct-31-2013 20:41
Attachments:
Hello Peter,

Thanks for the quick response. I followed your suggested solution without success. I am making use of .NET (C Sharp) in desktop development. Please find attached a modified copy of your Interactive Chart sample code with a clickHotspot event attached. The code within the handler still fails to fire when the chart is clicked. The event handler is the last method in the contained file.

Thanks in Advance.
frmfinancedemo.zip
frmfinancedemo.zip

8.13 Kb

  Re: Click HotSpot and Image Map Support In Finance Charts
Posted by Peter Kwan on Nov-01-2013 00:51
Hi

I have just tried your frmfinancedemo.cs, and it works normally in the original NetWinCharts sample project.

Since you have just provided the frmfinancedemo.cs, but not the corresponding Designer.cs file, it would first need to connect winChartViewer1_ClickHotSpot as the ClickHotSpot event handler of the WinChartViewer in the frmFinanceDemo form. After that, I press the RUN button, then open the "Interactive Financial Chart" sample code, then move the mouse over a candlestick, and click on it. A pop up box appeared with the text "KK" in it.

The following is the exact test project. Please try to download it, and open it and run it without any modification. Please press the RUN button, then open the "Interactive Financial Chart" sample code, then move the mouse over a candlestick, and click on it. Does the pop up box appear?

Regards
Peter Kwan

  Re: Click HotSpot and Image Map Support In Finance Charts
Posted by Toni Solarin on Nov-01-2013 18:20
No attachment was included in your reply. But I followed your instructions to the letter, still not working. I am using windows 8.1 Pro x64 (Visual Studio 2013 RC) with the solution targeting .NET framework 2.0, is there a possibility that the challenge could be from my PC ?

  Re: Click HotSpot and Image Map Support In Finance Charts
Posted by Peter Kwan on Nov-02-2013 01:13
Hi Toni,

Sorry. The project is at:

http://www.advsofteng.com/NetWinCharts_ClickableFinanceChart.zip

Please kindly try to download it to see if it works in your case.

Note that with the image map, only the data points are clickable (the lines, bars, etc). An empty space on the chart is not a hot spot and is not clickable. Also, note that the original form is not configured with mouse cursor feedback. So even if the hot spot is clickable, the mouse cursor would not change into a "hand" shape. It will remain as a "pointer" shape, but when the mouse is clicked, it should pop up a message box.

If the downloaded project works, but your own project does not work, is it possible to create a complete sample project like the one I attached, so that I can try it myself?

Regards
Peter Kwan