'Change color of item labels on range on Category chart
Solution 1:[1]
Given a category chart that has a CategoryItemLabelGenerator, such as the BarChartDemo1 variation cited here.
You can change the color used by the renderer for the item labels, illustrated below with white labels on a gray background:
CategoryItemLabelGenerator generator = new StandardCategoryItemLabelGenerator(…); renderer.setDefaultItemLabelGenerator(generator); renderer.setDefaultItemLabelPaint(Color.WHITE); renderer.setDefaultItemLabelsVisible(true);You can change the axis label color using
setLabelPaint(), as shown here.You can change the axis tick mark color using
setTickMarkPaint(), as shown here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | trashgod |


