12 Oct |
|
An updated release is available for both PoshBoard.Web and PoshBoard.Snapin Two new cmdlets for Charting, and a new parameter for PBDataGrid.
Out-PBChart and Out-PBChartSerieOut-PBChart let you build chart based on the pipeline objects, as Out-PBDataGrid does. It let you design one-liner chart script. Example :
It get the "Handles" Property of Get-Process and render it as Column DPNames parameterThe DPNAmes property let you specify an object property or string collection that will be used as Names for DataPoints names. Here we use the "ProcessName" property as DataPoints names source. If you set only one value for -DPName, the cmdlet will check for a property with the same name in the pipeline object (case insensitive). If a property is found, it uses it as a Name source. If not, it'll assume that the value provided is a string name. If you want to put your own name, be sure to provide as many names as your number of datapoints ! RenderAs parameterBy default, Rendering of series is of "Column" type. You can set the series rendering type with the -RenderAs Parameter.
Legends parameterAnother example : here we take the CPU usage and render a StackedColumn Chart. I HardCode the DAtaPoints name (here: "CPU"). You can set the Boolean Legends parameter. If set to true, it renders the Chart Legend.
You can use every other parameter found in the New-PBChart and New-PBDataSerie object (like title, scrollingEnabled and so on...) Out-PBChartSerie It renders ChartSerie from a pipeline Object. Usefull to build chart from different objects, with a small amount of code. Here's a sample on how to use it : Out-PBDataGrid / New-PBDatagrid ColumnsWidth parameterBy default, PoshBoard datagrid was set up with "AutoSize" true. When you add your columns, they fit the datagrid width without any scrollbar. This is cool for small grid, but when you want to build "big" datagrid, you may want to set your own Columns width, and activate horizontal scrollbar. The new ColumnsWidth parameter let you do just that. You can set a global width or specific width for each column. Example : This script transform every property of Get-Service in a datagrid, with a width of 150 pixels for each columns:
As you can see, a horizontal scrollbar appears, and every column are 150 pixels wide. You can also specify custom width for EACH column :
Download it now from Codeplex ! Follow PoshBoard updates on twitterYou can follow PoshBoard Development, Fresh news and release announcements on Twitter here
Have Fun ! antoine
Only registered users can write comments!
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
|||||
| Last Updated on Monday, 12 October 2009 17:26 |





