cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Flexible Programming model - Issue in Transition between different charts

GowthamRaja
Active Participant
0 Likes
457

Hi Experts,

I am using sapui5 flexible programming model to display a chart block in a custom page. The chart displays properly.

When i do transition between charts it is not working. By default it displays column chart but when i select different chart like bar chart or donut chart, it displays bar or donut. Now if i again select default column chart it does not displays.

View.xml:

<mvc:View controllerName="dashboard.ext.main.Main"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:macros="sap.fe.macros"
xmlns:l="sap.ui.layout">
<Page id="Main" title="{i18n&gt;MainTitle}">
<content>
<HBox fitContainer="true" alignItems="Stretch" alignContent="Stretch" justifyContent="Start" renderType="Div">
<l:Grid hSpacing="1" containerQuery="true" defaultSpan="L6 M6 S12">
<l:content>
<macros:Chart id="Chart" metaPath="@com.sap.vocabularies.UI.v1.Chart#PlantVsIntiatives" personalization="Type,Item,Sort" selectionMode="Multiple" chartType="Column"/>
<!-- <macros:Chart id="Chart2" metaPath="@com.sap.vocabularies.UI.v1.Chart#PlantVsIntiatives" personalization="Type,Item,Sort" selectionMode="Multiple" chartType="Column"/> -->
</l:content>
</l:Grid>
</HBox>
</content>
</Page>
</mvc:View>

annotation.cds:

using STODashboardService as service from '../../srv/dashboardservices';


annotate service.ZIJS_CDS_TOTAL_TI_COUNT with @(
Aggregation: {ApplySupported: {
$Type : 'Aggregation.ApplySupportedType',
Transformations : [
'aggregate',
'groupby'
],
Rollup : #None,
GroupableProperties : [PLANT],
AggregatableProperties: [{
$Type : 'Aggregation.AggregatablePropertyType',
Property: INITIATIVES,
}, ]

}, },
Analytics : {
// AggregatedProperty #min: {
// Name : 'Initiatives',
// AggregationMethod : 'min',
// AggregatableProperty: 'INITIATIVES',
// ![@Common.Label] : 'Initiatives'
// },
AggregatedProperty #max: {
Name : 'Initiatives',
AggregationMethod : 'max',
AggregatableProperty: 'INITIATIVES',
![@Common.Label] : 'Initiatives'
},
// AggregatedProperty #sum: {
// Name : 'Initiatives',
// AggregationMethod : 'sum',
// AggregatableProperty: 'INITIATIVES',
// ![@Common.Label] : 'Initiatives'
// },
},
UI.Chart #PlantVsIntiatives : {
$Type : 'UI.ChartDefinitionType',
Description : 'chart description',
Title : 'Events Per Departments',
ChartType : #Column,
Dimensions : [
PLANT,
],
DimensionAttributes : [
{
$Type : 'UI.ChartDimensionAttributeType',
Dimension : PLANT,
Role : #Category,
},
],
DynamicMeasures : [
'@Analytics.AggregatedProperty#max',
],
MeasureAttributes : [
{
$Type : 'UI.ChartMeasureAttributeType',
DynamicMeasure : '@Analytics.AggregatedProperty#max',
Role : #Axis1,
},
],
},

);
 
 
I am missing anything in above annotation file. Please need your help
 
Thanks,
Gowtham

Accepted Solutions (0)

Answers (1)

Answers (1)

sandeep_rs
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

I am assuming this is in a Fiori elements OData V4 context. If so: In the custom page, do you make use of the chart building block? If yes, I see this as a bug - please open a SNOW ticket against CA-UI5-FE with all the usual details (URL, connections & credentials, steps to recreate,...) and we will look into it.

Best Regards,

   Sandeep