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.