Chart is not showing defined color in stacked bar chart.

111 views
Skip to first unread message

Yashpal Singh

unread,
Jan 4, 2016, 2:29:16 AM1/4/16
to Google Visualization API
Hi There,

Chart is not showing defined color in stacked bar chart. Please refer below code and chart screen print for your reference. Please help, thanks in advance.
   
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Customer', 'Feedback not Received', 'Survey Closed','Received','Resent', 'Saved', 'Sent', { role: 'annotation' }],
          ['ABC Corp', 10, 24, 20, 32, 18, 20,''],
        ['XYZ Ltd', 16, 22, 23, 30, 16, 22,''],
        ['Test Company Ltd', 28, 19, 29, 30, 12, 25,'']
        ]);

        var options = {
        isStacked: true,
          chart: {
            title: 'Customer, Status Wise Feedback'
            
          },
          bars: 'horizontal',
          legend:{position: 'top', textStyle: {
          color: 'black', 
          fontSize: 10,
          fontName: 'arial'
          }},
          hAxis: {minValue: 0, title: 'Status', titleTextStyle: 
          {          
          color: 'black',
            bold: true
          }},
          vAxis: {title: 'Customer', titleTextStyle: 
          {
          color: 'black',
            bold: true
          }},          
          height: 400,
          bar: { groupWidth: "70%" },
          colors: ['green', 'red', 'blue', 'gray', 'yellow', 'orange']
        };
        var chart = new google.charts.Bar(document.getElementById('chart_div'));
        chart.draw(data, google.charts.Bar.convertOptions(options));        
      }





Message has been deleted

Yashpal Singh

unread,
Jan 4, 2016, 4:06:10 AM1/4/16
to Google Visualization API
Reply all
Reply to author
Forward
0 new messages