java - Effects on bars generated from Jfreechart -
this question has answer here:
- jfreechart barchart -> no gradient 3 answers
i new jfreechart , have generated barchart. bars have shining line in it. want know if possible rid of line in bars. want bars have matte effect. have attached image of barchart have generated. pointers of great help.
thanks in advance.
sscce:
public jfreechart createbarchart(categorydataset dataset) { // todo auto-generated method stub string unter_title="no of counts"; jfreechart jfreechart = chartfactory.createbarchart(title, unter_title, "frequencies", dataset, plotorientation.vertical, true, true, false); string text="test start time: "+(new date(test.getstart_utc_timestamp()).tostring()+" "+"test end time: "+new date(test.getend_utc_timestamp())); jfreechart.addsubtitle(new texttitle(text, new font("dialog", 3, 10))); categoryplot categoryplot = (categoryplot)jfreechart.getplot(); categoryplot.setdomaingridlinesvisible(true); categoryplot.setrangepannable(true); numberaxis numberaxis = (numberaxis)categoryplot.getrangeaxis(); numberaxis.setnumberformatoverride(numberformat.getpercentinstance()); numberaxis.setuppermargin(0.10000000000000001d); barrenderer barrenderer = (barrenderer)categoryplot.getrenderer(); barrenderer.setdrawbaroutline(false); barrenderer.setseriespaint(0, color.dark_gray); barrenderer.setmaximumbarwidth(0.0500000000000000001d); barrenderer.setlegenditemtooltipgenerator(new standardcategoryserieslabelgenerator("tooltip: {0}")); categoryaxis categoryaxis = categoryplot.getdomainaxis(); return jfreechart; }
the highlight feature of gradientbarpainter
. instead, try standardbarpainter
, suggested here.
Comments
Post a Comment