Class: graphly

graphly. graphly

The graphly class.

new graphly(options)

Parameters:
Name Type Description
options Object Parameters to configure the plot.
Properties
Name Type Argument Default Description
el String Required d3 selector identifier for container
renderSettings RenderSettings Configuration options for what should be rendered.
dataSettings DataSettings Additional information to set parameter specific rules.
debounceActive boolean <optional>
true Setting to determine if rendering is done once user interaction is finished using a prerendered image to show interaction. For less then ~6k points debounce can be set to false.
displayParameterLabel boolean <optional>
true Setting to configure if parameter label box is always shown or is hidden and can be opened with the cog symbol.
replaceUnderscore boolean <optional>
false Setting to configure if underlines appearing in parameter labels should be replaced by spaces.
displayColorscaleOptions boolean <optional>
true Setting to allow adding colorscale as third dimensio nto rendered points
displayAlphaOptions boolean <optional>
true Enable/disable possibility to change alpha value for rendered parameters
fixedSize boolean <optional>
false Enable/disable use of fixed size. Rendering is done for specific size not allowing resizing and not using margins in the extent of the axis.
fixedWidth Number <optional>
1000 Width used when using fixed size rendering.
fixedHeight Number <optional>
500 Height used when using fixed size rendering.
autoColorExtent boolean <optional>
false Dynamically adapt color extent for color range parameters
filterManager Object <optional>
Instanced filtermanager object to connect to.
enableFit boolean <optional>
true Enable/disable fitting functionality.
logX boolean <optional>
false Use logarithmic scale for x axis.
logY boolean <optional>
false Use logarithmic scale for left y axis.
logY2 boolean <optional>
false Use logarithmic scale for right y axis.
colorAxisTickFormat String <optional>
'g' d3 format string to use as default tick format.
defaultAlpha Number <optional>
0.9 Alpha value used as default when rendering.
debug boolean <optional>
false Show debug messages
enableSubXAxis boolean <optional>
false Enable selection option for x axis subticks, can also be a String if only enabled for one parameter.
enableSubYAxis boolean <optional>
false Enable selection option for x axis subticks, can also be a String if only enabled for one parameter.
labelAllignment String <optional>
'right' allignment for label box
connectFilteredPoints boolean <optional>
false option to render lines between points when there are filtered points in between
colorscales Array <optional>
Array of strings with colorscale identifiers that should be provided for selection, default list includes colorscales from colorscalesdef (eox-a)
showFilteredData boolean <optional>
true Option to show greyed out data points when filtering
disableAntiAlias boolean <optional>
false Allows disabling antialias of the rendering context
Properties:
Name Type Argument Default Description
multiYAxis boolean <optional>
true Adds controls for managing multiple y axis with single x axis,
Fires:

Methods


setRenderSettings(settings)

Update used render settings without re-rendering
Parameters:
Name Type Description
settings Object See renderSettings description of graphly constructor.

setDataSettings(settings)

Update used data settings without re-rendering
Parameters:
Name Type Description
settings Object See dataSettings description of graphly constructor.

saveImage( [format] [, resFactor])

Save current plot as rendering opening save dialog for download.
Parameters:
Name Type Argument Default Description
format String <optional>
png Format to save rendering, possible formats are png, jpeg, svg.
resFactor Number <optional>
1 Factor to scale rendering up/down for creating higher res renderings

getCanvasImage()

Get currant canvas as data URI (using toDataURL).
Returns:
A DOMString containing the requested image data URI.
Type
DOMString

getCanvas()

Get currant canvas node.
Returns:
Canvas DOM node element.
Type
HTMLElement

loadData(data)

Load data from data object
Parameters:
Name Type Description
data Object Data object containing parameter identifier as keys and arrays of values as corresponding parameter. {'parId1': [1, 2, 3], 'parId2': [0.6, 0.1, 3.2]}

resize( [debounce])

Resize graph
Parameters:
Name Type Argument Default Description
debounce boolean <optional>
true Do not resize if consecutive resize calls are being made.

renderData( [updateReferenceCanvas])

Render the data as graph
Parameters:
Name Type Argument Default Description
updateReferenceCanvas boolean <optional>
true Update the corresponding color reference canvas

Events


pointSelect

Fires when a point is selected in plot position information if it was configured which parameter is mapped to lat, lon and altitude.
Properties:
Name Type Description
position Object Object is passed containing Latitude, Longitude and Radius parameter.

axisChange

Event is fired When modifying a parameter for any of the axis settings.

colorsScaleChange

Fires when the colorscale for a parameter is changed
Properties:
Name Type Description
containing Object parameter key and colorscale identifier

rendered

Event is fired when graph has finished rendering plot.