SVG not accepting quotes along with expressions

SSC
Bronze 5
Bronze 5

Hello,

I am trying to create an SVG in which it shows a progress bar ascertaining percentage of order completed. The progress bar is supposed to fill in the blue color depending on my expressions which uses column values. But, i need to pass those values inside "" (Double Quote).

I tried  lot of combinations for doube quotes so far (as mentioned on mutiple community forum pages), but havent been able to generate the progress bar.

This is my SVGThis is my SVG

 

Even though my order is completed 100 percent, still my progress bar is stuck at zero.

Here is the svg code for that

<rect x="40" y="125" width="104" height="30" fill="url(%23progressGradient)" rx="15" ry="15" filter="url(%23progressShadow)"/>

I just need to pass the value in replace of 104 within double quotes. So here is what i did:

 <rect x="40" y="125" width= '&""""&round((([_thisrow].[Quantity Manufactured]/[_thisrow].[Quantity in Cubic Metres])*3.20))&""""&' height="30" fill="url(%23progressGradient)" rx="15" ry="15" filter="url(%23progressShadow)"/>

Any suggestions?

Solved Solved
1 8 275
1 ACCEPTED SOLUTION

Please try an expression something line below.

My suggestion would be to try it in an separate image type column first , so that you get an idea of how it works. You could then adapt it within your other SVG setup in the other column.

CONCATENATE("data&colon;image/svg+xml;utf8,<svg xmlns=""http://www.w3.org/2000/svg"" viewBox=""0 0 80 50"">
<rect x=""10%"" y=""25%"" width= ""100"" height=""10"" fill=""rgb(229, 228, 226)"" rx=""2"" ry=""2""/>
<rect x=""10%"" y=""25%"" width= """,ROUND(((([Quantity Manufactured]/DECIMAL([Quantity in Cubic Metres]))*3.20))*100),""" height=""10"" fill=""rgb(67, 135, 191)"" rx=""2"" ry=""2""/>
</svg>")

 

The generated SVG looks like below and the blue bar should increase in proportion of the percentage obtained by [Quantity Manufactured]/DECIMAL([Quantity in Cubic Metres]

At this moment I have no idea why you are multiplying by 3.20 in the expression but I have left it as it is.

Suvrutt_Gurjar_0-1724166195100.png

 

View solution in original post

8 REPLIES 8
Top Labels in this Space