points3D show all point info

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply

I want show all info on the points3D1

there only " this.tChart1.Series[0].Marks.Style = MarksStyles.XY",I want it support
0
No votes
like " MarksStyles.XYZ";I do not know how to do.Can you help me?
0
No votes
 
Total votes: 0

Chinfot
Newbie
Newbie
Posts: 9
Joined: Wed Sep 02, 2015 12:00 am

points3D show all point info

Post by Chinfot » Tue Sep 22, 2015 1:43 am

Code: Select all

        /// <summary>
        /// XYZ
        /// </summary>
        public class NumberAxis
        {
            public int X { get; set; }
            public int Y { get; set; }
            public int Z { get; set; }
        }

        private void Form2_Load(object sender, EventArgs e)[attachment=0]QQ截图20150922093643.png[/attachment]
        {
            List<NumberAxis> stemp = new List<NumberAxis>();
            NumberAxis s1 = new NumberAxis() { X = 1, Y = 1, Z = 1 };
            NumberAxis s2 = new NumberAxis() { X = 2, Y = 2, Z = 2 };
            NumberAxis s3 = new NumberAxis() { X = 3, Y = 3, Z = 3 };
            NumberAxis s4 = new NumberAxis() { X = 4, Y = 3, Z = 4 };
            NumberAxis s5 = new NumberAxis() { X = 5, Y = 5, Z = 5 };
            stemp.Add(s1);
            stemp.Add(s2);
            stemp.Add(s3);
            stemp.Add(s4);
            stemp.Add(s5);

            points3D1.DataSource = stemp;
            points3D1.XValues.DataMember = "X";
            points3D1.XValues.DataMember = "Y";
            points3D1.ZValues.DataMember = "Z";
            tChart1.Refresh();
            this.tChart1.Series[0].Marks.Visible = true;
            this.tChart1.Series[0].Marks.Style = MarksStyles.XY;
        }
Attachments
QQ截图20150922093643.png
QQ截图20150922093643.png (41.35 KiB) Viewed 5160 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: points3D show all point info

Post by Christopher » Tue Sep 22, 2015 1:13 pm

Hello,

You should be able to use the GetSeriesMark event, e.g.

Code: Select all

    private void InitializeChart()
    {
      Points3D points3D1 = new Points3D(tChart1.Chart);

      points3D1.FillSampleValues();

      this.tChart1.Series[0].Marks.Visible = true;
      this.tChart1.Series[0].Marks.Style = MarksStyles.XY;

      this.tChart1.Series[0].GetSeriesMark += Form1_GetSeriesMark;

    }

    private void Form1_GetSeriesMark(Series series, GetSeriesMarkEventArgs e)
    {
      e.MarkText += " " + series.ValuesLists[2][e.ValueIndex].ToString(series.ValueFormat);
    }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply