cancel
Showing results for 
Search instead for 
Did you mean: 

Using tooltips with BusinessGraphics

0 Kudos

Hello,

I'd like to bind the values of a series to a 'tool tip'. It works fine if I enter the fully qualified path to bind the values to the key 'value', but if I try to bind the values to the key 'tool tip' the project cannot be built anymore. The compiler reports the following error:

"The method bindTooltip(String) is undefined for the type IWDSimpleSeries".

When I have a look at the generated sourcecode I can see indeed, that the DevStudio tries to call the method bindTooltip of the class IWDSimpleSeries.

Is this a bug?

If not, is there a work-around to use different tooltips for different columns of the same series? It seems, as if you can set the tooltip for a series only globally via the method setTooltip().

Thanks and regards,

Christian

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hello Christian,

you can not bind the tooltip of a SimpleSeries, because unlike the value attribute the tooltip attribute applies to the series as a whole.

If you want a different tooltip for every single point, you will have to use 'Series' instead of 'SimpleSeries' with Point and Value elements. Bind the tooltip property of the Point and you are done.

Hope that helps

Jens

0 Kudos

Hi,

I tried to use 'Series' and to use a certain value attribute as tooltip for the 'Point'. First I encountered the following exception:

...

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:144)

Caused by: com.sap.tc.webdynpro.services.cal.core.exceptions.ClientRuntimeException

at com.sap.tc.webdynpro.clientimpl.csf.client.CSFUpdateClientPeer.sendResponse(CSFUpdateClientPeer.java:79)

at com.sap.tc.webdynpro.clientimpl.csf.client.CSFClient.sendResponse(CSFClient.java:438)

... 22 more

Caused by: java.lang.ClassCastException

at com.sap.tc.webdynpro.clientserver.uielib.graphics.impl.BusinessGraphics.putSeriesInGraphicsDC(BusinessGraphics.java:406)

...

When I entered just a String (e.g. "Test") it worked fine.

Finally, I found out that the value attribute must be of kind "String" and must not be of any other type like "Integer"! I guess that's why this ClassCastException occured.

Regards,

Christian

0 Kudos

I tried to set the tooltips via the following workaround in the wdDoModifyView method:

IWDBusinessGraphics graph = (IWDBusinessGraphics)view.getElement("graphics");

IWDAbstractSeries allSeries[] = graph.getSeriesList();

IWDSimpleSeries series;

for(int j=0;i<allSeries.length;j++) {

series = (IWDSimpleSeries)allSeries[j];

for(int i=0;j<wdContext.nodeMessage().size()i++) {

wdContext.nodeMessage().setLeadSelection(i);

series.setTooltip(series.getValue());

}

}

The method call series.getValue() returns the right value, but when I use the setTooltip method it probably overwrites the global variable...

Thanks,

Christian