Page 1 of 1

Legend series

Posted: Wed Jul 28, 2010 11:21 am
by 13047867
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 3949 times

Re: Legend series

Posted: Thu Jul 29, 2010 11:54 am
by 10050769
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,