Problem to update information in radar char graph

Hi community,
I have an application when users can select products and variables, these information is graphed in radar char working with quickchart.io. I used as a guide this link: https://www.chartjs.org/docs/2.9.4/charts/radar.html

alejandrovargas_0-1661278057250.png

The name of variables and their values are updated correctly. The problem is with the name of the products, always appears: Multimetro 1, Multimetro 2, etc. The graphic does not show the product name.

alejandrovargas_1-1661278268322.png

We tried the following couple of options, the problem happens in both codes.

[urlGrafica]
&"?title=Grafica radial"
&"&labels="& LIST(LOOKUP([variable1],"variables","codigo","nombre"),
LOOKUP([variable2],"variables","codigo","nombre"),
LOOKUP([variable3],"variables","codigo","nombre"),
LOOKUP([variable4],"variables","codigo","nombre"),
LOOKUP([variable5],"variables","codigo","nombre"))
&"&data1="& [Lista1]
&"&data2="& [Lista2]
&"&data3="& [Lista3]
&"&data4="& [Lista4]
&"&data5="& [Lista5]
[urlGrafica]
&"?title=Grafica radial"
&"&labels="& LIST(LOOKUP([variable1],"variables","codigo","nombre"),
LOOKUP([variable2],"variables","codigo","nombre"),
LOOKUP([variable3],"variables","codigo","nombre"),
LOOKUP([variable4],"variables","codigo","nombre"),
LOOKUP([variable5],"variables","codigo","nombre"))
&" &datasets="
&"&label1=Prueba1"
&"&data1="& [Lista1],
&"&label2=Prueba2"
&"&data2="& [Lista2],
&"&label=Prueba3"
&"&data3="& [Lista3],
&"&label=Prueba4"
&"&data4="& [Lista4],
&"&label=Prueba5"
&"&data5="& [Lista5]

Thanks in advance for your help.

0 4 121
4 REPLIES 4

I don't know much about chartio,  but it looks like there is only a single set of code to set labels.  Since you mention the labels with green squares is getting set properly then I assume this code below is what is setting them.

...
labels="& LIST(LOOKUP([variable1],"variables","codigo","nombre"),
LOOKUP([variable2],"variables","codigo","nombre"),
LOOKUP([variable3],"variables","codigo","nombre"),
LOOKUP([variable4],"variables","codigo","nombre"),
LOOKUP([variable5],"variables","codigo","nombre"))
...

It appears to me then that the code is simply missing the part to set the Product labels at the top.

Or is the &"label1 = Prueba1"  supposed to be changing the Product labels?

Hi @WillowMobileSys , thanks for your answer.

You are right, this part of the code assign variables name (green color in the image), it works correctly.

labels="& LIST(LOOKUP([variable1],"variables","codigo","nombre"), 
LOOKUP([variable2],"variables","codigo","nombre"),
LOOKUP([variable3],"variables","codigo","nombre"),
LOOKUP([variable4],"variables","codigo","nombre"),
LOOKUP([variable5],"variables","codigo","nombre"))

We tried with the following code to assign products name (red color in the image),, but it is not working. However,  values ([Lista1], [Lista2], etc.) are working correctly and are graphed. 

&" &datasets="
&"&label1=Prueba1"
&"&data1="& [Lista1],
&"&label2=Prueba2"
&"&data2="& [Lista2],

Ok.  Is the usage of the "label1="  just a guess?  You might try inserting single quotes for the label values like this:

...
&" &datasets="
&"&label1='Prueba1'"
&"&data1="& [Lista1],
&"&label2='Prueba2'"
&"&data2="& [Lista2],
...

Looking over the sample code for the radar chart on the website link shows JSON code implemented like the below image.  The "labels" property is showing as part of a "data" object alongside the "datasets" property.  Though this is JSON code, this leads me to think that the labels at the top need to be implemented similar to what you already have working.

But I don't know how this JSON code translates into the URL version of the request.  And there may be more than one way to represent the data.

Screen Shot 2022-08-23 at 4.27.16 PM.png

Steve
Platinum 4
Platinum 4

Missing [_THISROW]?

LOOKUP() - AppSheet Help

Top Labels in this Space