jorgerm

Problem with real time data update in WS2012

Recommended Posts

I have the same code in WS2003 and WS2012.

In WS2003, always update the value in real time.
In WS2012 it only updates once and never again.

Can someone help me to know why?

The code is the following:

Real Time Code

<% Randomize %>
&value=<% response.write(Int((3000)*Rnd+1))%>

 

Drawing HLinearGauge.swf code

<!-- #include virtual="FusionCharts/FusionCharts.asp" -->
<html>
   <head>
      <title>Tablero de Control de <%=DescripcionTom%></title>
      <script type="text/JavaScript" src="FusionMaps/FusionMaps.js"></script>
      <script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>
</head>
   <body>
    <table width="100%"  height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
         <tr>
           <td height="150"><% Call getGR_RT_CantMsgEncoladosAlerta( "MsgsEncoladosAlerta",TomId,5, "150",1 ) %></td>
         </tr>
       </table>
   </body>
</html>

<%

    Function getXML_RT_CantMsgEncoladosAlerta( IdTom, IntervaloRefresco, VerValorTiempoReal )
        sXml = "<chart bgcolor='#ffffff' showValue='0' showTickValues='1' showborder='0' lowerlimit='0' upperlimit='3000' numbersuffix=' MSGS' valueabovepointer='0' pointerRadius='20' showshadow='0' gaugefillmix='{light}' valuebgcolor='#ffffff' valuebgalpha='60' valuefontcolor='#000000' pointerbgcolor='#000000' pointerbgalpha='50' basefontcolor='#ffffff' dataStreamURL='jrmrt.asp' refreshinterval='10' >"
        sXml = sXml & "    <colorrange>"
        sXml = sXml & "        <color minvalue='0' maxvalue='2000' label='' code='#1aaf5d' />"
        sXml = sXml & "        <color minvalue='2000' maxvalue='2500' label='' code='#f2c500' />"
        sXml = sXml & "        <color minvalue='2500' maxvalue='3000' label='Posibles Demoras' code='#c02d00' />"
        sXml = sXml & "    </colorrange>"
        sXml = sXml & "    <pointers>"
        sXml = sXml & "        <pointer value='2250' />"
        sXml = sXml & "    </pointers>"
        sXml = sXml & "</chart>"
        getXML_RT_CantMsgEncoladosAlerta = sXml
    End Function    

    Function getGR_RT_CantMsgEncoladosAlerta( IdDiv, IdTom, IntervaloRefresco, Altura, VerValorTiempoReal )
        sXML = me.getXML_RT_CantMsgEncoladosAlerta(IdTom, IntervaloRefresco,VerValorTiempoReal )
        Call renderChart("FusionWidgets/HLinearGauge.swf", "", sXML, IdDiv, "100%", Altura, False, True)
    End Function

%>

Share this post


Link to post
Share on other sites

Hi,

Thanks for getting in touch.

After investigating your code snippet we came to the conclusion that you are implementing FusionCharts flash based version which has been deprecated. Please implement the latest full JavaScript version of FusionCharts and check. You could download the latest evaluation version of FusionCharts from https://www.fusioncharts.com/download/

Share this post


Link to post
Share on other sites

Hi

I downloaded the latest trial version, to test my code. but it does not work. Draw the graph but never update the value.

My code is:

<html>
<head>
<script type="text/javascript" src="/fusion2/js/fusioncharts.js"></script>      
<script type="text/javascript"><!--         
    
    FusionCharts.ready(function(){
        var fusioncharts = new FusionCharts({
                type: 'hlineargauge',
                renderAt: 'chartContainer',
                width: '100%',
                height: '250',
                dataFormat: 'json',
                id: 'jrm',
                dataStreamURL: 'jrmrt2.asp',
                refreshInterval: '2',
                dataSource: {
                        "chart": {
                        "theme": "fint",
                        "caption": "Server CPU Utilization",
                        "captionPadding": "0",
                        "numberSuffix": "%",
                        "valueFontSize": "11",
                        "valueFontBold": "0",
                        "chartBottomMargin": "20",
                        "basefontcolor":"#ffffff",
                        "pointerbgcolor": "#000000",
                        "pointerbgalpha": "50",
                        "gaugeFillMix": "{light-10},{light-70},{dark-10}",
                        "gaugeFillRatio": "40,20,40"
                    },
                    "colorRange": {
                        "color": [
                            {
                                "minValue": "0",
                                "maxValue": "35",
                                "code": "#6baa01"
                            },
                            {
                                "minValue": "35",
                                "maxValue": "70",
                                "code": "#f8bd19"
                            },
                            {
                                "minValue": "70",
                                "maxValue": "100",
                                "label": "Posibles Demoras2",
                                "code": "#e44a00"
                            }
                        ]
                    },
                    "pointers": {
                        "pointer": [
                            {
                                "borderColor": "#333333",
                                "borderThickness": "2",
                                "borderAlpha": "60",
                                "bgColor": "#0075c2",
                                "bgAlpha": "75",
                                "radius": "6",
                                "sides": "4",
                                "value": "75"
                            }
                        ]
                    }
                }
        });
        fusioncharts.render();
});

    // -->     
    </script>      

</head>
<body>
    <table width="100%"  height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">

         <tr><td><div id="chartContainer">FusionCharts XT will load here!</div></td></tr>
       </table>
  </body>        
   </body>
</html>

And my real time code is: jrmrt2.asp

&value=25

 

Also replace the fusioncharts.js with the following include: <script type = "text / javascript" src = "http://static.fusioncharts.com/code/latest/fusioncharts.js"> </ script>

and it does not work either

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