1

I need to plot a horizontal bar chart using JFreeChart. The problem is that some specific itens need to appear with a crosshatched fill (or any other visual style that makes clear that the item is different from the rest). Please see the piture below.

I couldn't find anything in XYBarRenderer to help me....

Does anyone know how to do it?

enter image description here

guilhermecgs
  • 2,740
  • 9
  • 34
  • 61

1 Answers1

2

I couldn't find anything in XYBarRenderer to help.

Right, XYBarRenderer uses an instance of GradientBarPainter to render each bar. You can replace it with your own BarPainter to render a bar however you like. TexturePaint, seen here, would be a good choice.

Community
  • 1
  • 1
trashgod
  • 200,320
  • 28
  • 229
  • 974