WebFOCUS Online Help > Creating Charts With Graph Tools > Customizing Graphs With the Graph Editor > Applying Gradient Fill (All Graph Types)
How to: |
You can apply a color gradient pattern and direction to any object or text in a graph.
The selections in this dialog add the following properties and methods to the code that defines this chart:
setFillType(aGetObjectIDMethod (), 2);
setGradientDirection(aGetObjectIDMethod (), value);
setGradientNumPins(aGetObjectIDMethod (), value);
setGradientPinLeftColor(aGetObjectIDMethod (),new Color(value,value,value), value);
setGradientPinLeftColor(aGetObjectIDMethod (),new Color(value,value,value), value);
setGradientPinPosition(aGetObjectIDMethod (),value,value);
setGradientPinPosition(aGetObjectIDMethod (),value,value);
setGradientPinRightColor(aGetObjectIDMethod (),new Color (value, value, value), value);
setGradientPinRightColor(aGetObjectIDMethod (), new Color (value, value, value), value);
Note: The aGetObjectIDMethod() 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.
The following methods select the background object in the chart and assign the "Sunset" gradient to the object in the Radial, Center, Top direction.
setFillType(getBackgrnd(),2);
setGradientDirection(getBackgrnd(),10);
setGradientNumPins(getBackgrnd(),2);
setGradientPinLeftColor(getBackgrnd(),new Color(255,0,0),1);
setGradientPinLeftColor(getBackgrnd(),new Color(0,0,255),0);
setGradientPinPosition(getBackgrnd(),1.0,1);
setGradientPinPosition(getBackgrnd(),0.0,0);
setGradientPinRightColor(getBackgrnd(),new Color(255,0,0),1);
setGradientPinRightColor(getBackgrnd(),new Color(0,0,255),0);
WebFOCUS |