Package org.zkoss.chart
Class Stop
- java.lang.Object
-
- org.zkoss.chart.Stop
-
- All Implemented Interfaces:
org.zkoss.json.JSONAware
public class Stop extends Object implements org.zkoss.json.JSONAware
Stop color for linear gradient, radial gradient, and solid gauges.- Since:
- 2.1.0
- Author:
- Christopher
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getColor()
Get the color of this stop object.Number
getStop()
Get the stop value of this stop object.void
setColor(String color)
Set the color value of this stop object.void
setStop(Number stop)
Set the stop value for this stop object.String
toJSONString()
-
-
-
Constructor Detail
-
Stop
public Stop(Number stop, String color)
Constructs a stop color object.- Parameters:
stop
- value between 0 and 1color
- any valid color in string format- See Also:
setStop(Number)
,setColor(String)
-
-
Method Detail
-
getStop
public Number getStop()
Get the stop value of this stop object.- Returns:
- stop the stop number
-
setStop
public void setStop(Number stop)
Set the stop value for this stop object. Value should be in the range of 0 to 1.- Parameters:
stop
-
-
getColor
public String getColor()
Get the color of this stop object.- Returns:
- color the color value as String
-
setColor
public void setColor(String color)
Set the color value of this stop object. Can be in any of the following format:- "#A4B5D4" - hex color code
- "rgb(143, 34, 98)" - rgb color, each from 0-255
- "rgba(53, 63, 108, 0.3)" - rgb color with alpha between 0-1
- Parameters:
color
- any valid color in string format
-
toJSONString
public String toJSONString()
- Specified by:
toJSONString
in interfaceorg.zkoss.json.JSONAware
-
-