Skip to Content

Donut chart not reacting to click

I'm struggling with donut charts in SAPUI5. Here is the xml:

<viz:VizFrame id="chDonutChart" vizType="donut" width="100%" height="50%" 
vizProperties="{plotArea: { drawingEffect: 'glossy' },title:{ text:'Spaces Available'}}" uiConfig="{ 'applicationSet': 'fiori' }" legendVisible="true" visible="false" >
<viz:dataset>
<vizData:FlattenedDataset data="{DonutChartModel>/ParkingSpaces}">
<vizData:dimensions>
<vizData:DimensionDefinition name="Status" value="{Status}"/>
</vizData:dimensions>
<vizData:measures>
<vizData:MeasureDefinition name="Count" value="{Count}"/>
</vizData:measures>
</vizData:FlattenedDataset>
</viz:dataset>
<viz:feeds>
<vizFeeds:FeedItem uid="size" type="Measure" values="Count"/>
<vizFeeds:FeedItem uid="color" type="Dimension" values="Status"/>
</viz:feeds>
</viz:VizFrame>


The result renders fine, but there is no reaction when I hover over the graph or click on a section. Other online examples show details when clicking on a section. I cannot figure out what might be the problem.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 02 at 08:59 AM

    There are 2 kinds of pop ups for your choice

    1. initialize sap.viz.ui5.controls.VizTooltip() and connect it to vizFrame by calling vizTooltipName.connect(vizFrameName.getVizUid). VizTooltip can be triggered only by mouse hover on data point

    2. initialize sap.viz.ui5.controls.Popover() and connect it to vizFrame by calling vizPopoverName.connect(vizFrameName.getVizUid). Popover can be triggered only by data point selection.

    Since Popover has a higher priority then vizTooltip, vizTooltip would not be prompted if both controls were initialized

    Add comment
    10|10000 characters needed characters exceeded