Page 1 of 1

Series format -> Marks ->Margins query.

Posted: Wed Sep 22, 2010 11:31 am
by 9530487
If you are in the TChart editor, and select a line series, followed by "Marks", and then "Margins", you have the option of setting the units to "Percent Font", "Percent Size" or "Pixels".

But in my TeeChartDefines.h file, I only have
// EErrorWidthUnits
const unsigned long ewuPercent = 0;
const unsigned long ewuPixels= 1;

Am I missing one? Shouldn't there be ewuPercentFont, ewuPercentSize and ewuPercentPixels?

Re: Series format -> Marks ->Margins query.

Posted: Thu Sep 23, 2010 2:16 pm
by yeray
Hi Tony,

In TeeChart AX v2010 Beta I can see:

Code: Select all

// EMarginsUnits
const unsigned long maPercentFont = 0;
const unsigned long maPercentSize = 1;
const unsigned long maPixels = 2;

Re: Series format -> Marks ->Margins query.

Posted: Thu Sep 23, 2010 2:22 pm
by 9530487
Are these valid in version 8.0.0.7?

Re: Series format -> Marks ->Margins query.

Posted: Thu Sep 23, 2010 2:48 pm
by yeray
Hi Tony,

No, and neither in TeeChart AX 8.0.0.8. It's new in TeeChart v2010.

Re: Series format -> Marks ->Margins query.

Posted: Thu Sep 23, 2010 2:54 pm
by 9530487
ok, so back to the original question, if you are in the TChart editor, and select a line series, followed by "Marks", and then "Margins", you have the option of setting the units to "Percent Font", "Percent Size" or "Pixels".

How do you set these in code given there are only two options (ewuPercent and ewuPixels)?

Re: Series format -> Marks ->Margins query.

Posted: Mon Sep 27, 2010 10:40 am
by narcis
Hi Tony,

What about using values (0, 1 and 2) instead of constants?

Re: Series format -> Marks ->Margins query.

Posted: Mon Sep 27, 2010 11:39 am
by 9530487
I can use constants easily enough, but that does not answer the question.

The following constants are in TChart 8.
ewuPercent = 0;
ewuPixels= 1;

How do I set the units to "Percent Font" or "Percent Size" when the only option is "Percent"?

Re: Series format -> Marks ->Margins query.

Posted: Wed Sep 29, 2010 9:20 am
by narcis
Hi Tony,

Sorry if my explanation was not clear enough. What I meant is that even constants are not defined you can use their numeric value, for example:

Code: Select all

	m_Chart1.Series(series1).GetMarks().GetMargins().SetUnits(2);
0: Sets margins to PercentFont.
1: Sets margins to PercentSize.
2: Sets margins to Pixels.

Re: Series format -> Marks ->Margins query.

Posted: Wed Sep 29, 2010 9:30 am
by 9530487
0: Sets margins to PercentFont.
1: Sets margins to PercentSize.
2: Sets margins to Pixels.
Do these work in TChart 8? If they do, it means the following is incorrect.

I just want to be sure before I let my customers use it.

// EErrorWidthUnits
const unsigned long ewuPercent = 0;
const unsigned long ewuPixels= 1;

Re: Series format -> Marks ->Margins query.

Posted: Wed Sep 29, 2010 9:51 am
by narcis
Hi Tony,

Yes, it does. I did the tests with v8 here.