public abstract class AbstractChartData extends java.lang.Object implements ChartData
| Modifier and Type | Field and Description |
|---|---|
protected Axis |
axisXBottom |
protected Axis |
axisXTop |
protected Axis |
axisYLeft |
protected Axis |
axisYRight |
static int |
DEFAULT_TEXT_SIZE_SP |
protected boolean |
isValueLabelBackgroundEnabled
If true each value label will have background rectangle
|
protected boolean |
isValueLabelBackgrountAuto
If true and
isValueLabelBackgroundEnabled is true each label will have background rectangle and that
rectangle will be filled with color specified for given value. |
protected int |
valueLabelBackgroundColor
If
isValueLabelBackgroundEnabled is true and isValueLabelBackgrountAuto is false each label
will have background rectangle and that rectangle will be filled with this color. |
protected int |
valueLabelTextColor |
protected int |
valueLabelTextSize |
protected android.graphics.Typeface |
valueLabelTypeface |
| Constructor and Description |
|---|
AbstractChartData() |
AbstractChartData(AbstractChartData data)
Copy constructor for deep copy.
|
| Modifier and Type | Method and Description |
|---|---|
Axis |
getAxisXBottom() |
Axis |
getAxisXTop() |
Axis |
getAxisYLeft() |
Axis |
getAxisYRight() |
int |
getValueLabelBackgroundColor() |
int |
getValueLabelTextColor()
Returns color used to draw value label text.
|
int |
getValueLabelTextSize()
Returns text size for value label in SP units.
|
android.graphics.Typeface |
getValueLabelTypeface()
Returns Typeface for value labels.
|
boolean |
isValueLabelBackgroundAuto() |
boolean |
isValueLabelBackgroundEnabled() |
void |
setAxisXBottom(Axis axisX)
Set horizontal axis at the bottom of the chart.
|
void |
setAxisXTop(Axis axisX)
Set horizontal axis at the top of the chart.
|
void |
setAxisYLeft(Axis axisY)
Set vertical axis on the left of the chart.
|
void |
setAxisYRight(Axis axisY)
Set vertical axis on the right of the chart.
|
void |
setValueLabelBackgroundAuto(boolean isValueLabelBackgrountAuto)
Set false if you want to set custom color for all value labels.
|
void |
setValueLabelBackgroundColor(int valueLabelBackgroundColor)
Set value labels background.
|
void |
setValueLabelBackgroundEnabled(boolean isValueLabelBackgroundEnabled)
Set whether labels should have rectangle background.
|
void |
setValueLabelsTextColor(int valueLabelTextColor)
Set value label text color, by default Color.WHITE.
|
void |
setValueLabelTextSize(int valueLabelTextSize)
Set text size for value label in SP units.
|
void |
setValueLabelTypeface(android.graphics.Typeface typeface)
Set Typeface for all values labels.
|
public static final int DEFAULT_TEXT_SIZE_SP
protected Axis axisXBottom
protected Axis axisYLeft
protected Axis axisXTop
protected Axis axisYRight
protected int valueLabelTextColor
protected int valueLabelTextSize
protected android.graphics.Typeface valueLabelTypeface
protected boolean isValueLabelBackgroundEnabled
protected boolean isValueLabelBackgrountAuto
isValueLabelBackgroundEnabled is true each label will have background rectangle and that
rectangle will be filled with color specified for given value.protected int valueLabelBackgroundColor
isValueLabelBackgroundEnabled is true and isValueLabelBackgrountAuto is false each label
will have background rectangle and that rectangle will be filled with this color. Helpful if you want all labels
to have the same background color.public AbstractChartData()
public AbstractChartData(AbstractChartData data)
data - public Axis getAxisXBottom()
getAxisXBottom in interface ChartDataChartData.setAxisXBottom(Axis)public void setAxisXBottom(Axis axisX)
ChartDatasetAxisXBottom in interface ChartDatapublic Axis getAxisYLeft()
getAxisYLeft in interface ChartDataChartData.setAxisYLeft(Axis)public void setAxisYLeft(Axis axisY)
ChartDatasetAxisYLeft in interface ChartDatapublic Axis getAxisXTop()
getAxisXTop in interface ChartDataChartData.setAxisXTop(Axis)public void setAxisXTop(Axis axisX)
ChartDatasetAxisXTop in interface ChartDatapublic Axis getAxisYRight()
getAxisYRight in interface ChartDataChartData.setAxisYRight(Axis)public void setAxisYRight(Axis axisY)
ChartDatasetAxisYRight in interface ChartDatapublic int getValueLabelTextColor()
ChartDatagetValueLabelTextColor in interface ChartDatapublic void setValueLabelsTextColor(int valueLabelTextColor)
ChartDatasetValueLabelsTextColor in interface ChartDatapublic int getValueLabelTextSize()
ChartDatagetValueLabelTextSize in interface ChartDatapublic void setValueLabelTextSize(int valueLabelTextSize)
ChartDatasetValueLabelTextSize in interface ChartDatapublic android.graphics.Typeface getValueLabelTypeface()
ChartDatagetValueLabelTypeface in interface ChartDatapublic void setValueLabelTypeface(android.graphics.Typeface typeface)
ChartDatasetValueLabelTypeface in interface ChartDatapublic boolean isValueLabelBackgroundEnabled()
isValueLabelBackgroundEnabled in interface ChartDataChartData.setValueLabelBackgroundEnabled(boolean)public void setValueLabelBackgroundEnabled(boolean isValueLabelBackgroundEnabled)
ChartDatasetValueLabelBackgroundEnabled in interface ChartDatapublic boolean isValueLabelBackgroundAuto()
isValueLabelBackgroundAuto in interface ChartDataChartData.setValueLabelBackgroundAuto(boolean)public void setValueLabelBackgroundAuto(boolean isValueLabelBackgrountAuto)
ChartDatasetValueLabelBackgroundAuto in interface ChartDatapublic int getValueLabelBackgroundColor()
getValueLabelBackgroundColor in interface ChartDataChartData.setValueLabelBackgroundColor(int)public void setValueLabelBackgroundColor(int valueLabelBackgroundColor)
ChartDatasetValueLabelBackgroundColor in interface ChartData