2013-03-01 78 views
3

问题用标题表示。详细信息:设置JFree图例边框的颜色图表

我在class-theme中设置了用于设置图例边框的特定非默认颜色的代码。

LegendTitle legend = jFreeChart.getLegend(); 
legend.setWidth(100); 

这个我需要设置颜色的传说边境后,但没有像

legend.setBorderColor(Color.green) 

我无法找到。

请帮助我。

感谢您的回复。

回答

3

当您更换图例的边框,您可以指定新的颜色:

LegendTitle legend = chart.getLegend(); 
legend.setFrame(new BlockBorder(Color.green)); 

enter image description here

+0

非常感谢! 真的,你是我见过的碧玉报告和jfreechart中最伟大的专家。 你的帮助对我来说非常宝贵。 – 2013-03-06 16:22:05

+0

请检查另一个我的问题 http://stackoverflow.com/questions/15254385/setting-currency-format-for-labels-of-vertical-axis-in-jfreechart – 2013-03-06 17:49:16