cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mert_ucar
Frequent Visitor

How can I encode in the url?

 

 

"https://quickchart.io/chart?c="&EncodeUrl("{
   'type': 'horizontalBar',
   'data': {
     'labels': [
       'GWT',
       'CTI',
       'NFV0',
       'UL94V0'
     ],
     'datasets': [
       {
         'label': 'RED',
         'backgroundColor': 'rgba(255, 99, 132, 0.5)',
         'borderColor': 'rgb(255, 99, 132)',
         'borderWidth': 1,
         'data': [
           4,
           0,
           2,
           0
         ]
       },
       {
         'label': 'KABUL',
         'backgroundColor': 'rgba(54, 162, 235, 0.5)',
         'borderColor': 'rgb(54, 162, 235)',
         'data': [
           649,
           272,
           416,
           11
         ]
       }
     ]
   },
   'options': {
     'elements': {
       'rectangle': {
         'borderWidth': 2
       }
     },
     'responsive': true,
     'legend': {
       'position': 'right'
     },
     'title': {
       'display': true,
       'text': 'Test Türlerine göre kabul ve red adetleri'
     }
   }
 }")

 

 

 

I have the above encode chart

I need to extract data from TEXT LABEL into the code, how can I include it in the encode, please help.

 

for example it doesn't work when i do as below.

 

 

"https://quickchart.io/chart?c="&EncodeUrl("{
   'type': 'horizontalBar',
   'data': {
     'labels': [
       'GWT',
       'CTI',
       'NFV0',
       'UL94V0'
     ],
     'datasets': [
       {
         'label': 'RED',
         'backgroundColor': 'rgba(255, 99, 132, 0.5)',
         'borderColor': 'rgb(255, 99, 132)',
         'borderWidth': 1,
         'data': [
           4,
           0,
           2,
           0
         ]
       },
       {
         'label': 'KABUL',
         'backgroundColor': 'rgba(54, 162, 235, 0.5)',
         'borderColor': 'rgb(54, 162, 235)',
         'data': [
           label9.text,
           label7.text,
           label6.text,
           label4.text
         ]
       }
     ]
   },
   'options': {
     'elements': {
       'rectangle': {
         'borderWidth': 2
       }
     },
     'responsive': true,
     'legend': {
       'position': 'right'
     },
     'title': {
       'display': true,
       'text': 'Test Türlerine göre kabul ve red adetleri'
     }
   }
 }")

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Roverandom
Solution Supplier
Solution Supplier

I imagine you are putting the code in an image or HTML control. I'm using the latter in my example, so:

 

"<img src=https://quickchart.io/chart?c="&EncodeUrl("{
   'type': 'horizontalBar',
   'data': {
     'labels': [
       'GWT',
       'CTI',
       'NFV0',
       'UL94V0'
     ],
     'datasets': [
       {
         'label': 'RED',
         'backgroundColor': 'rgba(255, 99, 132, 0.5)',
         'borderColor': 'rgb(255, 99, 132)',
         'borderWidth': 1,
         'data': [
           4,
           0,
           2,
           0
         ]
       },
       {
         'label': 'KABUL',
         'backgroundColor': 'rgba(54, 162, 235, 0.5)',
         'borderColor': 'rgb(54, 162, 235)',
         'data': [
            " & Label9.Text & ",
            " & Label7.Text & ",
            " & Label6.Text & ",
            " & Label4.Text & "
         ]
       }
     ]
   },
   'options': {
     'elements': {
       'rectangle': {
         'borderWidth': 2
       }
     },
     'responsive': true,
     'legend': {
       'position': 'right'
     },
     'title': {
       'display': true,
       'text': 'Test Türlerine göre kabul ve red adetleri'
     }
   }
 }") & " />"

 

In my example I am also using text fields to enter the values. Result:

 

quickchart.gif



Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.

View solution in original post

2 REPLIES 2
Roverandom
Solution Supplier
Solution Supplier

I imagine you are putting the code in an image or HTML control. I'm using the latter in my example, so:

 

"<img src=https://quickchart.io/chart?c="&EncodeUrl("{
   'type': 'horizontalBar',
   'data': {
     'labels': [
       'GWT',
       'CTI',
       'NFV0',
       'UL94V0'
     ],
     'datasets': [
       {
         'label': 'RED',
         'backgroundColor': 'rgba(255, 99, 132, 0.5)',
         'borderColor': 'rgb(255, 99, 132)',
         'borderWidth': 1,
         'data': [
           4,
           0,
           2,
           0
         ]
       },
       {
         'label': 'KABUL',
         'backgroundColor': 'rgba(54, 162, 235, 0.5)',
         'borderColor': 'rgb(54, 162, 235)',
         'data': [
            " & Label9.Text & ",
            " & Label7.Text & ",
            " & Label6.Text & ",
            " & Label4.Text & "
         ]
       }
     ]
   },
   'options': {
     'elements': {
       'rectangle': {
         'borderWidth': 2
       }
     },
     'responsive': true,
     'legend': {
       'position': 'right'
     },
     'title': {
       'display': true,
       'text': 'Test Türlerine göre kabul ve red adetleri'
     }
   }
 }") & " />"

 

In my example I am also using text fields to enter the values. Result:

 

quickchart.gif



Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.

Thank you very much for your support. solved

 

best regards

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,582)