components.nf-right-tick Class
Draws a line and a chevron at the specified domain value
on the right side of an nf-graph
.
Tips
- Position outside of
nf-graph-content
component, but insidenf-graph
. - Adding
paddingRight
tonf-graph
component will not affectnf-right-tick
's position.
Item Index
Methods
Methods
_getElements
()
private
Gets the elements required to do the d3 transitions
_nonTransitionalUpdate
()
private
Updates the tick position without a transition.
_trackedDataChanged
()
private
Observes changes to tracked data and sends the didTrack action.
_transitionalUpdate
()
private
performs the D3 transition to move the tick to the proper position.
_triggerNonTransitionalUpdate
()
private
Schedules the update of non-transitional positions
_triggerTransition
()
private
Schedules the transition when value
changes on on init.
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
didTrack
String
The action to send on didTrack
.
Default: null
duration
Number
The transition duration in milliseconds
Default: 400
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
isVisible
Unknown
private
Sets the visibility of the component. Returns false if y
is not
a numeric data type.
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
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
private
The SVG transform used to render the tick
value
Number
The domain value at which to place the tick
Default: null
xScale
d3.scale
The x scale used by this component
y
Number
The calculated y coordinate of the tick
yScale
d3.scale
The y scale used by this component