Page 1 of 1

Setting style of marks to Values

Posted: Wed Sep 05, 2007 5:21 am
by 7665556
Hi,

I want to set the style of the marks displayed in a line chart to show Values. The default seems to be Labels.

I can set them visible using

tChart1.getSeries(0).getMarks().setVisible(true);

How then can I change the style?

Thanks in advance for all replies

Posted: Wed Sep 05, 2007 8:30 am
by narcis
Hi shoey,

The default marks style is automatic but this displays series labels if labels exist.

To set marks displaying values you can use this:

Code: Select all

            tChart.getSeries(0).getMarks().setStyle(MarksStyle.VALUE);

Posted: Thu Sep 06, 2007 7:09 am
by 7665556
Thanks Narcis,

Sorry I wasn't more specific. As with the other problems I am encountering I am trying to do this via JavaScript in a webpage.
Using:

Code: Select all

tChart.getSeries(0).getMarks().setStyle(MarksStyle.VALUE);
will return a JavaScript error:
'MarksStyle' is undefined
Am I doing something wrong or is there another way of doing this?

Posted: Sun Sep 09, 2007 6:13 pm
by Tom
Please provide us with more information (eg sample code) in how you are trying to use the component with JavaScript

Posted: Tue Oct 09, 2007 1:03 pm
by 9338842
You must have imported MarkStyles

import com.steema.teechart.styles.*

now the MarkStyles class is visible.
7665556 wrote:Thanks Narcis,

Sorry I wasn't more specific. As with the other problems I am encountering I am trying to do this via JavaScript in a webpage.
Using:

Code: Select all

tChart.getSeries(0).getMarks().setStyle(MarksStyle.VALUE);
will return a JavaScript error:
'MarksStyle' is undefined
Am I doing something wrong or is there another way of doing this?