API Docs for:
Show:

mixins.graph-data-graphic Class

Extends Ember.Mixin
Module: utils/nf/array-helpers

This is mixed in to child components that need to register data with the graph. Includes methods for extracting, sorting and scrubbing data for use in graphing components.

Requires mixins.graph-registered-graphic and mixins.graph-has-graph-parent

Methods

getActualTrackData

(
  • renderX
  • renderY
  • data
)
Object

Gets the actual data at a rendered tracking point passed to it. This is overridden in nf-area to account for stacking of data.

Parameters:

  • renderX Number

    the x domain value the data is rendered at

  • renderY Number

    the y domain value the data is rendered at

  • data Object

    the raw data from the point

Returns:

Object:

simple x, y point structure

Properties

data

Array

Gets or sets the data used by the component to plot itself.

Default: null

firstVisibleData

Object

The first element from renderedData that is actually visible within the x domain.

lastVisibleData

Object

The last element from renderedData that is actually visible within the x domain.

renderedData

Array

The list of data points from mixins.graph-data-graphc/mappedData:property that fits within the x domain, plus up to one data point outside of that domain in each direction.

xprop

String

The path of the property on each object in data to use as x data to plot on the graph.

Default: 'x'

xPropFn

Function

The function to get the x value from each data object

yprop

String

The path of the property on each object in data to use as y data to plot on the graph.

Default: 'y'

yPropFn

Function

The function to get the y value from each data object