Q:

vis.js 2dchart correlate click event data to the main dataset

I'm still relatively new to javascript but loving vis.js. I've used the 2dchart functions to build some pretty cool stuff. My problem now is that i'm trying to make it a bit more interactive. I'm using a stacked bar graph and I want to be able to click on one of the bars and display some data to the user.
So my question is, is it possible to take the bar you've clicked on and correlate that info to your dataset.
graph2d = new vis.Graph2d(container, dataset, groups, options);
graph2d.on('click', onClick);

function onClick( event ) {
    //correlate the clicked item to a dataset ID somehow

If i'm way off here i apologize. Again, i'm newer to this javascript stuff.
Thanks!

A:

I'm the developer of the graph2d module. I'm glad you like it! Unfortunately want you want to do is not really supported at the moment. We do want to support interactivity like that in future releases but at the moment it's very busy and we can't work on new features. 
Now there is a way to do this but it's sort of a hack and not user friendly at all but I'll mention it anyway. The click event gives you the x value, so the time. You can also dig into the original click event to see what element you clicked on. You can then check the class name of that item. With the time and the class name (which can be specific to a group) you can search your input data for a match and thus obtain the item that was clicked on. You can then show that in a popup or something similar. 
Hope this helps! For more questions you can post an issue on our GitHub page. We try to answer them all as soon as we can. 

