0

This has been marked as answered and duplicated when asked again, but the solution provided in that "answer" does not actually use the legend to toggle the series, it uses a different set of check boxes to do the toggling, NOT THE LEGEND. I wish people here would actually read questions and look at the answers provided or accepted before deciding they are already answered or duplicates.

The answer accepted here does not use the legend to toggle the series: Toggle data series by clicking legend in flot chart?

Therefore, the actual question has not been answered, the user just opted for a different solution. So I'll ask again, does someone know of a way to toggle data series using the legend. Before anyone asks for my code, I have tried this about 20 different ways without success, there's no point in posting it. I just need a simple example with more than one data set that actually works. If you really need me to provide a basic flot chart with 3 or 4 data sets I can.

Community
  • 1
  • 1
bubba
  • 1
  • 2
    OK, if you don't want to be a duplicate of that one, how about this one: http://stackoverflow.com/a/14227287/16363? It's toggling from the legend. If you have some specific needs that doesn't fit, update your question. – Mark Jun 23 '14 at 16:09
  • I've looked at that several times before, I can't click the first legend item in the example you posted for some reason, otherwise I'd be using it already ;) – bubba Jun 23 '14 at 18:42
  • 2
    The reason you can't click the first one is a quirk of jsFiddle (it's putting the *Result* label on top of it). Try this: http://jsfiddle.net/AcuC7/148/ – Mark Jun 23 '14 at 18:44
  • Well, imagine my embarrassment :P I didn't even see that label until the chart was moved – bubba Jun 23 '14 at 18:45
  • Yes that will definitely work for my needs after some minor styling, sorry for the redundant question folks. Thanks for the quick answer :) – bubba Jun 23 '14 at 18:48
  • I tried to upvote your solution but I don't have enough reputation it seems. Thanks for the nice clean and easy solution, I've literally spent the weekend trying to get this figured out, every time I got something to work it broke one of the plugins I was using. If that happens again I'll post a very specific question ;) – bubba Jun 23 '14 at 19:00

0 Answers0