Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
28e1bd8
Enhance module manifest with additional metadata including tags, lice…
rebelinux Feb 20, 2026
c22a8a3
Add validation for category names in StackedBarChart and implement te…
rebelinux Feb 20, 2026
c64ab81
Merge branch 'AsBuiltReport:dev' into dev
rebelinux Feb 20, 2026
2e25904
Update Pester workflow to use actions/checkout@v6 and setup .NET 8.0,…
rebelinux Feb 20, 2026
2b15a7c
Enhance Pester workflow to include conditional checks for OS-specific…
rebelinux Feb 20, 2026
eafc462
Add Windows PowerShell build and copy steps to Pester workflow
rebelinux Feb 20, 2026
d875d9f
Enhance Pester and Release workflows for MacOS ARM64 support and upda…
rebelinux Feb 20, 2026
6f6635c
Remove unnecessary module dependencies from Invoke-Tests script and c…
rebelinux Feb 21, 2026
936fdba
Remove conditional code coverage for Windows PowerShell in Pester wor…
rebelinux Feb 21, 2026
70af964
Enhance module import statements for macOS ARM and x86 architectures …
rebelinux Feb 21, 2026
c98b6e0
Refactor workflows and issue templates for consistency and clarity; e…
rebelinux Feb 21, 2026
179fc80
Update Pester workflow to list DLL files from macOS ARM directory
rebelinux Feb 21, 2026
605a1eb
Fix path for listing DLL files in macOS ARM directory in Pester workflow
rebelinux Feb 21, 2026
e9a3a18
Fix path for listing DLL files in macOS ARM directory in Pester workflow
rebelinux Feb 21, 2026
21b9428
Update paths for copying libraries and listing DLL files in Pester wo…
rebelinux Feb 21, 2026
7498556
Update Pester workflow to use PowerShell commands for copying librari…
rebelinux Feb 21, 2026
d5e1e75
Update Pester workflow to improve library copy commands and list DLL …
rebelinux Feb 21, 2026
b06a9a6
Update Pester workflow to use Unix-style copy command for macOS library
rebelinux Feb 21, 2026
9745b5b
Update Pester and Release workflows to use PowerShell copy commands a…
rebelinux Feb 21, 2026
f3c45ee
Fix module import paths for macOS ARM and x64 architectures in AsBuil…
rebelinux Feb 21, 2026
fe37d46
Update module version to 0.2.0 and add changelog entry for new features
rebelinux Feb 21, 2026
39f948a
Merge branch 'AsBuiltReport:dev' into dev
rebelinux Feb 21, 2026
87fce9b
Merge branch 'AsBuiltReport:dev' into dev
rebelinux Feb 21, 2026
1b723c0
Update issue templates: enhance bug report and change request forms
rebelinux Feb 21, 2026
a52541d
Fix validation check in Chart method to compare values count with cat…
rebelinux Feb 23, 2026
5855892
Merge branch 'AsBuiltReport:dev' into dev
rebelinux Feb 24, 2026
d1ede48
Refactor module import statements for macOS architecture and update R…
rebelinux Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AsBuiltReport.Chart/AsBuiltReport.Chart.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ switch ($PSVersionTable.PSEdition) {
$architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
if ($architecture -eq "Arm64" -or $architecture -eq "Arm") {
Write-Verbose "Architecture: ARM (Apple Silicon)"
Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug
Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar)

} elseif ($architecture -eq "X64" -or $architecture -eq "X86") {
Write-Verbose "Architecture: x86 (Intel)"
Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug
Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar)

} else {
Write-Verbose "Architecture: Unknown or other architecture"
Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar) -Verbose -Debug
Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}mac-osx{0}osx-arm64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar)
}
} elseif ($IsLinux) {
Import-Module ("$PSScriptRoot{0}Src{0}Assemblies{0}Core{0}linux-x64{0}AsBuiltReportChart.dll" -f [System.IO.Path]::DirectorySeparatorChar)
Expand Down
Empty file.
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@
<!-- ********** REMOVE THIS MESSAGE WHEN THE MODULE IS FUNCTIONAL ********** -->
## :exclamation: THIS ASBUILTREPORT MODULE IS CURRENTLY IN DEVELOPMENT AND MIGHT NOT YET BE FUNCTIONAL ❗

AsBuiltReport.Chart is a PowerShell module which works in conjunction with [AsBuiltReport.Core](https://github.com/AsBuiltReport/AsBuiltReport.Core).

[AsBuiltReport](https://github.com/AsBuiltReport/AsBuiltReport) is an open-sourced community project which utilises PowerShell to produce as-built documentation in multiple document formats for multiple vendors and technologies.

Please refer to the AsBuiltReport [website](https://www.asbuiltreport.com) for more detailed information about this project.
AsBuiltReport.Chart is a PowerShell module which provides a set of cmdlets for generating charts and visualizations in As Built Reports. This module is designed to work seamlessly with the AsBuiltReport.Core module, allowing users to create visually appealing and informative reports with ease.

# :beginner: Getting Started

Expand Down Expand Up @@ -85,6 +81,31 @@ update-module AsBuiltReport.Chart -Force
```

## :computer: Examples
<!-- ********** Add some examples. Use other AsBuiltReport modules as a guide. ********** -->
Here are some examples to get you going.

### Pie Chart Examples
```powershell
# Generate a Pie Chart with the title 'Test', values of 1 and 2, labels 'A' and 'B', and export the chart in PNG format. Enable the legend and set the width to 600 pixels, height to 400 pixels, title font size to 20, and label font size to 16.
New-PieChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -EnableLegend -Width 600 -Height 400 -TitleFontSize 20 -LabelFontSize 16
```
![PieChart](./Samples/PieChart.png)

### Bar Chart Examples
```powershell
# Generate a Bar Chart with the title 'Test', values of 1 and 2, labels 'A' and 'B', and export the chart in PNG format. Enable the legend and set the width to 600 pixels, height to 400 pixels, title font size to 20, and label font size to 16.
New-BarChart -Title 'Test' -Values @(1,2) -Labels @('A','B') -Format 'png' -EnableLegend -Width 600 -Height 400 -TitleFontSize 20 -LabelFontSize 16 -AxesMarginsTop 1
```
![BarChart](./Samples/BarChart.png)

### Stacked Bar Chart Examples
```powershell
# Generate a Stacked Bar Chart with the title 'Test', values of 1 and 2 for the first category and 3 and 4 for the second category, labels 'A' and 'B', legend categories 'Value1' and 'Value2', and export the chart in PNG format. Enable the legend, set the legend orientation to horizontal, align the legend to the upper center, set the width to 600 pixels, height to 400 pixels, title font size to 20, label font size to 16, and axes margins top to 1.
New-StackedBarChart -Title 'Test' -Values @(@(1,2),@(3,4)) -Labels @('A','B') -LegendCategories @('Value1','Value2') -Format 'png' -EnableLegend -LegendOrientation Horizontal -LegendAlignment UpperCenter -Width 600 -Height 400 -TitleFontSize 20 -LabelFontSize 16 -AxesMarginsTop 1
```
![StackedBarChart](./Samples/StackedBarChart.png)

## :x: Known Issues

- No known issues at this time.


2 changes: 1 addition & 1 deletion Sources/StackedBarChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal class StackedBar : Chart
static StackedBar() { }
public object Chart(List<double[]> values, string[] labels, string[] categoryNames, string filename = "output", int width = 400, int height = 300)
{
if (values.Count != categoryNames.Length)
if (values[0].Length != categoryNames.Length)
{
throw new Exception("Error: Values and category names must be equal.");
}
Expand Down