ASP.NET Chart control - how to make it Smaller or add a scrollbar

Posted by nCdy on Stack Overflow See other posts from Stack Overflow or by nCdy
Published on 2010-06-01T11:00:26Z Indexed on 2010/06/01 11:03 UTC
Read the original article Hit count: 259

Filed under:
|
|
|

alt text

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);
            }
        }
    }

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET