Page 1 of 1

Marks for Point series doesn't work properly

Posted: Fri Feb 24, 2006 5:20 pm
by 9637279
Hi,

I added a point series to my two charts on the C# form and when I
use the Editor for the series -> Marks -> Format and check 'Transparent'
the Marks become transparent at design time.
However, once I launch the program, the Marks show up with background and a rectangular box - Always, NO matter what I try to change I cannot make them show up transparent, except in design mode. In design mode I can make the shape round etc but nothing it doesn't carry to the
run time. There it is always a rectangular.

What works are the properties related to the arrow of the marks.
I guess some other setting of the chart or the series interferes with
the settings regarding the shape and the transparency of the Marks.
I found there are often issues with the chart editor - like settings are
not always saved.

Is there any other way I can trick the Marks into showing transparent?

Thanks,
fano

Found the cause - need workaround please

Posted: Fri Feb 24, 2006 6:29 pm
by 9637279
Hi, I found what causes the mis-behavior and hope you can tell
me how to work around that:

If I fill the point series with :
tChart2.Series[1].FillSampleValues(40);
then the marks work and show transprency as set in the Editor.

However, if I fill the point series like this:
int iPoint;
for(int i = 0; i < 30; i++)
{
iPoint = tChart2.Series[1].Add(1.0,1.0);
tChart2.Series[1].Marks.Items[iPoint].Text = i.ToString();
}

Then the Marks show always as rectangulars.
The cause is the 2nd line in the loop:
tChart2.Series[1].Marks.Items[iPoint].Text = i.ToString();
which I need to add custom mark text.

Is there any workaround????
Help is greatly appreciated.

fano

one possible solution....

Posted: Fri Feb 24, 2006 6:40 pm
by 9637279
Hi,

I found one possible solutions:
for(int i = 0; i < 30; i++)
{
iPoint = tChart2.Series[1].Add(1.0,1.0);
tChart2.Series[1].Marks.Items[iPoint].Text = i.ToString();
//This RE-sets the transparency
tChart2.Series[1].Marks.Items[iPoint].Transparant = true;
}

Is there a better/correct way? I would have never(!) expected
that the properties like transparancy are wiped out when one
sets the text of Marks.Items.....

Thanks,
fano

Posted: Mon Feb 27, 2006 9:00 am
by narcis
Hi fano,

I've been able to reproduce what you reported. However, there's an easier way to get what you are trying to achieve. It is using an Add method override that already includes custom mark text:

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{
			for(int i=0; i<10; i++) points1.Add(i,i,"Point "+i.ToString());
		}