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

The problem about RangeSelector

4 Answers 71 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Maxson Junior
Top achievements
Rank 2
Maxson Junior asked on 18 Nov 2013, 03:37 AM
Hello, I am a junior programmar. Recently, I have been requested by using telerik AJAX to plot the html5 chart. Unfortunately, I am facing some kinds of minor problems.

1. Does event handler exist for the range selector?(Attachment: 1.JPG)
For some reasons, I need to keep track with the 'from' and 'to' date of the range selector. I need to put the 'from' and 'to' date to the textbox when the user slides the navigation bar. However, I can't put the rangeselector to the event class. So, it can't be done.
Does HtmlChart include something like http://www.telerik.com/help/winforms/rangeselector-properties-and-events.htmlelector-properties-and-events.html ?

2. Can Appearance of X-axis be changed?(2.JPG)
The another problem is that when the selection range is small, the displayed X-axis only display the time. It makes the users don't know what the date is.

3. HTML5 Chart is slow in IE
I have read many articles that related to HTML5 and IE, and try to add radstylesheet,scriptmanager......html5shiv.js. After doing everything that I know, it is faster but not fast enough. The tooltip only appears if I move the mouse towards the point many times. What else can I do? Can the future package be improved?

I hope you can answer the questions. Thank you.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

4 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 20 Nov 2013, 02:05 PM
Hello Maxson,

The selection events in the RangeSelector are not officially available yet, i.e. there is not OnRangeSelectorSelectionStart event or anything similar. However, you can get information about the selection if you bind to the corresponding "select", "selectSart" and "selectEnd" events on the client-side:
<script>
    $=$telerik.$;
    $(document).ready(function() {
        var chart=$find("<%=  Chart.ClientID %>");
        //set the event-handlers for the events
        chart._chartObject.bind("select",onSelectHandler);
        chart._chartObject.bind("selectStart",onSelectStartHandler);
        chart._chartObject.bind("selectEnd",onSelectEndHandler);
    });
 
    //the event handlers - you can take the values of From and To  from the event
    function onSelectHandler(e) {
        console.log("From: "+e.from+" To: "+e.to);
    }
</script>
I also created a sample page where the selection events are demonstrated, so that you can test them on your own.

Regarding your second question - there are several XAxis configurations which are supported for the Navigator's axis. You can have a look at our help article about it and the general article about Configuring axes. The kind of configuration you mentioned is not currently supported, but we plan to improve the navigation functionality, so we might consider implementing some useful features like this one.

On your third question - in general, the performance of RadHtmlChart is dependent on the number of individual chart elements that will be rendered on the page. There are several ways  speed up the client-side rendering, e.g. hide all labels, disable the chart animation with Transitions="false", hide Minor and MajorGridLines for the axes, etc.

Regards,
Stamo Gochev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Maxson Junior
Top achievements
Rank 2
answered on 11 Jul 2014, 03:52 AM
Hello Stamo Gochev,

Is the second question solved by now on 2014 Q2?? - If the period shorter than 24 hours, the date is not shown
on the graph.

Also, can I change the X axis format from MM/dd to YYYY/MM/dd if the period longer than 24 hours??
Thanks.
0
Danail Vasilev
Telerik team
answered on 15 Jul 2014, 09:48 AM
Hi Maxson,

Since Q1 2014, DateFormats allow you to set a date format for a particular BaseUnit (e.g., Years, Months, Days, etc.) of the X axis. More information is available in this online demo.

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.

 
0
Maxson Junior
Top achievements
Rank 2
answered on 16 Jul 2014, 02:23 AM
Thanks.
Tags
Chart (HTML5)
Asked by
Maxson Junior
Top achievements
Rank 2
Answers by
Stamo Gochev
Telerik team
Maxson Junior
Top achievements
Rank 2
Danail Vasilev
Telerik team
Share this question
or