Left Scale Label Being Clipped

A discussion forum for JFreeChart (a 2D chart library for the Java platform).

Left Scale Label Being Clipped

Postby 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.
gw1500se
 
Posts: 13
Joined: Tue Nov 21, 2017 3:36 pm

Re: Left Scale Label Being Clipped

Postby paradoxoff » Fri Dec 08, 2017 10:25 am

Code: Select all
plot.setInsets(new RectangleInsets(4,20,4,20));
paradoxoff
 
Posts: 1619
Joined: Sat Feb 17, 2007 1:51 pm

Re: Left Scale Label Being Clipped

Postby 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.
gw1500se
 
Posts: 13
Joined: Tue Nov 21, 2017 3:36 pm

Re: Left Scale Label Being Clipped

Postby 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.
paradoxoff
 
Posts: 1619
Joined: Sat Feb 17, 2007 1:51 pm


Return to JFreeChart

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 11 guests