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
truethe fill is applied, othewisefalse.
- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description FillingModegetMode()Returns the type of filling.StringgetValue()Returns the value as string (valid ONLY for relative dataset index and predefined), otherwiseUndefined.STRING.intgetValueAsInt()Returns the value as integer (valid ONLY for absolute dataset index), otherwiseUndefined.INTEGER.static booleanisValid(IsFill fill)Returnstrueif fill passed as argument is notnulland its value is notnulland its mode is notnullas well.static ObjecttoObject(IsFill fill)Transforms aIsFillinstance in the a CHART.JS FILL property accepted value.static Objecttransform(Object object)Returns a object which can be a boolean, integer, string orIsFillwhen the callback has been activated.
-
-
-
Method Detail
-
isValid
static boolean isValid(IsFill fill)
Returnstrueif fill passed as argument is notnulland its value is notnulland its mode is notnullas well.- Parameters:
fill- fill to be checked- Returns:
trueif fill passed as argument is notnulland its value is notnulland its mode is notnullas well.
-
transform
static Object transform(Object object)
Returns a object which can be a boolean, integer, string orIsFillwhen the callback has been activated.- Parameters:
object- object to be normalized.- Returns:
- a object property value
-
toObject
static Object toObject(IsFill fill)
Transforms aIsFillinstance 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.
-
-