Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
Does anyone know how to add images to the nodes so that the nodes display either as an icon or image?
Much appreciated if someone could help me. I know there is an image url property in the nodes section.
cheers
Datadude28
This is so confusing. Let me help.
First, let's just look at the internal logic with some quasi code.
if EMPTY("Format:Image url")
return INVALID_URL
if EMPTY("Format:Image")
return INVALID_URL
if HASDESTINATION()
if EMPTY("Fields:Source Type")
return INVALID_URL
else
return CONCAT("Format:Image url", "Fields:Source Type", "Format:Image")
else
if EMPTY("Fields:Target Type")
return INVALID_URL
else
return CONCAT("Format:Image url", "Fields:Target Type", "Format:Image")
The whole point of this is to let you build an image URL based on the node type.
What if you just want one image (not to build the URL based on type)?
SOLVED: Just put a question mark "?" at the end of the URL. Like this...
Yes, the docs could be more clear.
// Jerry
@Anonymous Check out this video on something similar. You should also test out by putting in online image url in image url section.
I tried using an image Url and it is still not working. Any ideas. The video is outdated and not as the latest release of Power BI desktop.
regards
Datadude28
Hi,
You need to set url to “Image url”. See screenshot below.
This is sample url: https://raw.githubusercontent.com/Microsoft/PowerBI-visuals-core/resources/images/reports/ForceGraph/
Be noted that Image url is the base url for images. Full url is composed by "base url + sourceType or targetType + image extension".
For details, you can go to https://visuals.azureedge.net/powerbi-visuals/ForceGraph1449359463895/sample-report/ForceGraph.pbix to download the a sample for ForceGraph.
See screenshot from it.
Best Regards
Alex
I see,
How do you use your own custom image?
and also how does the image Url works?
lastly, how can I make my own image Url?
cheers
DataDude28
Hi ,
Let me show you a detailed example.
I have a dataset like below.
I create a website in my local with 2 images under \images called tomcat.gif and printer.gif. See screenshot below.
Now I create a focegraph with config below.
The Image URL is: http://localhost:8081/powercase/images/
Note that:
1. Image is specified in the SourceType or TargetType columns, the first time a node shows up in the dataset, its image is set, it's not changed if it's set later in the dataset
2. Full url is composed by "base url + sourceType or targetType + image extension"
For example:
In column “Source” and “Target”, A appeared first in row 1 “Source” column, so its image should be the pic in “SourceType”. It is tomcat. So the full url for node A is Image url + tomcat + Image extension.
D appeared first in row 4 “Target” column, so its image shoud be the pic in “TargetType”. It is printer.
So the full url for node D is image url + printer + Image extension.
Best Regards
Alex
User | Count |
---|---|
128 | |
108 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |