on 07-13-2018 4:56 PM
Can anyone guide me on how to display a datapoint in a Donut Chart in an Analytical Card as a percentage - 30% rather than as a value e.g. 10. This site shows the donut chart displaying the values as a percentage and it is what i'm trying to achieve TechEd17 example.
In the CDS view i have default aggregation for the value set as:
@DefaultAggregation: #SUM
I've tried adding a measure unit to the local annotations but this annotation only takes effect in the card header.
<Annotation Term="CQP.Unit" String="%"/>
I've downloaded the annotations and manifest files from the example website but there is nothing different in my local annotations / manifest.json.
Any help would be greatly appreciated.
My understanding to you query is to show a negative percentages/values on donut chart. If this is true, I believe this is not a supported scenario to pie/donut chart by nature.
Differ from other axes charts like line/column which consist of origin (the zero line), pie/donut chart doesn't visualize values in quadrant but only by size of sectors so there is no origin to divide positive and negative values.That's said, pie/donut chart could only visible positive values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chapman
Not a negative percentage, just a percentage.
The sentence: 'Can anyone guide me on how to display a datapoint in a Donut Chart in an Analytical Card as a percentage - 30% rather than as a value e.g. 10' shouldn't have included a dash ( - ).
Thank you for your clarification.
Chart property
plotArea.dataLabel.type
allows you to set color, value, percentage, colorAndPercentage. "color" here represents value of dimension being fed as "color" uid. You could try set this property to "value" in order to show the original value.
Hi,
the KPI Annotation Path references to a value, shown on top in the head area. Usually, the path is defined in "metadata.xml" like this:
<EntityType Name="NeuRegistrierungen" sap:content-version="1">
<Key>
<PropertyRef Name="Keyval1"/>
<PropertyRef Name="TimeHh"/>
</Key>
<Property Name="AnzRegNeu" Type="Edm.Int32" Nullable="false" sap:unicode="false" sap:label="neue Registrierung" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Zeitraum" Type="Edm.String" Nullable="false" MaxLength="2" sap:unicode="false" sap:label="Zeitraum" sap:creatable="false"
sap:updatable="false" sap:sortable="false"/>
<Property Name="AnzReg" Type="Edm.Int32" Nullable="false" sap:unicode="false" sap:label="Registrierung" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Keyval1" Type="Edm.String" Nullable="false" MaxLength="8" sap:unicode="false" sap:label="Zeitraum" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="TimeHh" Type="Edm.String" Nullable="false" MaxLength="2" sap:unicode="false" sap:label="Uhrzeit Stunden"
sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="OVP-VerticalBulletChart_Value" Type="Edm.String" Nullable="true" sap:creatable="true" sap:updatable="true"
sap:deletable="true" sap:label="OVP-VerticalBulletChart_Value"/>
<Property Name="OVP-VerticalBulletChart_TrendCalculation_ReferenceValue" Type="Edm.String" Nullable="true" sap:creatable="true"
sap:updatable="true" sap:deletable="true" sap:label="OVP-VerticalBulletChart_TrendCalculation_ReferenceValue"/>
</EntityType>
The metadata.xml will be generated when you connect to your odata service. And so far I've understood, the KPI path is referenced in every single entity.
I have tried to create a card, but was also not able.
Cengiz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
I am working on a similar requirement.
I am trying to display a donut chart from cds views annotations. donut-1.png
But, I am unable to bind the values of KPI annotation path in Analytics Card of OVF page.
Kindly guide me this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What does your oData service look like? Can you post the $metadata. Looking at your CDS view there is no @DefaultAggregation annotation. In my experience this causes issues as it causes none of the properties to have sap:aggregation-role set. Can you also post your annotations xml file for your OVP if you're adding them via Web IDE.
Looking at some of my CDS views where we required a Count Distinct we approached it as below (where SalesContract was the field we required a Count Distinct on).
@Aggregation.default: #COUNT_DISTINCT
@Aggregation.referenceElement: [SalesContract]
cast( 1 as abap.int4 ) as SalesContractCount
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.