How to autoscroll candlesticks during live feed?

2 posts, 0 answers
  1. Coder
    Coder avatar
    8 posts
    Member since:
    Jan 2014

    Posted 23 Nov 2014 Link to this post

    Hi,


    I am incrementing my candlestick count during a live feed test. The ChartView is bounded to an ObservableCollection<Candlestick> which is constantly being  refreshed when an updated or brand new candlestick each period.

    The first image (25_candlesticks) is a snapshot of the Chart View  for the first 25 candlesticks displayed.

    The next image (100_candlesticks) shows the Chart View after 100 candlesticks are displayed.

    As you can see, the chart does not auto right scroll to show a preselected number of candlesticks in the current view, but instead, crams all the candlesticks into the same viewing area.

    I do not want this. What is necessary is that I have this instead:

    1) To have my very first candlestick appear on the left of the screen

    2) as more candlesticks are added, the screen remains un-scrolled until about 3 quarters down the view screen.

    3) at about 3/4 from the edge of the view screen, the chart auto-scrolls as new candlesticks are added, while maintaining the current X and Y axis scaling that I initially chose.

    Could you please instruct me on how this can be done?

    I would very much appreciate a WPF C# sample on this as a reference.

    Thanks for any help.
  2. Peshito
    Admin
    Peshito avatar
    496 posts

    Posted 24 Nov 2014 Link to this post

    Hi Coder,

    We received another forum thread from you regarding the same issue. I am pasting the answer here as well.

    "We have an online sample demo showing how the chart can handle real-life scenarios. It is very similar to yours and I suggest you to use it as a reference. The demo is for Silverlight but the approach for WPF is the same. You can also view its source code by downloading the WPF Demos from your account."

    I would suggest to keep the conversation in a single thread so it is easier for both sides to follow.

    Regards,
    Peshito
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top