cancel
Showing results for 
Search instead for 
Did you mean: 

Graph

Former Member
0 Kudos

Hi,

I am trying to plot a graph in HTMLB.

X Axis Company

Y Axis Num of Permanent Employee

Y Axis Num of Non-Permanent Employes

I have rows and columns in DefaultTableView with the required data.

Column1 = Company

Column2 = Permanent Employees

Column3 = Non-Permanent Employees

JCO.Table ChartColumnNames = new JCO.Table("OTP");

ChartColumnNames.addInfo( "GROUPID", JCO.TYPE_STRING, 50);

ChartColumnNames.addInfo( "X", JCO.TYPE_FLOAT, 50);

ChartColumnNames.addInfo( "Y", JCO.TYPE_FLOAT, 50);

ChartColumnNames.addInfo( "Z", JCO.TYPE_FLOAT, 50);

ChartColumnNames.addInfo( "COLOR", JCO.TYPE_CHAR, 50);

JCO.Table table = new JCO.Table( ChartColumnNames);

table.appendRow();

table.setValue( "", 0);

table.setValue( "", 0);

table.setValue( "", 0);

table.setValue( "", 0);

table.setValue( "", 0);

I am trying to figue out how to relate the column1,2,3 to

table.setValue( "", 0);

Any thought would be appreciated.

Thank you.

NAC

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Neville,

This is what your code should look like.

JCO.Table ChartColumnNames = new JCO.Table("OTP");
ChartColumnNames.addInfo( "GROUPID", JCO.TYPE_STRING, 50);
ChartColumnNames.addInfo( "X", JCO.TYPE_CHAR, 50);
ChartColumnNames.addInfo( "Y", JCO.TYPE_FLOAT, 50);
ChartColumnNames.addInfo( "COLOR", JCO.TYPE_CHAR, 50);

JCO.Table table = new JCO.Table( ChartColumnNames);
//add the data for number of employee in your company
table.appendRow();
//name of your company
table.setValue("Total Employees",0);
//name of your company
table.setValue("SAP",1);
//specify the count
table.setValue(10000,2);
//specify the color
table.setValue("10",3)

//add the data for number of permanent employee in your company
table.appendRow();
//name of your group
table.setValue("Permanent Employee",0);
//name of your company
table.setValue("SAP",1);
//specify the count
table.setValue(95000,2);
//specify the color
table.setValue("15",3)

//add the data for number of non-permanent employee in your company
table.appendRow();
//name of your group
table.setValue("Non-Permanent Employee",0);
//name of your company
table.setValue("SAP",1);
//specify the count
table.setValue(5000,2);
//specify the color
table.setValue("20",3)

Answers (0)