How to display 2 columns in a database on a Spider Chart axe

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mrinmoy.ganguly
Posts: 3
Joined: Mon May 11, 2009 11:35 am

How to display 2 columns in a database on a Spider Chart axe

Post by mrinmoy.ganguly » Mon Jun 15, 2009 8:11 pm

Hi,

I have to display Users' Skills and Required Skills on an Axes on Spider chart. These are 2 separate columns in the database that needs to be shown on an Axes.
The code I am using is:
defaultcategorydataset.addValue(resObj.getInt("REQDSKILLLEVEL"), resObj.getString("BASE_ROLE_LEVEL"), resObj.getString("SKILL_NAME"));
As per this code, I will be able to display the REQDSKILLLEVEL field on the Axes, BASE_ROLE_LEVEL on the Legend (Colored dot indicators) and SKILL_NAME as the Axes Name.
I need to display another field from the database USERSKILLLEVEL on the Axes apart from REQDSKILLLEVEL.
Also an extra dot indicator for USERSKILLLEVEL apart from the BASE_ROLE_LEVEL.

Thanks for any help on this.

Mrinmoy Ganguly

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: How to display 2 columns in a database on a Spider Chart axe

Post by david.gilbert » Mon Jun 15, 2009 11:05 pm

I got slightly confused by your description. Any chance you could post a sample table with actual values in it?
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

mrinmoy.ganguly
Posts: 3
Joined: Mon May 11, 2009 11:35 am

Re: How to display 2 columns in a database on a Spider Chart axe

Post by mrinmoy.ganguly » Wed Jun 17, 2009 6:58 pm

Hi Dave,
The table looks like this:
UserName UserSkillLevel ReqdSkillLevel SkillName BaseRoleLevel
XYZ 1 2 Portal Server 1
XYZ 1 1 WAS 1
XYZ 2 3 CSS 1
These are a few sample values in the table.
I need to indicate the UserSkillLevel by a Yellow dot and The ReqdSkillLevel by (1-Red Dot, 2-Blue Dot, 3-Red Dot). This would allow the User to compare his Skills in the Chart. So The UserSkillLevel and ReqdSkillLevel nedd to be on the Same Axes so as to allow the User to know his Levels.
The Chart is for a Specific UserName and BaseRoleLevel at a given time.
Please do let me know if the above information is sufficient.

Thanks for the help again.

Mrinmoy Ganguly

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: How to display 2 columns in a database on a Spider Chart axe

Post by david.gilbert » Wed Jun 17, 2009 9:15 pm

I'm not sure that this plot is flexible enough to do what you want. All I can suggest is adding the "actual" and "required" values with distinct row keys:

Code: Select all

        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        dataset.addValue(1.0, "XYZ - Actual", "Portal Server");
        dataset.addValue(1.0, "XYZ - Actual", "WAS");
        dataset.addValue(2.0, "XYZ - Actual", "CSS");
        dataset.addValue(2.0, "XYZ - Required", "Portal Server");
        dataset.addValue(1.0, "XYZ - Required", "WAS");
        dataset.addValue(3.0, "XYZ - Required", "CSS");
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked