components.nf-range-marker Class
Draws a rectangular strip with a templated label on an nf-graph
.
Should always be used in conjunction with an nf-range-markers
container component.
Item Index
Methods
Methods
_setup
()
private
Initialization function that registers the range marker with its parent and populates the container property
_trackedDataChanged
()
private
Observes changes to tracked data and sends the didTrack action.
_unregister
()
private
Unregisters the range marker from its parent when the range marker is destroyed.
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()
Properties
bottom
Number
The computed bottom of the range marker, not including the bottom margin.
didTrack
String
The action to send on didTrack
.
Default: null
height
Number
The height of the range marker.
Default: 10
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
labelTransform
String
The computed SVG transform fo the range marker label container.
marginBottom
Number
The spacing below the range marker.
Default: 3
marginTop
Number
The spacing above the range marker.
Default: 10
parentController
Ember.Controller
private
The parent controller to use for template binding
plotData
Unknown
private
The model for adding plots to the graph
scaleOffsetX
Number
The offset, in pixels, for the x scale
Default: 0
scaleOffsetY
Number
The offset, in pixels, for the y scale
Default: 0
scaleZoomX
Number
The zoom multiplier for the x scale
Default: 1
scaleZoomY
Number
The zoom multiplier for the y scale
Default: 1
showTrackingDot
Boolean
Gets or sets whether the tracking dot should be shown at all.
Default: true
totalHeight
Number
The computed total height of the range marker including its margins.
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'
transform
String
The computed SVG transform of the range marker container
width
Number
The computed width of the range marker.
x
Number
The computed x position of the range marker.
xMax
Unknown
The maximum domain value for the range to mark.
Default: 0
xMin
Unknown
The minimum domain value for the range to mark.
Default: 0
xScale
d3.scale
The x scale used by this component
y
Number
The computed y position of the range marker.
yScale
d3.scale
The y scale used by this component