Hello everyone, I have created a percentage chart type view and I would like to know if it is possible to change its color automatically as the percentage increases. Red for 0, yellow for 50, and green for 100%.
Regards.
Solved! Go to Solution.
If that's a quickchart radial gauge, here's the section where you can set the color.
{
type: 'radialGauge',
data: {
datasets: [
{
data: [...],
backgroundColor: 'blue'
},
],
}
Substitute "blue" either will a reference to a column as @TeeSee1 suggested or with the expression itself--for example:
IFS([Value] >= 75, "green", [Value] >= 50, "yellow", [Value] >= 25, "orange", [Value] > 0, "red", [Value] = 0, "transparent")
I do not know how you created this view. In any case, if your method has some way to specify the color based on a column, you could create a VC with an IF statement to render the color of your choice.
Hi @TeeSee1 , I'll tell you how I created the view. In any case, it is a Detail_View and I have put in the Header a column called "Progress" that shows the percentage of progress of a job. In said detail view I have checked so that "Card Layout" could be used and when I save, the progress is seen with that graph (at least until a week ago). I don't know what happened but the truth is that now I can't show it like this, I don't know if it's an Appsheet error or what, but the graph is not shown but rather a common percentage.
If that's a quickchart radial gauge, here's the section where you can set the color.
{
type: 'radialGauge',
data: {
datasets: [
{
data: [...],
backgroundColor: 'blue'
},
],
}
Substitute "blue" either will a reference to a column as @TeeSee1 suggested or with the expression itself--for example:
IFS([Value] >= 75, "green", [Value] >= 50, "yellow", [Value] >= 25, "orange", [Value] > 0, "red", [Value] = 0, "transparent")
Thank you. I would never have imagined that it could have been done with code, since I am used to doing everything in the native way of Appsheet. Regards. good day @dbaum
User | Count |
---|---|
33 | |
30 | |
30 | |
19 | |
17 |