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

Message ListMessage List     Post MessagePost Message

  Adding multiple marks with ImageMap
Posted by Thomas Cortsen on Jul-11-2012 20:23
Attachments:
How do i get the coordinates from more then 1 mark ?

This code don't get the coordinates !
    For id=0 to antalrows-1
        Set mark = c.xAxis2().addMark(DataSerie3nr(id), &H900066FF, DataSerie3txt(id), "arialbd.ttf")
        EventMark(IdMark) = mark.getImageCoor()
        IdMark = IdMark+1
      End If
    Next

I want to show some info where special events occurred.
I can only get coordinates after the "c.makeSession" code,  and then it is only the last coordinate.

Please help
Thanks
Marks.png

  Re: Adding multiple marks with ImageMap
Posted by Peter Kwan on Jul-12-2012 05:09
Hi Thomas,

As you have already known, the coordinates can only be obtained after the chart is drawn. Before the chart is drawn, the coordinates are not fixed (you can keep adding more data, and the axis scale will change to reflect your data), so you cannot get the coordinates.

Would you mind to clarify how you get the coordinates after makeSession? It should be similar to your current code, except that you store the mark instead of the  mark coordinates:

Set mark = c.xAxis2().addMark(DataSerie3nr(id), &H900066FF, DataSerie3txt(id), "arialbd.ttf")
Set EventMark(IdMark) = mark
IdMark = IdMark + 1

Then after makeSession, you can use a for loop to get the coordinates as EventMark(IdMark).getImageCoor().

Hope this can help.

Regards
Peter Kwan

  Re: Adding multiple marks with ImageMap
Posted by Thomas Cortsen on Jul-19-2012 14:00
Hi Peter

Thank you.
It was the method for getting coordinates for more than one mark i needed.
Your example clarified that.

Set EventMark(IdMark) = mark
EventMark(IdMark).getImageCoor()

Regards
Thomas