public abstract class ChartSeries extends ChartElementPresenter implements ChartSeries, DataBindingListener, ChartSeriesModel.DataPointsChangedListener
Modifier and Type | Field and Description |
---|---|
static int |
SERIES_Z_INDEX |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangedListener(PropertyChangedListener listener) |
ChartSeriesDataSource |
dataSource()
Gets the
ChartSeriesDataSource for this series. |
DataPointInfo |
findClosestPoint(Point location)
Finds the closest
DataPoint to the given location. |
boolean |
getClipToPlotArea()
Gets a value that determines if the chart will clip its children to fit inside the plot area.
|
Iterable |
getData()
Gets the items source of the series.
|
double |
getDistanceToPoint(Point dataPointLocation,
Point tapLocation)
Returns the distance between a data point and a tap location.
|
boolean |
getIsSelected() |
boolean |
getIsVisibleInLegend()
Gets a boolean value determining whether the current
PointTemplateSeries
instance will be visible in the Chart legend. |
int |
getLabelFillColor()
Gets the label fill color.
|
Typeface |
getLabelFont()
Gets the label font.
|
int |
getLabelFontStyle()
Gets the current label font style.
|
String |
getLabelFormat()
Gets the format in which the labels' text will be rendered.
|
float |
getLabelMargin()
Gets the label margin.
|
BaseLabelRenderer |
getLabelRenderer()
Gets the
ChartLabelRenderer responsible for drawing the labels. |
float |
getLabelSize()
Gets the label text size.
|
int |
getLabelStrokeColor()
Gets tje label stroke color.
|
int |
getLabelTextColor()
Gets the color of the label text.
|
Function<Object,String> |
getLabelValueToStringConverter()
Gets the converter used for converting the value of a label to text value.
|
RadSize |
getPlotAreaSize()
Gets the plot area size.
|
SeriesSelectionMode |
getSelectionMode() |
boolean |
getShowLabels()
Gets a value that determines whether the series labels should be shown.
|
boolean |
hitTest(PointF touchLocation)
Determines if the series contains the provided point.
|
DataPoint |
hitTestDataPoint(PointF touchLocation)
Determines if the provided point argument is on a data point.
|
ChartSeriesModel |
model()
Gets the series model for this instance.
|
void |
onBoundItemPropertyChanged(DataPointBindingEntry entry,
PropertyChangeEvent event)
Called when a change was made to an item that it currently bound.
|
void |
onDataBindingComplete()
Called after binding data source items.
|
void |
onDataPointIsSelectedChanged(DataPoint point)
Occurs when a
DataPoint owned by the series has its IsSelected property changed. |
void |
onPointAdded(int index,
DataPoint point) |
void |
onPointRemoved(int index,
DataPoint point) |
void |
postRender(Canvas canvas)
Used as second layer for rendering the current presenter instance onto the passed canvas object.
|
void |
removePropertyChangedListener(PropertyChangedListener listener) |
void |
render(Canvas canvas)
Used to render the current presenter instance onto the passed canvas object.
|
void |
setClipToPlotArea(boolean value)
Sets a value that determines if the chart will clip its children to fit inside the plot area.
|
void |
setData(Iterable value)
Sets the items source of the series.
|
void |
setIsSelected(boolean value) |
void |
setIsVisibleInLegend(boolean value)
Sets a boolean value determining whether the current
PointTemplateSeries
instance will be visible in the Chart legend. |
void |
setLabelFillColor(int color)
Sets the current label fill color.
|
void |
setLabelFont(Typeface value)
Sets the label font.
|
void |
setLabelFontStyle(int value)
Sets the current label font style.
|
void |
setLabelFormat(String value)
Sets the format in which the labels' text will be rendered.
|
void |
setLabelMargin(float value)
Sets the current label margin.
|
void |
setLabelPadding(float left,
float top,
float right,
float bottom)
Sets the padding for the labels in the series.
|
void |
setLabelRenderer(BaseLabelRenderer value)
Sets a
ChartLabelRenderer object that will be responsible for drawing the series labels. |
void |
setLabelSize(float value)
Sets the label text size.
|
void |
setLabelStrokeColor(int color)
Sets the current label stroke color.
|
void |
setLabelTextColor(int value)
Sets the color of the label text.
|
void |
setLabelValueToStringConverter(Function<Object,String> converter)
Sets the converter used to convert label value to string value.
|
void |
setSelectionMode(SeriesSelectionMode value) |
void |
setShowLabels(boolean value)
Sets the value that determines whether the series labels should be shown.
|
attach, detach, getCanApplyPalette, getChart, getCollectionIndex, getPalette, getZIndex, invalidatePalette, onPaletteInvalidated, onPaletteUpdated, requestLayout, requestRender, setZIndex, updatePalette
getPaletteFamily, getPaletteFamilyCore, isLoaded, isPaletteApplied, isVisible, measureContent, paletteFamily, refreshNode, setCanApplyPalette, setPaletteFamily, setVisible, setVisible
getValue, resetPropertyValue, setValue, setValue
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCollectionIndex, invalidatePalette, measureContent, refreshNode
public static final int SERIES_Z_INDEX
public void addPropertyChangedListener(PropertyChangedListener listener)
public void removePropertyChangedListener(PropertyChangedListener listener)
public void setSelectionMode(SeriesSelectionMode value)
public SeriesSelectionMode getSelectionMode()
public boolean getIsSelected()
public void setIsSelected(boolean value)
public void setLabelPadding(float left, float top, float right, float bottom)
left
- the left padding.top
- the top padding.right
- the right padding.bottom
- the bottom padding.public BaseLabelRenderer getLabelRenderer()
ChartLabelRenderer
responsible for drawing the labels.ChartLabelRenderer
instance.public void setLabelRenderer(BaseLabelRenderer value)
ChartLabelRenderer
object that will be responsible for drawing the series labels.value
- A the new series ChartLabelRenderer. If null
is passed, the default renderer will be used.public boolean getIsVisibleInLegend()
PointTemplateSeries
instance will be visible in the Chart legend.true
if the series is shown in the legend, otherwise false
.public void setIsVisibleInLegend(boolean value)
PointTemplateSeries
instance will be visible in the Chart legend.value
- true
if the series is shown in the legend, otherwise false
.public boolean hitTest(PointF touchLocation)
touchLocation
- The point to test.public DataPoint hitTestDataPoint(PointF touchLocation)
touchLocation
- The point to test.public String getLabelFormat()
public void setLabelFormat(String value)
value
- the new format.public Function<Object,String> getLabelValueToStringConverter()
public void setLabelValueToStringConverter(Function<Object,String> converter)
converter
- the new converter.public Typeface getLabelFont()
public void setLabelFont(Typeface value)
value
- the new label font.public int getLabelFontStyle()
public void setLabelFontStyle(int value)
value
- the new label font style.public int getLabelTextColor()
public void setLabelTextColor(int value)
value
- the new color.public int getLabelFillColor()
public void setLabelFillColor(int color)
color
- the new color.public int getLabelStrokeColor()
public void setLabelStrokeColor(int color)
color
- the new color.public float getLabelSize()
public void setLabelSize(float value)
value
- the new label text size.public float getLabelMargin()
public void setLabelMargin(float value)
value
- the new label margin.public boolean getShowLabels()
true
it the series labels should be shown andfalse
otherwise.public void setShowLabels(boolean value)
value
- true
it the series labels should be shown and
false
otherwise.public Iterable getData()
public void setData(Iterable value)
value
- The new items source of the series.public boolean getClipToPlotArea()
true
to clip children to the plot area or false
otherwise.public void setClipToPlotArea(boolean value)
value
- true
to clip children to the plot area or false
otherwise.public RadSize getPlotAreaSize()
RadSize
public void onDataBindingComplete()
DataBindingListener
onDataBindingComplete
in interface DataBindingListener
public void onBoundItemPropertyChanged(DataPointBindingEntry entry, PropertyChangeEvent event)
DataBindingListener
onBoundItemPropertyChanged
in interface DataBindingListener
entry
- the item that was changed.event
- the info about the change that was made.public void onDataPointIsSelectedChanged(DataPoint point)
ChartSeries
DataPoint
owned by the series has its IsSelected property changed.onDataPointIsSelectedChanged
in interface ChartSeries
public DataPointInfo findClosestPoint(Point location)
DataPoint
to the given location.location
- The location.DataPoint
to the given location.public ChartSeriesModel model()
ChartSeriesModel
.public void onPointAdded(int index, DataPoint point)
onPointAdded
in interface ChartSeriesModel.DataPointsChangedListener
public void onPointRemoved(int index, DataPoint point)
onPointRemoved
in interface ChartSeriesModel.DataPointsChangedListener
public double getDistanceToPoint(Point dataPointLocation, Point tapLocation)
dataPointLocation
- the data point.tapLocation
- the tap location.public ChartSeriesDataSource dataSource()
ChartSeriesDataSource
for this series.ChartSeriesDataSource
for this series.public void render(Canvas canvas)
PresenterBase
render
in class PresenterBase
canvas
- the canvas onto which the presenter is to be rendered.public void postRender(Canvas canvas)
PresenterBase
postRender
in class PresenterBase
canvas
- the canvas onto which the presenter is to be rendered.