public class MeterOptions extends AbstractPieOptions
Modifier and Type | Field and Description |
---|---|
static IsColor |
DEFAULT_FONT_COLOR
Default color of render, rgb(128, 128, 128)
|
static int |
DEFAULT_PRECISION
Default precision 2 to apply rendering the value or percentage.
|
Modifier and Type | Method and Description |
---|---|
IsChart |
getChart()
Returns the chart instance
|
protected T |
getConfiguration()
Returns the configuration element.
|
double |
getCutout()
Returns the portion of the chart that is cut out of the middle.
As Double , it is considered to be pixels. |
IsColor |
getFontColor()
Returns the font color to apply to the render of value.
|
ColorCallback<MeterContext> |
getFontColorCallback()
Returns the callback to customize the font color for rendered label in the chart.
|
MeterFormatCallback |
getFormatCallback()
Returns the callback to customize the value string in the chart.
|
int |
getPrecision()
Returns the decimal places to apply to render the value.
|
Render |
getRender()
Returns the render type of data in chart.
|
boolean |
isAnimated()
Returns if the render will be shown based on the animation of chart.
|
boolean |
isAutoFontSize()
Returns
true if the font size of the rendering will be automatically calculated, based on dimension of the area for rendering. |
ChartEnvelop<NativeObject> |
loadNativeObject(ChartEnvelop<NativeObject> envelop)
Returns the native object instance inside an envelop.
It can be called only from org.pepstock.charba.client package. |
void |
merge(NativeObjectContainer source,
String property)
Merge a native object in the this one with a specific property name.
This is used by plugins implementation (native java script ones) when they are not using the standard way to add plugin configuration in the options of chart. |
static void |
register(IsChart chart,
org.pepstock.charba.client.configuration.IsEventProvider provider)
Adds the event provider implementation as handlers of chart.
|
void |
setAnimated(boolean animated)
Sets if the render will be shown based on the animation of chart.
|
void |
setAutoFontSize(boolean autoFontSize)
Sets
true if the font size of the rendering will be automatically calculated, based on dimension of the area for rendering. |
void |
setCircumference(double circumference)
Sets the sweep to allow arcs to cover.
|
protected void |
setConfiguration(T configuration) |
void |
setCutout(double cutout)
Sets the portion of the chart that is cut out of the middle.
As Double , it is considered to be pixels. |
void |
setCutoutPercentage(String cutout)
Sets the portion of the chart that is cut out of the middle.
As String and ending with '%', percentage of the chart radius. |
void |
setFontColor(ColorCallback<MeterContext> fontColorCallback)
Sets the callback to customize the font color for rendered label in the chart.
|
void |
setFontColor(IsColor fontColor)
Sets the font color to apply to the render of value.
|
void |
setFormatCallback(MeterFormatCallback formatCallback)
Sets the callback to customize the value string in the chart.
|
void |
setPrecision(int precision)
Sets the decimal places to apply to render the value.
|
void |
setRender(Render render)
Sets the render type of data in chart.
|
String |
toJSON()
Returns the JSON representation of the object.
|
getAxisById, getCircumference, getCutoutPercentage, getRadius, getRadiusPercentage, getRotation, setRadius, setRadiusPercentage, setRotation
afterAxisConfigurationUpdate, afterConfigurationUpdate, beforeAxisConfigurationUpdate, beforeConfigurationUpdate, getAnimationContainer, getAspectRatio, getBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getColor, getColorAsString, getDatasets, getDevicePixelRatio, getElements, getEvents, getFiller, getFont, getHover, getInteraction, getLayout, getLegend, getLocale, getPlugins, getResizeDelay, getSubtitle, getTitle, getTooltips, hasAxisClickHandlers, hasAxisEnterHandlers, hasAxisHoverHandlers, hasAxisLeaveHandlers, hasDatasetSelectionHandlers, hasSubtitleClickHandlers, hasSubtitleEnterHandlers, hasSubtitleLeaveHandlers, hasTitleClickHandlers, hasTitleEnterHandlers, hasTitleLeaveHandlers, isDestroyOnDetach, isDrawOnAttach, isMaintainAspectRatio, isResponsive, load, loadOptions, onAdd, onRemove, setAspectRatio, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setChartOptions, setColor, setColor, setDestroyOnDetach, setDevicePixelRatio, setDrawOnAttach, setEvents, setLocale, setMaintainAspectRatio, setResizeDelay, setResponsive
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
public static final int DEFAULT_PRECISION
public static final IsColor DEFAULT_FONT_COLOR
public void setCutoutPercentage(String cutout)
AbstractPieOptions
String
and ending with '%', percentage of the chart radius.setCutoutPercentage
in class AbstractPieOptions
cutout
- the portion of the chart that is cut out of the middle.String
and ending with '%', percentage of the chart radius.public final void setCutout(double cutout)
AbstractPieOptions
Double
, it is considered to be pixels.setCutout
in class AbstractPieOptions
cutout
- the portion of the chart that is cut out of the middle.Double
, it is considered to be pixels.public final double getCutout()
AbstractPieOptions
Double
, it is considered to be pixels.getCutout
in class AbstractPieOptions
Double
, it is considered to be pixels.public final void setCircumference(double circumference)
AbstractPieOptions
setCircumference
in class AbstractPieOptions
circumference
- the sweep to allow arcs to cover.public final Render getRender()
public final void setRender(Render render)
render
- the render to setpublic final int getPrecision()
public final void setPrecision(int precision)
precision
- the decimal places to apply to the value in chartpublic final IsColor getFontColor()
public final void setFontColor(IsColor fontColor)
fontColor
- the displayFontColor to setpublic final boolean isAnimated()
true
the rendering is animated, otherwise false
public final void setAnimated(boolean animated)
animated
- true
if the rendering is animated, otherwise false
public boolean isAutoFontSize()
true
if the font size of the rendering will be automatically calculated, based on dimension of the area for rendering.true
if the font size of the rendering will be automatically calculated, based on dimension of the area for renderingpublic void setAutoFontSize(boolean autoFontSize)
true
if the font size of the rendering will be automatically calculated, based on dimension of the area for rendering.autoFontSize
- true
if the font size of the rendering will be automatically calculated, based on dimension of the area for renderingpublic final MeterFormatCallback getFormatCallback()
public final void setFormatCallback(MeterFormatCallback formatCallback)
formatCallback
- the callback to customize the value string in the chartpublic final ColorCallback<MeterContext> getFontColorCallback()
public final void setFontColor(ColorCallback<MeterContext> fontColorCallback)
fontColorCallback
- the callback to customize the font color for rendered label in the chartpublic static void register(IsChart chart, org.pepstock.charba.client.configuration.IsEventProvider provider)
chart
- chart instanceprovider
- event provider implmentationprotected final void setConfiguration(T configuration)
configuration
- the configuration to setprotected final T getConfiguration()
public final void merge(NativeObjectContainer source, String property)
source
- native object container to addproperty
- property namepublic final String toJSON()
public final ChartEnvelop<NativeObject> loadNativeObject(ChartEnvelop<NativeObject> envelop)
org.pepstock.charba.client
package.envelop
- envelop instance which will contain the native objectpublic final IsChart getChart()