We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c779724 commit 9fa5c3fCopy full SHA for 9fa5c3f
modules/draw/TPiePainter.mjs
@@ -246,8 +246,12 @@ class TPiePainter extends ObjectPainter {
246
}
247
} else if (this.#lblor === 2) {
248
// in the slice
249
- arg.align = 23;
250
- arg.rotate = Math.atan2(arg.y, arg.x) / Math.PI * 180 + 90;
+ arg.rotate = Math.atan2(y2 - y1, x2 - x1) / Math.PI * 180;
+ if ((arg.rotate > 90) || (arg.rotate < -90)) {
251
+ arg.rotate += 180;
252
+ arg.align = 21;
253
+ } else
254
+ arg.align = 23;
255
} else if ((arg.x >= 0) && (arg.y >= 0)) {
256
arg.align = 13;
257
if (this.#is3d)
0 commit comments