Skip to Content
0
Oct 27, 2005 at 07:25 AM

Htmlb chart control is not working

20 Views

Hi All

I created chart using htmlb chart control as per documents given in pdk. but it is not displaying any thing on the browser,I am attaching code ,Please tell me where will the wrong

Thanks in advance

Gopal

Java:

-


create a new JCO table

JCO.Table table = new JCO.Table("DAX");

// add the info/header to the table. The header is defined by the column name,

// data type and length (see JCO table API for details).

table.addInfo("GROUPID", JCO.TYPE_CHAR, 50);

table.addInfo("X", JCO.TYPE_CHAR, 50);

table.addInfo("Y", JCO.TYPE_CHAR, 50);

table.addInfo("Z", JCO.TYPE_CHAR, 50);

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

table.addInfo("EXTENSION", JCO.TYPE_CHAR, 150);

// append a record to the table. setValue sets the value as string. The second

// parameter is the column. The numbers are according to the sequence of the

// definition of the header (see above).

table.appendRow();

table.setValue("07.2001",0);

table.setValue("SAP",1);

table.setValue("158",2);

table.setValue("20",3);

table.setValue("10",4);

table.setValue("href=\"http://www.sap-ag.de/"",5);

// create a JCOChartModel and set the JCO table

IChartModel model = new JCOChartModel();

((JCOChartModel) model).setDataSrc(table);

myBean.setModel(model1);

-


JSP:

<jsp:useBean id="myBean" scope="session" class="com.sap.barchart.ModelBean" />

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<hbj:form id="myFormId" >

<hbj:chart

id="myChart1"

model="myBean.model"

visible="true"

displayObjectValues="true"

titleCategories="Company"

titleValues="Turnover"

title="Washers by Companies!"

chartType="BARS_3D"

colorOrder="DEFAULT"

height="200"

/>

</hbj:form>

</hbj:page>

</hbj:content>