Using SmartClient 8.1 (JavaScript) with FireFox 9.0.1
I am trying to draw a segmented circle (like a pie chart) with DrawSector. Each of the segments has the same centerPoint. However, the end points of the segments do not meet in the center of the circle.
Am I doing something wrong, did I misunderstand what centerPoint is for or is this a bug? Right way, fixes or work-arounds greatly appreciated.
Here is sample code to illustrate this problem:
I am trying to draw a segmented circle (like a pie chart) with DrawSector. Each of the segments has the same centerPoint. However, the end points of the segments do not meet in the center of the circle.
Am I doing something wrong, did I misunderstand what centerPoint is for or is this a bug? Right way, fixes or work-arounds greatly appreciated.
Here is sample code to illustrate this problem:
Code:
isc.DrawPane.create({
autoDraw: true,
ID: 'mainPane',
showEdges: true,
width: '100%',
height: '100%',
overflow: 'hidden',
cursor: 'auto',
canDrag: true
});
var angles = [ 90, 45, 12, 33, 120, 60 ];
var start = 0;
for (var i = 0; i < angles.length; i++) {
var end = start + angles[i];
isc.DrawSector.create({
drawPane: mainPane,
centerPoint: [150, 150],
startAngle: start,
endAngle: end,
radius: 100
});
start = end;
}
Comment