Skip to Content
0
Apr 11 at 08:09 AM

how to create a donut chart with the following data format

193 Views

<Annotation Term="UI.Chart" Qualifier="donutchart"> <Record Type="UI.ChartDefinitionType"> <PropertyValue Property="Title" String="Donut Chart"/> <PropertyValue Property="MeasureAttributes"> <Collection> <Record Type="UI.ChartMeasureAttributeType"> <PropertyValue Property="Measure" PropertyPath="RangeDesc"/> <PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1"/> </Record> </Collection> </PropertyValue> <PropertyValue Property="DimensionAttributes"> <Collection> <Record Type="UI.ChartDimensionAttributeType"> <PropertyValue Property="Dimension" PropertyPath="PlanGroup"/> <PropertyValue Property="Role" EnumMember="UI.ChartDimensionRoleType/Category"/> </Record> </Collection> </PropertyValue> <PropertyValue Property="ChartType" EnumMember="UI.ChartType/Donut"/> <PropertyValue Property="Description" String="Donut chart description"/> </Record> </Annotation> 

I have to display a donut chart with Dimension as 'PlanGroup' and Measure as 'RangeDesc'(where only Range Desc with IMEI 1 should be shown). I have data in below format. How do I filter only 'IMEI 1' and show it in a donut chart?

Does this filteration to be done in cds or can we filter and show this from frontend only? Basically how can we acheive a donut chart with below data? should we using any group by? or count?

image.png

the chart should be something like this:

image.png

The code is not showing the donut chart as expected. Please suggest

Attachments

image.png (29.8 kB)
image.png (26.7 kB)