- Analyzer Properties File
- Assign Analyzer Chart Colors
- Third-Party Visualizations
- Set Discrete Axis for Line and Area Charts
You can customize Pentaho Analyzer in the following ways.
Analyzer Properties File
Giving Analyzer reports a configuration that fits your needs involves editing the analyzer.properties file. The following actions are examples some of the settings you can change:
- Enabling your logo to appear in PDF output.
- Specifying the maximum number of rows when drilling-down in a report.
- Defining a specific value for blank cells.
- Changing the default chart options.
The complete list of properties that you can change are in the file comments, and you can find the file here:/pentaho/server/pentaho-biserver/pentaho-solutions/system/analyzer/analyzer.properties.
Changes take effect after you restart the Pentaho Server.
There are a number of ways that you can customize the appearance of your company's PDFs that are exported from Analyzer. For example, Analyzer PDF exports can be personalized with a company logo and a cover page, or you can change the default font used to generate PDFs.
PDF Logo and Cover Page Customization
You will need to replace a couple of image files in order to customize the cover page and company logo for your Analyzer PDF exports. These image files need to placed in the /pentaho-solutions/system/analyzer/resources/ directory. You then need to update analyzer.properties with the names of these images given to the keys below. If the file names are left blank, then no images are used.
- PDF cover image: renderer.pdf.cover.image
- PDF logo image: renderer.logo.image
Set Default Fonts for PDF Export
When displaying data in Analyzer, your reports will use the default browser fonts. However, the PDF export function may not have the same fonts available to it when creating a PDF from your Analyzer report, resulting in output that doesn't look the same way in PDF format as it does in the browser. The default font for PDFs is Helvetica, but you can specify any TrueType font or collection to replace it. Follow the instructions below to specify a different font for PDF exports.
If you have localized your schema in a language that uses a multi-byte character set (most Asian languages fit into this category), this process is required to make PDF output appear without errors.
- Stop the Pentaho User Console and Pentaho Server.
- Navigate to the /pentaho/server/pentaho-server/pentaho-solutions/system/analyzer/ directory and open the analyzer.properties file with any text editor.
- Uncomment the renderer.pdf.font.path line.
- Replace the value of this line with the TrueType font or collection that you want to use as the default. If you are specifying a collection, you must put a ,1 after the font name, as shown in the above example. This does not apply to individual fonts (TTF files).
- Save and close the file, and restart the Pentaho Server.
Your PDF exports from Analyzer should have the font you specified.
Sort Options in the Available Fields List
The Available fields list in Analyzer can be sorted using the View toggle with the following sorting options:
|UI Label||Description||Sort Option|
|By Category||Sorts by folder names.||cmdViewCategory|
|Measure - Level - Time||Sorts by the type of field.||cmdViewType|
|A > Z||Sorts by field names without any folders.||cmdViewName|
|Schema||Sorts in the same order thant is defined in the Mondrian schema file.||cmdViewSchema|
The default sort used in an Analyzer report is based on the following priority:
- A sort specified in an URL takes the highest priority.
- The last sort option is automatically remembered when a report is reopened.
- Next comes the annotation value specified on the report's cube in the Mondrian schema file.
- A system wide setting in analyzer.properties file.
- Last, the default value of cmdViewCategory.
Specify with an URL
The sort option can be set in the URL by adding a "fieldListView" query parameter at the end of the URL. For example, you can do something like this in a codeblock in HTML or XML.
Specify with Annotation
To specify the sort option using an annotation, add a Cube-level annotation called "AnalyzerFieldListView" in your Mondrian schema file. This annotation must be the first child element under a cube as shown here.
<Cube name="Quadrant Analysis"> <Annotations> <Annotation name="AnalyzerFieldListView">cmdViewName</Annotation> </Annotations> <Table name="Quadrant_Acuals" /> <DimensionUsage name="Region" source="Region" /> <DimensionUsage name="Department" source="Department" /> <DimensionUsage name="Positions" source="Positions" />
Specify through the Properties File
This sort option is specified by setting the cmdViewType for the "report.field.list.view" property.
# Default field list view mode used to sort the available field # list in the editor. Possible values include: cmdViewCategory, # cmdViewType, cmdViewSchema and cmdViewName # This can also be overriden on a cube level with the annotation # AnalyzerFieldListView report.field.list.view=cmdViewType
Assign Analyzer Chart Colors
Clarify visualizations by assigning specific chart colors to data objects.
Integrate third-party visualization into the Pentaho Analyzer.
Set Discrete Axis for Line and Area Charts
Line and Area charts in Analyzer and custom charts in VizAPI 3.0 render Time dimensions and associated hierarchic members on a continuous time-series axis. However, if you prefer to render these charts on a discrete time axis, perform the following step to change the global mapping configuration:
- Navigate to the
/pentaho/server/pentaho-server/pentaho-solutions/system/karaf/config/web-clientsystem directory and open the config.js file with any text editor.
- Uncomment the Example Rule 9 - Disable hierarchical dates strategy block, which contains the line
- Save and close the file, then refresh the browser.
Your Line and Area charts will render Time dimensions and hierarchies on a discrete axis.