Please take a look at the following example:
http://www.jqplot.com/deploy/dist/examples/hiddenPlotsInTabs.html
In the first example, the hidden graphs are plotted by catching the "tabshow" event and finding which tab was selected:
$('#tabs').bind('tabsshow', function (event, ui) {
if (ui.index === 1 && plot1._drawCount === 0) {
plot1.replot();
} else if (ui.index === 2 && plot2._drawCount === 0) {
plot2.replot();
}
});
This works fine but if you added more tabs and moved your plots to other tabs, you'd have to manually update the hard coded "ui.index" values, which I'd like to avoid in my project.
Does anybody know a good way to programmatically find under which tab your plot exists? I'd like to code in such a way that it doesn't matter how many tabs you have and where you place your plot.