Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
315
Line chart is not displaying lines properly.
posted

Hi,

When i tried pass data to line chart, it doesno't draw line properly. It is displaying streight lines from left to right. See attached image file. 

private void LoadChartData()

{

SqlConnection con = new SqlConnection("Initial Catalog=Northwind;User=sa;Password=******;Server=PCxxxx");SqlCommand command = new SqlCommand("Select Count(*) as Total, ShipCountry from Orders group by ShipCountry");

con.Open();

command.Connection = con;

DataSet ds = new DataSet("Orders");SqlDataAdapter adapter = new SqlDataAdapter(command);

adapter.Fill(ds);

ultraChart1.DataSource = ds;

ultraChart1.DataBind();

}

 Infra Line Chart Problem

 

Parents
No Data
Reply
  • 26458
    Offline posted

    There was no image attached, but I think the problem is that your line chart displays a line for each row in your data set (which is its default behavior). Try setting ultraChart1.Data.SwapRowsAndColumns = true.

Children
No Data