Skip to content

Commit 943d4f8

Browse files
committed
Documentation
1 parent e23e245 commit 943d4f8

3 files changed

Lines changed: 37 additions & 16 deletions

File tree

.idea/copyright/AndroidPlot_Apache_2_0.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ compatible with all versions of Android from 1.6 onward and is **used by over
1717

1818
**Links:**
1919

20-
* [Main Website](http://androidplot.com)
21-
* [Bitbucket Repo (primary)](https://bitbucket.org/androidplot/androidplot)
20+
* [Website](http://androidplot.com)
2221
* [Github Repo](https://github.com/halfhp/androidplot)
22+
* [Bitbucket Repo](https://bitbucket.org/androidplot/androidplot)
2323
* [Demo App (Google Play Store)](https://play.google.com/store/apps/details?id=com.androidplot.demos&hl=en)
2424
* [Demo App Soure Code](https://bitbucket.org/androidplot/androidplot/src/1538c5dfa56aed0d2cfdcbc7cdc6173e605543cd/demoapp/?at=master)
25-
* [Bug Tracker (Jira)](https://androidplot.jira.com)
25+
* [Bugs](https://github.com/halfhp/androidplot/issues)
2626
* [Contributing Source Code](http://androidplot.com/docs/working-with-androidplot-source/)
2727

2828
# Usage

docs/xyplot.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ to populate the graph with series data.
1414

1515
# The Graph
1616
XYGraphWidget encapsulates XYPlot's graphing functionality. Given an instance of XYPlot, a reference
17-
to XYGraphWidget can be retrieve via `Plot.getGraph()`.
17+
to XYGraphWidget can be retrieve via `XYPlot.getGraph()`.
1818

1919
## Domain & Range Boundaries
2020
By default, Androidplot will analyze all XYSeries instances registered with the Plot, determine the
@@ -23,8 +23,16 @@ plot contains dynamic data, especially if your plot can periodically contain eit
2323
or data with no resolution on one or both axis (all identical values for either x or y) then you may
2424
want to manually set your XYPlot's domain and range boundaries.
2525

26+
To set your plot's boundaries use:
27+
28+
* `XYPlot.setDomainBoundaries(Number value, BoundaryMode mode)`
29+
* `XYPlot.setRangeBoundaries(Number value, BoundaryMode mode)`
30+
31+
Note that the value argument is only used when setting `BoundaryMode.FIXED`. For all other
32+
modes, pass in null.
33+
2634
### BoundaryMode
27-
Androidplot provides four BoundaryMode options
35+
Androidplot provides four boundary modes:
2836

2937
#### Fixed
3038
The plot's boundaries on the specified axis are fixed to user defined values.
@@ -41,7 +49,23 @@ The plot's boundaries automatically shrink to the min value encountered by the p
4149
determines the starting boundaries from which the Shrink behavior will be based.
4250

4351
## Domain & Range Lines
44-
TODO
52+
These are the horizontal lines drawn on a graph. These lines are configured via:
53+
54+
* `XYPlot.setDomainStep(StepMode mode, Number value)`
55+
* `XYPlot.setRangeStep(StepMode, Number value)`
56+
57+
Androidplot provides these step modes:
58+
59+
### Subdivide
60+
When using `BoundaryMode.SUBDIVIDE`, the graph is subdivided into the specified number of sections.
61+
62+
### IncrementByValue
63+
`BoundaryMode.INCREMENT_BY_VALUE` instructs Androidplot draw grid lines at the specified interval. This
64+
is the most commonly used modes as is produces an easy to read result.
65+
66+
### IncrementByPixels
67+
`BoundaryMode.INCREMENT_BY_PIXELS` behaves identically to `BoundaryMode.INCREMENT_BY_VALUE` except that
68+
the increment quantity is expressed in pixels.
4569

4670
## Domain & Range Labels
4771
Androidplot supports labeling domain values on either or both the top and bottom graph edges
@@ -54,7 +78,13 @@ Sometimes it is desirable to display additional labels for a single axis, each u
5478
TODO - [f(x) plot example source](../demoapp/src/main/java/com/androidplot/demos/FXPlotExampleActivity.java)
5579
provides a reference implementation.
5680

57-
### StepMode
81+
### Line Label Interval
82+
Androidplot allows you to configure the interval at which labels are rendered for domain and range lines:
83+
84+
* `XYPlot.getGraph().setLinesPerDomainLabel(int interval)`
85+
* `XYPlot.getGraph().setLinesPerRangeLabel(int interval)`
86+
87+
### Line Label Format
5888
TODO
5989

6090
# Renderers

0 commit comments

Comments
 (0)