Database Reference
In-Depth Information
$chart = New-object System.Windows.Forms.DataVisualization.
Charting.Chart `
-property @{
Width=800; Height=400; BackColor=[System.Drawing.
Color]::Transparent
Dock = [System.Windows.Forms.DockStyle]::Fill
}
$chartTitle = $chart.Titles.Add("Average Salaries by Job Code")
$chartTitle.Font = new-object drawing.font("calibri",18,[drawing.
fontstyle]::Regular)
4.
Set up the chart area:
$chartArea = New-Object System.Windows.Forms.DataVisualization.
Charting.ChartArea
$chartArea.Area3DStyle.Enable3D = $true
5.
Set up the Y-axis of the chart area:
$yAxis = $chartArea.AxisY
$yAxis.Title = "Salaries"
$yAxis.Interval = 5000
$yAxis.LabelAutoFitMinFontSize = 16
$yAxis.LabelStyle.Font = new-object drawing.
font("calibri",14,[drawing.fontstyle]::Regular)
$yAxis.TitleFont = new-object drawing.font("calibri",18,[drawing.
fontstyle]::Regular)
6.
Set up the X-axis of the chart area:
$xAxis = $chartArea.AxisX
$xAxis.Interval = 1
$xAxis.LabelAutoFitMinFontSize = 16
$xAxis.Title = "Job Codes"
$xAxis.LabelStyle.Font = new-object drawing.
font("calibri",14,[drawing.fontstyle]::Regular)
$xAxis.TitleFont = new-object drawing.font("calibri",18,[drawing.
fontstyle]::Regular)
7.
Add the chart area:
$chart.ChartAreas.Add($ChartArea)
Set up the chart data binding:
$series = $chart.Series.Add("Data")
$series.XValueMember = "job_id"; $series.YValueMembers = "avg_sal"
$series["DrawingStyle"] = "Cylinder"
$chart.DataSource = $dt; $chart.DataBind()
 
Search WWH ::




Custom Search