BarChart text truncation problems

十年热恋 提交于 2019-12-11 18:22:34

问题


I have two problem, which can be illustrated by these screenshots:

So, how to avoid text's truncation in these case ? Of course, the width is enough.Moreover, truncation differs for differen strings.


回答1:


I suspect a layout or preferred size problem. You can override getPreferredSize() in ChartPanel to get a nice initial display, as shown here, and specify a layout like BorderLayout.CENTER or GridLayout to let the panel adopt the size of the enclosing Container. Failing this, please edit your question to include an sscce that exhibits any problem you encounter.



来源:https://stackoverflow.com/questions/15863515/barchart-text-truncation-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!