hello jayantik ,
you have to dynamically add data to every series.I think below code is your solution(code is in vb.net).reply me if u need more help.
If (dt.Rows.Count > 0) Then
YourChart.DataSource = dt
YourChart.Series.Clear()
For colIndex As Integer = 1 To dt.Columns.Count - 1
Dim Cseries As New Series(dt.Columns(colIndex).ColumnName)
Cseries.Points.Clear()
For Each dr In dt.Rows
Dim tempi As Integer = Convert.ToInt32(IIf(IsDBNull(dr(colIndex)), 0, dr(colIndex)))
Cseries.Points.AddXY(dr("Code"), tempi)
Next
YourChart.Series.Add(Cseries)
YourChart.Series(dt.Columns(colIndex).ColumnName).IsValueShownAsLabel = True
YourChart.Series(dt.Columns(colIndex).ColumnName).IsVisibleInLegend = True
YourChart.Series(dt.Columns(colIndex).ColumnName).Color = LegendColor(dt.Columns(colIndex).ColumnName)
Next
YourChart.DataBind()
YourChart.Titles.Clear()
YourChart.ChartAreas(0).AxisX.Interval = 1
YourChart.ChartAreas(0).AxisX.Title = "Locations"
YourChart.ChartAreas(0).AxisY.Title = "Numbers"
shiftSelectedDate = DateTime.Now
YourChart.Titles.Add("Summary")
YourChart.Titles.Add("Record for the date:-" + " " + shiftSelectedDate.ToString("dd-MMM-yy"))
Else
YourChart.Titles.Clear()
shiftSelectedDate = DateTime.Now
YourChart.AlternateText = ""
YourChart.Titles.Add("No Record for the date:-" + " " + shiftSelectedDate.ToString("dd-MMM-yy"))
End If
Aditya Prakash
Software Enginner
Seed Management Services pvt ltd