cancel
Showing results for 
Search instead for 
Did you mean: 

how to include two entity sets in the path (data: { path: "/Products" })

Former Member
0 Kudos

Hi Experts,

May i know how i am going to include two entity sets in the path? The below code only shown it only involves one entityset.

data: {

                path: "/Products"

            }

Second Question:

If both entity sets (Products & ProductRevenue) contains the same attributes (let say it is Hsl)but different value and i wish to set the Hsl in Products as x-axis and Hsl in ProductRevenue as y-axis,how the Web IDE is going to differentiate the value of Hsl from Products is set as x-axis or Hsl  from ProductRevenue is set as y-axis?

var feedValueAxis_dual_stacked_bar3 = new sap.viz.ui5.controls.common.feeds.FeedItem({

                'uid': "valueAxis",

                'type': "Measure",

                'values': ["Hsl"]

            }),

            //feedValueAxis2_dual_stacked_bar3 = new sap.viz.ui5.controls.common.feeds.FeedItem({

            //    'uid': "valueAxis2",

            //    'type': "Measure",

            //    'values': ["Hsl"]

            //}),

Regards,

Loh.

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

Not sure what you mean... you cannot display two arrays at the same time, how would your control know how to distinguish between them?

Or do you mean, the second entityset is a child from the first one? then use the OData $expand operation

Former Member
0 Kudos

Hi Robin, I will use the screen shots below as example to explain to you my question. Here i have 2 entity types, productRevenue and Products. Both entitytypes have the same fields, this is because when beltp =1, the Hsl field will contains the cost value, whereas beltp =2, the Hsl field will contains the revenue value. The reason i designed the 2 entitytypes in this way is because i want to display the cost data and revenue data in the stackbar chart. I have searched a lot of example of chart, usually it showed the path to only one entity types as example shown below.

data: {

                path: "/Products"

            }

May i know is it possible to show the path to two entitytypes?

data: {

                path: "/Products", "/ProductRevenue"

            }

santhu_gowdaz
Active Contributor
0 Kudos

"parts" will use for 2 properties to format the value.

But i'm not sure how it will help for you.

Qualiture
Active Contributor
0 Kudos

That is not possible this way, because it is like adding apples to oranges (although they may have the same properties, they are distinct entities)

Also, there is no way you can bind a list, table, etc to more than one array. It is logically not possible to have a list containing of multiple arrays of multiple different objects.

I think you should go back to the drawingboard, and create a service which contains all the properties you want for your chart

Former Member
0 Kudos

Hi Santhosh, i have just seen the link you suggested me. I guess it retrieved the fname &lname from the same entitytype, but my case i wish to retrieve 2 fields data from different entitytypes but i am not sure whether there is a syntax for this case.

santhu_gowdaz
Active Contributor
0 Kudos

As Robin's Said it's not possible. for single graph you can't bind with 2 entities. so do logic in backend to get all the values in single entity.

Former Member
0 Kudos

ok thanks Robin

Former Member
0 Kudos

Thanks ya, Santhosh

Answers (1)

Answers (1)

Former Member
0 Kudos

Any experts can help me answer in here