<asp:Chart ID="Chart1" runat="server" Height="350px" Width="600px" Style="text-align: center; margin-left: auto; margin-right: auto; "> <Titles> <asp:Title Font="Times New Roman, 12pt, style=Bold, Italic" Name="Title1" Text="Daily MeatSale Graph"> </asp:Title> </Titles> <Legends> <asp:Legend Docking="Bottom" IsTextAutoFit="False" Name="MeatinKgs" LegendStyle="Row" /> </Legends> <Series> <asp:Series Name="Meat in Kgs" ToolTip="#VALX [#VALY Kgs]" YValuesPerPoint="1" /> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1"> </asp:ChartArea> </ChartAreas> </asp:Chart>
dtmeatgraph = objRetailBAL.getdatewisegraph(objRetailPL); DataTable dttooltip = new DataTable(); dttooltip = dtmeatgraph.Tables[1].Copy(); string[] x = new string[dtmeatgraph.Tables[0].Rows.Count]; int[] y = new int[dtmeatgraph.Tables[0].Rows.Count]; for (int i = 0; i < dtmeatgraph.Tables[0].Rows.Count; i++) { x[i] = dtmeatgraph.Tables[0].Rows[i][1].ToString(); y[i] = Convert.ToInt32(dtmeatgraph.Tables[0].Rows[i][0]); } Chart1.Series[0].Points.DataBindXY(x,y); Chart1.Series[0].ChartType = SeriesChartType.Column; Chart1.ChartAreas[0].AxisX.LabelStyle.Angle = -90; Chart1.ChartAreas[0].AxisX.LabelStyle.Interval = 1; Chart1.Series[0].IsValueShownAsLabel = true; Chart1.ChartAreas[0].AxisX.Title = "Dates"; Chart1.ChartAreas[0].AxisY.Title = "Meat In Kgs";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)