diff --git a/smoothie.js b/smoothie.js index b54c436..758414d 100644 --- a/smoothie.js +++ b/smoothie.js @@ -210,7 +210,7 @@ */ TimeSeries.prototype.append = function(timestamp, value, sumRepeatedTimeStampValues) { // Reject NaN - if (isNaN(timestamp) || isNaN(value)){ + if (isNaN(timestamp) || (typeof value != string && isNaN(value))){ return } // Rewind until we hit an older timestamp @@ -339,7 +339,8 @@ /** Formats the HTML string content of the tooltip. */ SmoothieChart.tooltipFormatter = function (timestamp, data) { var timestampFormatter = this.options.timestampFormatter || SmoothieChart.timeFormatter, - lines = [timestampFormatter(new Date(timestamp))]; + lines = [timestampFormatter(new Date(timestamp))], + label; for (var i = 0; i < data.length; ++i) { label = data[i].series.options.tooltipLabel || ''