Legend series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Solutions Gallery BV
Newbie
Newbie
Posts: 25
Joined: Thu Dec 27, 2007 12:00 am

Legend series

Post by Solutions Gallery BV » Wed Jul 28, 2010 11:21 am

i want make in my graph series in legend not to 3 line relativly ,i want 2 line in legend like picture with indicated 3.is it possible?Also are they possible that is shown in picture with number1,2,3.if they are possible,how can i make.
Thanks
Adjustments Activity graph.png
Adjustments Activity graph.png (147.95 KiB) Viewed 3911 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Legend series

Post by Sandra » Thu Jul 29, 2010 11:54 am

Hello Solutions Gallery BV,

Could you please explain exactly what are you do with next points, because we can try to help you?

1.- Heat cycle days (= nr of days between 2 heat peaks)

2.- Heat probability.


On the other hand, I made a simple code that I think you can use to achieve sort legend items and do that your legend have two rows, using property of series Exchange and properties of legend MaxNumRows and TextSymbolGap as you can see in next code:

Code: Select all

 private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            for (int i = 0; i < 10; i++)
            {
                if (i < 5)
                {
                    new Steema.TeeChart.Styles.Line(tChart1.Chart);
                    tChart1[i].FillSampleValues();

                }
                else
                {
                    new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
                    tChart1[i].FillSampleValues();
                }

            }
            Steema.TeeChart.Legend legend1 = new Steema.TeeChart.Legend(tChart1.Chart);
            tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
            tChart1.Legend.MaxNumRows = 2;
            tChart1.Legend.TextSymbolGap = 0;
            int k,j;
            k=0;
            j= tChart1.Series.Count/2;
            while (k < tChart1.Series.Count && j< tChart1.Series.Count)
            {
                    tChart1.Series.Exchange(j,k);
                    j++;
                    k++;
              
            }
        }
Could you please tell us if previous code works fine for you?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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