Why can't images with URLs with special characters be displayed in the browser and android app?

Why can’t images with URLs with special characters be displayed in the browser and android app?
:rofl:
https://quickchart.io/chart?c={type:‘radialGauge’,data:{datasets:[{data:[70],backgroundColor:‘green’}]}}

in the ios app and Safari :

Chrome Browser and Android app:

2 Likes

Oh, this is interesting! I have an app using quickchart in a web-viewer and I get the same message on android and web, but I don’t have iOS to test it on.

1 Like

The URL contains invalid characters.

Try this
https://quickchart.io/chart?c={type:'radialGauge',data:{datasets:[{data:[70],backgroundColor:'green'}]}}

2 Likes

What’s the difference?

2 Likes

The quotation marks you used are not valid in Chrome browser. I just replaced the quotes with the standard one.

You can test that yourself and mark the post solved.

2 Likes

Can be displayed on chrome!

https://quickchart.io/chart?w=450&h=450&bkg=#14A0FABF&c={“type”:“radialGauge”,“data”:{“datasets”:[{“backgroundColor”:"#cc0000",“data”:[0]}]}}
This is from the app

1 Like

In my phone android it is visible

@muneer
https://quickchart.io/chart?w=450&h=450&bkg=#14A0FABF&c={‘type’:‘radialGauge’,‘data’:{‘datasets’:[{‘backgroundColor’:’#cc0000’,‘data’:[0]}]}}
Why?

1 Like

Dear @tony.ycy.program

This is a different problem that the first one you posted.

I fixed the first one and I know it works.

For this second problem you are not specifying the chart type in the URL.

Please understand, it’s not a good idea to keep changing the problem in the same post suggesting that it is not solved.

Where in the c= in the URL?

This

1 Like

The problem is in this. I use the word blue and it worked.

Looks like the issue here is that the URL must be URL encoded. URL encoding lets browsers interpret certain special characters. For example, # encodes to %23. When QuickChart receives this encoded value, it will interpret it as a normal hex code.

You can replace it as a one-off if that’s the only special character in your chart, or create a more general function that encodes URLs.

1 Like

@ianw-quickchart

Super stoked to see you poking around here. I’m making assumptions of course but I believe me and you have exchanged a few emails in the past!

Ian is the Quckchart Man!!!