ASP.NET Chart control - how to make it Smaller or add a scrollbar
- by nCdy
How to make the table column width inside the chart smaller so I can see more values and how to add some scrollbar to see the values that I can't see on right sight .
There is no changes in ASP (just added this element)
here is a method how I drawing this line :
if (dt != null) // dt - my DataTable
{
string seriesName = "Graph";
Chart1.Series.Add(seriesName);
Chart1.Series[seriesName].ChartType = SeriesChartType.Line;
Chart1.Series[seriesName].BorderWidth = 3;
foreach (DataRow row in dt.Rows)
{
string columnName = row[0].ToString();
try
{
double YVal = Convert.ToDouble(row[1]);
Chart1.Series[seriesName].Points.AddXY(columnName, YVal);
}
catch (Exception)
{
Chart1.Series[seriesName].Points.AddXY(columnName, 0);
}
}
}