Legend Title

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Legend Title

Post by UserLS » Mon Nov 02, 2009 7:59 pm

My legend is showing series names (which are not very long). I assigned a title to it (which is longer than any of my series names). If I place the legend on the left or right side of the graph, it is displayed fine. But top and bottom options are broken (you can see it, if you'll set borders around legend itself and the title).

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

Re: Legend Title

Post by Yeray » Tue Nov 03, 2009 12:22 pm

Hi UserLS,

I'm trying to reproduce it but I'm afraid I can't. I'm trying to do it with the following code, could you try it?

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            for (int i = 0; i < 5; i++)
            {
                new Steema.TeeChart.Styles.Line(tChart1.Chart);
                tChart1[i].FillSampleValues(25);
            }

            tChart1[0].Title = "my long series title name";
            tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Top;            
            tChart1.Legend.Pen.Width = 2;
            tChart1.Header.Transparent = false;
            tChart1.Header.Pen.Width = 2;
        }
Could you please modify the code to make the problem reproducible? Or could you please explain the exact steps I should follow to reproduce it here?

Thanks in advance.
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

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Re: Legend Title

Post by UserLS » Tue Nov 03, 2009 1:40 pm

Hi, Yeray!

I did not write any code. I just set up a graph using your editor and get the following result:
Legend.jpg
Legend.jpg (21.57 KiB) Viewed 4861 times

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

Re: Legend Title

Post by Yeray » Tue Nov 03, 2009 4:08 pm

Hi UserLS,

Sometimes an image is more clear than a thousand words ;)
I understood now what you mean, I could reproduce it with the following code and I've added it to the wish list to be fixed in future releases (TF02014531).

Code: Select all

            new Steema.TeeChart.Styles.Area(tChart1.Chart);
            tChart1[0].FillSampleValues(25);

            tChart1.Legend.LegendStyle=Steema.TeeChart.LegendStyles.Series;
            tChart1.Legend.Title.Visible = true;
            tChart1.Legend.Title.Text = "My Legend Title";
            tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
Note that we usually ask our customers to send us examples or code snippets because the explanations about what is done at design time can easily end in confusion.
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