Page 1 of 1

Legend not displayed!

Posted: Fri May 12, 2006 11:21 am
by 9640127
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...

Posted: Fri May 12, 2006 12:55 pm
by narcis
Hi POP,

Yes, you can force it using:

Code: Select all

      tChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series;

Posted: Sat May 13, 2006 4:25 am
by 9640127
Hey thanks for the reply...it worked...

Regards,
POP.