       formatBasicPlot data, opt
 )()
 
-
 # Formats an input array of tuples such that the first element of the tuple is set
 # as the x-coordinate and the second element as the y-coordinate. Supports layers
 # of tupled series. For real-time plots the first element of a tuple is set as the

# It then extracts the value for each key across each of the objects in the array
# to produce multi-layer plot data of the given chart type. Note that this formatter
# also can be passed an <code>x</code> or <code>time</code> option as a string that
# allows the programmer specify a kto define which key to use for the value of the
# first component of each resulting layer value.
#
# @param [Array] data Flat array of objects to format.
# @param [Array] keys List of keys used to extract data from each of the objects.

Epoch.Data.Format ?= {}

# Private Helper Function for DataFormats below
applyLayerLabel = (layer, options, i, keys=[]) ->
  [labels, autoLabels, keyLabels] = [options.labels, options.autoLabels, options.keyLabels]
  if labels? and Epoch.isArray(labels) and labels.length > i
    layer.label = labels[i]
  else if keyLabels and keys.length > i
    layer.label = keys[i]
  else if autoLabels
    label = []
    while i >= 0
