Crash when resizing donut chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
BeijerElectronics
Newbie
Newbie
Posts: 30
Joined: Tue Sep 13, 2011 12:00 am

Crash when resizing donut chart

Post by BeijerElectronics » Wed Nov 02, 2011 9:28 am

Resize a donut chart to size so small that the donut disapperars, causes the control to crash

Crash log...
System.ArgumentException: Width must be non-negative.

at System.Windows.Rect.set_Width(Double value)

at Steema.TeeChart.WPF.Styles.Circular.AdjustCircleMarks()

at Steema.TeeChart.WPF.Styles.Circular.ReCalcCircleRect()

at Steema.TeeChart.WPF.Styles.Circular.DoBeforeDrawValues()

at Steema.TeeChart.WPF.Styles.Pie.DoBeforeDrawValues()

at Steema.TeeChart.WPF.Styles.Series.DrawSeries()

at Steema.TeeChart.WPF.Chart.DrawAllSeries(Graphics3D g)

at Steema.TeeChart.WPF.Chart.InternalDraw(DrawingContext g, Boolean noTools)

at Steema.TeeChart.WPF.Chart.InternalDraw(DrawingContext g)

at Steema.TeeChart.WPF.TChart.Draw(DrawingContext g)

at Steema.TeeChart.WPF.TChart.OnRender(DrawingContext drawingContext)

at System.Windows.UIElement.Arrange(Rect finalRect)

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)

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Crash when resizing donut chart

Post by Sandra » Wed Nov 02, 2011 4:29 pm

Hello BeijerElectronics,

Ok. Using last version of TeeChart.Net and next lines of code, I can not reproduce your exception:

Code: Select all

    private void  InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Donut donut1 = new Donut(tChart1.Chart);
            donut1.FillSampleValues();
            tChart1.Dock = DockStyle.Fill;

}
Can you please,tell us if using previous lines of code your problem appears? On the other hand, can you tell us which version of TeeChart.Net are you using now?

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

BeijerElectronics
Newbie
Newbie
Posts: 30
Joined: Tue Sep 13, 2011 12:00 am

Re: Crash when resizing donut chart

Post by BeijerElectronics » Thu Nov 03, 2011 11:08 am

We can reproduce the crash in the latest version with the following slightly different call stack:

System.ArgumentException, {"Width must be non-negative."}

at System.Windows.Rect.set_Width(Double value)
at Steema.TeeChart.WPF.Styles.Circular.AdjustCircleMarks()
at Steema.TeeChart.WPF.Styles.Circular.ReCalcCircleRect()
at Steema.TeeChart.WPF.Styles.Circular.DoBeforeDrawValues()
at Steema.TeeChart.WPF.Styles.Pie.DoBeforeDrawValues()
at Steema.TeeChart.WPF.Styles.Series.DrawSeries()
at Steema.TeeChart.WPF.Chart.DrawAllSeries(Graphics3D g)
at Steema.TeeChart.WPF.Chart.InternalDraw(DrawingContext g, Boolean noTools)
at Steema.TeeChart.WPF.Chart.InternalDraw(DrawingContext g)
at Steema.TeeChart.WPF.TChart.Draw(DrawingContext g)
at Steema.TeeChart.WPF.TChart.OnRender(DrawingContext drawingContext)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Crash when resizing donut chart

Post by Sandra » Fri Nov 04, 2011 3:29 pm

Hello BeijerElectronics,

You are right! Finally I can reproduce your problem and I have added your request in bug list report with number [TW16015817]. We will try to fix it in next maintenance releases of TeeChartWPF.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply