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

RadHtmlChart and client-side editing

1 Answer 133 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
diego
Top achievements
Rank 1
diego asked on 27 Jan 2014, 04:27 PM
Hello
I have the necessity to build a .NET page to display charts.
Data are taken from a SQL server db via a service; I was trying different libraries, based upon JQuery framework
One is amcharts, with which I built this page (clicking on a red dot calls the service)
But I noticed the Chart (HTML5) component and it could be the definitive choice (this is the sample I created)
The problem is that, while with AmCharts I may set everything on client side (the title of the charts, the grid aspect, max/min values and so on), right now it seems I can't do the same with that component. The API documentation of the client-side methods, events and properties is not very clear.
Are there ways to make the SiteFinity Chart the most similar to the AmCharts one? Or it is still a work in progress?
Thanks in advance
Diego

1 Answer, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 30 Jan 2014, 06:37 AM
Hello Diego,

RadHtmlChart is actually an ASP.NET wrapper of Kendo UI chart. This means that you can take advantage of some server-side features (such as databinding to a SQLDataSource, etc.) out of the box, but you can also use all of the client-side functionality of Kendo chart.

You can set any of the chart properties from the above link by using the _chartObject.options in RadHtmlChart like this:
<script type="text/javascript">
    function pageLoad() {
        //get the chart
        var chart = $find("<%= Chart.ClientID %>");
        //set any client-side configuration from _chartObject.options
        chart._chartObject.options.title.text = "Some title text";
        //repaint the chart to apply the changes
        chart.repaint();
    }
</script>
The above example changes the text of the chart title.

I am also attaching a sample page where you can test other client-side properties using the Kendo documentation.

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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (HTML5)
Asked by
diego
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Share this question
or