Forum Discussion
WishAskedSooner
8 months agoContinued Contributor
SVG scaling limit
Hi Experts! There seems to be a size limit to how big an SVG will scale when loaded as a custom icon in a button. I need to load an SVG that will serve as a partial background that will be dy...
- 8 months ago
The use of the newly updated Image Visual can meet your needs. As for what you said about appearing interactive, I did not mention it here.
You can create the measure and used in Image Visual, such as :
TechBG_BlueCyan = VAR ShowBackground = 1 // SELECTEDVALUE( Table[IsShow], 1 ) VAR SvgVisible = "<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='900'>" & "<defs>" & "<linearGradient id='techGrad1' x1='0%' y1='0%' x2='100%' y2='100%'>" & "<stop offset='0%' stop-color='#0f172a' />" & "<stop offset='50%' stop-color='#0b3b5e' />" & "<stop offset='100%' stop-color='#06b6d4' />" & "</linearGradient>" & "</defs>" & "<rect width='100%' height='100%' fill='url(#techGrad1)' />" & "</svg>" VAR SvgHidden = "<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='900'>" & "<rect width='100%' height='100%' fill='transparent' />" & "</svg>" RETURN "data:image/svg+xml;utf8," & IF( ShowBackground = 1, SvgVisible, SvgHidden )And , You can use the measure to control the hide/show, don't need bookmark.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
alish_b
8 months agoSuper User
Hey WishAskedSooner ,
Did you try using the Fill option instead of the Icon button in the Button under Style>Fill? It scales better than the Icon option. But if there was any other requirement that prevented that option, do let us know.
Hope it helps!