sample code:
vf page:
Apex Controller:
public class Sample {
public List data {get;set;}
public sample() {
data = new List();
List memList = new List();
memList = [SELECT Name, Age__c, X10th__c, X12th__c FROM Member__c];
for(Member__c mem : memList) {
data.add(new RadarData(mem.Name, mem.X10th__c, mem.X12th__c, mem.Age__c));
}
}
public class RadarData {
String memName {get;set;}
Decimal tenthPercent {get;set;}
Decimal twelthPercent {get;set;}
Decimal age {get;set;}
public RadarData(String memName, Decimal tenthPercent, Decimal twelthPercent, Decimal age) {
this.memName = memName;
this.tenthPercent = tenthPercent;
this.twelthPercent = twelthPercent;
this.Age = age;
}
}
}
Output:
Cheers!!!