Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project setup #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/local.properties
/.idea/workspace.xml
.DS_Store
build/
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,62 @@
Chart and Graph Library for Android
====================================
# Chart and Graph Library for Android


## What is GraphView

<h2>What is GraphView</h2>
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:
<ul>
<li>Line Charts</li>
<li>Bar Charts</li>
</ul>

* Line Charts
* Bar Charts


Tested on Android 1.6, 2.2, 2.3 and 3.0 (honeycomb, tablet).

<img src="https://github.com/jjoe64/GraphView/raw/master/GVLine.jpg" />
<img src="https://github.com/jjoe64/GraphView/raw/master/GVBar.png" />

<h2>Features</h2>
## 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

<h2>How to use</h2>
<a href="http://android-graphview.org">View GraphView page http://android-graphview.org</a>
* <a href="http://android-graphview.org">View GraphView page: http://android-graphview.org</a>

Very simple example:
<pre>
// 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);
</pre>
```
4 changes: 2 additions & 2 deletions graphviewdemos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
2 changes: 1 addition & 1 deletion graphviewdemos/graphviewdemos.iml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<orderEntry type="jdk" jdkName="Android API 20 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="appcompat-v7-20.0.0" level="project" />
<orderEntry type="library" exported="" name="graphview-3.1.3" level="project" />
<orderEntry type="library" exported="" name="GraphView-3.1.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-20.0.0" level="project" />
</component>
Expand Down
Binary file removed graphviewdemos/libs/GraphView-3.1.2.jar
Binary file not shown.
Binary file added graphviewdemos/libs/GraphView-3.1.3.jar
Binary file not shown.