Forum Discussion

yaseenhamid's avatar
yaseenhamid
Frequent Visitor
3 years ago

Cant enter location variable in SVG code

hi, im trying to add location variable  in following svg code but power bi cant recognize syntax

 

var location = "100"

 

"data:image/svg+xml;utf8,"
        & "<svg xmlns=""http://www.w3.org/2000/svg""   >
   
<path d="M150 0 L75 200 L225 200 Z"></path>
   

</svg>"
 
i want to add location variable instead of 150 in above code (e.g <path d="M location 0 L75 200 L225 200 Z"></path>

1 Reply

  • var location = "100"
    return "data&colon;image/svg+xml;utf8,<svg xmlns=""http://www.w3.org/2000/svg""><path d=""M" & location & " 0 L75 200 L225 200 Z""></path></svg>"