react-google-charts icon indicating copy to clipboard operation
react-google-charts copied to clipboard

Couldn't add custom tooltip content in line chart

Open yanv1991 opened this issue 6 years ago • 2 comments

I have added a column like

{ type: 'string', role: 'tooltip' },

But this shows default content in the tooltip, instead of the row data I added

yanv1991 avatar Jul 10 '19 21:07 yanv1991

I also had this problem. I found that the culprit was using the chartType="Line". If you use this Chart Type, custom tooltips don't work. I've also come to find that with this Chart Type if you have too many columns of data the legend won't display all of them. They'll just run right off the bottom of the viewport and no zooming out/scrolling will make them visible. The v-axis title also doesn't work properly with this Chart Type as far as I can tell.

If you use chartType="LineChart", these things seem to work fine. However, I think the chartType="Line" version should be fixed. There are benefits to the material design version (such as having the entire line highlight when hovered over) that would be nice to have access to with this library.

fbartkowiak avatar Aug 06 '19 00:08 fbartkowiak

Correct! options are not working on type = "Line" but working on LineChart even on latest version (issue is 2-4 years old and hasn't been solved till now). Author should fix this sooon. @rakannimer

ChetSocio avatar Apr 05 '24 05:04 ChetSocio