WebFOCUS Online Help > Creating Charts With Graph Tools > Introduction to Creating Charts > Creating Custom Graph Templates
How to: |
Note: Creating custom graph templates is only applicable when using the Advanced Graph Assistant.
Custom graph templates are great for having complete control over the look of the chart. If you have many charts that share most of their characteristics, using a graph template would probably make sense. When creating charts in Advanced Graph Assistant, you can choose from one of the built-in templates or create your own custom template. Custom templates can be stored for easy accessibility and future use. This section describes the process for selecting a built-in template, creating a custom template file, and using a template file in Advanced Graph Assistant.
Note: For details about opening the Advanced Graph Assistant, see Accessing Advanced Graph Assistant.
The Advanced Graph Assistant opens at the Chart type tab.
Tip: The Apply Template property also appears under the Chart Editor tab of the Advanced Graph Assistant.
Note: The default template is SouthWestern.
The graph refreshes applying the template you selected.
Note: For details about opening the Advanced Graph Assistant, see Accessing Advanced Graph Assistant.
The Advanced Graph Assistant opens at the Chart type tab.
The following syntax is an example of GRAPHSTYLE syntax in the Text Editor.
ON GRAPH SET GRAPHSTYLE * setTemplateFile("/images/tdg/template/IBISouthWestern.txt"); setReportParsingErrors(false); setSelectionEnableMove(false); setTransparentBorderColor(getSeries(0),true); setTransparentBorderColor(getSeries(1),true); setTransparentBorderColor(getSeries(2),true); setTransparentBorderColor(getSeries(3),true); setTransparentBorderColor(getSeries(4),true); setTransparentBorderColor(getSeries(5),true); setTransparentBorderColor(getSeries(6),true); setTransparentBorderColor(getSeries(7),true); setTransparentBorderColor(getSeries(8),true); setTransparentBorderColor(getSeries(9),true); setTransparentBorderColor(getSeries(10),true); setDepthRadius(5); setTransparentBorderColor(getChartBackground(),true); setPlace(true); setFillColor(getChartBackground(),new Color(128,128,255)); ENDSTYLE
Note: If you are familiar with graph api syntax, you manually type custom syntax in the GRAPHSTYLE section of the Text Editor.
Note about naming templates: The name of the template file cannot start with 'IBI', which is reserved for WebFOCUS built-in templates.
Note about using JSCOM3: When generating graphs on reporting server and using JSCOM3 method, template files must be saved to the same directory as the reporting server, drive:\ibi\srvxx\home\graph.
The template name will be available from the Apply Template drop-down list in the Advanced Graph Assistant.
Note: For details about opening the Advanced Graph Assistant, see Accessing Advanced Graph Assistant.
The Advanced Graph Assistant opens at the Chart type tab.
Tip: The Apply Template property also appears under the Chart Editor tab of the Advanced Graph Assistant.
For example, the following syntax shows TemplateName.txt as the file that contains styling commands.
ON GRAPH SET GRAPHSTYLE * setTemplateFile("/images/tdg/template/TemplateName.txt");
WebFOCUS |