Pure client side

2 posts, 0 answers
  1. Henrik
    Henrik avatar
    23 posts
    Member since:
    Feb 2012

    Posted 01 Feb 2014 Link to this post


    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?
  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 04 Feb 2014 Link to this post

    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.
Back to Top