mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Initial commit [Examples to show Charting]
This commit is contained in:
9
Examples/JustCharts/CentralLimitTheorem.ps1
Normal file
9
Examples/JustCharts/CentralLimitTheorem.ps1
Normal file
@@ -0,0 +1,9 @@
|
||||
ColumnChart -Title "Central Limit Theorem" ($(
|
||||
for ($i = 1; $i -le 500; $i++) {
|
||||
$s=0
|
||||
for ($j = 1; $j -le 100; $j++){
|
||||
$s+=Get-Random -Minimum 0 -Maximum 2
|
||||
}
|
||||
$s
|
||||
}
|
||||
) | Sort | Group | select Count, Name)
|
||||
6
Examples/JustCharts/PieChartHandles.ps1
Normal file
6
Examples/JustCharts/PieChartHandles.ps1
Normal file
@@ -0,0 +1,6 @@
|
||||
# Get only processes hat have a company name
|
||||
# Sum up handles by company
|
||||
# Show the Pie Chart
|
||||
|
||||
PieChart -Title "Total Handles by Company" `
|
||||
(Invoke-Sum (Get-Process|Where company) company handles)
|
||||
7
Examples/JustCharts/PieChartPM.ps1
Normal file
7
Examples/JustCharts/PieChartPM.ps1
Normal file
@@ -0,0 +1,7 @@
|
||||
# Get only processes hat have a company name
|
||||
# Sum up PM by company
|
||||
# Show the Pie Chart
|
||||
|
||||
PieChart -Title "Total PM by Company" `
|
||||
(Invoke-Sum (Get-Process|Where company) company pm)
|
||||
|
||||
9
Examples/JustCharts/TargetData.ps1
Normal file
9
Examples/JustCharts/TargetData.ps1
Normal file
@@ -0,0 +1,9 @@
|
||||
$PropertyNames = echo Cost Date Name
|
||||
|
||||
New-PSItem 1.1 1/1/2015 John $PropertyNames
|
||||
New-PSItem 2.1 1/2/2015 Tom
|
||||
New-PSItem 5.1 1/2/2015 Dick
|
||||
New-PSItem 11.1 1/2/2015 Harry
|
||||
New-PSItem 7.1 1/2/2015 Jane
|
||||
New-PSItem 22.1 1/2/2015 Mary
|
||||
New-PSItem 32.1 1/2/2015 Liz
|
||||
1
Examples/JustCharts/TryBarChart.ps1
Normal file
1
Examples/JustCharts/TryBarChart.ps1
Normal file
@@ -0,0 +1 @@
|
||||
BarChart (.\TargetData.ps1) "A BarChart"
|
||||
1
Examples/JustCharts/TryColumnChart.ps1
Normal file
1
Examples/JustCharts/TryColumnChart.ps1
Normal file
@@ -0,0 +1 @@
|
||||
ColumnChart (.\TargetData.ps1) "A ColumnChart"
|
||||
1
Examples/JustCharts/TryPieChart.ps1
Normal file
1
Examples/JustCharts/TryPieChart.ps1
Normal file
@@ -0,0 +1 @@
|
||||
PieChart (.\TargetData.ps1) "A PieChart"
|
||||
Reference in New Issue
Block a user