Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
dbernal_007
New Member

D3JSVisual separation between nodes

Hi there, I've two questions in one: I need to add a visual icon to the top of the arrow that separates two nodes, but first I need to give more space between these nodes, precisaly to make the arrow a little bit longer and put the new icon on top.
Is it possible to edit and do this?
Regards,

Daniel Bernal

1 ACCEPTED SOLUTION
Omkar_1712
Solution Specialist
Solution Specialist

Hello @dbernal_007,

Yes, this is generally possible in D3.js.

To increase the distance between nodes, you'll need to adjust the parameters of your layout (for example, linkDistance in a force-directed graph or the node spacing settings in hierarchical/tree layouts). Increasing the spacing will make the connecting links/arrows longer.

Once you have sufficient space, you can place an icon on or near the link by:

  • Adding an SVG element (image, circle, text, etc.) positioned at the midpoint of the link.
  • Updating its position whenever the graph is rendered or refreshed.
  • The exact implementation depends on which D3 layout you're using (force-directed, tree, sankey, network graph, etc.).

Could you share:

  • The type of D3 visual you're using?
  • A code snippet or screenshot of the current implementation?

That would help provide a more specific solution.

Best regards,
Omkar Shinde
Microsoft Fabric Enthusiast | Power BI Consultant

💡 If you found this response helpful, please consider giving it a Kudos.
If this resolves your question, please mark it as the Accepted Solution to help others in the community.

View solution in original post

2 REPLIES 2
dbernal_007
New Member

Hi @Omkar_1712 , thanks for your answer. I found where the space between nodes must be setted up, the D3JS visualization in Power BI has an Edit option and there's the entire code that I didn't find before.
Thanks again

Omkar_1712
Solution Specialist
Solution Specialist

Hello @dbernal_007,

Yes, this is generally possible in D3.js.

To increase the distance between nodes, you'll need to adjust the parameters of your layout (for example, linkDistance in a force-directed graph or the node spacing settings in hierarchical/tree layouts). Increasing the spacing will make the connecting links/arrows longer.

Once you have sufficient space, you can place an icon on or near the link by:

  • Adding an SVG element (image, circle, text, etc.) positioned at the midpoint of the link.
  • Updating its position whenever the graph is rendered or refreshed.
  • The exact implementation depends on which D3 layout you're using (force-directed, tree, sankey, network graph, etc.).

Could you share:

  • The type of D3 visual you're using?
  • A code snippet or screenshot of the current implementation?

That would help provide a more specific solution.

Best regards,
Omkar Shinde
Microsoft Fabric Enthusiast | Power BI Consultant

💡 If you found this response helpful, please consider giving it a Kudos.
If this resolves your question, please mark it as the Accepted Solution to help others in the community.

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors