Fixed bug in graph-name list

The first parameter of the jQuery.each callback function is the index.