amcharts / amcharts5

The newest, fastest, and most advanced amCharts charting library for JavaScript and TypeScript apps.
Other
354 stars 95 forks source link

Adding a background to a Tooltip breaks the adapter update #1778

Open cheryllaird opened 3 weeks ago

cheryllaird commented 3 weeks ago

Bug description Adding a background to the Tooltip causes the text adapter to stop updating the values within the tooltip.

Using the example for the Free-floating tooltip on this page: https://www.amcharts.com/docs/v5/tutorials/combining-tooltip-values-from-multiple-series/

Bug shown here: Codepen: https://codepen.io/cheryllaird/pen/BaXYmXR?editors=0010

martynasma commented 3 weeks ago

fill accepts only Color objects, whereas you are setting to a string, which results in error, and stops the update.

Here's a correct way to set the background color of a tooltip:

tooltip.get("background").set("fill", am5.color(0x000000));
cheryllaird commented 3 weeks ago

Great I had missed this - is there a way I can see internal amCharts error to spot this next time? Thank you for the quick response!

martynasma commented 3 weeks ago

Not in this case, I'm afraid. I'm not entirely sure why it's failing silently.