Color for ID my charts with the dynamic element extension

I wrote the schema for the design and now set “id” as the ranking number but how? set the color for ID number 1,2,3.

screenshots of my application


do like this app
Nzuodj-1.apk (6.3 MB)
project1.aia (23.9 KB)

show your code please

You may use Random Color.

#1 For all item with color:

List up all desired colors in a variable and in color socket use “Pick Random Item from List block”

#2 For first three Item:

Add For Each Number From 1 to 3 block and under it setcolor.labelText to your desired color list / a random color from the variable list.

You can try to add one more parameter for changing the label color.


image

1 Like

I tried it and got an error

Post your blocks here, the error tells that you used a text, it needs a number

Please can you post your schema

I made it with schema that you provided, and i can get the colors with no problem,
Blocks:


Schema:

Update
I made this:
image

Schema

{
“name”: “TesteSchema”,
“metadata-version”: 1,
“extension_version”: 5,
“author”: “chocodubabr”,
“platforms”: [
creator.kodular.io
],
“extensions”: {
“DynamicComponents”: “com.yusufcihan.DynamicComponents.DynamicComponents”
},
“keys”: [
“ID”,
“Images”,
“Color”,
“Title”,
“Subtitle”
],
“components”: [
{
“id”: “Horizontal_Arrangement1{ID}”,
“type”: “HorizontalArrangement”,
“properties”: {
“AlignVertical”: 2,
“Width”: -2
},
“components”: [
{
“id”: “Label1{ID}”,
“type”: “Label”,
“properties”: {
“FontSize”: 14,
“Text”: “#{ID}”,
“TextColor”: “{Color}”
}
},
{
“id”: “Image1{ID}”,
“type”: “Image”,
“properties”: {
“Height”: 50,
“Width”: 50,
“Picture”: “{Images}”
}
},
{
“id”: “Vertical_Arrangement1{ID}”,
“type”: “VerticalArrangement”,
“components”: [
{
“id”: “Label2{ID}”,
“type”: “Label”,
“properties”: {
“FontBold”: true,
“Text”: “{Title}”
}
},
{
“id”: “Label3{ID}”,
“type”: “Label”,
“properties”: {
“Text”: “{Subtitle}”,
“TextColor”: “-6381922”
}
}
]
}
]
}
]
}

1 Like

Send me your aia, I will help you.

Or you can send all your schema template?

1 Like

I revised my .aia file attachment which contains the schemas. Looking forward to the help of the kodular community.

You reflash the page and it’s no error, you can try. :joy:

I got error when load first time, after i reflash it, and error disappear

nothing, i just import the aia above, and reflash

I try it later

I remember that I have updated your dynamic component extension to version 2.2.0 and fixed that error.

You can download it here and try again.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.