Package org.pepstock.charba.client.enums
Interface IsFill
-
- All Superinterfaces:
Key
- All Known Implementing Classes:
AbsoluteDatasetIndexFill
,Fill
,RelativeDatasetIndexFill
public interface IsFill extends Key
Represents how to fill the area under the line. This is an interfaces implemented on different way, as CHART.JS has implemented.
Both line and radar charts support a fill option on the dataset object which can be used to create area between two datasets or a dataset.
These are the different kinds of fill you can set:
- Predefined values, mapped by
Fill
. - Absolute dataset index, as integer (1,2,3,...)
- Relative dataset index, as string ("-1", "-2", "+1", "+2",...)
- Predefined boolean, if
true
the fill is applied, othewisefalse
.
- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description FillingMode
getMode()
Returns the type of filling.String
getValue()
Returns the value as string (valid ONLY for relative dataset index and predefined), otherwiseUndefined.STRING
.int
getValueAsInt()
Returns the value as integer (valid ONLY for absolute dataset index), otherwiseUndefined.INTEGER
.static boolean
isValid(IsFill fill)
Returnstrue
if fill passed as argument is notnull
and its value is notnull
and its mode is notnull
as well.static Object
toObject(IsFill fill)
Transforms aIsFill
instance in the a CHART.JS FILL property accepted value.static Object
transform(Object object)
Returns a object which can be a boolean, integer, string orIsFill
when the callback has been activated.
-
-
-
Method Detail
-
isValid
static boolean isValid(IsFill fill)
Returnstrue
if fill passed as argument is notnull
and its value is notnull
and its mode is notnull
as well.- Parameters:
fill
- fill to be checked- Returns:
true
if fill passed as argument is notnull
and its value is notnull
and its mode is notnull
as well.
-
transform
static Object transform(Object object)
Returns a object which can be a boolean, integer, string orIsFill
when the callback has been activated.- Parameters:
object
- object to be normalized.- Returns:
- a object property value
-
toObject
static Object toObject(IsFill fill)
Transforms aIsFill
instance in the a CHART.JS FILL property accepted value.- Parameters:
fill
- fill instance to transform- Returns:
- a CHART.JS FILL property accepted value
-
getMode
FillingMode getMode()
Returns the type of filling.- Returns:
- the type of filling.
-
getValueAsInt
int getValueAsInt()
Returns the value as integer (valid ONLY for absolute dataset index), otherwiseUndefined.INTEGER
.- Returns:
- the value as integer (valid ONLY for absolute dataset index), otherwise
Undefined.INTEGER
.
-
getValue
String getValue()
Returns the value as string (valid ONLY for relative dataset index and predefined), otherwiseUndefined.STRING
.- Returns:
- the value as string (valid ONLY for relative dataset index and predefined), otherwise
Undefined.STRING
.
-
-