public class PieDataPoint extends SingleValueDataPoint implements LegendSelectable
desiredSize, isEmpty, isPositive
PROPERTY_CHANGED_MESSAGE, PROPERTY_CHANGING_MESSAGE, trackPropertyChanged, trackPropertyChanging
Constructor and Description |
---|
PieDataPoint() |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
double |
getRelativeOffsetFromCenter()
Gets the offset of the point from the center of the pie relative to the radius.
|
LegendSelectableListener |
getSelectedChangeListener() |
double |
normalizedValue()
Gets the current normalized value.
|
double |
percent()
Gets the ratio between the value of this data point and the total value of all data points
converted to percentage.
|
void |
setIsSelected(boolean isSelected)
Sets a value indicating whether the data point is currently in a "Selected" state.
|
void |
setName(String value) |
void |
setRelativeOffsetFromCenter(double value)
Sets the offset of the point from the center of the pie relative to the radius.
|
void |
setSelectedChangeListener(LegendSelectableListener listener) |
double |
startAngle()
Gets the value of the angle where the first side of the pie slice,
that presents this data point, resides.
|
double |
sweepAngle()
Gets the value of the central angle of the pie slice that represents this data point.
|
void |
update(double startAngle,
double sweepAngle,
double normalizedValue)
Updates the values of this data point.
|
getTooltipTokens, getValue, getValueForAxis, setValue
getCenter, getCenterX, getCenterY, getDataItem, getIsSelected, getLabel, setDataItem, setLabel, setValueFromAxis
applyLayoutRounding, arrange, arrange, chartArea, clearValue, collectionIndex, getLayoutSlot, getNodeState, getParent, getPresenter, index, invalidate, isTreeLoaded, isVisible, load, setIsVisible, setParent, setValue
getTypedValue, getValue, isLocalValue
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIsSelected
public double percent()
public double getRelativeOffsetFromCenter()
0
and 1.0
, where 0
means
that there is no offset and 1.0
means that the offset is the same as the
radius.public void setRelativeOffsetFromCenter(double value)
0
and 1.0
, where 0
means
that there is no offset and 1.0
means that the offset is the same as the
radius.value
- the new offsetpublic void setName(String value)
public String getName()
public double startAngle()
public double sweepAngle()
public double normalizedValue()
public void update(double startAngle, double sweepAngle, double normalizedValue)
startAngle
- the start angle of this data pointsweepAngle
- the sweep angle of this data pointnormalizedValue
- the normalized value for this data pointpublic void setIsSelected(boolean isSelected)
DataPoint
setIsSelected
in interface LegendSelectable
setIsSelected
in class DataPoint
isSelected
- the new state of the point.public void setSelectedChangeListener(LegendSelectableListener listener)
setSelectedChangeListener
in interface LegendSelectable
public LegendSelectableListener getSelectedChangeListener()
getSelectedChangeListener
in interface LegendSelectable