Toggle data series by clicking legend in flot chart?

后端 未结 2 1350
忘掉有多难
忘掉有多难 2021-02-09 19:01

I have played a bit with flot.js for plotting some data, but I have quite a few data series, so the user might want to hide some series. One of flot\'s examples shows how to tog

2条回答
  •  孤独总比滥情好
    2021-02-09 19:30

    I am just getting back into programming and am not too familiar with ajax and the like, so I implemented my solution with javascript. You may be able to use to logic to do what you are seeking.

    
    
    
    
    
    
    
    
    Click Me

    I toggle when the legend is clicked.

    But I'm a recalcitrant text node and refuse to toggle.

    Click Me 2

    Toggle me too when the legend is clicked.

    But I'm a recalcitrant text node and refuse to toggle.

提交回复
热议问题