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

Exception RadChart during render

1 Answer 27 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Leticia
Top achievements
Rank 1
Leticia asked on 25 Apr 2016, 08:23 PM

Hi Team!

I'm having the following Exception throwed sometimes (I can't reproduce consistently).

Is there anything I can do to avoid it? Is this a known bug?

System.InvalidOperationException: Unable to return a TimeSpan property value for a Duration value of 'Automatic'. Check the HasTimeSpan property before requesting the TimeSpan property value from a Duration.
   at System.Windows.Duration.get_TimeSpan()
   at Telerik.Windows.Controls.Charting.BaseChartItem2D.ConfigureLinearLabelAnimation(Storyboard storyboard)
   at Telerik.Windows.Controls.Charting.BaseChartItem2D.ConfigureLabelAnimation(Boolean shouldApplyAnimation)
   at Telerik.Windows.Controls.Charting.BaseChartItem2D.ShowLabel(Boolean shouldApplyAnimation)
   at Telerik.Windows.Controls.Charting.BaseChartItem2D.OnApplyTemplate()
   at Telerik.Windows.Controls.Charting.BasePointMarkChartItem.OnApplyTemplate()
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.Charting.LinearSeriesPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.Charting.ChartPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Thanks a lot!

Best regards,

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 27 Apr 2016, 08:12 AM
Hello Leticia,

We have not seen such an exception so far. I investigated this and the only time that this can happen is if the Storyboard or the Transform of the series is for some reason missing. I am not sure how this can happen and without a sample project I cannot reproduce it. If you keep experiencing issues with this, you can create a small project and sent it to us. Note that we do not need the actual application, we need a small project that reproduces the exception, so we can look into the chart's set up.

For new development we suggest you do not use the old RadChart. We suggest you use the new RadChartView. Even though the animations are not a built-in feature for the new chartview, we have prepared a straight-forward approach to get animations via a utility class. See exaples in our qsf and sdk. Look for the ChartAnimationUtilities class. The new chartview is much more powerful than the old control, it is very easy to set up, it is flexible and its performance is extremely good. We strongly suggest you use the new component for new development.

Regards,
Petar Marchev
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Chart
Asked by
Leticia
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or