hiii... actually i put all the code to make the bar chart but the barchart column do not showing up. i think i got problem on the chart series @@
below is my aspx code
<asp:Chart ID="Chart1" runat="server" BackColor="Gray" EnableViewState="True"
Width="502px">
<Series>
<asp:Series Name="Series1" BackImageTransparentColor="Gray"
BackSecondaryColor="RosyBrown" BorderColor="Transparent"
BorderDashStyle="NotSet" ChartArea="ChartArea1" Color="Purple"
LabelBackColor="255, 128, 0" MarkerBorderColor="Lime" MarkerColor="Blue"
ShadowColor="BlueViolet">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BackColor="Khaki"
BorderColor="MediumAquamarine">
</asp:ChartArea>
</ChartAreas>
<Titles>
<asp:Title BackColor="White" BackImageAlignment="Top" ForeColor="Maroon"
Name="Forecast result" Text="Forecast result">
</asp:Title>
</Titles>
</asp:Chart>
this is my c# code
protected void Button5_Click(object sender, EventArgs e)
{
int i = int.Parse(DropDownList1.SelectedValue);
SqlConnection connection = new SqlConnection("Data Sourceaaa;Initial Catalog=System;Integrated Security=True");
connection.Open();
SqlDataAdapter fdm = new SqlDataAdapter("select (case when [Month] = 1 then 'January' when [Month] = 2 then 'February'when [Month] = 3 then 'March' when [Month] = 4 then 'April'when [MONTH] = 5 then 'May'when [MONTH] = 6 then 'June' when [MONTH] = 7 then 'July' when [MONTH] = 8 then 'August' when [MONTH] = 9 then 'September' when [MONTH] = 10 then 'October' when [MONTH] = 11 then 'November' when [MONTH] = 12 then 'December' end) as Month, sum(demand) as Result from reorder where id ='" + i + "' and [Month] in (1, 2, 3, 4,5,6,7,8,9,10,11,12) group by [Month] order by [Month];", connection);
DataSet ds = new DataSet();
fdm.Fill(ds);
Chart1.DataSource = fdm;
Chart1.ChartAreas["ChartArea1"].AxisX.Title = "Month";
Chart1.ChartAreas["ChartArea1"].AxisY.Title = "Result";
Chart1.Series["Series1"].XValueMember = "Month";
Chart1.Series["Series1"].YValueMembers = "result";
Chart1.DataBind();
fdm.Dispose();
connection.Close();
}}
what should i do so i the chart series can be seen? please help me thank you in advance :)