From bcd3ebf04c7eeb257afb0f6055d28cfd85a79e1b Mon Sep 17 00:00:00 2001
From: steve <steve@dev.mjnservices.com>
Date: Tue, 7 Sep 2010 09:56:14 -0600
Subject: [PATCH] Added labelsShowZeroValues option.  When this option is set
 to false the labelsDiv will not contain any points that have a 0 value.

---
 dygraph.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dygraph.js b/dygraph.js
index 5e04d1d..746949d 100644
--- a/dygraph.js
+++ b/dygraph.js
@@ -90,6 +90,7 @@ Dygraph.DEFAULT_ATTRS = {
     // TODO(danvk): move defaults from createStatusMessage_ here.
   },
   labelsSeparateLines: false,
+  labelsShowZeroValues: true,
   labelsKMB: false,
   labelsKMG2: false,
   showLabelsOnHighlight: true,
@@ -983,6 +984,7 @@ Dygraph.prototype.updateSelection_ = function() {
     if (this.attr_('showLabelsOnHighlight')) {
       // Set the status message to indicate the selected point(s)
       for (var i = 0; i < this.selPoints_.length; i++) {
+    	if (!this.attr_("labelsShowZeroValues") && this.selPoints_[i].yval == 0) continue;    	  
         if (!isOK(this.selPoints_[i].canvasy)) continue;
         if (this.attr_("labelsSeparateLines")) {
           replace += "<br/>";
-- 
2.7.4