APIs

Show:

Methods

adjustImages

() Undefined

Prevents images (such as the Chart Header) from bleeding off the side of the preview container.

Returns:

Undefined:

auditAction

(
  • action
)
Undefined

Audits the given action for each chart in the preview

Parameters:

  • action String

    Audit action

Returns:

Undefined:

buildChartOutline

(
  • chart
)
Object

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:

  • chart Object

    The chart data

Returns:

Object:

PrintChartOutline object

cloneImages

(
  • windowObject
)
Undefined

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:

  • windowObject Window

    window

Returns:

Undefined:

getContent

(
  • id
  • [options]
)
String

Get preview content.

Parameters:

  • id Integer

    ID of chart

  • [options] Boolean optional

    Argument container

    • [removeHidden] Boolean optional

      Removes hidden sections from html

Returns:

String:

HTML Content

preparePrint

(
  • id
)
String

Prepare the chart print preview content for printing

Parameters:

  • id Integer | String

    Chart ID#

Returns:

String:

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:

Undefined:

render

(
  • model
)
Undefined

render the print chart preview

Parameters:

  • model PrintChartModel

    Model to render

Returns:

Undefined:

showAll

(
  • id
  • show
)
Undefined

Shows or hides all non-disabled fields within the print preview

Parameters:

  • id String | Integer

    ID of chart

  • show Boolean

    Show flag

Returns:

Undefined:

showAllCharts

() Undefined

Shows all charts in the preview pane

Returns:

Undefined:

showChart

(
  • id
)
Undefined

Shows the chart with the given ID in the preview pane and hides all others

Parameters:

  • id Integer

    ID of chart

Returns:

Undefined:

showSection

(
  • id
  • key
  • show
)
Undefined

Shows or hides the section based on the data-key value Can be restricted by a chart ID, or pass in "all"

Parameters:

  • id String | Integer

    ID of chart

  • key String

    Key of section

  • show Boolean

    Show flag

Returns:

Undefined: