Skip to Content
Jan 01, 2018 at 10:57 AM

How to set "total" and "fraction" property for harvey ball ?



I am stuck with an issue pertaining to harvey ball. The harvey ball is not rendered after passing hard coded or dynamic values. The error I get is "Cannot read property substring of undefined". Below is the code for used to get it rendered.

Case 1: I am able to bind the fraction value after giving the items property, but unable to set "total" property. The ball is rendered here, but fraction value is set for total as well.

Tried to use setTotal() but no luck. Have used expression binding but no luck again. All the values passed are parsed to float.

Case 2: Tried passing hard coded values here, but still the above mentioned error is given. The code is referenced from Sample in demo kit.

It's been a while now and help will be highly appreciated.

case 1:
<dv:HarveyBallMicroChart size="M" total="{harveyBallData>/TotalOrder}" showTotal="true" showFractions="true" id="assignedHarveyBall" items="{harveyBallData>/}">
   <dv:HarveyBallMicroChartItem fraction="{harveyBallData>Assigned}" color="Good"/>

case 2:

<dv:HarveyBallMicroChart size="M" total="100" showTotal="true" showFractions="true" id="unassignedHarveyBall">
<dv:HarveyBallMicroChartItem fraction="80" color="Error" id="unassignedHarveyBallItem"/>