locked
Real time Chart RRS feed

  • Question

  • User493419699 posted

    Hello Everybody!!

    I will create a Real Time Chart with an AJAX - Timer and with an Updatepanel.

    My Code: ASP to create the chart

     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                
                     <ContentTempLate>
      <div>
      <asp:Chart ID="Chart3" runat="server" DataSourceID="SqlDataSource1">
                        <series>
                            <asp:Series ChartType="Line" Name="Series1" XValueMember="Zeit" YValueMembers="Leistung">
                            </asp:Series>
                        </series>
                        <chartareas>
                            <asp:ChartArea Name="ChartArea1">
                            </asp:ChartArea>
                        </chartareas>
                    </asp:Chart>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ProbeConnectionString %>" SelectCommand="SELECT [Leistung], [Zeit] FROM [Leistung/Zeit]"></asp:SqlDataSource>
              
      </div>
               
                    <asp:Timer ID="Timer1" runat="server" Interval="500" OnTick="Timer1_Tick">
                    </asp:Timer>
                          </ContentTempLate>
                    </asp:UpdatePanel>

    But the problem is, the chart is flickering. What can I do, that the chart isn't flickering?

    Thank you in advance!

    Sunday, February 16, 2014 5:21 AM

Answers

  • User555306248 posted

    we can use SignalR, the same time we can use Ajax timer and create an AJAX timer event and use it to update a chart in real time on the Client Side. We will be generating data randomly and using it for our table, so that we can see it update.

    There is a demo, please refer to the link below:

    http://www.dotnettutorials.com/tutorials/charts/chart-real-time-update/

    Hope it's useful for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 16, 2014 10:47 PM

All replies

  • User555306248 posted

    we can use SignalR, the same time we can use Ajax timer and create an AJAX timer event and use it to update a chart in real time on the Client Side. We will be generating data randomly and using it for our table, so that we can see it update.

    There is a demo, please refer to the link below:

    http://www.dotnettutorials.com/tutorials/charts/chart-real-time-update/

    Hope it's useful for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 16, 2014 10:47 PM
  • User493419699 posted

    Hello,

    thank you, I think I need SignalR, because your link with the real time update is also flickering.

    Thanks

    Tuesday, February 18, 2014 4:01 PM