use of org.opennms.netmgt.config.charts.PlotBackgroundColor in project opennms by OpenNMS.
the class ChartUtils method setPlotBackgroundColor.
private static void setPlotBackgroundColor(BarChart chartConfig, JFreeChart chart) {
if (chartConfig.getPlotBackgroundColor().isPresent()) {
final PlotBackgroundColor bgColor = chartConfig.getPlotBackgroundColor().get();
if (bgColor.getRgb().isPresent()) {
final Red red = bgColor.getRgb().get().getRed();
final Blue blue = bgColor.getRgb().get().getBlue();
final Green green = bgColor.getRgb().get().getGreen();
chart.getPlot().setBackgroundPaint(new Color(red.getRgbColor(), green.getRgbColor(), blue.getRgbColor()));
}
}
}
Aggregations