// Transform IPentahoResultSet to an object array
Object[][] data = processChartData( resultSet, valueColumn );
if ( chartModel.getTheme() != null ) {
AbstractChartThemeFactory chartThemeFactory = new AbstractChartThemeFactory() {
protected List<File> getThemeFiles() {
ArrayList<File> themeFiles = new ArrayList<File>();
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme1.xml" ) ) ); //$NON-NLS-1$
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme2.xml" ) ) ); //$NON-NLS-1$
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme3.xml" ) ) ); //$NON-NLS-1$
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme4.xml" ) ) ); //$NON-NLS-1$
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme5.xml" ) ) ); //$NON-NLS-1$
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme6.xml" ) ) ); //$NON-NLS-1$
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme7.xml" ) ) ); //$NON-NLS-1$
themeFiles.add( new File( PentahoSystem.getApplicationContext().getSolutionPath(
"system/chartbeans/themes/Theme8.xml" ) ) ); //$NON-NLS-1$
return themeFiles;
}
};
if ( !( chartModel.getPlot() instanceof DialPlot ) ) {
Theme chartTheme = chartThemeFactory.getTheme( chartModel.getTheme() );
if ( chartTheme != null ) {
chartTheme.applyTo( chartModel );
}
}
}