cancel
Showing results for 
Search instead for 
Did you mean: 

BSP Graph using HTMLB Extension's Chart element

David-Broughton
Explorer
0 Kudos

We are on EP 6.0 SP2 with WAS 6.2. I wrote a simple BSP to chart some values using the HTMLB extension's Chart element. It works great and is easy to use. However, I can not figure out how to make the values appear for each bar in the bar chart. In other words, there are axis values that show 500, 600, et cetera. But, I want the value (e.g., 512) to show on the bar on the chart. Any suggestions would be appreciated.

David Broughton

Oak Ridge National Lab

Accepted Solutions (0)

Answers (5)

Answers (5)

David-Broughton
Explorer
0 Kudos

Thank you for the many responses. My original problem was getting values to appear for each bar in a bar graph (i.e., over the bar or on a mouse-over).

During our process of working on this BSP application, our charts stopped appearing altogether. We verified that the sample programs also no longer produced graphs. It turns out that IGS 6.4 patch 2 was installed by our basis team. During IGS install, the Basis folks (doing a “custom installation”) took the “GFW Chart” default. However OSS Note 653249 indicates to uncheck “CFW Chart” and check “MIS Chart” for our version of BW 3.0B. I think this actually has something to do with the DLL that is loaded behind the scenes. In any case, the Basis team reinstalled IGS with “MIS Chart” and all of our charts started appearing again (i.e., we were back where we started).

Vik replied that we should set ‘displayObjectValues’ to True. However, we had already done that and the object values were not still displaying. Michael’s response suggested configuring GFW_ITS_RFC_DEST (in addition to IGS_RFC_DEST). We had already configured it. But in our BSP we were pointing to PH_IGS_RFC_DEST with this command: CL_GFW=>ITS_RFC_DEST = 'PH_IGS_RFC_DEST'. After changing the literal to GFW_ITS_RFC_DEST, the numbers in the bar chart started appearing! Doing this also fixed the problem that Janice mentioned regarding European decimal notation.

The respondent identified as “Person Bueno” raised the question on how to fill the “data” table. As for getting the mouse-over to display something (other than a blank), it turns out that the EXTENSION field in GRAPH_DATA_LINE table could be set to display a URL. Clicking the graph also takes us to the URL displayed.

GRAPH_DATA_LINE-EXTENSION =

'href="http://www.sap.com" alt = "SAP AG"'.

We are currently trying to figure out how to get values other than URL’s to display here.

In a separate , Brian indicated that the Basis SP level should be at least 41 to get rid of many (e.g., table view) bugs we were experiencing at SP 36. We are currently installing SP’s up to 42.

-


Message was edited by: Brian McKellar

Excellent summary!

Former Member
0 Kudos

I am using the HTMLB Chart element for bar graphs. When I am charting an employee's hourly pay rate, I get the European decimal notation on the Y axis. Is there a way to control this, to get a period instead of a comma? My SAP settings are for U.S. notation.

Thanks

Janice Ishee

kai_gutenkunst
Active Contributor
0 Kudos

I assume you are using the applet for displaying the chart. Please use the IGS for rendering the charts. The IGS displays the value according to your locale.

@Michael:

Thanks for the info with the pie chart. The bug is fixed with the latest IGS patch (IGS 6.40 patch 3).

Kai

Former Member
0 Kudos

In response to Shannon Hardin's query about the HTMLB pie-chart showing an empty tool-tip.

I use an HTMLB pie-chart that has no problem in outputting whatever tool-tip I want to display on mouser-over.

I can think of two possible reasons for the problem you are facing:

(1) Your JCO table (with data that is being supplied to the chart) has not be configured properly.

(2) Your mapping between the JCO table fields is not in synch with the HTMLB chart's model's attributes.

Former Member
0 Kudos

Can you please explain to me how I would check the JCO configuration?

Former Member
0 Kudos

Hello Shannon-

Could you tell me what is your model (or data source) for the <HTMLB:Chart> control?

I would like to know what is feeding the data to that control. Also, how are you linking this your model (or data source) to said control?

I need to know where the data is coming from [into the control] and how it is being provided [to the control].

Also, are you developing a Java IView or a BSP IView? Is your application deployed as an IView on Enterprise Portals or on Web Application Server as a web-application.

Thanks,

- Vik.

Former Member
0 Kudos

Vik,

Thanks for your help! Right now we are just testing the <htmlb:chart> control within a test BSP application that we are testing outside of the Portal. (We are performing the "Test" function within SE80, which opens a browser window with the BSP application, instead of calling it from within the Portal.) Would this chart act differently if we were running the BSP application from within the Portal?

We are on R/3 Enterprise ext 1.1, and would eventually be putting our BSP application into the Portal (EP 5.0.5) as a BSP iView if we can confirm that the chart control is working correctly.

We have been calling the <htmlb:chart> control like this:

<htmlb:chart id = "myChart1"

data = "<%= data %>"

axisMaxVal = "100"

axisMinVal = "0"

chartType = "PIE_3D"

colorOrder = "DEFAULT"

displayObjectValues = "TRUE"

height = "200"

legendPosition = "DEFAULT"

title = "Test Chart"

titleCategories = "Statuses"

titleValues = "Percentages"

visible = "X"

