如何在XYSplineRenderer图表中将正方形的形状更改为点 [英] How to change shape of square to dot in XYSplineRenderer Graph

查看:64
本文介绍了如何在XYSplineRenderer图表中将正方形的形状更改为点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在JFreeChart XYSplineRenderer Graph中,我需要显示小点而不是小正方形以显示XY坐标.我如何更改这些点的形状.

In JFreeChart XYSplineRenderer Graph I need to display small dots instead of small squares to display XY cordinates. How can i change the shape of these dots.

推荐答案

要使对称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.

这篇关于如何在XYSplineRenderer图表中将正方形的形状更改为点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