Sign in to follow this  
deepti

Real Time Fusion Chart With Historical Data.

Recommended Posts

Hi,

 

I am using a real time line chart in my application.It is woking .But I am facing two issues :

 

1 : The chart starts refreshing only from the second data push.i.e for the first data push the chart will remain the same.When the second data comes the chart gets refreshed with the first data.

2 : If I add one point as historical data to the chart,It will be shown in the chart when it is loaded.But the chart is not refreshing in this case.The response is coming in the refresh intervals, with the new data.But the chart will remain the same.

 

The xml that I am using to generate the chart is as shown below :

 

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>

<chart canvasBottomMargin='0' caption='Chart Caption' chartBottomMargin='30' labelDisplay='ROTATE' lineColor='000000' refreshInterval='30' rotateValues='0' setAdaptiveYMin='1' showRealTimeValue='1' showValues='0' showYAxisValues='1' slantLabels='1' rotateLabels='0' valuePadding='0' xAxisName='Time' xAxisNamePadding='30' yAxisMaxValue='7.0' yAxisMinValue='0.0' yAxisName='Percent Rejects'>

<categories>

<category label='17:31:02'/>

</categories>

<dataset>

<set value='0.7'/>

</dataset>

</chart>

 

Is this not the correct way to add historical data to the real time chart.Please help.

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites

Hi,

 

I am using a real time line chart in my application.It is woking .But I am facing two issues :

 

1 : The chart starts refreshing only from the second data push.i.e for the first data push the chart will remain the same.When the second data comes the chart gets refreshed with the first data.

2 : If I add one point as historical data to the chart,It will be shown in the chart when it is loaded.But the chart is not refreshing in this case.The response is coming in the refresh intervals, with the new data.But the chart will remain the same.

 

The xml that I am using to generate the chart is as shown below :

 

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>

<chart canvasBottomMargin='0' caption='Chart Caption' chartBottomMargin='30' labelDisplay='ROTATE' lineColor='000000' refreshInterval='30' rotateValues='0' setAdaptiveYMin='1' showRealTimeValue='1' showValues='0' showYAxisValues='1' slantLabels='1' rotateLabels='0' valuePadding='0' xAxisName='Time' xAxisNamePadding='30' yAxisMaxValue='7.0' yAxisMinValue='0.0' yAxisName='Percent Rejects'>

<categories>

<category label='17:31:02'/>

</categories>

<dataset>

<set value='0.7'/>

</dataset>

</chart>

 

Is this not the correct way to add historical data to the real time chart.Please help.

 

Thanks,

Deepti.

 

 

Hi,

Actually there was a mistake in the xml that I posted yesterday.The correct xml that I am using is the one given below.And as I have mtioned I can see that the new data is getting pushed in regular refresh intervals(I can see that in firebug).But the chart is not getting refreshed.

 

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>

<chart canvasBottomMargin='0' caption='P Chart of Rejects' chartBottomMargin='30' dataStreamURL='rt_pv.seam' labelDisplay='ROTATE' lineColor='000000' refreshInterval='30' rotateValues='0' setAdaptiveYMin='1' showRealTimeValue='1' showValues='0' showYAxisValues='1' slantLabels='1' rotateLabels='0' valuePadding='0' xAxisName='Time' xAxisNamePadding='30' yAxisMaxValue='7.0' yAxisMinValue='0.0' yAxisName='Percent Rejects'>

<categories>

<category label='17:31:02'/>

</categories>

<dataset>

<set value='0.7'/>

</dataset>

<trendLines>

<line color='FF1717' displayValue='LCL:0.0' startValue='0.0' valueOnRight='1'/>

<line color='0000FF' displayValue='Mean:0.0 ' startValue='0.0' valueOnRight='0'/>

<line color='FF1717' displayValue='UCL:5.0' startValue='5.0' valueOnRight='1'/>

</trendLines>

</chart>

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites

Hi,

Actually there was a mistake in the xml that I posted yesterday.The correct xml that I am using is the one given below.And as I have mtioned I can see that the new data is getting pushed in regular refresh intervals(I can see that in firebug).But the chart is not getting refreshed.

 

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>

<chart canvasBottomMargin='0' caption='P Chart of Rejects' chartBottomMargin='30' dataStreamURL='rt_pv.seam' labelDisplay='ROTATE' lineColor='000000' refreshInterval='30' rotateValues='0' setAdaptiveYMin='1' showRealTimeValue='1' showValues='0' showYAxisValues='1' slantLabels='1' rotateLabels='0' valuePadding='0' xAxisName='Time' xAxisNamePadding='30' yAxisMaxValue='7.0' yAxisMinValue='0.0' yAxisName='Percent Rejects'>

