Moving marks

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Janne
Newbie
Newbie
Posts: 24
Joined: Mon Oct 08, 2007 12:00 am

Moving marks

Post by Janne » Mon Dec 01, 2008 4:10 pm

Hi,

I am trying to move marks in a serie created in runtime but I can not get it to work. Please find code below.

Code: Select all

        private void Form1_Load(object sender, System.EventArgs e)
        {
            Steema.TeeChart.Styles.Points pie1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
            tChart1.Aspect.View3D = false;
            pie1.FillSampleValues(20);
            Bitmap b = tChart1.Bitmap;
            Steema.TeeChart.Styles.SeriesMarks.Position mp3 = pie1.Marks.Positions[3];
            mp3.Custom = true;
            mp3.ArrowTo.X = mp3.ArrowTo.X - 50;
            mp3.LeftTop.X = mp3.LeftTop.X - 50;
            pie1.Marks.Positions[5].Custom = true;
            pie1.Marks.Positions[5].ArrowTo.Y = pie1.Marks.Positions[5].ArrowTo.Y + 50;
            pie1.Marks.Positions[5].LeftTop.Y = pie1.Marks.Positions[5].LeftTop.Y + 50;
            tChart1.Refresh();
        }
Please help!

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 Dec 01, 2008 4:25 pm

Hi Janne,

Most likely the problem is that you need to set series' marks to visible before:

Code: Select all

			Steema.TeeChart.Styles.Points pie1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
			tChart1.Aspect.View3D = false;
			pie1.FillSampleValues(20);
			pie1.Marks.Visible = true;
			tChart1.Draw();
			Steema.TeeChart.Styles.SeriesMarks.Position mp3 = pie1.Marks.Positions[3];
			mp3.Custom = true;
			mp3.ArrowTo.X = mp3.ArrowTo.X - 50;
			mp3.LeftTop.X = mp3.LeftTop.X - 50;
			pie1.Marks.Positions[5].Custom = true;
			pie1.Marks.Positions[5].ArrowTo.Y = pie1.Marks.Positions[5].ArrowTo.Y + 50;
			pie1.Marks.Positions[5].LeftTop.Y = pie1.Marks.Positions[5].LeftTop.Y + 50;
			tChart1.Refresh(); 
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