且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在XYSplineRenderer图表中将正方形的形状更改为点

更新时间:2023-11-13 11:50:46

要使对称Shape在给定数据点上居中,您需要将左上角偏移半径(直径的一半).对于较小的点,

To center a symmetric Shape over a given data point, you'll want to offset the top-left corner by the radius (half the diameter). For smaller dots,

setSeriesShape(0, new Ellipse2D.Double(-3, -3, 6, 6));

另请参见使用ShapeUtilities与此相关的示例.

See also this related example using ShapeUtilities.