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

Message ListMessage List     Post MessagePost Message

  Hotspot ID
Posted by Helmut on Dec-26-2017 02:07
Hello,

VB6 / frmZoomScrollDemo

I need the direct record ID at the hotspot.
How do I get the best of it?

Thanks for your help.

Greetings Helmut

  Re: Hotspot ID
Posted by Peter Kwan on Dec-27-2017 01:17
Hi Helmut,

By "record ID", do you mean the array index? In the ClickHotSpot event, you can obtain the x data value. You can then do a binarySearch to obtain the array index. It is like:

'Get the x data value
Dim xValue As Date
xValue = cd.NTime(hotSpot("x"))

'Get the array index
Dim index As Long
index = binarySearch(timeStamps, xValue)

In frmZoomScrollDemo code uses binarySearch itself to determine the startIndex and endIndex. (See the code in "drawChart".)

Regards
Peter Kwan