cancel
Showing results for 
Search instead for 
Did you mean: 

RAP UI annotations: Line chart in column of object page's list

MattDion
Participant
0 Kudos

I have a RAP object with the following structure:

  • RootEntity
    • SubEntity
      • ChartEntity

All associations are [0..*]

RootEntity's object page has a line item facet for the association to SubEntity. This is a basic setup and works fine.

Now I want to display a Line Chart as a column in SubEntity's line item facet. The subentity ChartEntity has the content needed for the line chart. I have annotated ChartEntity with the following:

 

@Metadata.layer: #CORE
@UI.chart: [
  {
      qualifier: 'pleaseWork',
      title: 'Line Micro Chart',
      description: 'This is a micro chart',
      chartType: #LINE,
      measures: ['AverageDays'],
      dimensions: ['TimePeriod'],
      measureAttributes: [
        {
          measure: 'AverageDays',
          role: #AXIS_1,
          asDataPoint: true
        }
      ]
   }
]
annotate view <ChartEntity>
  with 
{
  @UI.dataPoint: { 
    qualifier: 'AverageDays'    
  }
  AverageDays;
}

 

And then in the SubEntity annotations I have added this:

 

 

@Metadata.layer: #CORE
annotate entity <SubEntity> with
{
  @UI.lineItem: [ { 
                    position: 10, 
                    label: 'Main Value' 
                  },
                  {
                    type: #AS_CHART,
                    label: 'Chart',
                    valueQualifier: 'pleaseWork',
                    targetElement: '_chartEntityAssociation',
                    position: 20
                  }
                ]
  MainValue;
}

With the addition of the #AS_CHART object, the object page fails to render and I end up with this error in the browser's console:

MattDion_0-1710939996636.png

Any thoughts on what I'm doing wrong?

Accepted Solutions (0)

Answers (0)