开发者

How to set axis line at bottom when all data 0 in jfreechart's bar chart?

开发者 https://www.devze.com 2023-01-04 08:45 出处:网络
I use Jfreechart\'s bar chart to show data. But in case all data is 0, the axis line will be displayed开发者_如何学Python in middle of chart. I just want to display the axis line in bottom as usual ca

I use Jfreechart's bar chart to show data. But in case all data is 0, the axis line will be displayed开发者_如何学Python in middle of chart. I just want to display the axis line in bottom as usual cases. How can I configure it? Thanks!


Assuming a DefaultCategoryDataset for example, use the clear() method when all values are sufficiently close to zero that you want to display no data. Alternatively, use setRangeWithMargins() when a specific range would be more meaningful.

0

精彩评论

暂无评论...
验证码 换一张
取 消