0

hi!
I have a datatable ,I need a linechart shows 2 value from datatable(like velocity vs distance) and their date.But I cann not achieve

this is my code

public void grafikOlustur(LineChart lc_sorgu, DataTable dt)
    {
        lc_sorgu.Graphs.Add(new LineChartGraph());

        string[] b = new string[dt.Rows.Count];
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            DateTime date = DateTime.Parse(dt.Rows[i]["DAY"].ToString() + "/" + dt.Rows[i]["MONTH"].ToString() + "/" + dt.Rows[i]["YEAR"].ToString());
            lc_sorgu.Series.Add(new LineChartSeriesDataItem(date.ToShortDateString(), date.ToShortDateString()));
            lc_sorgu.Graphs[0].Items.Add(new LineChartValuesDataItem(date.ToShortDateString(), double.Parse(dt.Rows[i]["FisrtValue"].ToString())));

        }

        //lc_sorgu.Graphs.Add(new LineChartGraph());
        changeBulletPoint(lc_sorgu, 0);



    }

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by jrubengb
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.