
Announcements
Hello Community:
I have this chart inside powerapps by using QuickChart
This next code is working fine:
"https://quickchart.io/chart?c="&EncodeUrl("{
type: 'bar',
data: {
labels: ["&Concat(colDefectCounts,"'" & DescripciónDefecto & "'" & ",") & "],
datasets: [
{
label: 'Top 5 Defects',
data: [ "&Concat(colDefectCounts,"'" & DefectCount & "'" & ",") & "],
backgroundColor: ['rgba(255, 99, 132, 1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192,1)', 'rgba(217, 48, 214,1)'],
borderColor: ['rgba(255, 99, 132, 1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)','rgba(217, 48, 214,1)'],
borderWidth: 1,
},
],
},
options: {
plugins: {
datalabels: {
anchor: 'center',
align: 'center',
color: '#fff',
font: {
weight: 'bold',
},
},
}, legend: {
display: false,
}
},
}
")
How can I Sort Order Ascending this part:
data: [ "&Concat(colDefectCounts,"'" & DefectCount & "'" & ",") & "],
i tried with this but is not showing anything:
data: [ "& Concat( SortByColumns(colDefectCounts,"DefectCount"), "'"& SortOrder.Ascending & "'" & ",") &" ],
Thanks
Hi @HectorOlivos ,
Please try:
Concat(Aort(colDefectCounts,DefectCount,SortOrder.Ascending),"'" & DefectCount & "'" & ",")
Best Regards,
Bof