public abstract class AbstractPieOptions extends ConfigurationOptions
Modifier | Constructor and Description |
---|---|
protected |
AbstractPieOptions(IsChart chart,
IsDefaultScaledOptions defaultvalues)
Builds the object storing the chart instance and defaults.
|
Modifier and Type | Method and Description |
---|---|
protected Axis |
getAxisById(int id)
Returns the axis by the unique CHARBA id of scale or
null if not axis. |
IsChart |
getChart()
Returns the chart instance
|
double |
getCircumference()
Returns the the sweep to allow arcs to cover.
|
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. |
String |
getCutoutPercentage()
Returns the portion of the chart that is cut out of the middle.
As String and ending with '%', percentage of the chart radius. |
double |
getRadius()
Returns the outer radius of the chart.
As Double , it is considered to be pixels. |
String |
getRadiusPercentage()
Returns the outer radius of the chart.
As String and ending with '%', percentage of the maximum radius. |
double |
getRotation()
Returns the starting angle to draw arcs from.
|
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 |
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 |
setRadius(double radius)
Sets the outer radius of the chart.
As Double , it is considered to be pixels. |
void |
setRadiusPercentage(String radius)
Sets the outer radius of the chart.
As String and ending with '%', percentage of the maximum radius. |
void |
setRotation(double rotation)
Sets the starting angle to draw arcs from.
|
String |
toJSON()
Returns the JSON representation of the object.
|
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
protected AbstractPieOptions(IsChart chart, IsDefaultScaledOptions defaultvalues)
chart
- chart instancedefaultvalues
- defaults of chartpublic void setCutout(double cutout)
Double
, it is considered to be pixels.cutout
- the portion of the chart that is cut out of the middle.Double
, it is considered to be pixels.public void setCutoutPercentage(String cutout)
String
and ending with '%', percentage of the chart radius.cutout
- the portion of the chart that is cut out of the middle.String
and ending with '%', percentage of the chart radius.public double getCutout()
Double
, it is considered to be pixels.Double
, it is considered to be pixels.public String getCutoutPercentage()
String
and ending with '%', percentage of the chart radius.String
and ending with '%', percentage of the chart radius.public void setRadius(double radius)
Double
, it is considered to be pixels.radius
- the outer radius of the chart.Double
, it is considered to be pixels.public double getRadius()
Double
, it is considered to be pixels.Double
, it is considered to be pixels.public void setRadiusPercentage(String radius)
String
and ending with '%', percentage of the maximum radius.radius
- the outer radius of the chart.String
and ending with '%', percentage of the maximum radius.public String getRadiusPercentage()
String
and ending with '%', percentage of the maximum radius.String
and ending with '%', percentage of the maximum radius.public void setRotation(double rotation)
rotation
- starting angle to draw arcs from.public double getRotation()
public void setCircumference(double circumference)
circumference
- the sweep to allow arcs to cover.public double getCircumference()
protected final Axis getAxisById(int id)
ConfigurationOptions
null
if not axis.getAxisById
in class ConfigurationOptions
id
- the unique CHARBA id of scalenull
if not axis.public 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()