public class SecondScale
extends java.lang.Object
setMinY(double)
and setMaxY(double)
to set them.
The second scale has it's own array of series.Modifier and Type | Field and Description |
---|---|
protected RectD |
mCompleteRange |
protected RectD |
mCurrentViewport |
protected GraphView |
mGraph
reference to the graph
|
protected LabelFormatter |
mLabelFormatter
label formatter for the y labels
on the right side
|
protected double |
mReferenceY |
protected java.util.List<Series> |
mSeries
array of series for the second
scale
|
int |
mVerticalAxisTitleColor
font color of the vertical axis title
|
float |
mVerticalAxisTitleTextSize
font size of the vertical axis title
|
Modifier and Type | Method and Description |
---|---|
void |
addSeries(Series s)
add a series to the second scale.
|
void |
calcCompleteRange()
caches the complete range (minX, maxX, minY, maxY)
by iterating all series and all datapoints and
stores it into #mCompleteRange
for the x-range it will respect the series on the
second scale - not for y-values
|
protected void |
drawVerticalAxisTitle(Canvas canvas)
draws the vertical axis title if
it is set
|
LabelFormatter |
getLabelFormatter() |
double |
getMaxY(boolean completeRange) |
double |
getMinY(boolean completeRange) |
java.util.List<Series> |
getSeries() |
java.lang.String |
getVerticalAxisTitle() |
int |
getVerticalAxisTitleColor() |
float |
getVerticalAxisTitleTextSize() |
boolean |
isYAxisBoundsManual() |
void |
removeAllSeries()
Removes all series of the graph.
|
void |
removeSeries(Series series)
Remove a specific series of the
second scale.
|
void |
setLabelFormatter(LabelFormatter formatter)
Set a custom label formatter that is used
for the y labels on the right side.
|
void |
setMaxY(double d)
set the max y bounds
|
void |
setMinY(double d)
set the min y bounds
|
void |
setVerticalAxisTitle(java.lang.String mVerticalAxisTitle) |
void |
setVerticalAxisTitleColor(int verticalAxisTitleColor) |
void |
setVerticalAxisTitleTextSize(float verticalAxisTitleTextSize) |
protected final GraphView mGraph
protected java.util.List<Series> mSeries
protected RectD mCompleteRange
protected RectD mCurrentViewport
protected LabelFormatter mLabelFormatter
protected double mReferenceY
public float mVerticalAxisTitleTextSize
public int mVerticalAxisTitleColor
public void addSeries(Series s)
s
- the seriespublic void setMinY(double d)
d
- min y valuepublic void setMaxY(double d)
d
- max y valuepublic java.util.List<Series> getSeries()
public double getMinY(boolean completeRange)
public double getMaxY(boolean completeRange)
public boolean isYAxisBoundsManual()
public LabelFormatter getLabelFormatter()
public void setLabelFormatter(LabelFormatter formatter)
formatter
- label formatter for the y labelspublic void removeAllSeries()
public void removeSeries(Series series)
series
- public void calcCompleteRange()
public java.lang.String getVerticalAxisTitle()
public void setVerticalAxisTitle(java.lang.String mVerticalAxisTitle)
mVerticalAxisTitle
- the title of the vertical axispublic float getVerticalAxisTitleTextSize()
public void setVerticalAxisTitleTextSize(float verticalAxisTitleTextSize)
verticalAxisTitleTextSize
- font size of the vertical axis titlepublic int getVerticalAxisTitleColor()
public void setVerticalAxisTitleColor(int verticalAxisTitleColor)
verticalAxisTitleColor
- font color of the vertical axis titleprotected void drawVerticalAxisTitle(Canvas canvas)
canvas
- canvas