cosmin.onea Posted July 31, 2007 Report Share Posted July 31, 2007 Hi I have a master script which passes a param to a drilldown script. The drilldown script looks like: $sCode = $args[0]Invoke-Webservice -wsdl http://myserver/LiveMonitoring/MyMonitor.asmx?wsdl -method GetDataSet | where {$_.ShortCode -eq $sCode} | out-chart -Label ShortCode -values Total -refresh 0:0:5 -topmost -DataGrid_Visible true -Gallery ganttFirst time it displays data but after 5 seconds it doesnt refresh and the problem is where cmdlet can not execute because the $sCode param is null. Is this an out-chart issue? How can I get around it?Cosmin. Quote Link to comment Share on other sites More sharing options...
cosmin.onea Posted July 31, 2007 Author Report Share Posted July 31, 2007 I created another WS method that gets the parameter and it seems to work fine.The script looks like this:Invoke-Webservice -wsdl http://myserver/LiveMonitoring/MyMonitor.asmx?wsdl -method GetSingleRecordDataSet -parameters $sCode| out-chart -Label ShortCode -values Total -refresh 0:0:5 -topmost -DataGrid_Visible true -Gallery gantt Another question though:The refresh generates new "Total" bars on the chart due to single line dataset. How can I have the Total bar refresh itself without creating aditional bars. Cosmin Quote Link to comment Share on other sites More sharing options...
cosmin.onea Posted July 31, 2007 Author Report Share Posted July 31, 2007 I added a dummy record in the dataset with "0" as the Total and "" as the code but it looks ugly.Is there any other way? Cosmin. Quote Link to comment Share on other sites More sharing options...
JuanC Posted August 1, 2007 Report Share Posted August 1, 2007 In the current public build when you only pass one element, a powergadgets chart will automatically "add" points every time the gadget is refreshed. Honestly we did not gave this a high priority because a chart with 1 bar might be better served by a gauge. We have just added a flag where you can use the DisableAuto to turn off this behavior, e.g. get-date -uformat "%S" | out-chart -refresh 0:0:1 -DisableAuto AddData This will result in a chart with one bar (showing the current number of seconds) but the chart will refresh the bar value instead of adding bars. This flag will be supported in build 2769. JuanC Quote Link to comment Share on other sites More sharing options...
cosmin.onea Posted August 2, 2007 Author Report Share Posted August 2, 2007 Thanks. When is the build going to be available? It is not only a single bar actually. Basically, the details in the drill-down chart include more than one bar. It was just an example to make the things more easy. Cosmin. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.