gmazzamuto / ng2-google-charts

Angular Google Charts module
https://www.devrandom.it/software/ng2-google-charts/
MIT License
120 stars 64 forks source link

[Bug] role: 'style' and role: 'tooltip' not working #130

Closed KyneSilverhide closed 3 years ago

KyneSilverhide commented 3 years ago

Hello,

I'm trying to use the Timeline chart, as described here : https://developers.google.com/chart/interactive/docs/gallery/timeline?hl=en#customizing-tooltips

The documentation lists two spcial columns that can be used to customized both the tooltip and color of each element. Unfortunately, while the chart does display "normally", both the tooltip and colors are ignored.

 const timelineData =
            [
                ['Name', 'From', 'To',  {type: 'string', role: 'style'}, {type: 'string', role: 'tooltip'}],
                ['Washington', new Date(1789, 3, 30), new Date(1797, 2, 4), 'red', 'My tooltip content'],
                ['Adams', new Date(1797, 2, 4), new Date(1801, 2, 4), 'red',  'My tooltip content'],
                ['Jefferson', new Date(1801, 2, 4), new Date(1809, 2, 4), 'red',  'My tooltip content']
            ];

Note : the API doesn't complain that there are too many columns using this syntax, so I though the syntax was correct, but I may be mistaken...

KyneSilverhide commented 3 years ago

Duplicate of https://github.com/gmazzamuto/ng2-google-charts/issues/91