Jump to content
Software FX Community

wwar1ace

Members
  • Posts

    5
  • Joined

  • Last visited

wwar1ace's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Data: represented in a Bar chart with 2 series The data itself is just three fields: catagory labels, series1, series2 Gallery: Bar chart only No major settings were changed, just selected formatting for the axes, background, etc. But based on your intuition, I did Out-Chart the same data without using any template, and it behaves properly. So, I guess I'll go through it again and start from scratch with creating the template.... I'll test it with the data at every settings change, starting from the basic chart, at let you know if I come across whichever one is causing this behavior. Thanks, -wwar1ace Edit: One other thing I noticed trying to create chart templates: the Bar chart has by default 3 series... and every time I try to remove one series from the collection and save the template as just a 2-series chart, it just comes back with all 3-series the next time I open the template for editing.
  2. A nice feature of the charts is that if you hover over a data series, after a second it will hide the other series from view for emphasis. It seems as though hovering over one of the X-axis values is supposed to do something similar by hiding all chart values except those for that particular category-value. However, the index for this seems to be off by (-1)... when I hover over a category value, the chart values for the category immediately before it are the ones displayed, instead. Has anyone else come across this? It seems like a nice feature, just doesn't work properly for me. -wwar1ace
  3. JuanC: >The approach using a variable is not supposed to refresh (read more about this) Interesting. Makes sense. >> I think the object method definitely looks nicer, but I think this more-raw way may reduce the overhead. >We tend to favor the object approach. This also allows you to use the same in other scripts to package >information even if you are not using PowerGadgets. I think the overhead is minimal although I have not >run any comparisons. You're right, reusability is a good thing. But I think I'm more apt to stick with inserting the scriptblock directly, since it seems to work for all instances. I can see berating myself for several days over something that SHOULD work because I didn't remember that the object method doesn't work with GWMI calls... ;-) >> I'm still confused as to why using the object method you pointed to wouldn't refresh. >Can you please try using the object approach with gps instead of gwmi. I have seen some cases where WMI >requests are not refreshed. Verified. I piped this script through Out-Chart with refresh and it worked fine: $Processes =((gps|Measure-Object).count) $obj = new-object System.Object add-member -inputobject $obj -membertype NoteProperty -Name Processes -value $Processes $obj Off topic, but from reading one of your examples, can you tell me what the second "$" in this statement is doing (just before Read-Host) ? I haven't seen that before: [string]$serverName = $(read-host "Please enter the web server name") Thanks, -wwar1ace
  4. @marco Thanks. I did come across those examples as well before I posted my question... but when I tried them, the Refresh of the gauge did not work. I had tried basically the same thing with creating an object in the following script and then piping it to the Out-Gauge, but it would just display the initial values: $RAM = [INT]((1-(gwmi win32_PerfRawData_perfOS_memory).availablebytes/1gb)*100)$CPU =(gwmi -class "Win32_PerfFormattedData_PerfOS_Processor"|where{$_.name -eq $_Total"}).percentprocessortime$obj = new-object System.Objectadd-member -inputobject $obj -membertype NoteProperty -Name RAM -value $RAMadd-member -inputobject $obj -membertype NoteProperty -Name CPU -value $CPU$obj = [INT]((1-(gwmi win32_PerfRawData_perfOS_memory).availablebytes/1gb)*100)$CPU =(gwmi -class "Win32_PerfFormattedData_PerfOS_Processor"|where{$_.name -eq $_Total"}).percentprocessortime$obj = new-object System.Objectadd-member -inputobject $obj -membertype NoteProperty -Name RAM -value $RAMadd-member -inputobject $obj -membertype NoteProperty -Name CPU -value $CPU$objBut I did come up with another way to get it working... just by placing the calculated values as their own little scriptblocks in the one-liner... $template just points to a radialgauge template with two scales and two DigitalPanel innergauges. gwmi "Win32_PerfFormattedData_PerfOS_Processor"|where{$_.name -eq "_Total"}|out-gauge -template $template -refresh 0:0:1 -value percentprocessortime -scales_1_indicators_0_value {([INT]((1-(gwmi win32_PerfRawData_perfOS_memory).availablebytes/1gb)*100))} -innergauges_1_DigitalPanel_Value {(gps|sort WS -desc|select -first 1).name} -innergauges_0_DigitalPanel_Value {(gps|sort CPU -desc|select -first 1).name} I think the object method definitely looks nicer, but I think this more-raw way may reduce the overhead. Also, I'm still confused as to why using the object method you pointed to wouldn't refresh. Any ideas? Thanks for your help though. I'm sure I'll be needing it again... ;-) -wwar1ace
  5. I've managed to create multiple indicators on a single gauge, but how do you set the value for the additional indicators from within PowerShell? i.e., anything besides the MainIndicator value. Thanks, -Brian
×
×
  • Create New...