WebFOCUS Online Help > Creating Charts With Graph Tools > Customizing Graphs With the Graph Editor > Applying Color and Line Options in Graphs
How to: |
You can modify the color and line widths of objects in your graphs. The Color and Line Setting dialog box includes different tabs depending on the object in the chart that is selected. For example, in a bar chart you can change the color of each bar, and in a line graph you can change the color and width of the line representing the data.
When an object with an interior is selected (that is, riser or chart frame), you can choose:
When a line object is selected in a chart, you can change:
Selections in the associated dialog box add the following methods to the code that describes this graph.
If a line object is selected:
setBorderColor ( aGetObjectIDMethod(), new Color ( value, value, value ));
If an object with an interior is selected:
setFillColor ( aGetObjectIDMethod(),new Color(value,value,value));
For example:
setFillColor( getCubeFloor(),new Color(192,192,192));
Note: The aGetObjectIDMethod() is not a Graph Editor method. It is a notation convention used in this document to indicate one of the methods that returns an object ID. The Editor chooses the appropriate method based on the object that is selected in the chart. For example, the getO1Label() method is used if the O1 Axis Label is selected in the chart.
Selections in the associated dialog box add a setLineWidth() method to the code that describes this graph:
setLineWidth ( aGetObjectIDMethod(),value); setLineWidth ( getY1ZeroLine(), 2 );
For example:
setLineWidth ( getY1ZeroLine(), 2 );
Note: The aGetObjectIDMethod() is not a Graph Editor method. It is a notation convention used in this document to indicate one of the methods that returns an object ID. The Editor chooses the appropriate method based on the object that is selected in the chart. For example, the getO1Label() method is used if the O1 Axis Label is selected in the chart.
WebFOCUS |