Class XYGraphWidget
-
- All Implemented Interfaces:
-
com.androidplot.ui.BoxModelable,com.androidplot.ui.Resizable
public class XYGraphWidget extends Widget
Displays graphical data (lines, points, etc.) annotated with domain and range tick markers. The inner area of the graph upon which grid lines and points are rendered is called the "grid" area.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classXYGraphWidget.LineLabelRendererpublic classXYGraphWidget.LineLabelStylepublic interfaceXYGraphWidget.CursorLabelFormatterpublic enumXYGraphWidget.Edge
-
Field Summary
-
Constructor Summary
Constructors Constructor Description XYGraphWidget(LayoutManager layoutManager, XYPlot plot, Size size)
-
Method Summary
-
Methods inherited from class com.androidplot.ui.widget.Widget
calculateCoordinates, containsPoint, draw, getAnchor, getAnchorCoordinates, getAnchorCoordinates, getAnchorOffset, getBackgroundPaint, getBorderPaint, getHeightMetric, getHeightPix, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMarginatedRect, getPaddedRect, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPositionMetrics, getRotation, getSize, getWidgetDimensions, getWidthMetric, getWidthPix, isClippingEnabled, isVisible, layout, onPostInit, position, position, refreshLayout, setAnchor, setBackgroundPaint, setBorderPaint, setClippingEnabled, setHeight, setHeight, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMargins, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPositionMetrics, setRotation, setSize, setVisible, setWidth, setWidth -
Methods inherited from class com.androidplot.ui.BoxModelable
getMarginatedRect, getPaddedRect, setMarginBottom -
Methods inherited from class com.androidplot.ui.Resizable
layout -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
XYGraphWidget
XYGraphWidget(LayoutManager layoutManager, XYPlot plot, Size size)
-
-
Method Detail
-
getLinesPerRangeLabel
int getLinesPerRangeLabel()
-
setLinesPerRangeLabel
void setLinesPerRangeLabel(int linesPerRangeLabel)
-
getLinesPerDomainLabel
int getLinesPerDomainLabel()
-
setLinesPerDomainLabel
void setLinesPerDomainLabel(int linesPerDomainLabel)
-
getGridInsets
@NonNull() Insets getGridInsets()
Grid insets
-
setGridInsets
void setGridInsets(@NonNull() Insets gridInsets)
-
getLineLabelInsets
@NonNull() Insets getLineLabelInsets()
Domain / Range label insets
-
setLineLabelInsets
void setLineLabelInsets(@NonNull() Insets lineLabelInsets)
-
getGridRect
@Nullable() RectF getGridRect()
-
setGridRect
void setGridRect(@NonNull() RectF gridRect)
-
getLabelRect
@Nullable() RectF getLabelRect()
-
setLabelRect
void setLabelRect(@NonNull() RectF labelRect)
-
getLineExtensionTop
float getLineExtensionTop()
-
setLineExtensionTop
void setLineExtensionTop(float lineExtensionTop)
-
getLineExtensionBottom
float getLineExtensionBottom()
-
setLineExtensionBottom
void setLineExtensionBottom(float lineExtensionBottom)
-
getLineExtensionLeft
float getLineExtensionLeft()
-
setLineExtensionLeft
void setLineExtensionLeft(float lineExtensionLeft)
-
getLineExtensionRight
float getLineExtensionRight()
-
setLineExtensionRight
void setLineExtensionRight(float lineExtensionRight)
-
getGridBackgroundPaint
@Nullable() Paint getGridBackgroundPaint()
-
setGridBackgroundPaint
void setGridBackgroundPaint(@Nullable() Paint gridBackgroundPaint)
-
getRangeGridLinePaint
@Nullable() Paint getRangeGridLinePaint()
Get the paint used to draw the range grid line.
-
setRangeGridLinePaint
void setRangeGridLinePaint(@Nullable() Paint gridLinePaint)
Set the Paint used to draw the range grid line.
-
getRangeSubGridLinePaint
@Nullable() Paint getRangeSubGridLinePaint()
Get the paint used to draw the range grid line.
-
setRangeSubGridLinePaint
void setRangeSubGridLinePaint(@Nullable() Paint gridLinePaint)
Set the Paint used to draw the range grid line.
-
getDomainGridLinePaint
@Nullable() Paint getDomainGridLinePaint()
Get the paint used to draw the domain grid line.
-
setDomainGridLinePaint
void setDomainGridLinePaint(@Nullable() Paint gridLinePaint)
Set the paint used to draw the domain grid line.
-
getDomainSubGridLinePaint
@Nullable() Paint getDomainSubGridLinePaint()
Get the paint used to draw the domain grid line.
-
setDomainSubGridLinePaint
void setDomainSubGridLinePaint(@Nullable() Paint gridLinePaint)
Set the paint used to draw the domain grid line.
-
isGridClippingEnabled
boolean isGridClippingEnabled()
-
setGridClippingEnabled
void setGridClippingEnabled(boolean gridClippingEnabled)
-
getDomainCursorPaint
@Nullable() Paint getDomainCursorPaint()
-
setDomainCursorPaint
void setDomainCursorPaint(@Nullable() Paint domainCursorPaint)
- Parameters:
domainCursorPaint- The Paint used to draw the domain cursor line.
-
getRangeCursorPaint
@Nullable() Paint getRangeCursorPaint()
-
setRangeCursorPaint
void setRangeCursorPaint(@Nullable() Paint rangeCursorPaint)
- Parameters:
rangeCursorPaint- The Paint used to draw the range cursor line.
-
getDomainOriginLinePaint
@Nullable() Paint getDomainOriginLinePaint()
-
setDomainOriginLinePaint
void setDomainOriginLinePaint(@Nullable() Paint domainOriginLinePaint)
-
getRangeOriginLinePaint
@Nullable() Paint getRangeOriginLinePaint()
-
setRangeOriginLinePaint
void setRangeOriginLinePaint(@Nullable() Paint rangeOriginLinePaint)
-
getDomainCursorPosition
@Nullable() Float getDomainCursorPosition()
-
setDomainCursorPosition
void setDomainCursorPosition(@Nullable() Float domainCursorPosition)
Set domain cursor position using screen coordinates
-
getRangeCursorPosition
@Nullable() Float getRangeCursorPosition()
-
setRangeCursorPosition
void setRangeCursorPosition(@Nullable() Float rangeCursorPosition)
Set range cursor position using screen coordinates
-
getCursorLabelFormatter
@Nullable() XYGraphWidget.CursorLabelFormatter getCursorLabelFormatter()
-
setCursorLabelFormatter
void setCursorLabelFormatter(@Nullable() XYGraphWidget.CursorLabelFormatter cursorLabelFormatter)
-
processAttrs
void processAttrs(@NonNull() TypedArray attrs)
Apply xml attrs
-
setCursorPosition
void setCursorPosition(@Nullable() Float x, @Nullable() Float y)
Set domain and range cursor position using screen coordinates
-
setCursorPosition
void setCursorPosition(@NonNull() PointF point)
Set domain and range cursor position using screen coordinates
-
getDomainCursorVal
@Nullable() Number getDomainCursorVal()
-
getRangeCursorVal
@Nullable() Number getRangeCursorVal()
-
isDrawGridOnTop
boolean isDrawGridOnTop()
-
isDrawMarkersEnabled
boolean isDrawMarkersEnabled()
-
getLineLabelRenderer
@Nullable() XYGraphWidget.LineLabelRenderer getLineLabelRenderer(@NonNull() XYGraphWidget.Edge edge)
-
setLineLabelRenderer
void setLineLabelRenderer(@NonNull() XYGraphWidget.Edge edge, @NonNull() XYGraphWidget.LineLabelRenderer renderer)
-
getLineLabelStyle
@Nullable() XYGraphWidget.LineLabelStyle getLineLabelStyle(@NonNull() XYGraphWidget.Edge edge)
-
setLineLabelStyle
void setLineLabelStyle(@NonNull() XYGraphWidget.Edge edge, @NonNull() XYGraphWidget.LineLabelStyle style)
-
isLineLabelEnabled
boolean isLineLabelEnabled(@NonNull() XYGraphWidget.Edge position)
-
setLineLabelEdges
void setLineLabelEdges(@Nullable() Array<XYGraphWidget.Edge> positions)
-
setLineLabelEdges
void setLineLabelEdges(@NonNull() Collection<XYGraphWidget.Edge> positions)
-
containsPoint
boolean containsPoint(float x, float y)
Checks whether the point exists within the visible grid space.
- Since:
1.0
-
setDrawGridOnTop
void setDrawGridOnTop(boolean drawGridOnTop)
-
setDrawMarkersEnabled
void setDrawMarkersEnabled(boolean drawMarkersEnabled)
-
-
-
-