Sign in to follow this  
Damon

Using Aspxtimer And Aspxcallback To Dynamically Updating Data Of Chart At Regular Time Makes The Chart Blink

Recommended Posts

Hi~

 

I am using ASPxTimert+ASPxCallback+FusionCharts to updating the data of chart on regular time. Updating data is working. But the chart blinks every time. How can I do to make the chart not blink. Thanks

 

Below is my Code.


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FusionChart.ascx.cs" Inherits="FusionChart" %>
<%@ Register Assembly="DevExpress.Web.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
   Namespace="DevExpress.Web.ASPxTimer" TagPrefix="dxt" %>
<%@ Register Assembly="DevExpress.Web.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
   Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dxcb" %>

<script type="text/javascript" src="<%=AppRoot %>Scripts/FusionCharts/FusionCharts.js"></script>
<div id="divContainer" runat="server" style="height:100%;background-color:transparent;"></div>
<dxt:ASPxTimer Interval="5000" runat="server" ID="Timer1" Enabled="false">
</dxt:ASPxTimer>
<script type="text/javascript" lang="javascript">
   function OnCallbackComplete_<%= this.ID%>(s, e) {
       if(e.result == '')
           return;

       FusionCharts.items["<%=ID %>"].setChartData(e.result,"json");

   }
</script>
<dxcb:ASPxCallback ID="Callback1" runat="server" OnCallback="ASPxCallback1_Callback">
   <ClientSideEvents CallbackComplete="OnCallbackComplete" />
</dxcb:ASPxCallback>
<script type="text/javascript" lang="javascript">
   function InvokeCallback_<%= this.ID%>(first) {
       <%= this.ID%>_Callback1.PerformCallback(first);
   }

   //FusionCharts.setCurrentRenderer('javascript');
   var myChart = new FusionCharts("<%=AppRoot %>Scripts/FusionCharts/<%=ChartType.ToString() %>.swf", "<%=ID %>", "<%=Width %>", "<%=Height %>", "<%=DebugModeOn %>", "<%=RegisterWithJS %>");
   myChart.setTransparent(true);
   myChart.configure({
       "PBarLoadingText": '<%=GetLocalResourceObject("PBarLoadingText").ToString() %>',//"Loading Chart. Please Wait.",
       "ChartNoDataText": '<%=GetLocalResourceObject("PBarLoadingText").ToString() %>',//"No data to display." ,
       "InvalidXMLText"  : '<%=GetLocalResourceObject("InvalidXMLText").ToString() %>',//"Invalid data.",
       "XMLLoadingText"  : '<%=GetLocalResourceObject("XMLLoadingText").ToString() %>',//"Retrieving Data. Please Wait.",
       "ParsingDataText"  : '<%=GetLocalResourceObject("ParsingDataText").ToString() %>',//"Reading Data. Please Wait.",
       "RenderingChartText"  : '<%=GetLocalResourceObject("RenderingChartText").ToString() %>',//"Rendering Chart. Please Wait.",
       "LoadDataErrorText"  : '<%=GetLocalResourceObject("LoadDataErrorText").ToString() %>'//"Error in loading data."
    });
   myChart.render("<%=divContainer.ClientID %>");

   InvokeCallback_<%= this.ID%>(1);
</script>

 

 

 

 

 

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Can you please provide some information on following points?

 

> What chart type used?

 

> Version of FusionCharts/Fusionwidgets used?

 

> In what browser you faced this issue? mention the browser version details.

 

> Have you used Flash charts or JavaScript charts?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this