JFreeChart v1.5.0

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
esalmin
Posts: 1
Joined: Wed Jul 08, 2020 4:01 pm
antibot: No, of course not.

JFreeChart v1.5.0

Post by esalmin » Wed Jul 08, 2020 5:01 pm

Hello.
I've been searching for an answer, but found only old solution, which probably doesn't work for this version.

How can I prevent the text on axes from stretching, when changing window\chart size?
And, also, how to keep ratio on chart resize?

Thanks for your help in advance.

https://pasteboard.co/JgIGN3j.png

colomb
Posts: 15
Joined: Fri May 29, 2009 8:10 pm

Re: JFreeChart v1.5.0

Post by colomb » Thu Sep 17, 2020 8:48 pm

See this answer: viewtopic.php?f=3&t=117097&p=178292&hil ... th#p178309

Set the minimum and maximum draw height and width of the chart panel:

Code: Select all

        chartPanel.setMinimumDrawHeight( 0 );
        chartPanel.setMinimumDrawWidth( 0 );
        chartPanel.setMaximumDrawHeight( Integer.MAX_VALUE );
        chartPanel.setMaximumDrawWidth( Integer.MAX_VALUE );
 

Locked