Navigator zooms in too much in RadHtmlChart Candlestick

Thread is closed for posting
4 posts, 0 answers
  1. Jan
    Jan avatar
    3 posts
    Member since:
    Jun 2014

    Posted 18 Jun 2014 Link to this post

    Hello

    I have a candlestick chart with daily data. When I use the mouse to zoom in, the chart expands showing HH:mm format in the x-axis. I need to restrict zoom-in to  the daily level, without showing hours/minutes, even if that means displaying only 1 bar on the chart. How do i implement such a restriction? Thanks.

    JB
  2. Jan
    Jan avatar
    3 posts
    Member since:
    Jun 2014

    Posted 18 Jun 2014 in reply to Jan Link to this post

    Found the solution:

    candleChart.PlotArea.XAxis.BaseUnit = DateTimeBaseUnit.Days;
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jan
    Jan avatar
    3 posts
    Member since:
    Jun 2014

    Posted 19 Jun 2014 Link to this post

    I still need some help with this issue. I need to set the minimum zoom-in level to days, and the solution I described in previous post solved that. Unfortunately, the solution created another problem. Now when I zoom out the chart doesn't aggregate the data points by months or years. Since the chart stays at the Day level, it displays one big cloud of numbers, which are impossible to read. 

    How can I restrict the zoom-in level to Day, but maintain the aggregation by month/year when zooming-out?

    Thanks
  5. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 20 Jun 2014 Link to this post

    Hello JB,

    I have already replied to the same question asked by you in a support ticket, so I paste my answer here in order for the rest of the forum members to benefit of it:

    I am sorry to say that currently it is not possible to achieve the desired behavior with the control. I have logged, however, an idea about implementing the autoBaseUnitSteps property here, which would allow you to do that.

    Generally the RadHtmlChart is an ASP.NET wrapper of the KendoUI's chart widget, so if you succeed at building the chart on the client, you can utilize KendoUI's API as follows in order to achieve the desired behavior from the stock chart:

    categoryAxis: {
        baseUnitStep: "auto",
        autoBaseUnitSteps: {
            hours: [0],
            minutes: [0],
        }

     

    You may also find useful the KendoUI online demos.


    Regards,
    Danail Vasilev
    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.

     
Back to Top