I am using JFreeCharts
in java to create a bar chart. My question is fairly simple... how can I choose a custom color for all of the bars in a bar chart? I'm not sure if this customization would be done in a GradientPaint
. An example of my code that determines bar color is:
final GradientPaint gp0 = new GradientPaint(
0.0f, 0.0f, Color.blue,
0.0f, 0.0f, Color.blue
);
I'm not sure if this is the right way to go for custom colors or not. Basically, I don't know if GradientPaint
is the right way to go or not. If it is, could someone let me know how I could edit this code to make it a custom color rather than blue?
I'm not sure if this helps, but say the information for the custom color was
- hue: 142
- Sat: 109
- Lum:126
- Red: 79
- Green: 129
- Blue: 189
With this is there a way to customize the color of the chart?