Skip to Content
0
Former Member
May 15, 2016 at 09:24 AM

HarveyBallMicroChart : How to show the other pieces

207 Views

Hello experts,

I've tried to use HarveyBallMicroChart, I think it's designed to show little pie chart, and it's make sense that there're several pieces of pie in the chart.

But it seems it can only show one piece in the pie chart, like this:

even I've add the second piece:

Here is the source code:

JS Bin - Collaborative JavaScript Debugging

Demo Source Code:

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js'

id="sap-ui-bootstrap"

data-sap-ui-libs="sap.ui.commons,sap.suite.ui.commons,sap.viz"

data-sap-ui-theme="sap_bluecrystal">

</script>

<script>

var complateChart = new sap.suite.ui.commons.HarveyBallMicroChart({

size:"M",

total:500,

totalScale:"Min",

showTotal:true,

showFractions:true,

items:[

new sap.suite.ui.commons.HarveyBallMicroChartItem({fraction:100, color:"Good", fractionScale:"Min" }),

new sap.suite.ui.commons.HarveyBallMicroChartItem({fraction:20, color:"Error", fractionScale:"Min" })

]

});

complateChart.placeAt("content");

</script>

</head>

<body class="sapUiBody" role="application">

<div id="content"></div>

</body>

</html>

Attachments

2.png (2.1 kB)
3.png (45.6 kB)