Legend not displayed!

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
POP
Newbie
Newbie
Posts: 8
Joined: Tue Jan 31, 2006 12:00 am

Legend not displayed!

Post by POP » Fri May 12, 2006 11:21 am

hi,
I'm dynamically generating graphs and binding the x-axis ,y-axis and title values to the values present inside a dataset.But if there is just one row in the datatable the legend displays the default settings(x-axis,y-axis value).

for(i=0;i<dt.Rows.Count;i++)
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(Chart1);
line1.YValues.DataMember = dt.Columns[6].ToString();
line1.LabelMember = dt.Columns[5].ToString();
line1.Title = dt.Rows["Name"].ToString();
line1.DataSource = dt;
}

If the number of rows in the datatable is more than one, then the title is displayed correctly.
Is there a solution to this...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri May 12, 2006 12:55 pm

Hi POP,

Yes, you can force it using:

Code: Select all

      tChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series;
Best Regards,
Narcís Calvet / 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

POP
Newbie
Newbie
Posts: 8
Joined: Tue Jan 31, 2006 12:00 am

Post by POP » Sat May 13, 2006 4:25 am

Hey thanks for the reply...it worked...

Regards,
POP.

Post Reply