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

Binding RadHtmlChart

1 Answer 76 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
EssMus
Top achievements
Rank 1
EssMus asked on 21 Apr 2015, 10:22 AM

hi,

i'm using control RadHtmlChart wich i bind it programaticly 

this is part of my code and in the pic the data don't display i dont know why plz help me i'm using gridview to make sure if i have data in datatable and it works  

 

string req = " select time_tag,[ain_sebou|niveau] from QTSW_DATA1 where time_tag between '15/01/2015 10:49:59' AND '15/02/2015 10:49:59'";
            Connecter();
            if (DS.Tables.Contains("TRChart"))
            {
                DS.Tables.Remove("TRChart");
            }
            SqlDataAdapter da = new SqlDataAdapter(req, con);
            da.Fill(DS, "TRChart");
            Deconnecter();
            RChart.DataSource = DS.Tables["TRChart"];
            RChart.DataBind();

            ScatterLineSeries SL = new ScatterLineSeries();
            SL.DataFieldX = "time_tag";
            SL.DataFieldY = "ain_sebou|niveau";
            RChart.PlotArea.Series.Add(SL);
            RChart.PlotArea.XAxis.TitleAppearance.Text = "Date Time";
            RChart.PlotArea.YAxis.TitleAppearance.Text = "Value Of AIn Sebou"; 

// here i bind Gridview

           Gridview1.DataSource = DS.Tables["TRChart"];
           Gridview1.DataBind();

 

plzz i need help 

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 23 Apr 2015, 07:13 AM
Hello Essoufi,

Special characters in data source field names should be escaped as per this article - http://www.telerik.com/help/aspnet-ajax/htmlchart-troubleshooting-common-issues.html#data-source-field-name-special-chars

Regards,
Danail Vasilev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

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