Skip to content

Printing charts scales them incorrectly #521

@andrewducker

Description

@andrewducker

If I try to print the html page produced by PSWriteHTML then any charts end up half on the page and half vanishing off the side, even if they entirely display on the page. This is true even if the tables that display correctly in the browser also display correctly in the printout.

Dashboard -Name "Test" -FilePath .\PrintProblemDemo.html  {
	Tab -Name "Test Tab"{
		Section -Name "Overview"{
			Chart {
				ChartToolbar
				ChartBarOptions -Vertical bar -DataLabelsEnabled $true
				ChartBar -Name "Status" -Value 5, 4, 3, 2, 1 -Color "Green","Orange","Orange","Red","Red"
				ChartLegend "Passed", "Untested","Retest","Blocked","Failed"
			}
		}
		Section -Name "Data"{
			$counts = [pscustomobject]@{Passed = 5; Untested=4; Retest=3; Blocked=2; Failed=1} | select passed,untested,retest,blocked,failed
			Table -InvokeHTMLTags -Datatable $counts -DisableSearch -DisablePaging -HideFooter -DisableButtons -DisableInfo -Title "Summary of Test Run results"
		}
	}
}

In the browser:

Image

Printed:

Image

Is this something that we can fix locally? Or is "Printing web pages with charts in them" not really possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions