如何在滚动上隐藏nvd3工具提示

时间:2015-10-16 19:14:59

标签: nvd3.js

当用户滚动页面时,我正试图隐藏折线图的工具包。


    var chart = nv.models.lineChart()
        .interpolate("cardinal")        
        .margin({left: 50})
        .useInteractiveGuideline(true)
        .duration(500)
        .showLegend(true)
        .showYAxis(true)
        .showXAxis(true);

    //... get data and plot it.

    $(window).on("scroll", function(){
        chart.interactiveLayer.tooltip.hidden(true);
        chart.tooltip.hidden(true);
    });

以上都没有奏效。我错过了什么吗?

0 个答案:

没有答案
相关问题