diff --git a/.gitignore b/.gitignore index d6bfc95..5ae56f9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /local.properties /.idea/workspace.xml .DS_Store +build/ diff --git a/README.md b/README.md index 6079558..7c38a0e 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,62 @@ -Chart and Graph Library for Android -==================================== +# Chart and Graph Library for Android + + +## What is GraphView -

What is GraphView

GraphView is a library for Android to programmatically create flexible and nice-looking diagramms. It is easy to understand, to integrate and to customize it. At the moment there are two different types: - + +* Line Charts +* Bar Charts + Tested on Android 1.6, 2.2, 2.3 and 3.0 (honeycomb, tablet). -

Features

+## Features * Two chart types -Line Chart and Bar Chart. + * Line Chart and Bar Chart. * Draw multiple series of data -Let the diagram show more that one series in a graph. You can set a color and a description for every series. + * Let the diagram show more that one series in a graph. You can set a color and a description for every series. * Show legend -A legend can be displayed inline the chart. You can set the width and the vertical align (top, middle, bottom). + * A legend can be displayed inline the chart. You can set the width and the vertical align (top, middle, bottom). * Custom labels -The labels for the x- and y-axis are generated automatically. But you can set your own labels, Strings are possible. + * The labels for the x- and y-axis are generated automatically. But you can set your own labels, Strings are possible. * Handle incomplete data -It's possible to give the data in different frequency. + * It's possible to give the data in different frequency. * Viewport -You can limit the viewport so that only a part of the data will be displayed. + * You can limit the viewport so that only a part of the data will be displayed. * Scrolling -You can scroll with a finger touch move gesture. + * You can scroll with a finger touch move gesture. * Scaling / Zooming -Since Android 2.3! With two-fingers touch scale gesture (Multi-touch), the viewport can be changed. + * Since Android 2.3! With two-fingers touch scale gesture (Multi-touch), the viewport can be changed. * Background (line graph) -Optionally draws a light background under the diagram stroke. + * Optionally draws a light background under the diagram stroke. + +## How to use -

How to use

-View GraphView page http://android-graphview.org +* View GraphView page: http://android-graphview.org Very simple example: -
-// init example series data
+
+```java
+// Init example series data
 GraphViewSeries exampleSeries = new GraphViewSeries(new GraphViewData[] {
-	      new GraphViewData(1, 2.0d)
-	      , new GraphViewData(2, 1.5d)
-	      , new GraphViewData(3, 2.5d)
-	      , new GraphViewData(4, 1.0d)
+	      new GraphViewData(1, 2.0d),
+	      new GraphViewData(2, 1.5d),
+	      new GraphViewData(3, 2.5d),
+	      new GraphViewData(4, 1.0d)
 });
 
 GraphView graphView = new LineGraphView(
-      this // context
-      , "GraphViewDemo" // heading
+      this, // context
+      "GraphViewDemo" // heading
 );
 graphView.addSeries(exampleSeries); // data
 
 LinearLayout layout = (LinearLayout) findViewById(R.id.layout);
 layout.addView(graphView);
-
+``` diff --git a/graphviewdemos/build.gradle b/graphviewdemos/build.gradle index 95fc90f..991aced 100644 --- a/graphviewdemos/build.gradle +++ b/graphviewdemos/build.gradle @@ -21,7 +21,7 @@ android { dependencies { compile 'com.android.support:appcompat-v7:20.+' compile 'com.android.support:support-v4:20.+' - //compile files('libs/GraphView-3.1.2.jar') + compile files('libs/GraphView-3.1.3.jar') //compile project(':GraphView') - compile 'com.jjoe64:graphview:3.1.3' + //compile 'com.jjoe64:graphview:3.1.3' } diff --git a/graphviewdemos/graphviewdemos.iml b/graphviewdemos/graphviewdemos.iml index 1694c9c..ca302b2 100644 --- a/graphviewdemos/graphviewdemos.iml +++ b/graphviewdemos/graphviewdemos.iml @@ -62,7 +62,7 @@ - + diff --git a/graphviewdemos/libs/GraphView-3.1.2.jar b/graphviewdemos/libs/GraphView-3.1.2.jar deleted file mode 100644 index 978e47f..0000000 Binary files a/graphviewdemos/libs/GraphView-3.1.2.jar and /dev/null differ diff --git a/graphviewdemos/libs/GraphView-3.1.3.jar b/graphviewdemos/libs/GraphView-3.1.3.jar new file mode 100644 index 0000000..94289ee Binary files /dev/null and b/graphviewdemos/libs/GraphView-3.1.3.jar differ