Skip to content

Commit 091223c

Browse files
authored
1.2.2 updates: (halfhp#8)
* more unit test coverage * more help documentation * added jacoco coverage reports * replaced Configurator with Fig lib * updated various formatters to support direct construction from xml configs * fixed a bug with rendering regions in LineAndPointRenderer * phased out ValPixConverter in favor of Region/RectRegion transform ops * moved PointLabeler and PointLabelFormatter into XYSeriesFormatter for broader point label support. * dded basic implementation of bubble charts. * added CircleCI support
1 parent 10e4ad2 commit 091223c

109 files changed

Lines changed: 3101 additions & 2415 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
# Androidplot
2-
3-
![image](docs/images/preview.png)
1+
# ![image](docs/images/aplogo_small.png) Androidplot [![CircleCI](https://circleci.com/gh/halfhp/androidplot.svg?style=shield)](https://circleci.com/gh/halfhp/androidplot) [![codecov](https://codecov.io/gh/halfhp/androidplot/branch/master/graph/badge.svg)](https://codecov.io/gh/halfhp/androidplot) [![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/androidplot.svg?style=social&label=Follow%20Us)](https://twitter.com/androidplot)
42

53
A library for creating dynamic and static charts in Android apps. It’s designed from the ground up for Android,
64
compatible with all versions of Android from 1.6 onward and is **used by over
75
[1,000 apps](http://www.appbrain.com/stats/libraries/details/androidplot/androidplot) on Google Play**.
86

7+
<img src="docs/images/screens/fx_vert.png" width="115">
8+
<img src="docs/images/screens/candlestick_vert.png" width="115">
9+
<img src="docs/images/screens/pie_vert.png" width="115">
10+
<img src="docs/images/screens/scatter_vert.png" width="115">
11+
<img src="docs/images/screens/step_vert.png" width="115">
12+
<img src="docs/images/screens/bubble_vert.png" width="115">
13+
<img src="docs/images/screens/bar_vert.png" width="115">
14+
915
**Features:**
1016

1117
* Line Charts
@@ -14,13 +20,13 @@ compatible with all versions of Android from 1.6 onward and is **used by over
1420
* Pie Charts
1521
* Step Charts
1622
* Candlestick Charts
23+
* Bubble Charts
1724
* Dynamic plots
1825
* Pan & Zoom
1926

20-
2127
# Usage
2228

23-
* :star: **[Quickstart](docs/quickstart.md)**
29+
* **[Quickstart](docs/quickstart.md)** :star:
2430
* [Full Documentation](docs/index.md)
2531

2632
# Links
@@ -30,7 +36,7 @@ compatible with all versions of Android from 1.6 onward and is **used by over
3036
* [Bitbucket Repo](https://bitbucket.org/androidplot/androidplot)
3137
* [Demo App (Google Play Store)](https://play.google.com/store/apps/details?id=com.androidplot.demos&hl=en)
3238
* [Demo App Soure Code](https://bitbucket.org/androidplot/androidplot/src/1538c5dfa56aed0d2cfdcbc7cdc6173e605543cd/demoapp/?at=master)
33-
* :ant: [Bugs](https://github.com/halfhp/androidplot/issues)
39+
* [Bugs](https://github.com/halfhp/androidplot/issues) :ant:
3440
* [Contributing Source Code](http://androidplot.com/docs/working-with-androidplot-source/)
3541

3642
# Help

androidplot-core/build.gradle

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
apply plugin: 'com.android.library'
1818
apply plugin: 'com.github.dcendents.android-maven'
1919
apply plugin: 'com.jfrog.bintray'
20+
apply plugin: 'com.vanniktech.android.junit.jacoco'
21+
apply plugin: 'com.github.kt3k.coveralls'
2022

2123
android {
2224
compileSdkVersion theCompileSdkVersion
@@ -42,11 +44,13 @@ group = 'com.androidplot'
4244
version = theVersionName
4345

4446
def siteUrl = 'http://androidplot.com'
45-
def gitUrl = 'https://bitbucket.org/androidplot/androidplot.git'
47+
def gitUrl = 'https://github.com/halfhp/androidplot.git'
4648

4749
dependencies {
50+
51+
compile 'com.halfhp.fig:figlib:1.0.3'
4852
testCompile "org.mockito:mockito-core:1.10.19"
49-
testCompile group: 'junit', name: 'junit', version: '4.9'
53+
testCompile group: 'junit', name: 'junit', version: '4.12'
5054
testCompile "org.robolectric:robolectric:3.1"
5155

5256
// temp fix for:
@@ -124,13 +128,17 @@ bintray {
124128
}
125129
repo = "androidplot"
126130
name = "com.androidplot:androidplot-core"
127-
issueTrackerUrl = "https://androidplot.jira.com"
131+
issueTrackerUrl = "https://github.com/halfhp/androidplot/issues"
128132
websiteUrl = siteUrl
129133
vcsUrl = gitUrl
130134
licenses = ["Apache-2.0"]
131135
}
132136
}
133137

138+
javadoc {
139+
options.overview = "src/main/java/overview.html"
140+
}
141+
134142
artifacts {
135143
archives javadocJar
136144
archives sourcesJar

androidplot-core/src/main/java/com/androidplot/Bounds.java

Lines changed: 0 additions & 78 deletions
This file was deleted.

androidplot-core/src/main/java/com/androidplot/LineRegion.java

Lines changed: 0 additions & 101 deletions
This file was deleted.

androidplot-core/src/main/java/com/androidplot/Plot.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
import com.androidplot.ui.widget.TextLabelWidget;
3232
import com.androidplot.ui.SeriesRenderer;
3333
import com.androidplot.util.AttrUtils;
34-
import com.androidplot.util.Configurator;
3534
import com.androidplot.util.DisplayDimensions;
3635
import com.androidplot.util.PixelUtils;
3736
import com.androidplot.ui.HorizontalPositioning;
3837
import com.androidplot.ui.VerticalPositioning;
38+
import com.halfhp.fig.*;
3939

4040
import java.lang.reflect.Field;
4141
import java.util.*;
@@ -513,7 +513,7 @@ private void loadAttrs(AttributeSet attrs, int defStyle) {
513513
attrHash.put(attrName.substring(XML_ATTR_PREFIX.length() + 1), attrs.getAttributeValue(i));
514514
}
515515
}
516-
Configurator.configure(getContext(), this, attrHash);
516+
Fig.configure(getContext(), this, attrHash);
517517
}
518518
}
519519

@@ -691,8 +691,8 @@ public FormatterType getFormatter(SeriesType series, Class<? extends RendererTyp
691691
return getSeries(series, rendererClass).getFormatter();
692692
}
693693

694-
public RendererType getRenderer(Class<? extends RendererType> rendererClass) {
695-
return getRenderers().get(rendererClass);
694+
public <T extends RendererType> T getRenderer(Class<T> rendererClass) {
695+
return (T) getRenderers().get(rendererClass);
696696
}
697697

698698
public List<RendererType> getRendererList() {

0 commit comments

Comments
 (0)