LineChart

LineChart

d3.js line chart for Netlify build times

Constructor

new LineChart()

Source:

Members

lineTransitionIn

Source:

Animate new line drawing in

onClick

Source:

Open Netlify build logs for selected build. Prevent clicks when no builds present

onMouseLeave

Source:

Handle mouse leave

onMouseMove

Source:

Calculate which data point is selected on mouseover. Prevent when no builds present.

onTouchStart

Source:

Prevent default on touch start which stops the entire page moving when a finger drags on the interface. On touch screens the tool tip stays on the screen after dragging but a brief touch will clear it.

Methods

closestDataPoint()

Source:

Get the closest data point based on mouse position in listening rect. Also handles a touch event for a finger dragging on the interface.

createDataVis()

Source:

Called the first time the page is loaded to setup the visualisation

initialiseAccessors()

Source:

Setup the accessors for the visualisation

initialiseDataVis()

Source:

Setup the structure of the visualisation

kpiLineTransition()

Source:

Animate KPI lines

setGenerators()

Source:

Setup the generators for the visualisation which can be updated as the data set changes

setScales()

Source:

Setup the scales for the visualisation which can be updated as the data set changes

tweenDashIn()

Source:

Animate new line drawing in

updateDataVis()

Source:

When the data set is updated this will cause the visualisation to animate