score:1

Accepted answer

Add an onclick event which passes clicked bar reference to the function which loads html.

.on('click', function(d) {loadHtml(d)});

Then create a loadHtml function

function loadHtml(clickedBar)
{
  if (clickedBar[0] = "foo")
  {
      $('#DivForLoadingHtml').load("http://mydomain.xyz/foo.htm");
  }   
  if (clickedBar[0] = "bar")
  {
      $('#DivForLoadingHtml').load("http://mydomain.xyz/bar.htm");
  } 

}

Related Query