<categories>

<category label='17:31:02'/>

</categories>

<dataset>

<set value='0.7'/>

</dataset>

<trendLines>

<line color='FF1717' displayValue='LCL:0.0' startValue='0.0' valueOnRight='1'/>

<line color='0000FF' displayValue='Mean:0.0 ' startValue='0.0' valueOnRight='0'/>

<line color='FF1717' displayValue='UCL:5.0' startValue='5.0' valueOnRight='1'/>

</trendLines>

</chart>

 

Thanks,

Deepti.

 

Hi,

 

If any one have any idea please give me a reply.I have one more issue.When I am getting the realtime poits(without historical data) the yvalue of the first point that is plotted is being shown on the x axis at the middle.How can I remove this.

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites
Guest Angie

HI,

 

Could you please mention the position of your Data plot?

 

Awaiting for your reply.

Share this post


Link to post
Share on other sites

HI,

 

Could you please mention the position of your Data plot?

 

Awaiting for your reply.

 

Hi,

 

You mean the xaxis position of the fisrt y value that is being shown on the xaxis? It is exactly at the center of the xaxis.

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

Actually I mean to say the exact position you are looking for to plot the data .

 

I think I am clear enough.smile.gif

Share this post


Link to post
Share on other sites

Hi,

 

Actually I mean to say the exact position you are looking for to plot the data .

 

I think I am clear enough.smile.gif

 

Hi,

 

I am sorry ,I did't get your question properly.But I my requirement is,If I am passing some (x,y) points initially,more precisely , If I am adding some datasets and categories to the chart through the xml, I want those points to be shown in the chart and then continue with the new point that are coming during the chart refresh intervals,pushing the old pints.I think this is how realtime charts with historical data works.

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites

Hi,

 

Please refer to the attachment.

 

Here, I have shared with you a simple example of real time chart using historical data.

 

Hope, this will help you.smile.gif

 

Hi,

Thanks for the reply.

I have added the attributes numdisplaysets='20' and decimals='2' and then it started working.But I have one more issue :

 

The chart gets refreshed only for the second data push.Means if I have given the refresh interval as 30,I am getting the next point after 30 secs(which I can see in the firebug response).But chart gets updated only after 60 secs,i.e when the second data is pushed and that too with the data that was pushed previously.And that continues.That means the chart is getting updated after that in every 30secs,but everytime the chart is getting updated with the previous data pushed.Do I need to set any other attributes to solve this? Please help.

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

If you want the chart to keep polling for new data every x seconds and queue it, you can specify that x seconds as <updateInterval>. This helps you poll at different intervals and then draw at another interval (specified as <refreshInterval>).

Hope this helps.smile.gif

Share this post


Link to post
Share on other sites

Hi,

If you want the chart to keep polling for new data every x seconds and queue it, you can specify that x seconds as <updateInterval>. This helps you poll at different intervals and then draw at another interval (specified as <refreshInterval>).

Hope this helps.smile.gif

 

Hi,

 

Thanks for your replies.It helped me.

But there is one small issue that I have mentioned in one of the previous mails like the yvalue of the first point that is plotted is being shown at the middle of the xaxis.How can I remove this?

 

Expectiong your reply.

Deepti.

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

Please try the same by setting <showLabel='0'> attribute inside the <category> element.

 

 

Hope this helps.smile.gif

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

The previous one was to hide labels.

 

Since you are plotting only one datapoint, it will show at the middle of x-axis only.

 

Please try the same using more data points,hope it will work.

 

Awaiting for your reply.

Share this post


Link to post
Share on other sites

Hi,

 

The previous one was to hide labels.

 

Since you are plotting only one datapoint, it will show at the middle of x-axis only.

 

Please try the same using more data points,hope it will work.

 

Awaiting for your reply.

 

Hi,

 

I am sorry, I didn't get what u meant. But if you see the attachement you can see one '5' that I have highlighted in a red box.This is the yvalue of the last point added . How can I remove this.

 

Thanks,

Deepti.

post-9906-031929500 1294128476_thumb.png

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

I mean to say that, since there is only one value in the <dataset> element, it will show at the middle of X-axis only.

Please try the same using more than one value, hope it will work.

 

Awaiting for your reply.

Share this post


Link to post
Share on other sites

Hi,

