cancel
Showing results for 
Search instead for 
Did you mean: 

BusinessGraphics

former_member211905
Participant
0 Kudos

Hey,

I want to show a graph of some values received from R3. The RFC returns a series of numbers which I want to map onto my BusinessGraphic. I've made two SimpleSeries in the BusinessGraphics and have set up the context settings. Do I have to do anything in the wdDoInit() method to be able to show the graph. I've tried this:

IPrivateGrapic.ICatElement catElement = wdContext.createCatElement();

catElement.setBalance(wdThis.wdGetRentCustController().wdGetContext().currentBalance_Pr_TransElement().getBalance());

catElement.setBalance_Date(wdThis.wdGetRentCustController().wdGetContext().currentBalance_Pr_TransElement().getBalance_Date());

wdContext.nodeCat().addElement(catElement);

I only get a "Graphics Rendering Problem" out of this.

Please help,

Best Regards

Øyvind Isaksen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have you specified the IGS URL property for the BusinessGraphics UI element?

Regards,

Satyajit.

former_member211905
Participant
0 Kudos

Yes, it works when i set some hardcoded numbers. I have found out something more now, but the problem is to fetch all the numbers from the customcontroller. My code now looks like:

IPrivateGrapic.ICatElement catElement = wdContext.createCatElement();

catElement.setBalance(wdThis.wdGetRentCustController().wdGetContext().currentBalance_Pr_TransElement().getBalance());

wdContext.nodeCat().addElement(catElement);

But only the last value is shown in the graph. How can I get the other previous values from R3.

Regards,

Øyvind Isaksen

Former Member
0 Kudos

Hi,

I don't know what your context structure looks like. So can you share your context structure?

Regards,

Satyajit.

former_member211905
Participant
0 Kudos

Context

Cat

-Balance

-Balance_Date

Balance is mapped against the Balance in my custom controller, as well as the Balance_Date. My custom controller RentCust looks like:

Context

Zpo_Embt_Cust_Input

-Output

-Balance_Pr_Trans

-Balance

-Balance_Date

Regards

Øyvind Isaksen

Former Member
0 Kudos

Which UI elememts did you create and how is the data binding?

If the view context is mapped to the component context you don't have to create node elements explicitely.

Armin

former_member211905
Participant
0 Kudos

In my Graphic view I have created a BusinessGraphics1 element. This have the Cat (mentioned above) as its seriesSource. I have inserted one series called SimpleSeries1 of type simpleseries into the BusinessGraphics1. The SimpleSeries1's value is set to Cat.Balance.

I also thought it wouldn't be necessary to create node elements explicitely, but when my wdoDoInit() is empty I only get the "graphics rendering problem".

Regards

Øyvind

Former Member
0 Kudos

Hi,

You can try out this code:


int custNodeSize = wdThis.wdGetRentCustController.wdContext.getContext().nodeBalance_Pr_Trans().size();

for(int i=0; i<custNodeSize; i++){
//create Cat element and then do the following
wdThis.wdGetRentCustController.wdContext.getContext().nodeBalance_Pr_Trans().setLeadSelection(i);
catElement.setBalance(wdThis.wdGetRentCustController.wdContext.getContext().nodeBalance_Pr_Trans().currentBalance_Pr_TransElement().getBalance();

//add Cat element to node in context.
}

Regards,

Satyajit.

Answers (1)

Answers (1)

former_member211905
Participant
0 Kudos

Thank you Satyajit, that solved my problem!

Regards

Øyvind Isaksen