Buenos Dias, I would like to know if you can help me, I'm doing a statistical chart with asp.net c #, so I got the graph but what does not come out is that I want the actual number in each bar to appear for example as well as the image
Currently I get it but without those numbers above and that's what I would like
Currently this is my html code.
<asp:Chart ID="Chart1" runat="server" Width="600px">
<Titles>
<asp:Title Text="Costo Mensual"></asp:Title>
</Titles>
<Series>
<asp:Series Name="Series1" XValueMember="0" YValueMembers="2">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
and in the code:
DataSet ds = new DataSet();
SqlConnection cn = new SqlConnection(ObtenerCadenaConexion());
cn.Open();
SqlCommand cmd2 = new SqlCommand("GenerarBarraLineal", cn);
cmd2.CommandType = CommandType.StoredProcedure;
cmd2.Parameters.Add("@opt", SqlDbType.Int);
cmd2.Parameters.Add("@anio", SqlDbType.VarChar);
cmd2.Parameters.Add("@suministro", SqlDbType.VarChar);
cmd2.Parameters["@opt"].Value = 1;
cmd2.Parameters["@anio"].Value = cboPeriodo.SelectedItem.Text;
cmd2.Parameters["@suministro"].Value = "";
cmd2.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter(cmd2);
da.Fill(ds);
Chart1.DataSource = ds;
cn.Close();