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

Message ListMessage List     Post MessagePost Message

  Text rotated 90 degrees and placed at a specific time
Posted by chuck on Jul-16-2020 04:03
Hi Peter,

Can you point me to TEXT examples in VB.Net?

Specifically, I’m looking to place TEXT on an OHLCV Chart rotated 90 degrees and placed at at a specific X/Y Axis location - preferably from a center point of the font string.

I looked at the examples library section but did not see anything with a TEXT subject line.

Thank you for your help.
Chuck

  Re: Text rotated 90 degrees and placed at a specific time
Posted by Peter Kwan on Jul-16-2020 16:18
Hi chuck,

There are many methods to put text on the chart. The details depending on exact where you want to put the text. Some of the methods are:

(a) Use BaseChart.addText. This will add the text at the given (x, y) pixel coordinates with the given alignment. See:

https://www.advsofteng.com/doc/cdnet.htm#BaseChart.addText.htm

The following is one of the examples using the BaseChart.addText method:

https://www.advsofteng.com/doc/cdnet.htm#splineline.htm

(b) Add a scatter layer to the chart and add labels to the scatter symbols. The scatter symbols can be set to transparent, so basically you are just adding text. With this method, the (x, y) are in data values (as opposed to pixel coordinates). For example, see:

https://www.advsofteng.com/doc/cdnet.htm#scatterlabels.htm

The above example uses the TextBox.setAlignment method to configure the labels to be on the right side of the symbol. You can use other alignments, such as Chart.Center. The TextBox.setFontAngle can be used to configure the font angles.

(c) If you want to add text on the axis, you can use Axis.addMark. For example:

https://www.advsofteng.com/doc/cdnet.htm#markzone.htm

Like (b), you can use TextBox.setFontAngle to configure the rotation angle.

Regards
Peter Kwan