Error Clearing Series

Thread is closed for posting
2 posts, 0 answers
  1. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 11 Oct 2013 Link to this post

    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


    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 -

    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
  2. Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 16 Oct 2013 Link to this post

    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.

    Petar Kirov
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top