Class: AppMetricController

AppMetricDirective~ AppMetricController


new AppMetricController($scope, $element, ctrlName)

Sets up a controller to glue together the generic AppChart chart drawing
component with the <app-metric> AngularJS directive & scope. Enhances
the AppChartController by some functionality like linking together the x-
axis of various graphs, populating selected values to other directives
listening to seriesesValuesChanged events etc.

Parameters:
Name Type Description
$scope

the AngularJS scope of the directive where the chart should
be placed.

$element

the DOM element of the directive

ctrlName

the name of the controller in the angularjs scope

Source:

Extends

Methods


<static> getFactory(options)

Returns the factory function of the controller. The factory is used in
the directives .controller property. You have to specify some "options"
to the factory. The factory callback returned will accept exactly two
parameters: $scope and $element.

Parameters:
Name Type Description
options

see AppChartController.getFactory

Source:

dataUpdated()

To be called if the data property of the associated data object in the
directive / controller is changed or initialized.

Inherited From:
Source:

fitChart()

Initializes the display area (x- and y-axis domain) of the chart based
on whether the highlights object specifies an area the chart should
navigate to via the xRange property and base on whether the highlight
object's "looseness" property dictates that the chart should be re-fit
to the maximum viewable area.

Inherited From:
Source:

highlightsUpdatedHandler()

Returns a callback that can be invoked if the highlights object supplied
to the directive / controller is changed. Will delegate the highlight
change to the included AppChart object.

Overrides:
Source:

This function must be called when the directive using this controller links
the directive to a DOM element. It takes care of actually drawing the
chart into the DOM element.

Parameters:
Name Type Description
chartOptions

the chart options to create the AppChart with

dataTransformer

the data transform function to apply to the data
before the chart is drawn

Overrides:
Source:

loosenessUpdatedHandler()

Returns a callback that should be invoked any time the "looseness" value
of the highlights object is changed. The "looseness" value specifies
which amount of "guiding" the UI should enforce (looseness = 0:
storytelling mode, looseness 1 = storytelling mode with user
starting to explore the graph, looseness = 2: user has collapsed the
storytelling, looseness = 3: user has completely 'gone off on its own' and
selected other metrics, zoomed/panned in the graph etc.)

Inherited From:
Source:

metricHighlightedHandler()

Returns a callback that should be invoked any time a metric graph as a
whole is highlighted (mouseover'ed). Updates the highlights.metricId object
accordingly.

Source:

metricUnhighlightedHandler()

Returns a callback that should be invoked any time a metric graph as a
whole is unhighlighted (mouseout'ed). Updates the highlights.metricId
object accordingly.

Source:

seriesesValuesUpdatedHandler()

Returns a callback that can be invoked if a datapoint is selected. Will
update the highlights.seriesesValues object accordingly.

Source:

seriesHighlightedHandler()

Returns a callback that should be invoked any time a series is highlighted.
The callback accepts exactly one parameter: the seriesId. Will take care
that the highlights object (seriesId and looseness) is updated accordingly.

Inherited From:
Source:

seriesUnhighlightedHandler()

Returns a callback that should be invoked any time a series is
unhighlighted. The callback accepts exactly one parameter: the seriesId.
Will take care that the highlights object (seriesId and looseness) is
updated accordingly.

Inherited From:
Source:

xRangeUpdatedHandler()

Returns a callback that should be invoked every time the highlights.xRange
value is changed. Will take care that all charts scroll uniformely along
the x axis.

Inherited From:
Source:

xyHighlightedHandler()

Returns a callback that should be invoked any time a x/y value in the
graph is highlighted (effectively, any time the mouse moves). Callback
will accept a x and y domain coordinate as its 2 parameters and update
highlights.x and highlights.y accordingly.

Inherited From:
Source:

xyUnhighlightedHandler()

Returns a callback that should be invoked any time the mouse leaves the
graph area or no point at all is highlighted in the graph.

Inherited From:
Source:

zoomedPannedHandler()

Returns a callback that should be invoked any time the x/y extent changes
because the user zooms or pans in the graph. Updates the highlights object
(xRange property) and the "looseness" property accordingly.

Overrides:
Source: