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

Message ListMessage List     Post MessagePost Message

  Label on AddMark
Posted by Eva on Sep-07-2018 17:39
Attachments:
I used code below to mark a line on the chart.
But I found that the text will be weird.
It seems like the text's right side will be cut off.

Call c.xAxis().addMark(2, c.dashLineColor(&H800080, cd.DashLine), "AAA = " & 100).setAlignment(9)
SS.PNG

  Re: Label on AddMark
Posted by Peter Kwan on Sep-08-2018 01:42
Hi Eva,

It is because by default, the text color will be the same as the mark line color. If you use a dash line color for the mark line, the text will be drawn using the dash line color as well. So some part of the text could become missing.

To solve the problem, you may use Mark.setMarkColor to specify different colors for the line and the text. It is like:

Set m = c.xAxis().addMark(2, -1, "AAA = " & 100)
Call m.setMarkColor(c.dashLineColor(&H800080, cd.DashLine), &H000080)
Call m.setAlignment(cd.TopRight)

Hope this can help.

Regards
Peter Kwan