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

Message ListMessage List     Post MessagePost Message

  How to display text labels in FinanceChart (python)?
Posted by pychart Fan on Sep-03-2015 21:22
Hello.

How can I display text labels in a CandleStick chart with FinanceChart as
in the ScatterLayers?

In the "scatterlabels.py" both the symbols and the text boxes are shown
but using the same codes from the scatterlabels.py in the Financechart example,
only the symbols are correctly shown but not the text box.

How can I display the text box with datas from the label array also in the FinanceChart?

Thank you.

  Re: How to display text labels in FinanceChart (python)?
Posted by pychart Fan on Sep-04-2015 14:22
hmm.. got a clue..

from
.addExtraField( label )

the label is a big 1D string array list.
only datas to be shown were set as "data data data"
where not needed index had just blank "".

with label format as "{field0}".. the datas with a textbox
were shown only when filled the whole array list with strings
instead
blank like "".

But.. in the scatterlabel.py example.. the datas were correctly
shown
even with having datas like "" and "some string"...

Are there any difference or necessary additional settings?

Thank you.

  Re: How to display text labels in FinanceChart (python)?
Posted by Peter Kwan on Sep-05-2015 01:12
Hi pychart Fan,

For your case, you may add a scatter layer to specify the point where you want to put the
labels. The y-coordinates of the scatter layer should be an array of the same length as your
timeStamps array, but contain the coordinates of the labels. For example, if you want the
label to be at the "high price", then use the high price as the coordinate. If there is no label
in a particular trading session, uses NoValue as the coordinates. The scatter symbols can
be configured to be Transparent so it would not be visible. Then you can use the
addExtraField and setDataLabelFormat method to associate the labels to the scatter layer.

There is an example in ChartDirector 6.0 that demonstrates custom symbols in a financial
chart, in which the symbols are added using scatter layers:

http://www.advsofteng.com/doc/cdpython.htm#financesymbols.htm

For your case, you may set the symbols to transparent and associate the labels to the
transparent symbols.

Hope this can help.

Regards
Peter Kwan

  Re: How to display text labels in FinanceChart (python)?
Posted by pychart Fan on Sep-06-2015 19:38
Thanks a lot.

Will try as adviced.

BR.
Thank you.