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

Message ListMessage List     Post MessagePost Message

  No heading with addLineLayer
Posted by AC on Dec-12-2020 22:16
Hi Peter,

I am using VB.net from VS 2015 Community Edition. As the subject goes, I am unable to show the heading using addLineLayer.

I am using CandleStickLayer to plot the chart. Along with this main chart, I will be plotting some other values on second Y Axis. Below is the code -


Dim lineLayer1 As LineLayer = c.addLineLayer(lp, &HFF00FF, "Long")
lineLayer1.setUseYAxis2()

Dim lineLayer2 As LineLayer = c.addLineLayer(sp, &HFF00FF, "Short")
lineLayer2.setUseYAxis2()

FYI, my project is not using DWrite.dll



Regards
AC

  Re: No heading with addLineLayer
Posted by Peter Kwan on Dec-14-2020 18:14
Hi AC,

ChartDirector is self contained and does not need DWrite.dll. So the lack of DWrite.dll will not affect ChartDirector.

From your description, I assume you are using the XYChart directly (as opposed to a FinanceChart). By "heading", I assume you are referring the legend keys. (So the lines are visible, but there is no text to label those lines.)

To show the legend keys, your code needs to specify the position to show the keys and how the key should be layout. Some examples are:

- Legend key shows on top, left aligned
https://www.advsofteng.com/doc/cdnet.htm#multiline2.htm

- Legend keys at the bottom center aligned
https://www.advsofteng.com/doc/cdnet.htm#multisymbolline.htm

- Legend keys at the right line by line
https://www.advsofteng.com/doc/cdnet.htm#percentarea.htm

- Legend keys at the bottom table layout
https://www.advsofteng.com/doc/cdnet.htm#multistackbar.htm

You may refer to the code above to see how to position the LegendBox in various ways. The key is the line that calls "c.addLegend(.....)".

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

Regards
Peter Kwan

  Re: No heading with addLineLayer
Posted by AC on Dec-16-2020 20:19
Hi Peter

Thanks a lot. :)


Regards
AC