plotter.js
function time_format(options) {
  if (_.isString(options.time)) {
    /* Translate the string we've been given into a format */
    switch(options.time) {
    case 'days':
    case 'Days':
      return "%d/%m";
    case 'hours':
    case 'Hours':
      return "%H:%M";
    default: /* Presume we've been given a gnuplot-readable time format string */
      return options.time;
    }
  } else { /* Just default to hours */
    return "%H:%M";
  }
}
function time_format(options) {
  if (_.isString(options.time)) {
    /* Translate the string we've been given into a format */
    switch(options.time) {
    case 'days':
    case 'Days':
      return "%d/%m";
    case 'hours':
    case 'Hours':
      return "%H:%M";
    default: /* Presume we've been given a gnuplot-readable time format string */
      return options.time;
    }
  } else { /* Just default to hours */
    return "%H:%M";
  }
}
function time_format ( options ) { if ( _ . isString ( options . time ) ) { /* Translate the string we've been given into a format */ switch ( options . time ) { case 'days' : case 'Days' : return "%d/%m" ; case 'hours' : case 'Hours' : return "%H:%M" ; default : /* Presume we've been given a gnuplot-readable time format string */ return options . time ; } } else { /* Just default to hours */ return "%H:%M" ; } }
Returns the string to give to gnuplot based on the value of options.time.
Returns the string to give to gnuplot based on the value of options . time .