Hi All,
Is there a way to change or removed the border of the legend (image below) of the Barchart in Reporting? The only option available is either to show it or not and legend font and color.
Thanks
Hi All,
Is there a way to change or removed the border of the legend (image below) of the Barchart in Reporting? The only option available is either to show it or not and legend font and color.
Thanks
Almost certainly possible via the configureChart
extension function.
Possibly (untested):
from org.jfree.chart.block import BlockBorder
chart.legend.itemContainer.frame = BlockBorder.NONE
from org.jfree.chart.block import BlockBorder
from java.awt import Color
legend = chart.getLegend()
# Change color
legend.setFrame(BlockBorder(Color.red))
# Hide border
legend.setBorder(0, 0, 0, 0)
# or
legend.setFrame(BlockBorder.NONE)
Hi jpark,
Thanks a lot! It works and looks better now.
Thank you sir PGriffith for your input