Design page code:-
<asp:Chart EnableViewState="false" ID="Chart1" runat="server" ImageStorageMode="UseHttpHandler" Width="560" Height="400">
<Titles>
<asp:Title ShadowColor="32, 0, 0, 0" TextStyle="Shadow" Font="Trebuchet MS, 14.25pt, style=Bold" ForeColor="26, 59, 105">
</asp:Title>
</Titles>
<Legends>
<asp:Legend LegendStyle="Row" IsTextAutoFit="False" DockedToChartArea="ChartArea1"
Docking="Top" IsDockedInsideChartArea="False" Name="Default" BackColor="Transparent"
Font="Trebuchet MS, 8.25pt, style=Bold" Alignment="Far"></asp:Legend>
</Legends>
<Series>
<asp:Series ChartArea="ChartArea1" IsValueShownAsLabel="true" ChartType="Column"
LegendText="Average Score" Name="Series1" LabelForeColor="#150517" BorderColor="180, 26, 59, 105"
CustomProperties="EmptyPointValue=Zero" Color="220, 65, 140, 240" IsXValueIndexed="True"
Label="#VALY" LabelToolTip="#VALX">
<EmptyPointStyle MarkerStyle="Diamond" MarkerColor="224, 64, 10"></EmptyPointStyle>
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent"
BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<AxisY LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisY>
<AxisX LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
C# Page Code:-
DataTable dt = objReport.OVERALLTNGEffEvalAvgScore(TRAININGNAME, STRKI, stroperation);
if (dt.Rows.Count > 0)
{
Chart1.DataSource = dt;
string titletxt="Average score of " + dp_traininglist.SelectedItem.Text;
Chart1.Titles.Add(new Title(titletxt, Docking.Top, new Font("Trebuchet MS", 14f, FontStyle.Bold), Color.Black));
Chart1.Series["Series1"].XValueMember = "OPERATION";
Chart1.Series["Series1"].YValueMembers = "AVGSCORE";
Chart1.Series["Series1"]["PointWidth"] = "0.3";
Chart1.DataBind();
Chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false;
Chart1.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = true;
Chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;
}
<asp:Chart EnableViewState="false" ID="Chart1" runat="server" ImageStorageMode="UseHttpHandler" Width="560" Height="400">
<Titles>
<asp:Title ShadowColor="32, 0, 0, 0" TextStyle="Shadow" Font="Trebuchet MS, 14.25pt, style=Bold" ForeColor="26, 59, 105">
</asp:Title>
</Titles>
<Legends>
<asp:Legend LegendStyle="Row" IsTextAutoFit="False" DockedToChartArea="ChartArea1"
Docking="Top" IsDockedInsideChartArea="False" Name="Default" BackColor="Transparent"
Font="Trebuchet MS, 8.25pt, style=Bold" Alignment="Far"></asp:Legend>
</Legends>
<Series>
<asp:Series ChartArea="ChartArea1" IsValueShownAsLabel="true" ChartType="Column"
LegendText="Average Score" Name="Series1" LabelForeColor="#150517" BorderColor="180, 26, 59, 105"
CustomProperties="EmptyPointValue=Zero" Color="220, 65, 140, 240" IsXValueIndexed="True"
Label="#VALY" LabelToolTip="#VALX">
<EmptyPointStyle MarkerStyle="Diamond" MarkerColor="224, 64, 10"></EmptyPointStyle>
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent"
BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<AxisY LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisY>
<AxisX LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
C# Page Code:-
DataTable dt = objReport.OVERALLTNGEffEvalAvgScore(TRAININGNAME, STRKI, stroperation);
if (dt.Rows.Count > 0)
{
Chart1.DataSource = dt;
string titletxt="Average score of " + dp_traininglist.SelectedItem.Text;
Chart1.Titles.Add(new Title(titletxt, Docking.Top, new Font("Trebuchet MS", 14f, FontStyle.Bold), Color.Black));
Chart1.Series["Series1"].XValueMember = "OPERATION";
Chart1.Series["Series1"].YValueMembers = "AVGSCORE";
Chart1.Series["Series1"]["PointWidth"] = "0.3";
Chart1.DataBind();
Chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false;
Chart1.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = true;
Chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;
}