I mean to say that, since there is only one value in the <dataset> element, it will show at the middle of X-axis only.

Please try the same using more than one value, hope it will work.

 

Awaiting for your reply.

Hi,

 

My dataset element always does not contain single value.For example in case of the following xml also I am getting that value on the xaxis :

 

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>

<chart canvasBottomMargin='0' caption='P Chart of Rejects' chartBottomMargin='30' decimals='4' labelDisplay='ROTATE' lineColor='000000' numDisplaySets='30' refreshInterval='5' rotateValues='0' setAdaptiveYMin='1' showLabels='1' showRealTimeValue='1' showValues='0' showYAxisValues='1' slantLabels='1' rotateLabels='0' updateInterval='10' valuePadding='0' xAxisName='Time' xAxisNamePadding='30' yAxisMaxValue='7.0' yAxisMinValue='0.0' yAxisName='Percent Rejects'>

<categories>

<category label='14:09:03' showLabel='1'/>

<category label='14:10:01' showLabel='1'/>

<category label='14:11:01' showLabel='1'/>

<category label='14:12:01' showLabel='1'/>

<category label='14:13:01' showLabel='1'/>

<category label='14:14:01' showLabel='1'/>

<category label='14:15:01' showLabel='1'/>

<category label='14:16:01' showLabel='1'/>

<category label='14:17:00' showLabel='1'/>

</categories>

<dataset showValues='0'>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

</dataset>

</chart>

 

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

To add historical data to the real time chart, please try the same using the <dataStreamURL> attribute inside the <chart> element of the XML document.

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

To add historical data to the real time chart, please try the same using the <dataStreamURL> attribute inside the <chart> element of the XML document.

Hope this helps.

Hi,

 

Sorry my xml has that and all. Sorry for the wrong xml last time.Following is the xml I am using :

 

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>

<chart canvasBottomMargin='0' caption='P Chart of Rejects' chartBottomMargin='30' dataStreamURL='rt_pv.seam' decimals='4' labelDisplay='ROTATE' lineColor='000000' numDisplaySets='30' refreshInterval='5' rotateValues='0' setAdaptiveYMin='1' showLabels='1' showRealTimeValue='1' showValues='0' showYAxisValues='1' slantLabels='1' rotateLabels='0' updateInterval='10' valuePadding='0' xAxisName='Time' xAxisNamePadding='30' yAxisMaxValue='7.0' yAxisMinValue='0.0' yAxisName='Percent Rejects'>

<categories>

<category label='14:23:04' showLabel='1'/>

<category label='14:24:01' showLabel='1'/>

<category label='14:25:02' showLabel='1'/>

<category label='14:26:01' showLabel='1'/>

<category label='14:27:01' showLabel='1'/>

<category label='14:28:00' showLabel='1'/>

<category label='14:29:00' showLabel='1'/>

<category label='14:30:01' showLabel='1'/>

<category label='14:31:00' showLabel='1'/>

 

</categories>

<dataset showValues='0'>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

<set showValue='0' value='5.0'/>

</dataset>

<trendLines>

<line color='FF1717' displayValue='LCL:0.0' startValue='0.0' valueOnRight='1'/>

<line color='0000FF' displayValue='Mean:5.0' startValue='5.0' valueOnRight='1'/>

<line color='FF1717' displayValue='UCL:5.0 ' startValue='5.0' valueOnRight='0'/>

</trendLines>

</chart>

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

The value at the middle of the X-axis can't be removed as the chart takes this data form the data provider page mentioned in the <dataStreamURL> attribute.

 

This value will update after every refresh interval and by default, it will show at the middle of the X-axis.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

The value at the middle of the X-axis can't be removed as the chart takes this data form the data provider page mentioned in the <dataStreamURL> attribute.

 

This value will update after every refresh interval and by default, it will show at the middle of the X-axis.

 

Hope this helps.

 

Hi,

 

Do you mean to say there is no way to avoid dispalying it.Even by setting any of the attributes?

Is this a bug, because it is like displaying something that is not actually required or wished to be displayed.

 

Thanks,

Deepti.

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

I am afraid, there is no such attribute in FusionCharts to avoid displaying the value, at this time.

 

This is not a bug, as the data provider page automatically sends the value to chart after every refresh interval.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

I am afraid, there is no such attribute in FusionCharts to avoid displaying the value, at this time.

 

This is not a bug, as the data provider page automatically sends the value to chart after every refresh interval.

 

Hope this helps.

 

Hi,

 

Thanks for the reply.Thanks for your patience and time.

 

Deepti.

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