Fix an issue when clicking on a graph's first item

Clicking on the first chart is index=0, but the falsey check caused it   
to go to the default behaviour, which is to assume the user clicked on  
the last item in the graph.