Infowindow on mouseclick only works for one marker : I have a map with 5 markers and I need an infoWindow for each marker on mouseclick, I have one infoWindow that works. However when I add code/data for another infoWindow for another marker, it doesn't work (i.e. I click on the marker for Edinburgh and a bubble displays but the chart doesn't display and nothing displays at all when I click on the Inverness marker). 

LINK TO JSFIDDLE FILE: https://jsfiddle.net/MarnieMaclean/megx2cbo/30/

Code Snippet: I currently have data for an InfoWindow for 2/5 markers.

   

    google.charts.load('current', {packages: ['corechart']});
       
     function drawChart(map, marker) {
    //set up data
    var data = google.visualization.arrayToDataTable([
    ['Genre', '#'],
    ['Science Fiction', 55],
    ['Comedy', 33],
    ['Thriller', 21],
    ['Action', 63],
    ['Romance', 17], 
    ]);
    
       //set up any options
    var options = {
    title: 'Film Genre Preferences'
    };
    
    //Create node
     var node = document.createElement('div'),
     infoWindow = new google.maps.InfoWindow(),
     chart = new google.visualization.BarChart(node);
    
     //chjjeck which marker it is
     if (marker.id == 'c4') {
     chart.draw(data, options);
    
     }
       infoWindow.setContent(node);
      infoWindow.open(map,marker);
    }
    
    
       google.charts.load('current', {packages: ['corechart']});
    function drawChart(map, marker) {
    //set up data
    var data = google.visualization.arrayToDataTable([
    ['Genre', '#'],
    ['Science Fiction', 41],
    ['Comedy', 27],
    ['Thriller', 13],
    ['Action', 15],
    ['Romance', 19], 
    ]);
    
       //set up any options
    var options = {
    title: 'Film Genre Preferences'
    };
    
    //Create node
     var node = document.createElement('div'),
     infoWindow = new google.maps.InfoWindow(),
     chart = new google.visualization.BarChart(node);
    
     //chjjeck which marker it is
     if (marker.id == 'c1') {
     chart.draw(data, options);
    
     }
       infoWindow.setContent(node);
      infoWindow.open(map,marker);
    }
    
    
    // Initialize and add the map
     function initMap() {
      
      //The location of Inverness
      var inverness = {lat: 57.480819, lng: -4.224250};
      var city1 = {position: inverness};
      // The map, centered at Inverness
      var map = new google.maps.Map(
          document.getElementById('map'), {zoom: 4, center: inverness});
          // The marker positioned at Inverness
    var marker1 = new google.maps.Marker({position: inverness, map: map, id: 'c1', title: 'Number Of Cinemas: 2'});
    
     //The location of Dundee
      var dundee = {lat: 56.467546, lng: -2.969593};
      var city2 = {position: dundee};
      // The marker, positioned at Dundee
      var marker2 = new google.maps.Marker({position: dundee, map: map, id: 'c2', title: 'Number Of Cinemas: 2'});
    
    //The location of Glasgow
      var glasgow = {lat: 55.875362, lng: -4.250252};
      var city3 = {position: glasgow};
      // The marker, positioned at Glasgow
      var marker3 = new google.maps.Marker({position: glasgow, map: map, id: 'c3', title: 'Number Of Cinemas: 11'});
      
      //The location of Edinburgh
        var edinburgh = {lat: 55.959425, lng: -3.189161};
        var city4 = {position: edinburgh};
        // The marker, positioned at Edinburgh
      var marker4 = new google.maps.Marker({position: edinburgh, map: map, id: 'c4', title: 'Number Of Cinemas: 3'}); 
    
        
      //The location of Aberdeen
      var aberdeen = {lat: 57.155988, lng: -2.095139};
      var city5 = {position: aberdeen};
      // The marker, positioned at Aberdeen
      var marker5 = new google.maps.Marker({position: aberdeen, map: map, id: 'c5', title: 'Number Of Cinemas: 3'});
      marker4.addListener('click', function() {
      drawChart(map,this);
      });
      } 


[Proof of infoWindow working for one marker][1]


[What happens after I've added code for a 2nd infoWindow][2]


[Click on marker, no infoWindow][3]


  [1]: https://i.stack.imgur.com/38taB.png
  [2]: https://i.stack.imgur.com/TmS3G.png
  [3]: https://i.stack.imgur.com/vRf8q.png