如何在 JfreeChart 中包装类别标签
我使用 JFreeChart 创建了堆积条形图。该类别的标签相当大,并且与下一个 Bar 的标签重叠。我想将其换行到下一行。我做了一些搜索,发现我必须使用下面的代码。 CategoryAxis 中的 setMaximumCategoryLabelLines(2) 但它仍然没有换行到下一行。
请提出解决方案。
I have Stacked Bar Chart created using JFreeChart. The labels of the category are quite big and they overlap with the label of the next Bar. I would like to wrap it to the next line. I did some searching and found that i have to use the below code.
setMaximumCategoryLabelLines(2) in the CategoryAxis
and still it doesn't wrap to the next line.
Please suggest solutions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更改
BarChartDemo1
代码 如图所示并使用长类别名称,我看到下面的图表。它似乎也适用于堆叠渲染。这是想要的效果吗?Altering the
BarChartDemo1
code as shown and using long category names, I see the chart below. It seems to work with stacked rendering, too. Is that the desired effect?