Package org.zkoss.chart
Class RadialGradient
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.RadialGradient
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class RadialGradient extends Optionable
A radial gradient is a smooth transition from one color to another. In addition, several color transitions can be applied to the same element.All the options in this class support
DynamicalAttribute
.- Author:
- jumperchen, RaymondChao
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description RadialGradient(double cx, double cy, double r)
The cx, cy and r attributes define the outermost circle
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStop(double index, String color)
Adds the color range for a gradient can be composed of two or more colors.List<Stop>
getStops()
Returns the all stopsvoid
setStops(String color1, String color2)
Sets the color range for a gradient can be composed of two colors.void
setStops(List<Stop> stops)
Sets the color range for a gradient can be composed of two or more colors.void
setStops(Stop... stops)
Sets the color range for a gradient can be composed of two or more colors.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
-
-
-
Method Detail
-
addStop
public void addStop(double index, String color)
Adds the color range for a gradient can be composed of two or more colors. Each color is specified with a offset in order.
-
setStops
public void setStops(String color1, String color2)
Sets the color range for a gradient can be composed of two colors. It is the same as
setStops(Arrays.asList(new Stop(0, color1), new Stop(1, color2)));
- See Also:
setStops(Stop... stops)
-
setStops
public void setStops(List<Stop> stops)
Sets the color range for a gradient can be composed of two or more colors. Each color is specified with a offset in order.For example,
setStops(Arrays.asList(new Stop[]{ new Stop(0, "rgb(255, 255, 255)"), new Stop(1, "rgb(200, 200, 255)") }));
-
setStops
public void setStops(Stop... stops)
Sets the color range for a gradient can be composed of two or more colors. Each color is specified with a offset in order.For example,
setStops( new Stop(0, "rgb(255, 255, 255)"), new Stop(1, "rgb(200, 200, 255)") );
-
-