public class MeterOptions extends AbstractPieOptions
Modifier and Type | Field and Description |
---|---|
static IsColor |
DEFAULT_DISPLAY_COLOR
Default color of display
|
static String |
DEFAULT_FORMAT
Default format "##0" to apply displaying the value or percentage
|
Constructor and Description |
---|
MeterOptions(AbstractChart<?,?> chart,
ChartOptions defaultValues)
Builds the object storing the chart instance and defaults.
|
Modifier and Type | Method and Description |
---|---|
AbstractChart<?,?> |
getChart()
Returns the chart instance
|
protected T |
getConfiguration()
Returns the configuration element.
|
MeterDisplay |
getDisplay()
Returns the display type of data in chart.
|
IsColor |
getDisplayFontColor()
Returns the font color to apply to the display of value.
|
String |
getFontFamily()
Returns the font family to apply to the display of value.
|
FontStyle |
getFontStyle()
Returns the font style to apply to the display of value.
|
String |
getFormat()
Sets the format to apply to display the value.
|
Hover |
getHover()
Returns the hover element.
|
Layout |
getLayout()
Returns the layout element.
|
Legend |
getLegend()
Returns the legend element.
|
Tooltips |
getTooltips()
Returns the tooltips element.
|
boolean |
isAnimatedDisplay()
Returns if the display will be shown based on the animation of chart.
|
void |
setAnimatedDisplay(boolean animatedDisplay)
Sets if the display will be shown based on the animation of chart.
|
protected void |
setConfiguration(T configuration) |
void |
setCutoutPercentage(double cutoutPercentage)
Sets the percentage of the chart that is cut out of the middle.
|
void |
setDisplay(MeterDisplay display)
Sets the display type of data in chart.
|
void |
setDisplayFontColor(IsColor displayFontColor)
Sets the font color to apply to the display of value.
|
void |
setFontFamily(String fontFamily)
Sets the font family to apply to the display of value.
|
void |
setFontStyle(FontStyle fontStyle)
Sets the font style to apply to the display of value.
|
void |
setFormat(String format)
Sets the format to apply to display the value.
|
void |
setLegendCallback(LegendCallback legendCallback)
Sets the legend callback instance
|
String |
toJSON()
Returns the JSON representation of the object.
|
getCircumference, getCutoutPercentage, getRotation, setCircumference, setRotation
addHandler, getAnimation, getAspectRatio, getDevicePixelRatio, getElements, getEvents, getLegendCallback, getPlugins, getResponsiveAnimationDuration, getTitle, hasDatasetSelectionHandlers, isMaintainAspectRatio, isResponsive, load, removeHandler, setAspectRatio, setDevicePixelRatio, setEvents, setMaintainAspectRatio, setResponsive, setResponsiveAnimationDuration
onAdd, onRemove
public static final String DEFAULT_FORMAT
public static final IsColor DEFAULT_DISPLAY_COLOR
public MeterOptions(AbstractChart<?,?> chart, ChartOptions defaultValues)
chart
- chart instancedefaultValues
- defaults of chartpublic void setCutoutPercentage(double cutoutPercentage)
AbstractPieOptions
setCutoutPercentage
in class AbstractPieOptions
cutoutPercentage
- the percentage of the chart that is cut out of the middle.public Hover getHover()
ConfigurationOptions
getHover
in class ConfigurationOptions
public final Layout getLayout()
ConfigurationOptions
getLayout
in class ConfigurationOptions
public final Legend getLegend()
ConfigurationOptions
getLegend
in class ConfigurationOptions
public final Tooltips getTooltips()
ConfigurationOptions
getTooltips
in class ConfigurationOptions
public final void setLegendCallback(LegendCallback legendCallback)
ConfigurationOptions
setLegendCallback
in class ConfigurationOptions
legendCallback
- the legendCallBack to setpublic final MeterDisplay getDisplay()
public final void setDisplay(MeterDisplay display)
display
- the display to setpublic final String getFormat()
public final void setFormat(String format)
format
- the format to setpublic final String getFontFamily()
public final void setFontFamily(String fontFamily)
fontFamily
- the fontFamily to setpublic final FontStyle getFontStyle()
public final void setFontStyle(FontStyle fontStyle)
fontStyle
- the fontStyle to setpublic final IsColor getDisplayFontColor()
public final void setDisplayFontColor(IsColor displayFontColor)
displayFontColor
- the displayFontColor to setpublic final boolean isAnimatedDisplay()
true
if animated, otherwise false
. Default is false
.public final void setAnimatedDisplay(boolean animatedDisplay)
animatedDisplay
- the animatedDisplay to set, true
if animated, otherwise false
protected final void setConfiguration(T configuration)
configuration
- the configuration to setprotected final T getConfiguration()
public final String toJSON()
public final AbstractChart<?,?> getChart()