更新时间:2023-10-08 15:24:52
最简单的方法是在实例化相关的StandardXYItemRenderer
时指定StandardXYItemRenderer.SHAPES
.此示例的以下更改产生以下结果:
The simplest way is to specify StandardXYItemRenderer.SHAPES
when instantiating the relevant StandardXYItemRenderer
. The following changes to this example produce the result below:
private static void init() {
XYItemRenderer renderer = new StandardXYItemRenderer(SHAPES);
…
}
请注意,StandardXYItemRenderer
是出于历史原因而保留的,通常,应改为使用XYLineAndShapeRenderer
类." 此处.
Note that StandardXYItemRenderer
"has been retained for historical reasons and, in general, you should use the XYLineAndShapeRenderer
class instead." Comparable constructor parameters and mutators are cited here.
使用任一渲染器,您都可以使用自定义的DrawingSupplier
更改系列形状和颜色,如
With either renderer, you can alter the series shapes and colors using a custom DrawingSupplier
, as shown here.