From ca027fdfda11cda3d9fd9cf26addf914aed80341 Mon Sep 17 00:00:00 2001 From: Philipp Jahoda Date: Sat, 28 Feb 2015 11:07:51 +0100 Subject: [PATCH 1/6] Update README.md --- README.md | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/README.md b/README.md index e0e0c79b1c..070aa42ada 100644 --- a/README.md +++ b/README.md @@ -192,56 +192,6 @@ For customizing the `Legend`, use you can retreive the `Legend` object from the // and many more... ``` - -**Displaying / styling labels:** - -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` ("xVals"), the y-axis labels depend on the actual values that are set for the chart. - -Labels can be enabled/disabled, using the methods: - - - `setDrawXLabels(boolean enabled)` - - `setDrawYLabels(boolean enabled)` - -the chart provides. -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. - -Example: - -```java -XLabels xl = mChart.getXLabels(); -xl.setPosition(XLabelPosition.BOTTOM); // set the position -xl.setTypeface(...); // set a different font -xl.setTextSize(12f); // set the textsize -xl.setSpaceBetweenLabels(3); // set how many characters of space should be between the labels -//... and more - -YLabels yl = mChart.getYLabels(); -yl.setPosition(YLabelPosition.BOTH_SIDED); // set the position -yl.setTypeface(...); // set a different font -yl.setTextSize(12f); // set the textsize -yl.setLabelCount(6); // set how many label entries should be displayed -//... and more - -``` - -**Limit Lines:** - -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. - -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. - -```java - -LineData ld = new LineData(...); - -LimitLine ll = new LimitLine(140f); -ll.setLineColor(Color.RED); -ll.setLineWidth(4f); -// .. and more styling options - -ld.addLimitLine(ll); -``` - **Dynamically adding data (real time):** 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. @@ -284,8 +234,6 @@ mChart.animateXY(3000, 3000); // animate horizontal and vertical 3000 millisecon If `animate(...)` (of any kind) is called, no further calling of `invalidate()` is necessary to refresh the chart. -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. - More documentation and example code coming soon. This chart library is intended to fill the gap between popular charting libraries like "GraphView" or "achartengine". From 7d37dcb9757b84b801084858dd7c0189dbb7ecbf Mon Sep 17 00:00:00 2001 From: Philipp Jahoda Date: Sat, 28 Feb 2015 11:17:25 +0100 Subject: [PATCH 2/6] Update README.md --- README.md | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/README.md b/README.md index 070aa42ada..7f7f6b117a 100644 --- a/README.md +++ b/README.md @@ -192,48 +192,6 @@ For customizing the `Legend`, use you can retreive the `Legend` object from the // and many more... ``` -**Dynamically adding data (real time):** - -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. - -Class `DataSet` (and all subclasses): - - `addEntry(Entry e)`: Adds the given `Entry` object to the `DataSet`. - -Class `ChartData` (and all subclasses): - - `addEntry(Entry e, int dataSetIndex)`: Adds the given `Entry` to the `DataSet` at the specified dataset index. - - `addDataSet(DataSet d)`: Adds the given `DataSet` object to the `ChartData` object. - -In addition to that, there are also methods for **removing data dynamically**. - -Class `DataSet` (and all subclasses): - - `public boolean removeEntry(Entry e)`: Removes the given `Entry` object from the `DataSet`. Returns true if successful. - - `public boolean removeEntry(int xIndex)`: Removes the `Entry` at the given x-index from the `DataSet`. Returns true if successful. - -Class `ChartData` (and all subclasses): - - `public boolean removeEntry(Entry e, int dataSetIndex)`: Removes the given `Entry` object from the `DataSet` with the given dataset index. Returns true if successful. - - `public boolean removeEntry(int xIndex, int dataSetIndex)`: Removes the `Entry` at the given x-index from the `DataSet` with the given dataset index. Returns true if successful. - - `public boolean removeDataSet(DataSet d)`: Removes the given `DataSet` object from the `ChartData` object. Returns true if successful. - - `public boolean removeDataSet(int index)`: Removes the `DataSet` at the given index from the `ChartData` object. Returns true if successful. - - -**Animations:** - -All chart types support animations that can be used to create / build up the chart in an awesome looking way. Three different kinds of animation methods exist that animate either both, or x- and y-axis separately: - - - `animateX(int durationMillis)`: Animates the charts values on the horizontal axis, meaning that the chart will build up within the specified time from left to right. - - `animateY(int durationMillis)`: Animates the charts values on the vertical axis, meaning that the chart will build up within the specified time from bottom to top. - - `animateXY(int xDuration, int yDuration)`: Animates both horizontal and vertical axis, resulting in a left/right bottom/top build-up. - -```java -mChart.animateX(3000); // animate horizontal 3000 milliseconds -// or: -mChart.animateY(3000); // animate vertical 3000 milliseconds -// or: -mChart.animateXY(3000, 3000); // animate horizontal and vertical 3000 milliseconds -``` - -If `animate(...)` (of any kind) is called, no further calling of `invalidate()` is necessary to refresh the chart. - More documentation and example code coming soon. This chart library is intended to fill the gap between popular charting libraries like "GraphView" or "achartengine". From 27b7ec16d1cc530921131a2df1fcb9780ea77655 Mon Sep 17 00:00:00 2001 From: Philipp Jahoda Date: Sat, 28 Feb 2015 11:20:40 +0100 Subject: [PATCH 3/6] Update README.md --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 7f7f6b117a..109a604b4b 100644 --- a/README.md +++ b/README.md @@ -159,13 +159,6 @@ For getting started, rely on the **"MPChartExample"** folder and check out the e For a **detailed documentation**, please refer the [**Wiki**](https://github.com/PhilJay/MPAndroidChart/wiki). -**Other:** - - saveToGallery(String title): Saves the current chart state as an image to the gallery. - - saveToPath(String title, String pathOnSD): Saves the current chart state as an image to the specified path. - - setScaleMinima(float x, float y): Sets the minimum scale factors for x- and y-axis. If set for example to 3f, the user will not be able to fully zoom out. - - centerViewPort(int xIndex, float val): This method makes it possible to aim the center of the view (what you can see from the chart) to a specific position inside the chart, described by the index on the x-axis and the value on the y-axis. This also works very well in combination with the `setScaleMinima(...)` method. - - fitScreen(): Resets all zooming and dragging and makes the chart fit exactly it's bounds. - **Displaying / styling legends:** By default, all chart types support legends and will automatically generate and draw a legend after setting data for the chart. If a legend should be drawn or not can be enabled/disabled using the From 61b493deebb58907cf8df7127c4c7db1093ef64a Mon Sep 17 00:00:00 2001 From: Philipp Jahoda Date: Sat, 28 Feb 2015 11:26:34 +0100 Subject: [PATCH 4/6] Update README.md --- README.md | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 109a604b4b..ba70af84d7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ MPAndroidChart ======= -A simple charting library for Android, supporting line-, bar-, scatter-, candlestick- and piecharts, as well as scaling, dragging, selecting and animations. **Supporting Android 2.2 (API level 8)** and upwards. +A simple charting library for Android, supporting line-, bar-, scatter-, candlestick-, pie- and radarcharts (spider web), as well as scaling, dragging, selecting and animations. **Supporting Android 2.2 (API level 8)** and upwards. Remember: *It's all about the looks.* @@ -53,6 +53,7 @@ Features **Core features:** - Scaling on both axes (with touch-gesture, axes separately or pinch-zoom) - Dragging / Panning (with touch-gesture) + - Combined-Charts (line-, bar-, scatter-, candle-data) - Finger drawing (draw values into the chart with touch-gesture) - Highlighting values (with customizeable popup-views) - Multiple / Separate Axes @@ -157,38 +158,9 @@ Getting Started For getting started, rely on the **"MPChartExample"** folder and check out the examples in that project. The example project is also [**available in the Google PlayStore**](https://play.google.com/store/apps/details?id=com.xxmassdeveloper.mpchartexample). -For a **detailed documentation**, please refer the [**Wiki**](https://github.com/PhilJay/MPAndroidChart/wiki). - -**Displaying / styling legends:** - -By default, all chart types support legends and will automatically generate and draw a legend after setting data for the chart. If a legend should be drawn or not can be enabled/disabled using the - - - `setDrawLegend(boolean enabled)` - -method. - -The number of entries the automatically generated legend contains depends on the number of different colors (across all `DataSet` objects) as well as on the `DataSet` labels. The labels of the `Legend` depend on the labels set for the used `DataSet` objects in the chart. If no labels for the `DataSet` objects have been specified, the chart will automatically generate them. If multiple colors are used for one `DataSet`, those colors are grouped and only described by one label. - -For customizing the `Legend`, use you can retreive the `Legend` object from the chart **after setting data** using the `getLegend()` method. - -```java - // setting data... - chart.setData(....); - - Legend l = chart.getLegend(); - l.setFormSize(10f); // set the size of the legend forms/shapes - l.setForm(LegendForm.CIRCLE); // set what type of form/shape should be used - l.setPosition(LegendPosition.BELOW_CHART_LEFT); - l.setTypeface(...); - l.setXEntrySpace(5f); // set the space between the legend entries on the x-axis - l.setYEntrySpace(5f); // set the space between the legend entries on the y-axis - // and many more... -``` - -More documentation and example code coming soon. - -This chart library is intended to fill the gap between popular charting libraries like "GraphView" or "achartengine". - +Documentation +======= +For a **detailed documentation**, please have a look at the [**Wiki**](https://github.com/PhilJay/MPAndroidChart/wiki). License ======= From a2e92e6ef076c57be7dbfe2f7fd923dd4c4cf91b Mon Sep 17 00:00:00 2001 From: Philipp Jahoda Date: Sat, 28 Feb 2015 11:41:06 +0100 Subject: [PATCH 5/6] Update README.md --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ba70af84d7..6fb5fcc71c 100644 --- a/README.md +++ b/README.md @@ -153,15 +153,12 @@ dependencies { - Import the library folder (`MPChartLib`) into your Eclipse workspace - Add it as a reference to your project: [referencing library projects in Eclipse](http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject) -Getting Started -======= - -For getting started, rely on the **"MPChartExample"** folder and check out the examples in that project. The example project is also [**available in the Google PlayStore**](https://play.google.com/store/apps/details?id=com.xxmassdeveloper.mpchartexample). - Documentation ======= For a **detailed documentation**, please have a look at the [**Wiki**](https://github.com/PhilJay/MPAndroidChart/wiki). +Furthermore, you can also rely on the **"MPChartExample"** folder and check out the example code in that project. The corresponding application to the example project is also [**available in the Google PlayStore**](https://play.google.com/store/apps/details?id=com.xxmassdeveloper.mpchartexample). + License ======= Copyright 2014 Philipp Jahoda From 8ccc75ffe075c390ee8dcb9073d65665eaff42a7 Mon Sep 17 00:00:00 2001 From: Philipp Jahoda Date: Sat, 28 Feb 2015 11:41:47 +0100 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fb5fcc71c..75072874eb 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ Documentation ======= For a **detailed documentation**, please have a look at the [**Wiki**](https://github.com/PhilJay/MPAndroidChart/wiki). -Furthermore, you can also rely on the **"MPChartExample"** folder and check out the example code in that project. The corresponding application to the example project is also [**available in the Google PlayStore**](https://play.google.com/store/apps/details?id=com.xxmassdeveloper.mpchartexample). +Furthermore, you can also rely on the [**MPChartExample**](https://github.com/PhilJay/MPAndroidChart/tree/master/MPChartExample) folder and check out the example code in that project. The corresponding application to the example project is also [**available in the Google PlayStore**](https://play.google.com/store/apps/details?id=com.xxmassdeveloper.mpchartexample). License =======