Im trying to change a shape:
XYDotRenderer dotRenderer = new XYDotRenderer();
dotRenderer.setPaint(Color.black);
dotRenderer.setDotHeight(3);
dotRenderer.setDotWidth(3); dotRenderer.setBaseShape(org.jfree.chart.plot.DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE[6]);
xyplot.setRenderer(0, dotRenderer);
I have gone over all the setshape methods in the renderer but non works, it is always the same rectangle. If i try dotRenderer.setLegendShape(Shape) it works fine... but not the shape of the dot itself.. ideas?
My renderer wont change shapes (XYDotRenderer)
If you look at the source for org.jfree.chart.renderer.xy.XYDotRenderer you will see that the shape of the dot is hardcoded
Code: Select all
252 g2.fillRect((int) transY, (int) transX, this.dotHeight,
253 this.dotWidth);
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Correct. For more generalised shapes, the XYLineAndShapeRenderer should be used instead (you can switch off the lines).skunk wrote:If you look at the source for org.jfree.chart.renderer.xy.XYDotRenderer you will see that the shape of the dot is hardcodedCode: Select all
252 g2.fillRect((int) transY, (int) transX, this.dotHeight, 253 this.dotWidth);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

