WebGrid Community Server

Welcome to WebGrid Community Server Sign in | Join | Help
in Search

Blank box shows up instead of Chart

Last post 08-06-2008, 1:34 by BGrader. 1 replies.
Sort Posts: Previous Next
  •  08-05-2008, 23:18 709

    Blank box shows up instead of Chart

    I am using WebGrid Chart control and I am not getting the graph when I run the code (in debug mode).
    I am using Visual Studio 2005 on XP Prof. SP3 machine with IE 7.
    Here's the code I am using:

    ArrayList
    tmp = new ArrayList();

    Random random = new Random();

    tmp.Add(new WebGrid.Util.ChartValue("Sample 1", random.Next(1, 100)));

    tmp.Add(new WebGrid.Util.ChartValue("Sample 2", random.Next(1, 100)));

    tmp.Add(new WebGrid.Util.ChartValue("Sample 3", random.Next(1, 100)));

    tmp.Add(new WebGrid.Util.ChartValue("Sample 4", random.Next(1, 100)));

    tmp.Add(new WebGrid.Util.ChartValue("Sample 5", random.Next(1, 100)));

    ccDaysByDept2.AddDataArray(tmp);

    ccDaysByDept2.DataBind();

    Am I doing something wrong? Please Help.

  •  08-06-2008, 1:34 710 in reply to 709

    Re: Blank box shows up instead of Chart

    Never mind folks found my problem!

    I forgot to define the ChartType :)

    ccDaysByDept2.ChartType = WebGrid.Enums.ChartTypes.VerticalBarChart;

     

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems