Search in sources :

Example 1 with ChartBackgroundColor

use of org.opennms.netmgt.config.charts.ChartBackgroundColor in project opennms by OpenNMS.

the class ChartUtils method setChartBackgroundColor.

private static void setChartBackgroundColor(BarChart chartConfig, JFreeChart chart) {
    if (chartConfig.getChartBackgroundColor().isPresent()) {
        final ChartBackgroundColor bgColor = chartConfig.getChartBackgroundColor().get();
        Red red = bgColor.getRgb().getRed();
        Blue blue = bgColor.getRgb().getBlue();
        Green green = bgColor.getRgb().getGreen();
        chart.setBackgroundPaint(new Color(red.getRgbColor(), green.getRgbColor(), blue.getRgbColor()));
    }
}
Also used : Red(org.opennms.netmgt.config.charts.Red) Blue(org.opennms.netmgt.config.charts.Blue) ChartBackgroundColor(org.opennms.netmgt.config.charts.ChartBackgroundColor) Color(java.awt.Color) ChartBackgroundColor(org.opennms.netmgt.config.charts.ChartBackgroundColor) PlotBackgroundColor(org.opennms.netmgt.config.charts.PlotBackgroundColor) Green(org.opennms.netmgt.config.charts.Green)

Aggregations

Color (java.awt.Color)1 Blue (org.opennms.netmgt.config.charts.Blue)1 ChartBackgroundColor (org.opennms.netmgt.config.charts.ChartBackgroundColor)1 Green (org.opennms.netmgt.config.charts.Green)1 PlotBackgroundColor (org.opennms.netmgt.config.charts.PlotBackgroundColor)1 Red (org.opennms.netmgt.config.charts.Red)1