I have displayed a column chart using asp Chart control on a button click. It is working. Now I want to set some timer to display each column (like animated) using timer when the page loads. How is it possible without using any libraries?
<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();
}