Help sorting an array of objects needed please.

I am trying to sort the array Students[] in descending order of Fees due. Using the code below I get a null pointer error at runtime. The array is not completely full, it has 20 cells, but the variable studentArrayCounter holds the number of used cells. The 'getFeesDue()' code returns an integer value.
Any help is appreciated.
     // Sort Student Records Method
           public void sortStudentRecords()
            int loopCount = 0;
           for (loopCount = 1; loopCount < studentArrayCounter; loopCount ++)
          if(Students[loopCount].getFeesDue()>Students[loopCount-1].getFeesDue())
               SortStudents[0]=Students[loopCount-1];
               Students[loopCount-1]=Students[loopCount];
               Students[loopCount]=SortStudents[0];
     }

Also, unless the excersize is to write a sort algorigthm (which I kinda doubt) you should use Arrays.sort
Arrays.sort(Students, new Comparator() {
  public int compare(Object o1, Object o2) {
    Student s1 = (Student) o1;
    Student s2 = (Student) o2;
    return s1.getFeesDue() - s2.getFeesDue();
});

Similar Messages

  • How to sort an array of objects?

    I need to sort an array of objects. Each object has serial number, and other properties. I need to sort it by serial number.

    Do a java.util.Arrays.sort(). The method has quite a few overloads, so I'll give a complete example this time:import java.util.*
    public class SortDemo {
        public static void main(String args) {
            SimpleObject[] objs = new SimpleObject[10];
            for (int i=0; i<10; i++)
                objs=new SimpleObject();
    dump(objs);
    Comparator c = new SimpleComparator();
    Arrays.sort(objs, c);
    dump(objs);
    static void dump(Object[] o) {
    for (int i=0; i<o.length; i++)
    System.out.print(o[i] + " ");
    /** Object to demonstrate comparing with **/
    class SimpleObject {
    private int n = (int) (10*Math.random());
    public String toString() {
    return String.valueOf(getNumber());
    public int getNumber() {return n;}
    /** The custom comparator **/
    class SimpleComparator implements Comparator {
    public int compare(Object o1, Object o2) {
    return ((SimpleObject) o1).getNumber() - ((SimpleObject) o2).getNumber();
    public boolean equals(Object o) {return false;}
    }I could have made the SimpleObject class "Comparable", but a design like this allows more flexibility so I decided to use another class for the Comparator.

  • Sorting an array of objects

    hi there, i have to sort an array of object that looks like:
    surname, name, age, height
    well i have to sort them alphabetically like this:
    based on the surnames, if the surnames are the same than sort on the base of the names; if the names are the same sort them on the base of age and so on. If all the fields are the same the order is non important.
    Well I am not sure how I can do it using the Comparable Interface? as it is an interface i don't have any idea how to implement it

    This search took 2 seconds to do. And it's using your exact subject header. Next time try searching, instead of waiting forever hoping that someone will help you.
    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=&qt=%2B%22sorting+an+array+of+objects%22

  • Java sorting the array of objects

    Hi ,
    I have a question on sorting objects in java.
    I have a java interface some thing like :
    public classmyObj extends Nullable
        private int objId;
        private Datemydate;
        public int getObjID();
        public Date getmyDate();
        public int getISecondD();
      }I need to create the array of the objects of this class that are sorted on the ObjID:
    classmyObj[] collectionObjects
    I need to pass this collectionObjects to another function.
    Now how should I sort these objects based on the ObjID on collection?
    Please help with this!
    Thanks

    neeto wrote:
    Hi ,
    I have a question on sorting objects in java.
    I have a java interface some thing like :You mean class?
    >
    public classmyObj extends Nullable
    private int objId;
    private Datemydate;
    public int getObjID();
    public Date getmyDate();
    public int getISecondD();
    }I need to create the array of the objects of this class that are sorted on the ObjID:
    classmyObj[] collectionObjects
    I need to pass this collectionObjects to another function.
    Now how should I sort these objects based on the ObjID on collection?Create a comparator and use it in a call to Collections.sort (or Arrays.sort if you have an array)

  • Sorting an array of objects and returning another variable

    Hi there,
    Bit stuck on this one I wonder if anyone can help..
    I have an object array into which I've pushed a number of objects with different variables :-
    myArray.push({myRef: 1, myValue: "W"});
    I can sort the array in numerical order using :-
    myArray.sortOn("myRef", Array.NUMERIC);
    but after sorting I would like to collapse the array using something along the lines of :-
    myArray.join("");
    to join the OTHER variable (myValue)...
    Is it possible to do this without pushing every instance of 'myValue' to another array and then joining that ?
    Many Thanks in advance
    Martin

    Hi kglad,
    I really appreciate you helping, but I have had to completely change my approach to this problem, therefore I will be marking the question as answered !!
    Thanks again

  • Sorting an array of objects by an attribute

    I'm pretty new to java so don't laugh if you think my question is real easy!
    I have an array of objects and I want to sort them according to an integer value stored in each object. Any help would be very much appreciated.
    Thanks for looking!!

    Perhaps an example would help:
    public class Person {
      private String name;
      private int age;
      public void setName(String name) { this.name = name; }
      public void setAge(int age) { this.age = age; }
      public String getName() { return name; }
      public int getAge() { return age; }
    =====
    public class PersonAgeSorter implements Comparable {
      public int compare(Object o1, Object o2) {
        Person p1 = (Person) o1;
        Person p2 = (Person) o2;
        Integer i1 = new Integer(p1.getAge());
        Integer i2 = new Integer(p2.getAge());
        return i1.compareTo(i2);
    =====
    public class PersonNameSorter implements Comparable {
      public int compare(Object o1, Object o2) {
        Person p1 = (Person) o1;
        Person p2 = (Person) o2;
        String s1 = p1.getName();
        String s2 = p2.getName();
        return s1.compareTo(s2);
    =====
    import java.util.Arrays;
    public class SortExample {
      public static void main(String [] args) {
      Person p1 = new Person();
      Person p2 = new Person();
      p1.setName("Tom");
      p1.setAge(22);
      p2.setName("Nancy");
      p2.setAge(33);
      Person [] people = new Person[2];
      people[0] = p1;
      people[1] = p2;
      Arrays.sort(people, new PersonAgeSorter());
      Arrays.sort(people, new PersonNameSorter());
    }

  • Help populating an array of objects

    New here, trying to figure this out.
    I'm trying to create an array of objects, then populate the array defining fields. I stripped this down as far as i could to simplify the problem but I get the following error when I compile (i tweaked the carrot placment, formating issues i guess):
    PointsTest.java:41: ']' expected
    cubeArray[0] = new Point();
    ^
    PointsTest.java:41: invalid method declaration; return type required
    cubeArray[0] = new Point();
    ^
    2 errors
    My code:
    class PointsTest{
        public static void main(String[] args) {
                   //So far, this works.
                //convert 3 numbers to point coordinates held in temp variables
                float xT = (Float.valueOf(args[0])).floatValue();
                float yT = (Float.valueOf(args[1])).floatValue();
                float zT = (Float.valueOf(args[2])).floatValue();
                Point point1 = new Point(xT, yT, zT);
                point1.printXYZ(); 
    class Point {
        //A BASIC point class
        //fields defined
        float x, y, z;
        //a constructor that sets initial XYZ values
        Point(float startX, float startY, float startZ) {
                x = startX;
                y = startY;
                z = startZ;
        //a no argument constructor for defualt states
        Point () {
            x = 0;
            y = 0;
            z = 0;
        //method
        void printXYZ(){
            System.out.println("coordinates: " + x + " " + y + " " + z);
    class Cube{
         Point cubeArray[] =  new Point[9];
         cubeArray[0] = new Point();
    }I've looked for answers online without much luck, I'm not worried about using a loop to populate the array at the moment (you can do it one at a time, right?). Didn't see any obvious listings in the java tutorials about arrays of objects. Any help would be appreciated.

    You need to put operations inside of a method instead of just floating them around inside the top-level of your Cube class. The errors you are getting are related to the fact that only class data members or methods are supposed to be inside the top-level of a class definition.
    Something like this should get you started:
    class Cube{
            private Point[] cubeArray;
            public Cube(){
             cubeArray =  new Point[9];
    }Regards,
    -MF

  • Plz help!! array of object (for search)

    i've got few questions of array of object
    1-how to search for a price that is greater than 300 in the array of object
    and how to list all of them?
    2- how to search for the smallest price in the array of object, and how to list?
    can anyone provde a java code for me:P?
    but plz don't too complex
    coz i'm a learner of javaT_T

    _< i still can't understand, and dunno how to change into the code that i needand you guyz help me change it?
    /*wirte the driver program which will define and create an array of
    objects instantiated from the class WaterBill
    Create Accessor and Mutator methods to get/set data from the class.
    write code within the driver method to perfrom the following:
    a) The final total of funds
    b) To search for accounts greater than $300 in the array of objects,
         and list all the customer details
    c)To search for the lowest bill in the array of objects, and list
    those customer dtails
    Class definitions and Objects  using price
    import java.text.*;
    import javax.swing.JOptionPane;
    public class Pre_pb3
         public static void main(String []args)
              int  TTc=0;
              int accNum[]=new int[20];
              String name[]=new String[20], output, stans, display; //stAccNum, stUsage, stTTc;
              double usage[]=new double[20];
              double TTa=0.0;
              double price[]=new double[20];
              char ans;
              double acctG,lowest;
              int i=0;
              waterBill MYwaterBill = new waterBill();
              ans='Y';
              while (!(ans=='N'))
                   name=inputName();
                   accNum[i]=inputAccNum();
                   usage[i]=inputUsage();
                   price[i]=calculateAmountOwing(usage[i]);
                   TTa=MYwaterBill.TTaPrice(price[i]);
                   output=MYwaterBill.outputInfo(name[i], accNum[i], usage[i], price[i]);
                   waterBill MYwaterBill2= new waterBill(name[i], accNum[i],usage[i], price[i]);     
                   stans=JOptionPane.showInputDialog("Do you wanna continue?, (Y)es, (N)o");
                   stans = stans.substring(0, 1);
                   stans=stans.toUpperCase();
                   ans=stans.charAt(0);
                   TTc++;     
              MYwaterBill.outputoutput(TTc, TTa);
              MYwaterBill.findGreat();     //b)
              MYwaterBill.searchDetail();     //c)
              System.exit(0);                                                  
         public static String inputName()
                   String name;
                   name=JOptionPane.showInputDialog("Enter Name ");
                   return name;
         public static int inputAccNum()
              int accNum;
              String stAccNum;
              stAccNum=JOptionPane.showInputDialog("Enter Account Number");
              accNum=Integer.parseInt(stAccNum);
              return accNum;
         public static double inputUsage()
              double usage;
              String stUsage;
              stUsage=JOptionPane.showInputDialog("Enter Water Usage");
              usage=Double.parseDouble(stUsage);
              if (!(usage>=0 && usage<=99999999))
                   System.out.println("water useage is invalid");
                   System.exit(0);
              return usage;
         public static double calculateAmountOwing(double usage)
              double price=0.0;
              if (usage>=0)
                   if (usage<=10000)
                        price=(10000/10)*0.01;
                   else if (usage>10000)
                        price=((10000/10)*0.01)+(((usage-10000)/10)*0.02);
              else
                        System.out.println("Error of usage");
                   return price;
    class waterBill
         private static     int TTc=0 ,accNum=0;
         private static String name, stAccNum, stUsage, stTTc;
         private static String output=" ";
         private static double usage=0.0;
         private static double TTa=0.0;
         private static double price=0.0;
         private static String lowest;
         public waterBill()
              name=" ";
              accNum=0;
              usage=0.0;
              price=0.0;
         public waterBill(String n,int an, double us, double p)
              setName(n);
              setAccNum(an);
              setUsage(us);
              setPrice(p);
         public void setName(String n)
              name=n;
         public void setAccNum(int an)
              accNum=an;
         public void setUsage(double us)
              usage=us;
         public void setPrice(double p)
              price=p;
         public String getName()
              return name;
         public int getAccNum()
              return accNum;
         public double getUsage()
              return usage;
         public double getPrice()
              return price;
         public double TTaPrice(double price)
              TTa=TTa + price;
              return TTa;
         public String outputInfo(String name, int accNum, double usage, double price )
              String output=" ";                         
              output: System.out.println( "Account Number: "+ accNum +
                                       "\nWater Usage: " + usage +
                                       "\nCost Owing: " price
                                       "\nName: "+ name+"\n");
              return output;
         public void outputoutput(int TTc, double TTa)
              display:     System.out.println("Total customer: "+ TTc +
                                  "\nTotal amount owing: " + TTa + "\n\n");
         public void findGreat()//search the a/c that is greater than 300.
              //dunno how to do, so i just leave it blank^^"
              public String searchDetail()//search the smallest a/c
              //same...dunno how to doT_T     

  • Sorting an array of Objects based on a variable inside each object

    I have a class public class handInfo
              //VARS
                   int highC = 0;
                   int hVal = 0;
                   int numHand = 0;
              //CONSTRUCOTRS
                   public handInfo()
              //METHODS
                   public void setHC(int hc)
                             highC = hc;
                   public void setHV(int hv)
                             hVal = hv;
                   public void setNH(int nh)
                             numHand = nh;
                   public int getHC()
                             return highC;
                   public int getHV()
                             return hVal;
                   public int getNH()
                             return numHand;
         }now i have an array, handInfo[] hands = new handInfo[4];
                        hands[0] = new handInfo();
                        hands[0].setHC(HV);
                        hands[0].setNH(1);
                        hands[0].setHV(Val);
                        hands[1] = new handInfo();
                        hands[1].setHC(HV2);
                        hands[1].setNH(2);
                        hands[1].setHV(Val2);
                        hands[2] = new handInfo();
                        hands[2].setHC(HV3);
                        hands[2].setNH(3);
                        hands[2].setHV(Val3);
                        hands[3] = new handInfo();
                        hands[3].setHC(HV4);
                        hands[3].setNH(4);
                        hands[3].setHV(Val4);i need to know how to sort this array, based off hVal...
    D:

    Write a Comparator and call Arrays.sort(array, Comparator).

  • Need help sorting 2 arrays linked by their indexes

    I have 2 arrays that have been linked by the index of both arrays. The first array has to be sorted alphabetically, so I need a way to sort the 2nd array so that the indices match up again with the first array.
    Now, I cannot change my ArrayList (i.e. TreeSet, List, etc.) since there is lots of code that would have to be changed. Here is my test code. Hopefully everyone is a fan of the television show Friends so that you can see how if I sort the firstName Array alphabetically, then I have to have the 2nd array sorted to be "linked" back to the first array based on the index. I am looking for ideas, but if you have simple code, that would be great too.
    import java.util.*;
    public class Test
         public static void main(String[] args)
              System.out.println("BEGIN TEST...");
    Test test = new Test();
    test.beginTest();
    System.out.println("\nTEST COMPLETE!");
         public Test(){}
         public void beginTest()
              ArrayList firstName = new ArrayList();
              ArrayList lastName = new ArrayList();
              //Add to firstName ArrayList
              firstName.add("Ross");
              firstName.add("Chandler");
              firstName.add("Rachel");
              firstName.add("Phoebe");
              firstName.add("Joey");
              //Add to lastName ArrayList
              lastName.add("Geller");
              lastName.add("Bing");
              lastName.add("Green");
              lastName.add("Buffay");
              lastName.add("Tribbiani");
              try
                   System.out.println("TESTING...\n");
                   for(int index=0; index<firstName.size(); index++)
                        String first = firstName.get(index).toString();
                        String last = lastName.get(index).toString();
                        System.out.println("Hi, I am " + first + " " + last + ".");                    
              catch(Exception X) { System.out.println("EXCEPTION! "+X); X.printStackTrace(); }
    }

    Keeping the list in synch is conceptually easy.
    Basically anything you do to the one List, you have to do to the other in order to keep them consistent.
    How are you sorting your "firstnames" list?
    Using the Collections.sort method, or some manual coding?
    Would it be possible to change your datastructure from "parallel arrays" to "List of people objects"
    iepublic class Person {
      String firstName;
      String lastName;
      public Person(String firstName, String lastName){
        this.firstName = firstName;
        this.lastName = lastName;
      // appropriate getter/setter methods
    }Then you could build up your list like this:
    List friends = new ArrayList();
    friends.add(new Person("Ross", "Geller"));
    friends.add(new Person("Chandler", "Bing"));
      ...Now when you sort the list, the last name always goes with the first name because they are in the same object.
    You then write different Comparator objects to impose different orderings.
    Hope this helps,
    evnafets

  • I need help sorting an Array.

    Hi, I need to make a program that reads a string (sentence), then it counts the number of times each letter is "typed". As an optional challenge, the teacher told us to sort the results from the most repeated, to the least.
    My program is working pretty well, here is the code:
    import java.lang.String;
    //import java.util.Collections;
    //import java.util.*;
    public class count {
         final int alpha = 66;
         int [] lower = new int [alpha];
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              java.util.Scanner in = new java.util.Scanner (System.in);
              char current;
              final int alpha = 66;
              int [] lower = new int [alpha];
              int Spaces = 0;
    System.out.println("Enter a sentence:");
    String line = in.nextLine ();
    //int length = line.length();
    line = line.toLowerCase();
    for (int ch = 0; ch < line.length(); ch++)
    current = line.charAt(ch);
    if (current >= 'a' && current <= 'z')
    lower[current-'a']++;
    else if (current == ' ')
    Spaces ++;
    System.out.println();
    for (int letter=0; letter < lower.length;letter++)
         if (lower[letter]>0){
    System.out.print((char)(letter + 'a'));
    System.out.println(": " + lower[letter]);
         System.out.println ();
         System.out.println ("Spaces: " + Spaces);
         }[now, I want to sort the results. I tried using Arrays.sort(lower); but it doesnt work as it should. Example:
    String: Hello
    not sorted:
    e: 1
    h: 1
    l: 2
    o: 1
    Spaces: 0
    "sorted":
    : 1
    .:1
    ]:1
    ~:2
    Spaces: 0
    I would really appreciate your help.
    Thanks, J. Flemming

    Since you didn't post your Arraays.sort code, I can't
    tell what you did wrong.
    What does your array store? Element 0 is the number
    of 'a' occurences, 1 is 'b', etc?
    If so, then when you sort that, you'll have no idea
    which element corresponds to 'a'. You'll need a
    different approach for that. For instance, a class
    that encapsulates two pieces of data: character and
    number of occurences. You could then implement your
    own sort, or learn how to use Comparable/Comparator.
    Making Java
    Objects Comparable
    http://java.sun.com/docs/books/tutorial/collections/in
    terfaces/order.html
    http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-
    sort.htmlAs I said in my original post, I used Arrays.sort(lower), which is probably wrong. My Arrays does work as you described, element 0 is the numer of occurrences of 'a', and 1 is the number of occurrences of 'b' and so on. Thanks for your responce. Im looking into what you said. Thanks again.
    Message was edited by:
    Flemm.John

  • Need help with adding arrays to invoice.java please willing to pay?

    Using your Invoice class created in lab02, write a client program that allows the user to input three Invoice objects into an array of Invoice objects. After you have inputted all of the invoices, print a heading and then output all of the array elements (Invoice objects) by calling the method from your Invoice class that displays all of the data members on a single line using uniform field widths to insure that all Invoice objects will line up in column format (created in Lab04). At the end of the loop, display the calculated total retail value of all products entered in the proper currency format.
    Example of possible program execution:
    Part Number : WIDGET
    Part Description : A fictitious product
    Quantity : 100
    Price          : 19.95
    (etc.)
    Example of possible output
    Part Number          Part Description          Quantity          Price     Amount
    WIDGET          A fictitious product     100          19.95     199.95
    Hammer               9 pounds          10          5.00     50.00
    (etc.)
    Total Retail Value:                                   249.95
    This is what i have so far Invoice Test
    //Lab 2 InvoiceTest.java
    //Application to test class Invoice.
    //By Morris Folkes
    public class InvoiceTest
    public static void main( String args[] )
    Invoice invoice1 = new Invoice( "1234", "Hammer", 2, 14.95 );
    // display invoice1
    System.out.println( "Original invoice information" );
    System.out.printf( "Part number: %s\n", invoice1.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice1.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice1.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice1.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice1.getInvoiceAmount() );
    // change invoice1's data
    invoice1.setPartNumber( "001234" );
    invoice1.setPartDescription( "Blue Hammer" );
    invoice1.setQuantity( 3 );
    invoice1.setPricePerItem( 19.49 );
    // display invoice1 with new data
    System.out.println( "\nUpdated invoice information" );
    System.out.printf( "Part number: %s\n", invoice1.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice1.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice1.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice1.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice1.getInvoiceAmount() );
    Invoice invoice2 = new Invoice( "5678", "PaintBrush", -5, -9.99 );
    // display invoice2
    System.out.println( "\nOriginal invoice information" );
    System.out.printf( "Part number: %s\n", invoice2.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice2.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice2.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice2.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice2.getInvoiceAmount() );
    // change invoice2's data
    invoice2.setQuantity( 3 );
    invoice2.setPricePerItem( 9.49 );
    // display invoice2 with new data
    System.out.println( "\nUpdated invoice information" );
    System.out.printf( "Part number: %s\n", invoice2.getPartNumber() );
    System.out.printf( "Description: %s\n",
    invoice2.getPartDescription() );
    System.out.printf( "Quantity: %d\n", invoice2.getQuantity() );
    System.out.printf( "Price: %.2f\n", invoice2.getPricePerItem() );
    System.out.printf( "Invoice amount: %.2f\n",
    invoice2.getInvoiceAmount() );
    } // end main
    } // end class InvoiceTest

    i suck in java There are 2 possible reasons for this:
    1. you haven't studied
    2. you aren't cut out for programming
    and there r hardly any tutors at my school. plus i work 2 jobs day n night. Please, I'm only want help thats allYou have the help of the ENTIRE WORLD COMMUNITY right here, right now. But you're not willing to make any effort whatsoever. You think people will help or even respect you? You may fail your class and you may fail in life!
    Cheaters don't win and winners don't cheat!

  • Help with email suppot on n96 needed please.

    hi, im hoping some one can help me with my problem, i downloaded the email update for n96, it's the 1st time ive used it, (the one with the pink @ logo.) i go through the email setup and ad my main account with another one. it worked for a while until both accounts got an email from nokia mail saying that its not working and gave me a list of reason.
    Dear Nokia Messaging customer,
    Recently, our email service has been unable to connect to your email service provider, preventing email delivery to your phone.
    This may occur due to one of the following reasons:
    1. Through your service provider, you have changed the email password of your email address. If so, you must update your Nokia Messaging service account with your new password. Email messages will then be delivered to your phone.
    2. The server for your email address is down. For more information, contact your service provider.
    3. You might have inadvertently changed a setting in your Nokia Messaging service account. Log in to your Nokia Messaging account on the website http://netac2.vie.hosting.nokia.com/account to determine whether your information needs to be updated.
    Sincerely,
    The Nokia Messaging Team
    now, i never changed any settings, or password information, and hotmail is saying theres is nothing wrong.
    can some one please help me?!?! thank you.

    please try and help some 1! This is really bugging me.

  • Help With Creating Array of Objects

    I made a little test class
    class MyClass
        public int x = 0, y = 0;
    }Then I tried to declare an array.
    MyClass testObjs = new MyClass[10];However, when I tried to assign values using
    testObjs[0].x = 3;I got an error. What's the problem?
    Thanks.

    I'm thinking that you'll get a compile time message even without assigning anything. So what is the actual code and the actual error message?
    In general terms the procedure is:
    (1) Declare a variable of the type "array of MyClass"
    (2) Create (with "new") and assign a reference to an array to the variable - possibly in the same line
    (3) Populate the array - that is create (with "new") references to MyClass objects and assign them to slots in the array
    (4) Do things with the references to MyClass objects that are in the array slots.

  • How to create a spidar chart (Radar chart) with an array collection object...

    Hi All,
              I need to create Spidar (Radar) chart in my application with the help of an array collection object........can any one help me ?? do i need to import any external library ???
    Please provide the required code for it .........
    Thanks in advance....

    You'll need to set the "series" property of the chart. This will be an array of BarSeries objects.
    You may also need to set the horizontalAxis and verticalAxis properties for the chart. (I forget if there are defaults for these.)

Maybe you are looking for