Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikunj0580
Contributor II
Contributor II

% and _ sign in Qlik Sense Map layers with SVG images /text

How to show  %  or  &  symbols in SVG  based text  within Map layer ?   Sample code below where I would like yo display a KPI with % . The text works well but moment any function with  % or & sign is added in text , the object disappears in layout. 

perc issue.png

'<g transform="matrix(6 0 0 4 1625 875)">'& // KPI : Female and URN
'<text text-anchor="middle" font-family="Roche Sans" font-weight="bold" font-size="12" fill="rgb(0,0,0)">' &
'<tspan dominant-baseline="middle" text-anchor="middle" x="0" y="10">' & 'F ' & $(vKPI_Underrep_Exec_CM) & '('& '77' & '%'& ')'& '</tspan>' & //$(vKPI_Executive_CM_Female_Param(*,*))
'</text>' &
'</g>'&

 

@Patric_Nordstrom  - Any thoughts? If you could have a look , would be very helpful.

Labels (2)
2 Solutions

Accepted Solutions
Patric_Nordstrom
Employee
Employee

'%' and  '&' are reserved keywords in url, encode to ASCII with https://www.w3schools.com/tags/ref_urlencode.asp

 

Thanks,

Patric

 

 

View solution in original post

Patric_Nordstrom
Employee
Employee

You can test and encode your svg with this tool

https://yoksel.github.io/url-encoder/

 

Thanks,

Patric

View solution in original post

3 Replies
Patric_Nordstrom
Employee
Employee

'%' and  '&' are reserved keywords in url, encode to ASCII with https://www.w3schools.com/tags/ref_urlencode.asp

 

Thanks,

Patric

 

 

nikunj0580
Contributor II
Contributor II
Author

@Patric_Nordstrom  : Thank you . I just tried.  % and other characters seem to be working well with ASCII encoding in expression but  encoding for "&" (ampersand) sign does not work yet. I tried "%26".  Could you let me know specific encoding to use for & (ampersand ) sign ? %26 seem to be working on other web interfaces but  for some how not  working in Qlik sense. 

Patric_Nordstrom
Employee
Employee

You can test and encode your svg with this tool

https://yoksel.github.io/url-encoder/

 

Thanks,

Patric