24
Views
3
Comments
img src not display on tooltip graph

Hi everyone,

I’m encountering an issue where an image does not display in a Highcharts tooltip.


I have already set useHTML: true in the tooltip configuration, but the image still does not appear. The tooltip only shows an empty box where the image should be.


I’ve attached the tooltip value I’m using below.


What’s confusing is that when I display the same data (including the image) in a table using an HTML element, the image displays correctly. The issue only happens inside the Highcharts tooltip.


Has anyone faced a similar issue or knows how to properly display images in a Highcharts tooltip (especially when using OutSystems Charts)?

Any help would be appreciated. Thank you!




2023-10-16 05-50-48
Shingo Lam

I think the issue is the highchart is loaded before DataAction1 is completed. You can try to wrap the highchart to wait for the DataAction1 fetched

2022-03-10 08-26-10
Cristian Angel Puma Villalva

Hi Annisa,

Shingo has a good point—the chart might be rendering before your data is ready. Try wrapping your Chart in an If widget (DataAction1.IsDataFetched) to ensure it only loads once the image URL is available.

Additionally, Highcharts tooltips often fail to display images if the dimensions aren't explicitly defined. Try setting the width and height directly in your HTML tag:

<img src="URL" width="50" height="50" /> 

This helps the tooltip calculate the space needed before the image even finishes loading. Give that a try!

Regards,

2023-10-16 05-50-48
Shingo Lam

Ah yeah. Predefined dimensions is a good point.

Moreover, please add alt text, if the image cannot load, the text will show

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.