Looking for this chart type?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Matthew Scott
Newbie
Newbie
Posts: 16
Joined: Tue Apr 08, 2003 4:00 am

Looking for this chart type?

Post by Matthew Scott » Thu May 21, 2009 11:27 am

I am using a quite version 1.1.1544.23908 of TChart and C#. I would like to develop a chart as in this link sample ?
https://www.yousendit.com/download/MnFq ... MnVGa1E9PQ

Is there anyway that we can achieve in TChart? Any advice is highly appreciated!



Regards,

LG

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Thu May 21, 2009 11:55 am

Hi Matthew,

I'm afraid that there is no series in TeeChart thought to do a chart like this but maybe we could point to you some tips to obtain an acceptable approximation if we understand it well. So it would be interesting if you could explain us what is the logic these charts follow? For example:

- Do the vertical divisions in the two first series follow a user defined frequency?

- How are the point colors defined for the first series? By 4 on 4?

- What does the yellow selection means on the two first series?

- Do the color bars of the third series follow any specified sequence or they are defined totally by the user?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Matthew Scott
Newbie
Newbie
Posts: 16
Joined: Tue Apr 08, 2003 4:00 am

Post by Matthew Scott » Fri May 22, 2009 1:11 am

Thank you. Sorry that I might have confuse you - the main thing we would like to have is the shape of the series of each point the same as the sample that I posted.


No worry about the vertical series frequency and yellow colour does not do anything at all. What I would like to have and be able to draw a lot of points in the same axes and each point is the same shape as radio button and equal bar the same as in the sample.


The main point is to be able to draw each point shape in the same way of three series sample. Each type of shape represent a series.


Regards,

LG

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Fri May 22, 2009 8:52 am

Hi Matthew,

I've made an example with two Points series and an Horizontal bar and I think that the result is pretty similar to your picture:

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }

        private void InitializeChart()
        {
            chartController1.Chart = tChart1;

            tChart1.Aspect.View3D = false;
            tChart1.Legend.Visible = false;

            Points points1 = new Points(tChart1.Chart);
            Points points2 = new Points(tChart1.Chart);
            HorizBar horizbar1 = new HorizBar(tChart1.Chart);

            points1.Pointer.Style = PointerStyles.Circle;
            points1.Pointer.Pen.Width = 3;
            points1.Pointer.VertSize = 5;
            points1.Pointer.HorizSize = 5;
            points1.Pointer.Pen.Color = Color.LightGray;

            points2.Pointer.Style = PointerStyles.Circle;
            points2.Pointer.Pen.Width = 3;
            points2.Pointer.VertSize = 5;
            points2.Pointer.HorizSize = 5;
            points2.Pointer.Pen.Color = Color.Red;

            horizbar1.MultiBar = MultiBars.SelfStack;
            horizbar1.Marks.Visible = false;
            horizbar1.BarHeightPercent = 5;
            horizbar1.Pen.Color = Color.LightGray;

            for (int i = 0; i < 46; i++)
            {
                if (((i > 8) && (i < 32)) || ((i > 36) && (i < 41)))
                {
                    points1.Add(i+0.5, 4, Color.Red);
                }
                else
                {
                    points1.Add(i+0.5, 4, Color.LimeGreen);
                }

                points2.Add(i+0.5, 3, Color.LightGray);

                if (i < 3)
                {
                    horizbar1.Add(1, 1, Color.Yellow);
                }
                else if (i < 7)
                {
                    horizbar1.Add(1, 1, Color.Orange);
                }
                else if (i < 9)
                {
                    horizbar1.Add(1, 1, Color.LimeGreen);
                }
                else if (i < 19)
                {
                    horizbar1.Add(1, 1, Color.Green);
                }
                else if (i < 21)
                {
                    horizbar1.Add(1, 1, Color.LightSkyBlue);
                }
                else if (i < 25)
                {
                    horizbar1.Add(1, 1, Color.Green);
                }
                else if (i < 37)
                {
                    horizbar1.Add(1, 1, Color.LimeGreen);
                }
                else if (i < 41)
                {
                    horizbar1.Add(1, 1, Color.Yellow);
                }
                else
                {
                    horizbar1.Add(1, 1, Color.LimeGreen);
                }
            }

            tChart1.Axes.Left.SetMinMax(0, 6);
        }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply