X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=auto_tests%2Ftests%2Fplugins_legend.js;h=5f67591590842147a44e861de51a1f9657b72198;hb=902091b8b33555845682681f64048f7ed1811c27;hp=e0384c84d453468b08530e84ef27020e11dcaa69;hpb=961b513bfe7d680506b4025b4dfb68aa6393bb4f;p=dygraphs.git diff --git a/auto_tests/tests/plugins_legend.js b/auto_tests/tests/plugins_legend.js index e0384c8..5f67591 100644 --- a/auto_tests/tests/plugins_legend.js +++ b/auto_tests/tests/plugins_legend.js @@ -113,4 +113,30 @@ it('should use a legendFormatter', function() { assert.equal(calls[2].series[0].y, undefined); }); +it('should include point drawn where canvas-y is 0', function () { + var graph = document.getElementById("graph"); + var calls = [] + function callback(data) { + calls.push(data); + }; + + var g = new Dygraph(document.getElementById("graph"), + "X,Y\n" + + "1,5\n" + + "1,10\n" + + "1,12\n", + { + legendFormatter: callback, + axes: { + y: { + valueRange: [0, 10] + } + } + }); + g.setSelection(1); + var data = calls[1]; + assert.isTrue(data.series[0].isVisible); + assert.notEqual(data.series[0].yHTML, ''); +}); + });