Hello. I need to build smartchart based on CAP Service. I added annotations but the graph is not showing up. The event handler for the view is not called.
view.xml
<Shell id="shell">
<App id="app">
<pages>
<Page id="page" title="{i18n>title}">
<content>
<VBox fitContainer="true">
<smartchart:SmartChart id ="smartChartGeneral" enableAutoBinding="true"
entitySet="Analytics" useVariantManagement="true"
persistencyKey="PKeyChartExample9" useChartPersonalisation="true"
header="" showFullScreenButton="true" selectionMode="Multi"
showChartTooltip="true" showDrillBreadcrumbs="false"
showDetailsButton="false" showDrillButtons="true"
showSemanticNavigationButton="true"
height="100%"
data:dateFormatSettings='\{"pattern":"y MMMM d"\}'>
<smartchart:semanticObjectController>
<sl:SemanticObjectController
navigationTargetsObtained="onNavigationTargetsObtained" navigate="onNavigate" />
</smartchart:semanticObjectController>
</smartchart:SmartChart>
</VBox>
</content>
</Page>
</pages>
</App>
</Shell>
manifest
"dataSources": {
"mainService": {
"uri": "/v2/service/",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
}
"models": {
"": {
"dataSource": "mainService",
"preload": true
}
},
cds definition
@Aggregation.ApplySupported.PropertyRestrictions : true
view Reports as
select from DateEntry {
key ID,
@Analytics.Dimension : true
employee.id AS employee_id,
@Analytics.Dimension : true
employee.name,
@Analytics.Dimension : true
skf.id AS skf_id,
@Analytics.Dimension : true
skf.description,
@Analytics.Dimension : true
shift.id,
@Analytics.Dimension : true
shift.name AS shift_name,
@Analytics.Dimension : true
entryDate,
@Analytics.Measure : true
@Aggregation.default : #SUM
value
};
cds service
entity Analytics as projection on my.Reports;
service CatalogService @(path:'/service')
//@(requires: 'authenticated-user')
annotate CatalogService.Analytics with @(
Analytics : {
AnalyticalContext : [
{
$Type : 'Analytics.AnalyticalContextType',
Dimension: true,
Property : 'name'
},
{
$Type : 'Analytics.AnalyticalContextType',
Dimension: true,
Property : 'shift_name'
},
{
$Type : 'Analytics.AnalyticalContextType',
Measure:true,
Property : 'value'
}
],
}
);
in the console "Assertion failed: ManagedObject.apply: encountered unknown setting 'customData' for class 'sap.ui.comp.navpopover.NavigationPopoverHandler' (value:'Element sap.ui.core.CustomData#__data5')"
Request clarification before answering.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.