Skip to content

Commit a124e85

Browse files
committed
Documentation updates
1 parent e58d4da commit a124e85

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ specific plot types explaining styling and other advanced topics.
1515
* [Quickstart](quickstart.md) :star:
1616
* [Quickstart (YouTube Video)](https://www.youtube.com/watch?v=wEFkzQY_wWI) :movie_camera:
1717
* [Plot Composition](plot_composition.md)
18+
* [The Legend](legend.md)
1819
* [XY Plots](xyplot.md)
1920
* [Bar Charts](barchart.md)
2021
* [Candlestick Charts](candlestick.md)

docs/legend.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plot.getLegend().setVisible(true|false);
1313
```
1414

1515
# Hiding Series Items
16-
You can tell Androidplot not to generate a legend item for a Series by configuring it's associated
16+
You can tell Androidplot not to generate a legend item for a `Series` by configuring it's associated
1717
`Formatter`:
1818

1919
```java
@@ -56,4 +56,8 @@ plot.getLegend().setLegendItemComparator(myComparator);
5656
```
5757

5858
Using a custom `Comparator` in conjunction with `ROW_MAJOR` and `COLUMN_MAJOR` properties on the `TableModel`
59-
(show above) gives you full control over the display ordering of your legend entries.
59+
(show above) gives you full control over the display ordering of your legend entries.
60+
61+
# Positioning and Resizing
62+
The legend is just an implementation of a Widget and is positioned and resized in the same ways
63+
that all Widget instances are positioned. See the [Plot Composition](plot_composition.md) doc for details.

docs/plot_composition.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
# Plot Composition
2-
All plots in Androidplot inherit from the abstract base class Plot which provides common behaviors
3-
for all Plot implementations.
2+
All plots in Androidplot inherit from the abstract base class `Plot` which provides common behaviors
3+
for all `Plot` implementations.
44

55
# Widgets
6-
Plots are composed of one or more Widgets. A Widget is an abstraction of a visual
6+
Plots are composed of one or more Widgets. A `Widget` is an abstraction of a visual
77
component that may be positioned and scaled within the visible area of a Plot. For example,
8-
an XY Plot is typically composed of these 5 Widgets:
8+
an `XYPlot` is typically composed of these 5 `Widgets`:
99

1010
* Title
1111
* Graph
1212
* Domain Label
1313
* Range Label
14-
* Legend
14+
* [Legend](legend.md)
1515

16-
All Plot implementations will contain at least one default Widget providing the core
17-
behavior encapsulated by that Plot. In addition to moving and scaling these Widgets, developers may
18-
also extend them and replace the Plot's default instance with the derived implenentation in order to
16+
All implementations of `Plot` will contain at least one default `Widget` providing the core
17+
behavior encapsulated by that `Plot`. In addition to moving and scaling a `Widget`, developers may
18+
also extend them and replace the `Plot` instance's default instance with the derived implementation in order to
1919
get custom behavior.
2020

2121
# The LayoutManager
22-
The LayoutManager provides the logic for visually positioning and scaling Widgets; all Plot implementations
23-
contain an instance of LayoutManager that can be retrieved via `Plot.getLayoutManager()`.
22+
The `LayoutManager` provides the logic for visually positioning and scaling Widgets; all `Plot` implementations
23+
contain an instance of `LayoutManager` that can be retrieved via `Plot.getLayoutManager()`.
2424

2525
## Z-Indexing
2626
Z-indexing is a 2D drawing concept which associates each drawable entity with a value that determines
2727
which elements get drawn onto the screen first, producing the visual effect that certain elements appear
2828
on top of others.
2929

3030
While Androidplot uses the term "z-index" it's implemented internally as a linked list to prevent the possibility
31-
of duplicate index values and therefore ensuring that the drawing order of Widgets is always explicit.
31+
of duplicate index values and therefore ensuring that `Widget` drawing order is always explicit.
3232
The [Layerable](../androidplot-core/src/main/java/com/androidplot/util/Layerable.java) interface
33-
defines methods used for manipulating the z-index of a Widget.
33+
defines methods used for manipulating the z-index of a `Widget`.
3434

3535
## Adding & Removing Widgets
36-
New Widgets can be added either to the front or back of the z-index using these methods:
36+
New `Widget` instances can be added either to the front or back of the z-index using these methods:
3737

3838
* `LayoutManager.addToTop(Widget)`
3939
* `LayoutManager.addToBottom(Widget)`

0 commit comments

Comments
 (0)