PrintChartPreview Class
Item Index
Methods
adjustImages
()
Undefined
Prevents images (such as the Chart Header) from bleeding off the side of the preview container.
Returns:
auditAction
-
action
Audits the given action for each chart in the preview
Parameters:
-
actionStringAudit action
Returns:
buildChartOutline
-
chart
Builds an outline of the chart structure derived from the markup by walking over each element with a data-key set. Top level sections are marked with a data-section attribute. Fields that appear under a section are marked with a data-field attribute. Fields that contain a list of data are marked with a data-list attribute. Inidivudal list items are marked with a data-list-item attribute.
Parameters:
-
chartObjectThe chart data
Returns:
PrintChartOutline object
cloneImages
-
windowObject
Clone canvas elements from the print preview html into the new window context. Unfortunately these don't copy over properly if you just copy the mark up alone. We need to actually re-render the image data in the print window.
Parameters:
-
windowObjectWindowwindow
Returns:
getContent
-
id -
[options]
Get preview content.
Parameters:
-
idIntegerID of chart
-
[options]Boolean optionalArgument container
-
[removeHidden]Boolean optionalRemoves hidden sections from html
-
Returns:
HTML Content
preparePrint
-
id
Prepare the chart print preview content for printing
Parameters:
-
idInteger | StringChart ID#
Returns:
HTML of chart
print
()
Undefined
Print the chart. Must be called after the view has rendered the chart data, otherwise there is nothing to print!
Returns:
render
-
model
render the print chart preview
Parameters:
-
modelPrintChartModelModel to render
Returns:
showAll
-
id -
show
Shows or hides all non-disabled fields within the print preview
Parameters:
-
idString | IntegerID of chart
-
showBooleanShow flag
Returns:
showAllCharts
()
Undefined
Shows all charts in the preview pane
Returns:
showChart
-
id
Shows the chart with the given ID in the preview pane and hides all others
Parameters:
-
idIntegerID of chart
Returns:
showSection
-
id -
key -
show
Shows or hides the section based on the data-key value Can be restricted by a chart ID, or pass in "all"
Parameters:
-
idString | IntegerID of chart
-
keyStringKey of section
-
showBooleanShow flag