Left Scale Label Being Clipped

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
gw1500se
Posts: 23
Joined: Tue Nov 21, 2017 3:36 pm
antibot: No, of course not.

Left Scale Label Being Clipped

Post by gw1500se » Thu Dec 07, 2017 4:42 pm

I have a working chart but the first (left) tick label is being clipped on the left side.

https://ibb.co/g4wFkG

Perhaps this is a bug since scaling the width does not help. How do I get the chart moved slightly right so the label is not clipped? TIA.

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

Re: Left Scale Label Being Clipped

Post by paradoxoff » Fri Dec 08, 2017 10:25 am

Code: Select all

plot.setInsets(new RectangleInsets(4,20,4,20));

gw1500se
Posts: 23
Joined: Tue Nov 21, 2017 3:36 pm
antibot: No, of course not.

Re: Left Scale Label Being Clipped

Post by gw1500se » Fri Dec 08, 2017 2:07 pm

Thanks, that worked. However, how did you know what parameters to use? I looked through the documentation and it mentioned setting and getting insets in various places but I found nothing on what insets actually are/do.

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

Re: Left Scale Label Being Clipped

Post by paradoxoff » Fri Dec 08, 2017 6:19 pm

I have been working with JFreeChart for more than a decade, and picked up a thing or two along the way. :)
If you are unsure about what a property does, just play around, change it, and see in what way it affects the output.

Locked