-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathExample15.ps1
More file actions
35 lines (28 loc) · 1.1 KB
/
Copy pathExample15.ps1
File metadata and controls
35 lines (28 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$PieCanvasID = "piecanvas"
$Html = html {
head {
title 'Integrating BootStrap JQuery and ChartJS.'
Write-PSHTMLAsset -Name Jquery
Write-PSHTMLAsset -Name BootStrap
Write-PSHTMLAsset -Name Chartjs
}
body {
div -Class "Container"{
h1 -Class "text-uppercase" 'Implementing BootStrap example.'
P {
"This is a very simple example to demonstrate how Bootstrap integrated with PSHTML"
}
canvas -Height 400px -Width 400px -Id $PieCanvasID {
}
}
Script -content {
$Data1 = @(34,7,11,19)
$Labels = @("Closed","Unresolved","Pending","Open")
$colors = @("Lightgreen","red","Blue","Yellow")
$dsp1 = New-PSHTMLChartPieDataSet -Data $data1 -label "March" -BackgroundColor $colors
New-PSHTMLChart -type pie -DataSet $dsp1 -title "Pie Chart v2" -Labels $Labels -CanvasID $PieCanvasID
}
}
}
$Html | Out-File -FilePath ".\Export.html" -Encoding utf8
start .\Export.html