error while trying to change min/max vertical axis on Candlestick Series

5 posts, 0 answers
  1. Dan
    Dan avatar
    8 posts
    Member since:
    Apr 2012

    Posted 18 Jul 2012 Link to this post

    I only get this some times (making it more annoying), but it seems like a bug in the OhlcSeriesRoundLayoutContext.SnapPointToGrid functionality. I need to be able to change the min/max of the vertical axis. Is there any way to turn off the snapping behaviour so it doesn't try to do it and thus doesn't break? Or is this something else doing it? I need to get this working rather soon. 


    exception attached:

    System.ArgumentOutOfRangeException was unhandled
      Message=Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
      Source=mscorlib
      ParamName=index
      StackTrace:
           at System.ThrowHelper.ThrowArgumentOutOfRangeException()
           at System.Collections.Generic.List`1.get_Item(Int32 index)
           at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
           at Telerik.Charting.OhlcSeriesRoundLayoutContext.SnapToLowGridLine(OhlcDataPoint point)
           at Telerik.Charting.OhlcSeriesRoundLayoutContext.SnapPointToGrid(OhlcDataPoint point)
           at Telerik.Charting.OhlcSeriesModel.ApplyLayoutRounding()
           at Telerik.Charting.CartesianChartAreaModel.ApplyLayoutRounding()
           at Telerik.Charting.ChartAreaModelWithAxes.ArrangeOverride(RadRect rect)
           at Telerik.Charting.ChartNode.Arrange(RadRect rect, Boolean shouldRoundLayout)
           at Telerik.Charting.ChartAreaModel.Arrange()
           at Telerik.Windows.Controls.ChartView.RadChartBase.UpdateChartArea()
           at Telerik.Windows.Controls.ChartView.RadChartBase.CallUpdateUI()
           at Telerik.Windows.Controls.ChartView.RadChartBase.OnInvalidated()
           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)
           at System.Windows.Threading.DispatcherOperation.InvokeImpl()
           at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
           at System.Threading.ExecutionContext.runTryCode(Object userData)
           at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
           at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Windows.Threading.DispatcherOperation.Invoke()
           at System.Windows.Threading.Dispatcher.ProcessQueue()
           at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
           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)
           at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
           at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
           at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
           at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
           at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
           at System.Windows.Application.RunDispatcher(Object ignore)
           at System.Windows.Application.RunInternal(Window window)
           at System.Windows.Application.Run(Window window)
           at System.Windows.Application.Run()
           at MyApplication.App.Main() in D:\Work\MyApplication\MyApplication
    \obj\x86\Debug\App.g.cs:line 0
      InnerException: 

  2. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 19 Jul 2012 Link to this post

    Hi Dan,

    Could you, please, elaborate a bit more on your specific scenario, as we've been unable to reproduce this issue in our local tests, so perhaps we are missing some of the details. Do you set Min and Max values for the axis initially and then update them on a button click or a similar action? Please, find attached a sample test application, which we've prepared to test this scenario. It would be very helpful for us if you're able to have a look at it and modify it if needed so that the issue is reproducible, then send it back to us to debug.

    Any additional information on your scenario, chart settings and how you update the axis values would also be greatly appreciated.

    Regards,
    Nikolay
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Dan
    Dan avatar
    8 posts
    Member since:
    Apr 2012

    Posted 19 Jul 2012 Link to this post

    I recreated the scenario in your code. First thing I discovered is that it's apparently data, dependent, this break. I found some randomly generated data that does break it though and saved the data to a text file. Breaks every time. I use a datetimecategoricalaxis, and PanZoom behaviour. What my actual project does is dynamically change the y axis min/max depending on what data is in the screen to fill most of the screen whatever is being shown. This is not necessary to break it. I wired the panOffset so that whenever it changes, the y minmax changes with it and that makes it break in my dummy project. As for attaching it.. How? This only lets me attach pictures.
  5. Dan
    Dan avatar
    8 posts
    Member since:
    Apr 2012

    Posted 19 Jul 2012 Link to this post

    Sent the zip file with my modifications back. Support ticket #567289
  6. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 24 Jul 2012 Link to this post

    Hi Dan,

     Since you've been already answered in the support thread started by you on the same topic, I'm copying the answer here for anyone else that may happen upon this forum thread:

    "We have been able to reproduce the issue on our side and it has been logged for our developers to investigate and provide a fix for one of the upcoming LIB releases."

    Kind regards,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready