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

Pure client side

1 Answer 32 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Henrik asked on 01 Feb 2014, 02:42 PM

I cant seem to figure this out:
I want to use the HTMLchare pure client-sided.

My data looks like this :
var qData = [{"QNum": 1,"Result": 2},{"QNum": 2,"Result": 2},{"QNum": 3,"Result": 3},{"QNum": 4,"Result": 3},{"QNum": 5,"Result": 4},{"QNum": 6,"Result": 1}];

My chart is configured like this :

                <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server"
                    Width="800px" InvokeLoadData="FromCode">
<Appearance Visible="False">

                        <Appearance Visible="False">
<XAxis Step="1" Visible="True" DataLabelsField="QNum" >


<YAxis MaxValue="4" MinValue="0" Visible="True"   >

                            <telerik:ColumnSeries Name="Result" DataFieldY="Result" >
                                        <FillStyle BackgroundColor="#d5a2bb"></FillStyle>
                        <XAxis Visible="True">

And i try to bind it like this:

                    function CheckboxClicked(sender) {
                        var RadHtmlChart1 = $find('<%=RadHtmlChart1.ClientID %>');

                        //Redrawing the chart

Now, when I repaint, it does create 6 labels on the XAxis and naming them according to the QNum column in my data but the values of the columns are not populated according to the "Result" column in my data.

What am I missing?

1 Answer, 1 is accepted

Sort by
Danail Vasilev
Telerik team
answered on 04 Feb 2014, 02:36 PM
Hello Henrik,

Setting the InvokeLoadData property to "FromCode" is required in scenarios where the chart's data source is to be loaded via a callback. Since the data source binding is performed entirely on the client it is not required for this property to be set. You can also find a runnable sample of the provided VS example in the attached archive.

Danail Vasilev
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.
Chart (HTML5)
Asked by
Top achievements
Rank 2
Answers by
Danail Vasilev
Telerik team
Share this question