You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-52Lines changed: 0 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,56 +192,6 @@ For customizing the `Legend`, use you can retreive the `Legend` object from the
192
192
// and many more...
193
193
```
194
194
195
-
196
-
**Displaying / styling labels:**
197
-
198
-
Labels (classes `XLabel` and `YLabel`) are used to describe the values of the chart on the x- and y-axis. While the x-axis labels display what is handed over to the `ChartData` object as an `ArrayList<String>` ("xVals"), the y-axis labels depend on the actual values that are set for the chart.
199
-
200
-
Labels can be enabled/disabled, using the methods:
201
-
202
-
-`setDrawXLabels(boolean enabled)`
203
-
-`setDrawYLabels(boolean enabled)`
204
-
205
-
the chart provides.
206
-
In order to apply a different styling to the labels, the methods `getYLabels()` and `getXLabels()` can be used to acquire the labels object and modify it.
207
-
208
-
Example:
209
-
210
-
```java
211
-
XLabels xl = mChart.getXLabels();
212
-
xl.setPosition(XLabelPosition.BOTTOM); // set the position
213
-
xl.setTypeface(...); // set a different font
214
-
xl.setTextSize(12f); // set the textsize
215
-
xl.setSpaceBetweenLabels(3); // set how many characters of space should be between the labels
216
-
//... and more
217
-
218
-
YLabels yl = mChart.getYLabels();
219
-
yl.setPosition(YLabelPosition.BOTH_SIDED); // set the position
220
-
yl.setTypeface(...); // set a different font
221
-
yl.setTextSize(12f); // set the textsize
222
-
yl.setLabelCount(6); // set how many label entries should be displayed
223
-
//... and more
224
-
225
-
```
226
-
227
-
**Limit Lines:**
228
-
229
-
Limit lines (class `LimitLine`) are (as the name might indicate) plain and simple lines that can be set for all `Line-, Bar- and ScatterData` objects. They can be used to **provide additional information** for the user.
230
-
231
-
As an example, your chart might display various blood pressure measurement results the user logged with an application. In order to inform the user that a systolic blood pressure of over 140 mmHg is considered to be a health risk, you could add a `LimitLine` at 140 to provide that information.
232
-
233
-
```java
234
-
235
-
LineData ld =newLineData(...);
236
-
237
-
LimitLine ll =newLimitLine(140f);
238
-
ll.setLineColor(Color.RED);
239
-
ll.setLineWidth(4f);
240
-
// .. and more styling options
241
-
242
-
ld.addLimitLine(ll);
243
-
```
244
-
245
195
**Dynamically adding data (real time):**
246
196
247
197
For **adding new data** to the chart dynamically, there are various methods that allow to either add `Entry` objects to an existing `DataSet` or `DataSet` objects to an existing `ChartData` object.
If `animate(...)` (of any kind) is called, no further calling of `invalidate()` is necessary to refresh the chart.
286
236
287
-
In order to support animations below Honeycomb, this library makes use of the awesome [**nineoldandroids library**](https://github.com/JakeWharton/NineOldAndroids) developed by Jake Wharton.
288
-
289
237
More documentation and example code coming soon.
290
238
291
239
This chart library is intended to fill the gap between popular charting libraries like "GraphView" or "achartengine".
0 commit comments