Exception zooming in on Histogram series (WPF Version)
Posted: Mon Sep 08, 2008 10:02 am
I'm using the WPF version of TeeChart.
I have set up the chart to display a simple histogram series.
When I click and drag to to zoom in, I get the following exception:
An unhandled exception of type 'System.ArgumentException' occurred in WindowsBase.dll
Additional information: Height must be non-negative.
This is the call stack
> WindowsBase.dll!System.Windows.Rect.Height.set(double value) + 0xea bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Histogram.CalcRectangle(int valueIndex = 0) + 0x346 bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Histogram.DrawValue(int valueIndex = 0) + 0x61 bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Series.Draw() + 0x3f bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Series.DrawSeries() + 0x3a2 bytes
TeeChart.WPF.dll!Steema.TeeChart.Chart.InternalDraw(System.Windows.Media.DrawingContext g = {System.Windows.Media.VisualDrawingContext}, bool noTools = false) + 0x481 bytes
TeeChart.WPF.dll!Steema.TeeChart.Chart.InternalDraw(System.Windows.Media.DrawingContext g = {System.Windows.Media.VisualDrawingContext}) + 0x20 bytes
TeeChart.WPF.dll!Steema.TeeChart.WPF.TChart.Draw(System.Windows.Media.DrawingContext g = {System.Windows.Media.VisualDrawingContext}) + 0x127 bytes
TeeChart.WPF.dll!Steema.TeeChart.WPF.TChart.OnRender(System.Windows.Media.DrawingContext drawingContext = {System.Windows.Media.VisualDrawingContext}) + 0x1e bytes
PresentationCore.dll!System.Windows.UIElement.Arrange(System.Windows.Rect finalRect) + 0x493 bytes
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() + 0x245 bytes
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) + 0x19 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() + 0x10 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() + 0x77 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget = null) + 0x78 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) + 0x2b bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = {System.Object RenderMessageHandler(System.Object)}}, object args = null, bool isSingleParameter = true) + 0x4a bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 0x3f bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x104 bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) + 0x28 bytes
mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x43 bytes
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0xa7 bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x92 bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x48 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x102 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x6a bytes
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = 921628, int msg = 49684, System.IntPtr wParam = 0, System.IntPtr lParam = 0, ref bool handled = false) + 0x87 bytes
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x62 bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = {System.Object DispatcherCallbackOperation(System.Object)}}, object args = {MS.Win32.HwndSubclass.DispatcherOperationCallbackParameter}, bool isSingleParameter = true) + 0x4a bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 0x3f bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, bool isSingleParameter) + 0x14f bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg) + 0x3d bytes
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = 921628, int msg = 49684, System.IntPtr wParam = 0, System.IntPtr lParam = 0) + 0x1e0 bytes
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame = {System.Windows.Threading.DispatcherFrame}) + 0x144 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x83 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x75 bytes
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x78 bytes
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x29 bytes
PresentationFramework.dll!System.Windows.Application.Run() + 0x16 bytes
TeeChartTest.exe!TeeChartTest.App.Main() + 0x4c bytes C#
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) + 0x39 bytes
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x2b bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x3b bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x81 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x40 bytes
I have set up the chart to display a simple histogram series.
When I click and drag to to zoom in, I get the following exception:
An unhandled exception of type 'System.ArgumentException' occurred in WindowsBase.dll
Additional information: Height must be non-negative.
This is the call stack
> WindowsBase.dll!System.Windows.Rect.Height.set(double value) + 0xea bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Histogram.CalcRectangle(int valueIndex = 0) + 0x346 bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Histogram.DrawValue(int valueIndex = 0) + 0x61 bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Series.Draw() + 0x3f bytes
TeeChart.WPF.dll!Steema.TeeChart.Styles.Series.DrawSeries() + 0x3a2 bytes
TeeChart.WPF.dll!Steema.TeeChart.Chart.InternalDraw(System.Windows.Media.DrawingContext g = {System.Windows.Media.VisualDrawingContext}, bool noTools = false) + 0x481 bytes
TeeChart.WPF.dll!Steema.TeeChart.Chart.InternalDraw(System.Windows.Media.DrawingContext g = {System.Windows.Media.VisualDrawingContext}) + 0x20 bytes
TeeChart.WPF.dll!Steema.TeeChart.WPF.TChart.Draw(System.Windows.Media.DrawingContext g = {System.Windows.Media.VisualDrawingContext}) + 0x127 bytes
TeeChart.WPF.dll!Steema.TeeChart.WPF.TChart.OnRender(System.Windows.Media.DrawingContext drawingContext = {System.Windows.Media.VisualDrawingContext}) + 0x1e bytes
PresentationCore.dll!System.Windows.UIElement.Arrange(System.Windows.Rect finalRect) + 0x493 bytes
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() + 0x245 bytes
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) + 0x19 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() + 0x10 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() + 0x77 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget = null) + 0x78 bytes
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) + 0x2b bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = {System.Object RenderMessageHandler(System.Object)}}, object args = null, bool isSingleParameter = true) + 0x4a bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 0x3f bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x104 bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) + 0x28 bytes
mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x43 bytes
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0xa7 bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x92 bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x48 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x102 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x6a bytes
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = 921628, int msg = 49684, System.IntPtr wParam = 0, System.IntPtr lParam = 0, ref bool handled = false) + 0x87 bytes
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x62 bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = {System.Object DispatcherCallbackOperation(System.Object)}}, object args = {MS.Win32.HwndSubclass.DispatcherOperationCallbackParameter}, bool isSingleParameter = true) + 0x4a bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 0x3f bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, bool isSingleParameter) + 0x14f bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg) + 0x3d bytes
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = 921628, int msg = 49684, System.IntPtr wParam = 0, System.IntPtr lParam = 0) + 0x1e0 bytes
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame = {System.Windows.Threading.DispatcherFrame}) + 0x144 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x83 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x75 bytes
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x78 bytes
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x29 bytes
PresentationFramework.dll!System.Windows.Application.Run() + 0x16 bytes
TeeChartTest.exe!TeeChartTest.App.Main() + 0x4c bytes C#
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) + 0x39 bytes
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x2b bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x3b bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x81 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x40 bytes