This is a migrated thread and some comments may be shown as answers.

Navigator zooms in too much in RadHtmlChart Candlestick

3 Answers 148 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 18 Jun 2014, 08:48 PM
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

3 Answers, 1 is accepted

Sort by
0
Jan
Top achievements
Rank 1
answered on 18 Jun 2014, 09:00 PM
Found the solution:

candleChart.PlotArea.XAxis.BaseUnit = DateTimeBaseUnit.Days;
0
Jan
Top achievements
Rank 1
answered on 19 Jun 2014, 04:28 PM
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
0
Danail Vasilev
Telerik team
answered on 20 Jun 2014, 12:53 PM
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.

 
Tags
Chart (Obsolete)
Asked by
Jan
Top achievements
Rank 1
Answers by
Jan
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or