Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 3 additions & 4 deletions Code/Classes/003.pshtml.components.charts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,8 @@ Class ChartAnimation {
}

Class ChartOptions {
[int]$barPercentage = 0.9
[Int]$categoryPercentage = 0.8
[bool]$responsive = $false
[String]$barThickness
[Int]$maxBarThickness
[Bool] $offsetGridLines = $true
[scales]$scales = [scales]::New()
[ChartTitle]$title = [ChartTitle]::New()
Expand Down Expand Up @@ -435,7 +432,9 @@ Class ChartOptions {
#region Charts

Class BarChartOptions : ChartOptions {

[int]$barPercentage = 0.9
[String]$barThickness
[Int]$maxBarThickness
}

Class horizontalBarChartOptions : ChartOptions {
Expand Down
2 changes: 1 addition & 1 deletion PSHTML/Examples/Charts/Chart01/Chart1.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $HTMLPage = html {
$Data3 = @(4,1,6,12,17,25,18,17,22,30,35,44)
$Labels = @("January","February","Mars","April","Mai","June","July","August","September","October","November","december")

$dsb3 = New-PSHTMLChartBarDataSet -Data $data3 -label "2018" -BackgroundColor ([Color]::blue )
$dsb3 = New-PSHTMLChartBarDataSet -Data $data3 -label "2018" -BackgroundColor "blue"

New-PSHTMLChart -type bar -DataSet $dsb3 -title "Bar Chart Example" -Labels $Labels -CanvasID $BarCanvasID

Expand Down
19 changes: 9 additions & 10 deletions PSHTML/Examples/Charts/Chart04/4Charts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,24 @@ $HTMLPage = html {
script -src "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js" -type "text/javascript"


#script -content {
script -content {

$Data1 = @(34,7,11,19)
$Data2 = @(40,2,13,17)
$Data3 = @(53,0,0,4)
$Labels = @("Closed","Unresolved","Pending","Open")


$dsb1 = New-PSHTMLChartBarDataSet -Data $data1 -label "March" -BackgroundColor ([Color]::Orange)
$dsb2 = New-PSHTMLChartBarDataSet -Data $data2 -label "April" -BackgroundColor ([Color]::red)
$dsb3 = New-PSHTMLChartBarDataSet -Data $data3 -label "Mai" -BackgroundColor ([Color]::Green )
$dsb1 = New-PSHTMLChartBarDataSet -Data $data1 -label "March" -BackgroundColor "Orange"
$dsb2 = New-PSHTMLChartBarDataSet -Data $data2 -label "April" -BackgroundColor "red"
$dsb3 = New-PSHTMLChartBarDataSet -Data $data3 -label "Mai" -BackgroundColor "Green"

New-PSHTMLChart -type bar -DataSet $dsb1,$dsb2,$dsb3 -title "Bar Chart v2" -Labels $Labels -CanvasID $BarCanvasID -tobase64

$red = [Color]::red
$dsl1 = New-PSHTMLChartLineDataSet -lineColor "cyan" -Data $data1 -label "March"

$dsl2 = New-PSHTMLChartLineDataSet -Data $data2 -label "April" -LineColor ([Color]::Orange )
$dsl3 = New-PSHTMLChartLineDataSet -Data $data3 -label "Mai" -LineColor ([Color]::Green)
$dsl2 = New-PSHTMLChartLineDataSet -Data $data2 -label "April" -LineColor "Orange"
$dsl3 = New-PSHTMLChartLineDataSet -Data $data3 -label "Mai" -LineColor "Green"


New-PSHTMLChart -type Line -DataSet @($dsl1,$dsl2,$dsl3) -title "Line Chart v2" -Labels $Labels -CanvasID $lineCanvasID -tobase64
Expand All @@ -83,14 +82,14 @@ $HTMLPage = html {

$colors = @("yellow","red","green","orange")
$dsd1 = New-PSHTMLChartDoughnutDataSet -Data $data1 -label "March" -backgroundcolor $colors -hoverbackgroundColor $Colors
$dsd2 = New-PSHTMLChartDoughnutDataSet -Data $data2 -label "April" -BackgroundColor ([Color]::red)
$dsd3 = New-PSHTMLChartDoughnutDataSet -Data $data3 -label "Mai" -BackgroundColor ([Color]::Green )
$dsd2 = New-PSHTMLChartDoughnutDataSet -Data $data2 -label "April" -BackgroundColor "red"
$dsd3 = New-PSHTMLChartDoughnutDataSet -Data $data3 -label "Mai" -BackgroundColor "green"


New-PSHTMLChart -type doughnut -DataSet @($dsd1) -title "Doughnut Chart v2" -Labels $Labels -CanvasID $DoughnutCanvasID -tobase64


#}
}


}
Expand Down
2 changes: 1 addition & 1 deletion PSHTML/Examples/Charts/Chart05/BasicBarChart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $HTMLPage = html {
$Labels = @("Closed","Unresolved","Pending","Open")


$dsb1 = New-PSHTMLChartBarDataSet -Data $data1 -label "March" -BackgroundColor ([Color]::blue)
$dsb1 = New-PSHTMLChartBarDataSet -Data $data1 -label "March" -BackgroundColor "blue"

New-PSHTMLChart -type bar -DataSet $dsb1 -title "Ticket Statistics" -Labels $Labels -CanvasID $BarCanvasID

Expand Down
2 changes: 1 addition & 1 deletion PSHTML/Examples/Charts/Chart06/BasicPieChart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ $HTMLPage = html {
}


$OutPath = $Home\BasicPieChart.html"
$OutPath = "$Home\BasicPieChart.html"
$HTMLPage | out-file -FilePath $OutPath -Encoding utf8
start $outpath
2 changes: 1 addition & 1 deletion PSHTML/Examples/Charts/Chart10/PolarAreaChart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $HTMLDocument = html {
$HoverColors = @('DarkGreen', 'yellow', 'Orange', 'grey', 'DarkGrey', 'blue', 'Magenta', 'DarkMagenta', 'red', 'Cyan', 'DarkCyan', 'green' )
$Data1 = @(17, 25, 18, 17, 10, 28, 35, 50, 44, 10, 32, 72)

$dsb1 = New-PSHTMLChartPolarAreaDataSet -Data $data1 -BackgroundColor $Colors -hoverBackgroundColor $HoverColors -PointRadius
$dsb1 = New-PSHTMLChartPolarAreaDataSet -Data $data1 -BackgroundColor $Colors -hoverBackgroundColor $HoverColors

New-PSHTMLChart -type polarArea -DataSet $dsb1 -title 'PolarArea Chart Example' -Labels $Labels -CanvasID $PolarCanvasID
}
Expand Down
20 changes: 7 additions & 13 deletions PSHTML/PSHTML.psd1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# Module manifest for module 'PSHTML'
# Module manifest for module 'PSGet_PSHTML'
#
# Generated by: Stéphane van Gulick
#
# Generated on: 20/10/2019
# Generated on: 21.10.2019
#

@{
Expand Down Expand Up @@ -32,13 +32,13 @@ Copyright = '(c) 2018 Stéphane van Gulick. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Cross platform PowerShell module to generate HTML markup language and create awesome web pages!'

# Minimum version of the PowerShell engine required by this module
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.0'

# Name of the PowerShell host required by this module
# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# Minimum version of the Windows PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
Expand Down Expand Up @@ -127,17 +127,11 @@ PrivateData = @{
# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/Stephanevg/PSHTML/blob/master/Change_Log.md'

# Prerelease string of this module
# Prerelease = ''

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()
# ExternalModuleDependencies = ''

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
Expand Down
Loading