Based on this KB article , I am implementing drill down winchart. I upgraded the sample code to use ver 8.1 CLR 2 and sample works fine but my code, is not working.
Data is not binding to graph and I get following error "Data Not Available. Please call UltraChart.Data.DataBind() after setting valid Data.DataSource"
I am not sure why I am getting this error. Here is my code
this.ultraChartGeneral.ChartType = ChartType.BarChart3D; this.ultraChartGeneral.Legend.Visible = true; // Set DataSource Option 1: this.ultraChartGeneral.DataSource = mChartControlBL.GetChartData(); this.ultraChartGeneral.DataBind();
// Set DataSource Option 2: //this.ultraChartGeneral.Data.DataSource = mChartControlBL.GetChartData();// this.ultraChartGeneral.Data.DataBind();
GetChartData() method returns data table but for some reason, it doesn't bind to graph. What am I missing?
Thanks,
i don't think you're missing anything, and i'm confused why you would get that message if you're sure you're setting the DataSource property to a DataTable and then calling DataBind().
is it possible for you to provide a sample project which reproduces the problem?
After lot of debugging, I solved this problem.
Here is the solution - There is a method "BuildChart" that binds the data to chart and creates the chart. I was calling that method from the constructor instead of Form_Load method. Once I moved that method in Form_Load method, it worked.
Now I have a different problem but I am going to create another thread on it.