width = "500" />

The "data" table is being filled like this:

Groupid = the same 'Groupname' for all the entries

x = The category text, such as 'Complete', 'Incomplete', etc. (We see these texts in the legend)

y = The actual percentage, such as '30', '70', etc.

z = The category text again (because didn't know if this would be used on the chart as an explanatory text)

color = color desired for each piece of the pie

datalabel = The category text again (because didn't know if this would be used on the chart as an explanatory text)

We really appreciate your help! Please let me know if you need even more information than this.

Thanks,

Shannon

Former Member
0 Kudos

Vik,

Do you need more information about how the values we are passing in for the attributes of <htmlb:chart>?

Thanks,

Shannon

Former Member
0 Kudos

Hiya Shannon-

I have all the information I need, for now, I think.

So far so good. This looks fine to me. After all it is fairly a straight-forward use of the HTMLB:Chart control. You seem to be declaring appropriately with the necessary parameters defined in the correct spots.

I am curious though as to whether you are still having the problem of not being able to display values for the chart elements. Or if you want to know of my opinion about any differences I can estimate in your deployment of this application on EP?

Thanks,

- Vik.

Former Member
0 Kudos

Hi everybody!

Where can I find, how the "data" table for htmlb:chart must be filled like? I use the same tag and have a problem with it. I think I have wrong type of "data" table. There are only two rows (numbers - strings) in it.

Thanks in advance.

-

-


Hallo,

wo kann ich die beschreibung für "data" table aus htmlb:chart finden? Wie muss man diese tabelle mit werten richtig ausfüllen? Ich gebe die tabelle mit 2 zeilen (nummern - strings) über, aber es funktioniert nicht. Wahrscheinlich hat diese tabelle walsches format für tag htmlb:chart.

Danke im Voraus.

Gruss

former_member181879
Active Contributor
0 Kudos

Your use of both English and German is impressive. For the record we can handle a number of other languages from Afrikaans to (nearly) Zulu, including a major language such as Russian. (I suspect you know this already?) However, for SDN we use English. As you can already handle that with perfection, let us stick to it.

In another will give you the lay of the land. This thread will show you a simple example of the <htmlb:chart> in action.

++bcm

Former Member
0 Kudos

Thank you for your answer und helpful links. I hope it'll solve my problems:-). Especially "Crawling SDN" and "the full package" of graphics from graphics@sap.com

======= off top =======

<i>As you can already handle that with perfection, let us stick to it.</i>

That's why I wrote in German also;-).

It's a pity that nobody speaks Russian here:-( ;-).

======================

former_member181879
Active Contributor
0 Kudos

> It's a pity that nobody speaks Russian here:-( ;-).

Rest assure, we have a fair number of Russian speaking experts in this forum. But we try to stick to English, so that our American colleagues can also follow .

Former Member
0 Kudos

The <HTMLB:Chart> control has a parameter 'displayObjectValues' which has the possible values 'TRUE' and 'FALSE'.

To make the values appear for each element in the chart set the parameter 'displayObjectValues' to 'TRUE'.

If your graph looks very cluttered due to the amounts of the information on the screen then consider increasing the size of your chart by modifying the 'width' and 'height' properties.

Former Member
0 Kudos

We are having the same problem. We are actually trying to create a pie chart using <htmlb:chart>. We can create the pie chart, but there is nothing on the pie chart which gives the exact percentage. On mouseover, it only displays a blank tooltip (it looks like one space). We have even tried sending in values in the data table (data-datalabel field), but these values are never shown on the chart. We have also tried different values for attribute displayObjectValues, but it doesn't make a difference.

We would also like to know the answer to this question. Is there any way to show the exact values on the chart? And why is there a blank tooltip that is shown when you place your cursor over a section of the pie chart? This seems like a bug.

Thanks,

Shannon

Former Member
0 Kudos

We had to modify CL_HTMLB_CHART(DO_AT_END) because of an SAP bug. This fixed our pie chart but we have to confirm with SAP that this is a valid fix or if they have another way to correct the problem.

Mike

-


loop at data into l_s_data.

*{ INSERT

    • Added logic to show tool-tip

condense l_s_data-x.

condense l_s_data-y.

    • End logic

*} INSERT

concatenate l_data_string

'@.' l_s_data-groupid

'@,' l_s_data-x

'@,' l_s_data-y

'@,' ' '

*{ DELETE

*\ '@,' ' '

*} DELETE

*{ INSERT

    • Added logic to show tool-tip

'@,' l_s_data-y

    • End logic

*} INSERT

'@,' l_s_data-color

into l_data_string.

endloop.

Former Member
0 Kudos

After going back and forth in OSS, the answer is that OSS note 454042 #3 is a little misleading. It should say: (and also add IGS_RFC_DEST if your on 6.10 or later). We had only the IGS_RFC_DEST entry which caused our pie charts not to show correctly. So add GFW_ITS_RFC_DEST & IGS_RFC_DEST and it should work as designed. We also noticed the GFW entry added a new bug where a pie chart won't display at all if one section of the pie chart has 100% of the count. Meaning if Sect 1 has 5, Sect 2 has 0, and Sect 3 has 0, you will get no graphic but you should see a pie chart all in one color.

Regards,

Mike