google charts bar shadows

2019-09-11 09:04发布

问题:

is there a way to get rid of the shadows in when I hover the bars in a chart? I am able to do so on the tooltip, but have not found a way to do so on the bar itself. in this instance the blue or red bar itself...

I imagine if possible, this needs to be done in css? function drawBasic() {

var data = google.visualization.arrayToDataTable([
    ['City', '2010 Population','j'],
    ['New York City, NY', 80,10],
    ['Los Angeles, CA', 80,0],
    ['Chicago, IL', 70,0],
    ['Houston, TX', 65,0],
    ['Philadelphia, PA', 17,0]
  ]);
    var num = 0;


  var options = {
    title: 'Percent of students enrolled',
    chartArea: {width: '50%'},
    hAxis: {
      title: 'Percentage',
      minValue: 100
    },
    vAxis: {
      title: 'college location'
    },
      isStacked: true
  };

https://jsfiddle.net/skinnyb/33og516L/3/

回答1:

This css-rule seems to work:

rect[stroke-opacity]{
   stroke-width:0 !important;
}

https://jsfiddle.net/kghv82yc/