web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

SVG Help

(0) ShareShare
ReportReport
Posted on by 3,295

Hi there,

I would like to implement a horizontal char in my power apps. I have been trying to implement this nice svg icon. I don't know much about SVG's but I would like to have sometime that fits accordingly in my image.size.

 

This is how the image looks like:

sajarac_0-1686854019603.png

 

This is the image code:

"data:image/svg+xml;utf8, " & EncodeUrl(
"<svg width='150' height='80' viewBox='0 0 150 80' xmlns='http://www.w3.org/2000/svg'>"
&Concat(colPopDistribution,"<line x1='30' y1='"&No*12&"' x2='"&30+Value*170&"' y2='"&No*12&"' stroke='rgba(0,164,148,1)' stroke-width='7'>"
&"<animate attributeName='x2'
values='30; "&30+Value*170&"'
dur='1s'
repeatCount='1'
/>"
&"</line>"
&"<text x='"&35+Value*170&"' y='"&No*12+3&"' font-size='8' color='black' font-family='sans-serif'>"&Text(Value*100,"[$-en-US]0.0%")
&"
<animate attributeName='x'
values='35; "&35+Value*170&"'
dur='1s'
repeatCount='1'
/>"
&"<animate attributeName='opacity'
values='0;0;1'
dur='1s'
repeatCount='1'
/>
</text>
<text x='0' y='"&No*12+3&"' font-size='8' color='black' font-family='sans-serif'>"&Category&"</text>"
)

//Refresher
&"<circle cx='500' cy='1000' r='3'/>"
&"</svg>"
)

 

An this is how I would like the image be:

 

sajarac_2-1686854303416.png

 

Categories text alignment : right

and show all the percentages labels.

 

Thanks in advance for point me in the right direction

 

Regards

 

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @sajarac ,

     

    Maybe you could try:

    "https://quickchart.io/chart?c="&EncodeUrl("{
     type: 'horizontalBar',
     data: {
     labels: ['Cat 1', 'Cat 2', 'Cat3 maximun value', 'Cat 4', 'Cat 5'],
     datasets: [
     {
     label: 'Dataset 1',
     data: [
     16.7,
     33.3,
     50,
     78.5,
     100,
     ],
     datalabels: {
     align: 'end',
     anchor: 'end'
     }
     }
     ],
     },
     options: {
     legend: {
     display: false,
     },
     scales: {
     xAxes: [{
     display: false,
     gridLines: {
     display: false,
     },
     }],
     yAxes: [{
     display: true,
     gridLines: {
     display: false,
     },
     }]
     },
     plugins: {
     datalabels: {
     color: 'black',
     font: {
     weight: 'bold'
     },
     formatter: function(value, context) {
     return value + '%';
     }
     }
     }
     },
     showLabels: true
    }")

     

     

    Best Regards,

    Bof

  • Sajarac Profile Picture
    3,295 on at

    Thank you very much. Silly question?

    Do you know if I can use quick chart in commercial apps?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @sajarac ,

     

    Yes.

    vbofengmsft_0-1686881183100.png

     

    Best Regards,
    Bof

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard