you may use following code
First add chart in aspx page as following:
<asp:Chart ID="Chart1" runat="server" Width="500px">
<Series>
<asp:Series Name="Series1" ChartType="StackedBar"></asp:Series>
</Series>
<Series>
<asp:Series Name="Series2" ChartType="StackedBar"></asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1"></asp:ChartArea>
</ChartAreas>
</asp:Chart>
Then write following code:
using (SqlConnection cnn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConString"].ConnectionString))
{
cnn.Open();
SqlDataAdapter da = new SqlDataAdapter("select MonthName,TotalTruck,Item from table1", cnn);
DataTable dt = new DataTable();
da.Fill(dt);
Chart1.DataSource = dt;
Chart1.Series[0].XValueMember = "MonthName";
Chart1.Series[0].YValueMembers = "TotalTruck";
Chart1.Series[1].XValueMember = "Item";
Chart1.Series[1].YValueMembers = "TotalTruck";
Chart1.DataBind();
}
}
It will stack Item in the bars.