This is a migrated thread and some comments may be shown as answers.

Error Clearing Series

1 Answer 11 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 11 Oct 2013, 09:40 AM
Hi,
I have a radChart with some filters at the top that resubmit the database query to redraw the chart. Some of the filters produce no results from the database which means the chart stays the same. I thought clearing the series would solve it so I do this

rcBubble.Series.Clear();

But I get an error when there are no results and I try to do this. Can someone please tell me how I reset the chart if there are no results.

It's similair to this problem but this is for WPF -http://www.telerik.com/community/forums/wpf/chart/chart-is-not-reset-when-i-clear-series-and-do-not-add-new.aspx


The error incidentally doesn't occur within the actual radChart code but I see from the stack trace it's something to do with the chart:
[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Charting.RenderedObject.GetOrder() +6
   Telerik.Charting.MapAreaBuilderBase.GetPath(IOrdering element, ArrayList list) +44
   Telerik.Charting.MapAreaBuilderBase.AddImageMap(IOrdering elem, StringBuilder html, Boolean makeTooltipOnly) +239
   Telerik.Charting.MapAreaBuilderBase.GenerateImageMap(IContainer container) +2274
   Telerik.Web.UI.RadChart.RenderClassic(HtmlTextWriter writer) +1133
   Telerik.Web.UI.RadChart.RenderContents(HtmlTextWriter writer) +387
   Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +126
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
   ASP._masterpages_masterpage_master.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in c:\Projects\LogIT\_masterpages\MasterPage.master:27
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +314
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5289

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 16 Oct 2013, 09:12 AM
Hi Karl,

So far we haven't had reports for the problems that you are describing (changes in the DataSource are not reflected and RadChart.Series.Clear() causes exception). Our WPF RadChart uses a completely different charting engine and your issue should not be related to the forum post you are referring to.
In order to help you, it would be best if you could open a formal support ticket and provide a small runable project that reproduces the problem, so we can investigate it on our side.

Thanks for the understanding.

Regards,
Petar Kirov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (Obsolete)
Asked by
Karl
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or