components.nf-range-markers Class
A container and manager for nf-range-marker components.
Used to draw an association between nf-range-marker components so they
can be laid out in a manner in which they don't collide.
Item Index
Methods
_trackedDataChanged
()
private
Observes changes to tracked data and sends the didTrack action.
init
()
Initalization method that gets the nf-graph parent
and assigns it to graph
NOTE: all object that mixin and have init, must call super.init()
registerMarker
-
marker
Adds the passed marker to the markers list, and sets the prevMarker and nextMarker
properties on the marker component and it's neighbor.
Parameters:
-
markerNf-range-markerthe range marker to register with this container
unregisterMarker
-
marker
Removes the marker from the markers list. Also updates the nextMarker and prevMarker
properties of it's neighboring components.
Parameters:
-
markerNf-range-markerthe range marker to remove from the
markerslist.
Properties
didTrack
String
The action to send on didTrack.
Default: null
hoverData
Object an object with the following values:
- point: an x, y pair for the exact px coordinates inside the graph-content
- graphX: domain x value at mouse position
- graphY: domain y value at mouse position
- x: nearest x data value
- y: nearest y data value
- data: nearest raw data
- renderX: domain x value to render a tracking dot at (stacked areas are offset)
- renderY: domain x value to render a tracking dot at (stacked areas are offset)
- mouseX: mouse x position in pixels
- mouseY: mouse y position in pixels
The value of the data that is being tracked by the component, ONLY if the graph-content is currently being hovered.
Default: null
isRangeMarkerContainer
Boolean
Used by nf-range-marker to identify the nf-range-markers container
Default: true
markerMargin
Number
The margin, in pixels, between the markers
Default: 10
markers
Array
The marker components registered with this container
orient
String
Sets the orientation of the range markers.
'bottom'- Range markers start at the bottom and stack upward'top'- Range markers start at the top and stack downward
Default: 'bottom'
showTrackingDot
Boolean
Gets or sets whether the tracking dot should be shown at all.
Default: true
trackedData
Object an object with the following values:
- point: an x, y pair for the exact px coordinates inside the graph-content
- graphX: domain x value at mouse position
- graphY: domain y value at mouse position
- x: nearest x data value
- y: nearest y data value
- data: nearest raw data
- renderX: domain x value to render a tracking dot at (stacked areas are offset)
- renderY: domain x value to render a tracking dot at (stacked areas are offset)
- mouseX: mouse x position in pixels
- mouseY: mouse y position in pixels
The value of the data that is being tracked by the component.
Default: null
trackingDotRadius
Number
The radius of the tracking dot in pixels
Default: 2.5
trackingMode
String
Gets or sets the tracking mode of the component.
Possible values are:
- 'none': no tracking behavior
- 'hover': only track while mouse hover
- 'snap-last': track while mouse hover, but snap to the last data element when not hovering
- 'snap-first': track while mouse hover, but snap to the first data element when not hovering
- 'selected-hover': The same as
'hover'tracking mode, but only when the compononent is selected - 'selected-snap-last': The same as
'snap-last'tracking mode, but only when the compononent is selected - 'selected-snap-first': The same as
'snap-first'tracking mode, but only when the compononent is selected
Default: 'none'
