Marks for Point series doesn't work properly

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
fano
Newbie
Newbie
Posts: 56
Joined: Wed Jun 22, 2005 4:00 am
Location: USA, California

Marks for Point series doesn't work properly

Post by fano » Fri Feb 24, 2006 5:20 pm

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

fano
Newbie
Newbie
Posts: 56
Joined: Wed Jun 22, 2005 4:00 am
Location: USA, California

Found the cause - need workaround please

Post by fano » Fri Feb 24, 2006 6:29 pm

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

fano
Newbie
Newbie
Posts: 56
Joined: Wed Jun 22, 2005 4:00 am
Location: USA, California

one possible solution....

Post by fano » Fri Feb 24, 2006 6:40 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 27, 2006 9:00 am

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());
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply