Skip to content

PScriboCharts provides a set of functions for authoring charts and graphs in Windows PowerShell

License

Notifications You must be signed in to change notification settings

iainbrighton/PScriboCharts

Repository files navigation

Build status Platforms Version Downloads

PScribo Charts (Preview)

PScribo (pronounced 'skree-bo') Charts is an open source project that provides a PowerShell facade over the [System.Windows.Forms.DataVisualization.Charting] .NET library. PScribo Charts provides a set of functions for authoring charts and graphs in Windows PowerShell for use in documentation and/or web pages, e.g. with PScribo.

Due to its reliance on the [System.Windows.Forms.DataVisualization.Charting] namespace, this module only works on Microsoft Windows devices. However, both Windows PowerShell and PowerShell (Core) are supported on Microsoft Windows.

Requires Powershell 3.0 or later.

Authoring Example

The following example creates a line chart of the highest 10 process WorkingSet properties and exports a .PNG file to the desktop.

Import-Module PScriboCharts

$sampleData = Get-Process | Sort-Object -Property WS -Descending | Select-Object -First 10
$exampleChart = New-Chart -Name Example1 -Width 600 -Height 600
$addChartSeriesParams = @{
    Chart     = $exampleChart
    ChartArea = Add-ChartArea -Chart $exampleChart -Name exampleChartArea -PassThru
    Name      = 'exampleChartSeries'
    XField    = 'ProcessName'
    YField    = 'WS'
}
$sampleData | Add-LineChartSeries @addChartSeriesParams
Export-Chart -Chart $exampleChart -Path ~\Desktop -Format PNG -PassThru

Installation

  • Automatic (via PowerShell Gallery):
    • Run 'Install-Module PScriboCharts'
    • Run 'Import-Module PScriboCharts'
  • Manual:
    • Download and unblock the latest .zip file.
    • Extract the .zip into your $PSModulePath, e.g. ~\Documents\WindowsPowerShell\Modules\
    • Ensure the extracted folder is named 'PScriboCharts'
    • Run 'Import-Module PScriboCharts'

If you find it useful, unearth any bugs or have any suggestions for improvements, feel free to add an issue or place a comment at the project home page.

About

PScriboCharts provides a set of functions for authoring charts and graphs in Windows PowerShell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published