Skip to content

Latest commit

 

History

History
215 lines (163 loc) · 9.04 KB

API.md

File metadata and controls

215 lines (163 loc) · 9.04 KB

Classes

Pulseplot

The main Pulseplot class.

Pulseplot

The main Pulseplot class.

Kind: global class

new Pulseplot(options)

Initialize a new Pulseplot.

Param Type Default Description
options Object
[options.width] number 0 canvas width in px, 0 = auto
[options.height] number 150 canvas height in px
[options.yHi] number 50 Marks y-height
[options.yLo] number 100 Spaces y-height
[options.yHintLo] number 115 Hints y-bottom
[options.yHintHi] number 35 Hints y-top
[options.yHintText] number 125 Hints text y-offset
[options.scroll] number 0 Initial scroll offset
[options.zoom] number 1 Initial zoom factor
[options.unlockable] boolean false Enable unlockable
[options.scrollzoom] boolean false Enable scrollZoom
[options.slicer] Slicers Slicer to apply, unset = auto
options.parent string | Object Container element or selector
[options.renderInfo] string | Object Info element or selector
[options.theme] string | Object Theme name or options, see setTheme

pulseplot.setTheme(options)

Set a color theme.

Kind: instance method of Pulseplot

Param Type Default Description
options string | Object Theme name or theme options
[options.hiStroke] string "'#3c3'" Mark stroke color
[options.hiFill] string "'rgba(51,204,51,0.1)'" Mark fill color
[options.hiLine] number 3 Mark line width
[options.hiDash] Array.<number> [] Mark dash
[options.loStroke] string "'#c33'" Space stroke color
[options.loFill] string "'rgba(204,204,204,0.1)'" Space fill color
[options.loLine] number 3 Space line width
[options.loDash] Array.<number> [] Space dash
[options.edgeStroke] string "'#ccc'" Edges stroke color
[options.edgeLine] number 1 Edges line width
[options.edgeDash] Array.<number> [] Edge dash
[options.textFill] string "'#666'" Texts color
[options.dotFill] string "'#999'" Dots color
[options.hintStroke] string "'#aaf'" Hints stroke color
[options.hintDash] Array.<number> [3, 2] Hints dash
[options.hintLine] number 1 Hints line width
[options.hintAltStroke] string "'#f99'" Error hints stroke color
[options.hintAltDash] Array.<number> [3, 2] Error hints dash
[options.hintAltLine] number 3 Error hints line width
[options.hintFill] string "'#448'" Hints text color
[options.timeLabelFill] string "'#333'" Time label text color
[options.timeMinorFill] string "'#CCC'" Time minor tick color
[options.timeMajorFill] string "'#666'" Time major tick color
[options.font] string "'10px sans-serif'" Text font

pulseplot.heightDefaults([height]) ⇒ Object

Get all height options based on total height value.

Kind: instance method of Pulseplot
Returns: Object - - All height option defaults

Param Type Default Description
[height] number 120 Total height

pulseplot.enableUnlockable()

Enables mouse and touch scroll zoom on double click.

Kind: instance method of Pulseplot

pulseplot.disableUnlockable()

Disables mouse and touch scroll zoom on double click.

Kind: instance method of Pulseplot

pulseplot.enableScrollZoom()

Enables mouse and touch scroll zoom.

Kind: instance method of Pulseplot

pulseplot.disableScrollZoom()

Disables mouse and touch scroll zoom.

Kind: instance method of Pulseplot

pulseplot.destroy()

Release all event handlers and resources.

Kind: instance method of Pulseplot

pulseplot.setOption(opt, value)

Set an option on the Pulseplot to some value.

Kind: instance method of Pulseplot

Param Type Description
opt string Option name, see new
value Object The new value for the option

pulseplot.setOptions(opts)

Set a number of options on the Pulseplot to some values.

Kind: instance method of Pulseplot

Param Type Description
opts Object A key/value object of options to set, see new

pulseplot.setData(filedata)

Set new data on the Pulseplot.

Kind: instance method of Pulseplot

Param Type Description
filedata string | Object A URL string or File data object of { fileBuffer: ArrayBuffer, name: string, size: number, type: string }

Pulseplot.slicerOptions

Get all possible slicer options.

Kind: static property of Pulseplot

Pulseplot.codingOptions

Get all possible coding options.

Kind: static property of Pulseplot

Slicers : enum

Possible slicer values.

Kind: global enum
Read only: true
Properties

Name Type Default
PCM string "PCM"
PWM string "PWM"
PPM string "PPM"
MC string "MC"
DM string "DM"
NRZI string "NRZI"
CMI string "CMI"
PIWM string "PIWM"

Codings : enum

Possible coding values.

Kind: global enum
Read only: true
Properties

Name Type Default
ManchesterGET string "Manchester-GET"
ManchesterIEEE string "Manchester-IEEE"
DifferentialManchester string "Differential-Manchester"