Hi, I need to create a graph using stakedbar, but I need to use different colors in each stackedbar. How to do it?
I want to create bars independent from each other.
Staked bar with different colors in each bar
-
- Posts: 1
- Joined: Tue May 24, 2016 2:36 am
- antibot: No, of course not.
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Staked bar with different colors in each bar
Subclass the StackedBarRenderer and override getItemPaint(int row, int column), or create your own BarPainter by e. g. extending StandardBarPainter, and use whatever color you like in the paintBar-method.