I refer below Article and made one sample where data is hardcode in Datatable.
ASP.Net AJAX Line Chart Control Multiple Series: Populate from Database example
Refer below sample code for your reference and implement it as per your code logic.
for y axix you must need to assign an numeric value else your chart functionality will never work.
HTML
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
<cc1:LineChart ID="LineChart1" runat="server" ChartHeight="300" ChartWidth="450"
ChartType="Basic" ChartTitleColor="#0E426C" Visible="false" CategoryAxisLineColor="#D08AD9"
ValueAxisLineColor="#D08AD9" BaseLineColor="#A156AB" >
</cc1:LineChart>
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Employee", typeof(string))
,new DataColumn("Days", typeof(string))
,new DataColumn("CameOnTime", typeof(decimal)) });
dt.Rows.Add("Jon", "Mon", "10");
dt.Rows.Add("Jon", "Tue", "20");
dt.Rows.Add("Jon", "Wed", "30");
dt.Rows.Add("Jon", "Thu", "20");
dt.Rows.Add("Jon", "Fri", "10");
dt.Rows.Add("Jon", "Sat", "20");
dt.Rows.Add("Mak", "Mon", "20");
dt.Rows.Add("Mak", "Tue", "10");
dt.Rows.Add("Mak", "Wed", "20");
dt.Rows.Add("Mak", "Thu", "30");
dt.Rows.Add("Mak", "Fri", "10");
dt.Rows.Add("Mak", "Sat", "30");
List<string> x = (from p in dt.AsEnumerable()
select p.Field<string>("Days")).Distinct().ToList();
var Employee = (from p in dt.AsEnumerable()
select p.Field<string>("Employee")).Distinct().ToList();
foreach (var emp in Employee)
{
List<decimal> totals = (from p in dt.AsEnumerable()
where p.Field<string>("Employee") == emp
select p.Field<decimal>("CameOnTime")).Cast<decimal>().ToList();
LineChart1.Series.Add(new AjaxControlToolkit.LineChartSeries { Name = emp, Data = totals.ToArray() });
}
LineChart1.CategoriesAxis = string.Join(",", x.ToArray());
LineChart1.ChartTitle = string.Format("Employee Come time Details");
Label lbl = new Label();
lbl.Text = "<b>On Time: 10 <br/> Grace Time 20 <br/> Late Time: 30</b>";
LineChart1.Controls.Add(lbl);
LineChart1.Visible = true;
}
}
Screenshot