From: Robert Konigsberg Date: Sat, 8 Dec 2012 23:32:19 +0000 (-0500) Subject: Remove superfluous warning when specifying labelsKMG2. X-Git-Tag: v1.0.0~146 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=8f5b370893166e36abb0e87847fb4405d6856840;p=dygraphs.git Remove superfluous warning when specifying labelsKMG2. --- diff --git a/dygraph-tickers.js b/dygraph-tickers.js index fa8d342..b340626 100644 --- a/dygraph-tickers.js +++ b/dygraph-tickers.js @@ -193,7 +193,7 @@ Dygraph.numericTicks = function(a, b, pixels, opts, dygraph, vals) { } // Add formatted labels to the ticks. - var k = 1; + var k; var k_labels = []; var m_labels = []; if (opts("labelsKMB")) { @@ -207,6 +207,8 @@ Dygraph.numericTicks = function(a, b, pixels, opts, dygraph, vals) { m_labels = [ "m", "u", "n", "p", "f", "a", "z", "y" ]; } + k = k || 1; // If neither option is specified. + var formatter = /**@type{AxisLabelFormatter}*/(opts('axisLabelFormatter')); // Add labels to the ticks.