Quickchart syntax

Linar
New Member

I am trying to use quickchart in my VC, but i get error “Chart error: Invalid or unexpected token -2:148”
This is what the formula looks like, what am I doing wrong?

concatenate(
https://quickchart.io/chart?bkg=white&c={
““type””: ““outlabeledPie””,
““data””: {
““labels””: [”“ONE”", ““TWO””, ““THREE””, ““FOUR””, ““FIVE””],
““datasets””: [{
““backgroundColor””: [""#FF3784"", “”#36A2EB"", “”#4BC0C0"", “”#F77825"", “”#9966FF""],
““data””: [1, 2, 3, 4, 5]
}]
},
““options””: {
““plugins””: {
““legend””: false,
““outlabels””: {
““text””: “”%l %p"",
““color””: ““white””,
““stretch””: 35,
““font””: {
““resizable””: true,
““minSize””: 12,
““maxSize””: 18
}
}
}
}
}"
)

Solved Solved
0 4 1,167
  • UX
1 ACCEPTED SOLUTION

Linar
New Member

By the highest standards the problem was the % symbol, the issue is closed

View solution in original post

4 REPLIES 4

Linar
New Member

By the highest standards the problem was the % symbol, the issue is closed

Yes you need to wrap that with ENCODEURL().

Hi, I was also working on the same thing and had an error (chart error: Error: unexpected token '; -1:3 quickchart). Have you done it successfully? If so, can I get an example of your corrected formula. I attached my formula, maybe you can help me to fix.

CONCATENATE("https://quickchart.io/chart?c=", ENCODEURL("{
"type": "outlabeledPie",
"data": {
"labels": ["ONE", "TWO", "THREE", "FOUR", "FIVE"],
"datasets": [{
"backgroundColor": ["#FF3784", "#36A2EB", "#4BC0C0", "#F77825", "#9966FF"],
"data": [1, 2, 3, 4, 5]
}],
},
"options": {
"plugins": {
"legend": false,
"outlabels": {
"text": "%l %p",
"color": "white",
"stretch": 35,
"font": {
"resizable": true,
"minSize": 12,
"maxSize": 18
}
}
}
}
}"))

You might find the following video helpful:

Top Labels in this Space