Google Chart API: Change color on hovering legend

后端 未结 1 781
南旧
南旧 2021-01-22 12:45

So I have a ColumnChart and one of the built-in functionality is that you can hover over an item (so called category) in the legend of the chart and you get some highlight-borde

相关标签:
1条回答
  • 2021-01-22 13:28

    In the past I used some CSS hacks to change some properties of the generated SVG (path, rect, etc...) you can play around with advanced selectors and maybe you'll be able to achieve you what you want. I created a very quick and buggy example, but maybe it will point you on the right direction.

    For example:

    div.google_chart svg g g g g rect { 
                stroke-width:0px; fill:red; 
                }
    

    Hope it helps.

    0 讨论(0)
提交回复
热议问题