return svgImage;
}
public void updateSettings(JFreeChart chart, ChartConfig chartConfig){
Plot plot = chart.getPlot();
Visibility visibility = chartConfig.getVisibility();
Colors colors = chartConfig.getColors();
// Chart level visible items
chart.setBorderVisible(visibility.isBorder());
plot.setOutlineVisible(visibility.isOutline());
// chart level colors
final Color BACKGROUND = new Color(colors.getBg());
plot.setBackgroundPaint(BACKGROUND);
chart.setBackgroundPaint(BACKGROUND);
// Chart level title
if(chart.getTitle() != null){
TextTitle title = chart.getTitle();
title.setVisible(visibility.isTitle());
title.setBackgroundPaint(new Color(colors.getTitleBg()));
title.setPaint(new Color(colors.getTitle()));
title.setExpandToFitSpace(true);
}
// In case of multiple plot read and update child level chart
if(plot instanceof MultiplePiePlot){
MultiplePiePlot multiplePiePlot = (MultiplePiePlot)plot;
chart = multiplePiePlot.getPieChart();
plot = chart.getPlot();
chart.setBorderVisible(visibility.isBorder());
plot.setOutlineVisible(visibility.isOutline());
chart.setBackgroundPaint(BACKGROUND);
plot.setBackgroundPaint(BACKGROUND);
}
if(plot instanceof CategoryPlot){
CategoryPlot categoryPlot = (CategoryPlot)chart.getPlot();
categoryPlot.setRangeGridlinesVisible(visibility.isRangeGridLines());