cancel
Showing results for 
Search instead for 
Did you mean: 

Can Overview Page use OData v4 to configure analysis charts?

JiaHao_He
Discoverer
0 Kudos
264

After configuration, the chart did not appear, but the Card is displayed. Below are my Annotation configuration and the current page situation.

```xml

<Annotation Term="UI.Chart" Qualifier="ConsultationByRegion">
<Record>
<PropertyValue Property="Title" String="咨询数量"/>
<PropertyValue Property="MeasureAttributes">
<Collection>
<Record Type="UI.ChartMeasureAttributeType">
<PropertyValue Property="Measure" PropertyPath="constantOne"/>
<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="DimensionAttributes">
<Collection>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPath="geoName"/>
<PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="ChartType" EnumMember="UI.ChartType/Donut"/>
</Record>
</Annotation>

```

- mainfest.json

```json

"ConsultationByRegionCard": {
"model": "mainModel",
"template": "sap.ovp.cards.v4.charts.analytical",
"settings": {
"title": "地区咨询情况",
"entitySet": "ConsultingCustRequest",
"valueSelectionInfo": "比上月",
"chartAnnotationPath": "com.sap.vocabularies.UI.v1.Chart#ConsultationByRegion",
"identificationAnnotationPath": "com.sap.vocabularies.UI.v1.Identification#IDENT",
"dataPointAnnotationPath": "com.sap.vocabularies.UI.v1.DataPoint#TotalQuantity",
"addODataSelect": true
}
}

```

 

JiaHao_He_1-1723386690603.png

 

 

View Entire Topic
MioYasutake
Active Contributor
0 Kudos

@JiaHao_He 

For OData V4, in addition to the annotation for charts, annotations such as `Aggregation.Applysupported` are also required. Please refer to the "How to Annotate Your Service as an Analytical Service" section in the following document.

https://sapui5.hana.ondemand.com/#/topic/7f844f1021cd4791b8f7408eac7c1cec

JiaHao_He
Discoverer
0 Kudos
First of all, thank you very much for your response and assistance! I referred to the document you provided and added the following to my annotation.xml: <Annotation Term="Aggregation.ApplySupported"> <PropertyValue Property="GroupableProperties"> <Collection> <PropertyPath>geoName</PropertyPath> </Collection> </PropertyValue> </Annotation> However, the chart still does not appear. Is there something I might have written incorrectly or missed? Thank you again for your help!
MioYasutake
Active Contributor
0 Kudos
@JiaHao_He Can I confirm whether your backend service is CAP or RAP?
JiaHao_He
Discoverer
0 Kudos
Our backend service is not based on CAP or RAP. We use Olingo to expose an OData server. When creating the SAP Fiori application, we chose the "Connect to an OData Service" option.