Jump to content
Software FX Community

Tail of Chart

Chris Kinsman

Recommended Posts

Our default behavior is as follows

If the data being fed into the chart has more than 1 elements (in SQL your statement returns more than 1 rows, in powershell your statement/script returns more than 1 object) we will reload the new data and destroy the old data. If you do not get this on the sidebar please try running the same gadget on the desktop, this would tell us if you are experiencing a refresh issue on the sidebar.

If the data being fed into the chart has only 1 element our default behavior is to only keep the last 20 points. If you have powershell installed you should be able to see this behavior by typing the following

get-date -uformat "%S" | out-chart -refresh 0:0:1 -axisy_max 60

This command will show you the current number of seconds and after 20 seconds you should not see new bars added but instead the tail behavior you expected. You can control the number of points by using the -realtime_buffersize parameter, e.g.

get-date -uformat "%S" | out-chart -refresh 0:0:1 -axisy_max 60 -realtime_buffersize 5



Link to comment
Share on other sites

I am using this command for the source of my chart:

 import-csv 'C:\Program Files\Vergent Software\TemperatureLoggingServiceSetup\TemperatureLog.csv' | select Date,{$_.Temperature}

 The CSV looks like this:


Date Temperature
7/11/2007 16:22 82.4
7/11/2007 16:26 82.4
7/11/2007 18:11 84.2
7/11/2007 18:11 87.8
7/11/2007 18:13 84.2
7/11/2007 20:47 78.8
7/12/2007 5:30 75.2
7/12/2007 17:03 75.2
7/13/2007 6:30 71.6


I can't figure out where I would put the realtime_buffersize option.  It doesn't show up in the chart designer when I click on "customize and add new items to gadget".




Link to comment
Share on other sites

OK, so you aren't passing the values one at a time to the gadget?  What you have is a datafile and you import the whole thing on each run.  You possibly want to keep your datafile for recording purposes.

I think this will give you what you're looking for:

import-csv 'C:\Program Files\Vergent Software\TemperatureLoggingServiceSetup\TemperatureLog.csv' | select -last 10 Date,{$_.Temperature}

Use that as the data handed over to the gadget.


Link to comment
Share on other sites

If your CSV will ALWAYS have more than 1 value then Marco's reply is what you need. Use Powershell to use only the last X number of items in the CSV. Please note that as the file grows larger, Powershell will take more time to process it all and return the last 10 elements.

If you CSV only has the last point, then I am afraid we do not expose the realtime settings when using the creator.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...