Here I have created sample that wil help you out.
HTML
<div>
<div>
<asp:Chart ID="MobileSalesChart" runat="server" Width="500px" Height="500px" ToolTip="Mobile Sales"
BorderlineColor="Gray">
<Series>
<asp:Series Name="Apple" IsValueShownAsLabel="true" ChartType="StackedColumn" LegendText="Apple">
</asp:Series>
<asp:Series Name="Nokia" IsValueShownAsLabel="true" ChartType="StackedColumn">
</asp:Series>
<asp:Series Name="Samsung" IsValueShownAsLabel="true" ChartType="StackedColumn">
</asp:Series>
<asp:Series Name="Sony" IsValueShownAsLabel="true" ChartType="StackedColumn">
</asp:Series>
<asp:Series Name="Motorola" IsValueShownAsLabel="true" ChartType="StackedColumn">
</asp:Series>
<asp:Series Name="Total" IsValueShownAsLabel="true" ChartType="Point" LegendText="Total">
</asp:Series>
</Series>
<Legends>
<asp:Legend Name="MobileBrands" Docking="Bottom" Title="Mobile Sales (in 1000's)"
TableStyle="Wide" BorderDashStyle="Solid" BorderColor="#e8eaf1" TitleSeparator="Line"
TitleFont="TimesNewRoman" TitleSeparatorColor="#e8eaf1">
</asp:Legend>
</Legends>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<AxisX>
<MajorGrid Enabled="false" />
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
</div>
</div>
C#
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[] {
new DataColumn("Apple"),
new DataColumn("Nokia"),
new DataColumn("Samsung"),
new DataColumn("Sony"),
new DataColumn("Motorola"),
new DataColumn("Year")
});
dt.Rows.Add(1000, 200, 500, 400, 400, 2014);
dt.Rows.Add(2000, 500, 500, 600, 400, 2015);
dt.Columns.Add("Total");
foreach (DataRow row in dt.Rows)
{
int total = 0;
total += Convert.ToInt32(row["Apple"]);
total += Convert.ToInt32(row["Nokia"]);
total += Convert.ToInt32(row["Samsung"]);
total += Convert.ToInt32(row["Sony"]);
total += Convert.ToInt32(row["Motorola"]);
row["Total"] = total;
}
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
MobileSalesChart.Series["Total"].Points.Add(new DataPoint(i, dt.Rows[i]["Total"].ToString().Trim()));
MobileSalesChart.Series["Apple"].Points.Add(new DataPoint(i, dt.Rows[i]["Apple"].ToString().Trim()));
MobileSalesChart.Series["Nokia"].Points.Add(new DataPoint(i, dt.Rows[i]["Nokia"].ToString().Trim()));
MobileSalesChart.Series["Samsung"].Points.Add(new DataPoint(i, dt.Rows[i]["Samsung"].ToString().Trim()));
MobileSalesChart.Series["Sony"].Points.Add(new DataPoint(i, dt.Rows[i]["Sony"].ToString().Trim()));
MobileSalesChart.Series["Motorola"].Points.Add(new DataPoint(i, dt.Rows[i]["Motorola"].ToString().Trim()));
MobileSalesChart.Series[0].Points[i].AxisLabel = dt.Rows[i]["Year"].ToString().Trim();
}
}
}
Screenshot