I successfully implemented a column chart using the asp Chart control on a button click. The next step for me is to add a timer to animate the display of each column when the page loads. I would like to achieve this without relying on any external libraries. How can I accomplish this task?
<asp:Chart ID="Chart1" Visible="false" runat="server"
BackColor="DarkRed" BackImageAlignment="Center"
BackImageTransparentColor="MediumVioletRed" BackSecondaryColor="White"
BorderlineDashStyle="DashDotDot" Palette="Excel" Height="390px"
Width="800px">
<Titles>
<asp:Title Font="Times New Roman, 12pt, style=Bold" Name="Title1" ForeColor="White"
Text="Sample Test">
</asp:Title>
</Titles>
<Series>
<asp:Series Name="Series1" XValueMember="month" YValueMembers="sales" ChartType="Column"
CustomProperties="DrawingStyle=LightToDark, DrawSideBySide=True" Color="#800033" IsValueShownAsLabel="True" LabelForeColor="#800033">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BorderColor="Transparent">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
public void BindDatatoChart1()
{
Chart1.Visible = true;
DataTable dt = new DataTable();
using (SqlConnection cn = obj.getcon())
{
string sql = "select * from sample1 order by id";
using (SqlCommand cmd = new SqlCommand(sql, cn))
{
using (SqlDataAdapter da = new SqlDataAdapter(cmd))
{
da.Fill(dt);
}
}
}
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 15;
timer.Start();
Chart1.DataSource = dt;
Chart1.DataBind();
}