Opacity on bar colors doesnt work

177 views
Skip to first unread message

Mateusz Dzierzecki

unread,
May 16, 2018, 8:38:22 AM5/16/18
to Google Visualization API
Hi,

I am creating chart with Google Charts API, but opacity on bar colors doesn't work. Bar with opacity is completely white. Why it doesn't work?

var data = google.visualization.arrayToDataTable([
 
['Year', 'Visitations', { role: 'style' } ],
  ['2010', 10, 'color: gray'],
  ['2020', 14, 'color: #76A7FA'],
  ['2030', 16, 'opacity: 0.5'],
  ['2040', 22, 'stroke-color: #703593; stroke-width: 4; fill-color: #C5A5CF'],
  ['2050', 28, 'stroke-color: #871B47; stroke-opacity: 0.6; stroke-width: 8; fill-color: #BC5679; fill-opacity: 0.2']
]);

      var view = new google.visualization.DataView(data)
     
$('#chart').html('');

      var chart = new google.visualization.ColumnChart(document.getElementById('chart'));

      chart.draw(view);
  };

Reply all
Reply to author
Forward
0 new messages