Curve = function(name, data, getXValueFn, getYValueFn) {
  this.name = name;
  this.data = data;
  this.getXValue = getXValueFn;
  this.getYValue = getYValueFn;

  this.color = null;

  // Sorting data in ascending order by X axis, such that bisection can happen
  // when hovering over the graph.
  this.data.sort(function(a, b) {
    return getXValueFn(a).getTime() - getXValueFn(b).getTime();
  });
}
A Curve instance represents a curve in a graph. A graph can contain multiple
curves.
@constructor

@param {string} name The name of this curve.
@param {!Array<!Object>} data The data points for this curve.
@param {!Function} getXValueFn The function to use for extracting the x-axis
    value from a data point.
@param {!Function} getYValueFn The function to use for extracting the y-axis
    value from a data point.