From 78d6ecb12d333a8cec205f36bd1f1661136b78d8 Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Sun, 26 Nov 2023 10:51:01 +0100 Subject: [PATCH] Add charts design example --- .../Example-Charts/Example-ChartsDesign.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Examples/Example-Charts/Example-ChartsDesign.ps1 diff --git a/Examples/Example-Charts/Example-ChartsDesign.ps1 b/Examples/Example-Charts/Example-ChartsDesign.ps1 new file mode 100644 index 00000000..c61c2851 --- /dev/null +++ b/Examples/Example-Charts/Example-ChartsDesign.ps1 @@ -0,0 +1,18 @@ +Import-Module .\PSWriteHTML.psd1 -Force + +New-HTML -TitleText 'My title' -Online -FilePath $PSScriptRoot\Example-ChartsDesign.html { + New-HTMLSection -HeaderText 'Bar Charts - Test' -CanCollapse { + New-HTMLPanel { + New-HTMLChart { + New-ChartLegend -LegendPosition bottom -HorizontalAlign right -Color Red, Blue, Yellow -DisableOnItemHoverHighlightDataSeries -DisableOnItemClickToggleDataSeries + New-ChartAxisY -LabelMaxWidth 200 -LabelAlign left -Show -LabelFontColor Red, Blue, Green -TitleText 'This is title for y Axis' -TitleColor Red + New-ChartBarOptions -Distributed + New-ChartBar -Name 'Test very long' -Value 1 + New-ChartBar -Name 'Test1' -Value 20 + New-ChartBar -Name 'Test2 and even longer title' -Value 30 + + New-ChartDesign -GradientShade light -GradientType diagonal1 -GradientInverseColors + } -Title 'Testing Title' -TitleAlignment center -SubTitle 'Because SubTitles are better' -SubTitleAlignment center -SubTitleFontSize 30 -TitleColor Gold + } + } +} -Show \ No newline at end of file