Sign in to follow this  
slaguduv

Getting error while adding data stamp to the realtime chart

Recommended Posts

Hi,

 

 

 

When I try to add datastamp to the realtime chart, am getting error and the chart is not rendering. I am using jsp and servlet for realtime chart implementation. The following is the code snippet,

 

 

 

jsp:

 

===

 

myChart.setDataXML("<chart dataStamp='13:43:45' defaultAnimation='1' dataStreamURL='/upm/LiveGraphServlet' refreshInterval='1' setAdaptiveYMin='1' xAxisName='Time' YAxisName='Value in %25' showRealTimeValue='0' realTimeValuePadding='40' labelDisplay='Rotate' slantLabels='0' numberPrefix='' numDisplaySets='30' hoverCapSepChar=' ' anchorScale='0' anchorAlpha='1' xAxisNamePadding='50'><dataset seriesName='CPUUtilization' showValues='0' color='1941A5' lineThickness='2'> </dataset><styles> <definition> <style type='font' name='captionFont' size='14' /> </definition> <application> <apply toObject='Caption' styles='captionFont'/> <apply toObject='Realtimevalue' styles='captionFont'/> </application></styles> </chart>");

 

 

 

 

 

servlet;

 

=====

 

 

 

String time = getDisplayTime (new Timestamp (System.currentTimeMillis ()));

 

pw.print ("&name="+time+"&value="+strVal+"&dataStamp=" +time);

 

 

 

Error in debug window:

 

=================

 

 

 

" Error in loading stream data: The chart couldn't load data from the specified data stream URL. Error HTTP Status returned was: undefined. Please make sure that your data stream provider page is present in the same sub-domain as the chart. "

 

 

 

 

 

Without the datastamp, the charts are rendered properly. When I add that am getting the above error. And also I want to know how to retrieve the datastamp in the server side as I couldn't find this in the online documentation.

 

 

 

Could anybody tell me what is the error in this implementation or any other change have to do for this and also how to retrieve that in the server side ?

 

 

 

Please reply asap.

 

 

 

Thanks in advance,

 

slaguduv.

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Thanks Pallav.

 

 

 

I tried with replacing by '.' and now its working fine. But this could have been mentioned in the online documentation as there it has been used with the colon in the datastamp.

 

http://www.fusioncharts.com/widgets/Docs/Contents/RealTimeStamp.html

 

 

 

If possible please mention that in the documentation.

 

 

 

Thanks,

 

slaguduv.

Share this post


Link to post
Share on other sites

Hi,

 

I have the same error. The first request with dataStamp runs ok... but when I update the dataStamp in the response the chart stops refreshing...

 

My output is:

 

Response.Write("&label=" + label + "&value=" + value + "&dataStamp=" + lastData.AddSeconds(1).ToString("yyyyMMddHHmmss"));

 

Is the format of the string wrong? How should it be?

 

Regards,

Marco

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