change the end decoration of the line on a Vector chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Fred
Posts: 38
Joined: Sat Dec 12, 2015 4:57 pm
antibot: No, of course not.

change the end decoration of the line on a Vector chart

Post by Fred » Tue Dec 22, 2015 9:44 pm

Hello,

I'm attempting to remove the ">" (arrow or pointer) at the end of a vector defined on VectorPlotDemo1.
The reason, the arrow when placed on the chart skews other lines on the chart requiring me to scale down to remove the arrow.

Is there a method that will allow the removal of this arrow? I've tried set the base stroke, set the stroke or set the series stroke but
nothing works (see code below)

Code: Select all

        VectorRenderer renderer = new VectorRenderer();
        renderer.setSeriesPaint(0, Color.blue);
        renderer.setBaseStroke(new BasicStroke(1.0f,BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT));
One might ask why a VectorRenderer and the reason is the chart I'm ultimately defining will have very many vector lines on them.
Of course one could use a different chart renderer but this chart gives me exactly what I need just without the arrows.

Fred

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: change the end decoration of the line on a Vector chart

Post by paradoxoff » Wed Dec 23, 2015 3:47 pm

Fred wrote: One might ask why a VectorRenderer and the reason is the chart I'm ultimately defining will have very many vector lines on them.
Of course one could use a different chart renderer but this chart gives me exactly what I need just without the arrows.
I indeed wonder why you do not simply switch to an XYLineAndShapeRenderer? This should lead all the things that you need untouched and just eliminate the arrows.

Locked