web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / QuickCharts Radar Char...
Power Apps
Unanswered

QuickCharts Radar Chart and For All Collection

(2) ShareShare
ReportReport
Posted on by 61
Hi
 
Not sure if anyone has used quick charts with powerapps - I have a few times but never in the way I need to now.
I am utlising the radar chart and I am able to show one record on it no issue - however I need to be able to have a user select items from a gallery and have them all show on the radar chart as a different dataset 
 
has anyone tried this before?
 
code for one record for reference:
 
"https://quickchart.io/chart?c=" & EncodeUrl(
    "{
  type: 'radar',
  data: {
    labels: [
      'Accommodation/Living Environment',
      'Living Skills and Self Care',
      'Mental Health and Wellbeing',
      'Friends and Community',
      'Relationships and Family',
      'Drugs and Alcohol',
      'Managing Feelings and Response',
      'Positive Use of Time',
    ],
    datasets: [
      {
        backgroundColor: 'rgba(255, 255, 255, 0.5)',
        borderColor: 'rgb(75, 192, 192,1)',
        data: [" & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,Accomodation) & ", " & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,LivingSkills) & ", " & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,MentalHealth) & ", " & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,FriendsCommunity) & ", " & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,RelationshipsFamily) & ", " & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,DrugsAlcohol) & ", " & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,ManagingFeelings) & ", " & LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,PositiveUseTime) & "],
        label: '" & Gallery66.Selected.Date & "',
      },
    ],
  },
    options: {
    spanGaps: false,
    elements: {
      line: {
        tension: 0.000001,
      },
    },
    scale: {
      ticks: {
        min: 0,
        max: 5,
        stepSize: 1,
      },
    }
  },
}
"
)
 
 
Thanks
Laura
Categories:
I have the same question (0)
  • Suggested answer
    jpespena Profile Picture
    335 on at
    Hi,
     
    Does this code
    LookUp(CriminalJusticeWeb,Date=Gallery66.Selected.Date && YPID=ViewYPSelect_10.Selected.YPID,Accomodation)
    and the rest of the LookUp functions output numbers?
  • LauraGrimes123 Profile Picture
    61 on at
    @jpespena yes they output numbers
  • jpespena Profile Picture
    335 on at
    Hi Laura,
     
    You can try to use your LookUp functions one by one on a text label to see if it will output a number. Your Quickchart code is correct so the issue might be coming from the LookUp codes.
     
     
  • LauraGrimes123 Profile Picture
    61 on at
    Hi @jpespena
     
    The code is outputting numbers the thing I am looking to achieve is a for all output with it.
     
    I have a gallery with the records for the chart - I want the user to be able to select the ones they wish to view on the radar chart and then for the quick chart code to be able to do a for all kind of loop with the selected records - the code as it is now works for one selected records, but I am wondering has anyone been able to achieve it with multiple records?
  • Suggested answer
    jpespena Profile Picture
    335 on at
    Hi Laura, 
     
    Did you mean you want to show multiple radar chart if a user selected multiple records in the gallery?
     
    If so, you can add a checkbox on the main gallery that has a function to collect/remove record to a new collection:
     
    OnCheck:
    Collect(colSelectedRecords, ThisItem)
     
    OnUncheck:
    Remove(colSelectedRecords, ThisItem)
     
    Then create a new gallery, could be a horizontal gallery, and set its Item properties to colSelectedRecords.
     
    Then in the gallery add the image control with the Quickchart code and change the LookUp( ) function from Selected.Date to ThisItem.Date...etc.
     
     
  • LauraGrimes123 Profile Picture
    61 on at
    Not really so here is the example radar chart from quick charts:
     
     
    Here is my page:
     
     
    I want the user to click the two boxes and have both sets of data on the chart as above, but I want the user to select the ones they want if there is ever more than one (but I will limit the selection to 5)
  • Suggested answer
    jpespena Profile Picture
    335 on at
    Hi Laura, 
     
    I get what you mean now.
     
    You can continue on my suggestion to create a collection (colSelected) when checking the checkbox on the gallery then use this code for the Quickchart radar chart:
     
    "https://quickchart.io/chart?c=" & EncodeUrl(
        "{
      type: 'radar',
      data: {
        labels: [
          'Accommodation/Living Environment',
          'Living Skills and Self Care',
          'Mental Health and Wellbeing',
          'Friends and Community',
          'Relationships and Family',
          'Drugs and Alcohol',
          'Managing Feelings and Response',
          'Positive Use of Time',
        ],
        datasets: [
          " & Concat(
            ForAll(
                colSelected As Item,
                "{
            backgroundColor: 'rgba(255, 255, 255, 0.5)',
            borderColor: 'rgb(75, 192, 192,1)',
            data: [" & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,Accomodation) & ", " & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,LivingSkills) & ", " & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,MentalHealth) & ", " & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,FriendsCommunity) & ", " & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,RelationshipsFamily) & ", " & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,DrugsAlcohol) & ", " & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,ManagingFeelings) & ", " & LookUp(CriminalJusticeWeb,Date=Item.Date && YPID=ViewYPSelect_10.Selected.YPID,PositiveUseTime) & "],
            label: '" & Item.Date &"',
          }"
            ),
            Value,
            ","
        ) & "
        ],
      },
        options: {
        spanGaps: false,
        elements: {
          line: {
            tension: 0.000001,
          },
        },
        scale: {
          ticks: {
            min: 0,
            max: 5,
            stepSize: 1,
          },
        }
      },
    }
    "
    )
    With this code, Concat() function will concatenate all the selected records with the properties needed for the radar chart. However, it won't give a varying colors on the chart.

    Note that I declared the colSelected collection as "Item" in the ForAll() function and I only change the requirements on the LookUp() function with "Gallery.Selected.Date" to "Item.Date", I'm not sure if "ViewYPSelect_10.Selected.YPID" is from the gallery too but if it is you can just change it to "Item.YPID" too.
     
    Hopefully this answers your question. 
  • jpespena Profile Picture
    335 on at
    Hi Laura,
     
    Just wanted to asked if you were able to make this work?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard