Skip to content
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
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
}
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=1.5.8
VERSION_CODE=13
VERSION_NAME=1.5.9
VERSION_CODE=14
GROUP=com.github.lecho

POM_DESCRIPTION=Charting library for Android compatible with API 8+(Android 2.2).
Expand Down
17 changes: 17 additions & 0 deletions hellocharts-library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

//To upload to maven central
Expand Down Expand Up @@ -62,6 +63,22 @@ android {

}

bintray {
user = BINTRAY_USER
key = BINTRAY_API_KEY
publications = ['maven']
publish = true
pkg {
repo = 'maven'
name = POM_ARTIFACT_ID
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/gudatcomputers/hellocharts-android'
version {
name = VERSION_NAME
}
}
}

//Execute "gradle clean jarRelease" to cook jar.
android.libraryVariants.all { variant ->
def name = variant.buildType.name
Expand Down
Binary file not shown.
6 changes: 6 additions & 0 deletions hellocharts-library/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Oct 09 09:59:35 CDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
164 changes: 164 additions & 0 deletions hellocharts-library/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions hellocharts-library/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Single point coordinates, used for LineChartData.
*/
public class PointValue {
public static final int UNINITIALIZED = 0;

private float x;
private float y;
Expand All @@ -16,6 +17,16 @@ public class PointValue {
private float diffX;
private float diffY;
private char[] label;
private int color = UNINITIALIZED;

public int getColor() {
return color;
}

public void setColor(int color) {
this.color = color;
}


public PointValue() {
set(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,10 @@ private void prepareLinePaint(final Line line) {
// may cause problems in the future with
// implementing point styles.
private void drawPoints(Canvas canvas, Line line, int lineIndex, int mode) {
pointPaint.setColor(line.getPointColor());
int valueIndex = 0;
for (PointValue pointValue : line.getValues()) {
//If points have color, use point color. Default to line color if point color is null.
pointPaint.setColor(pointValue.getColor() != 0 ? pointValue.getColor() : line.getPointColor());
int pointRadius = ChartUtils.dp2px(density, line.getPointRadius());
final float rawX = computator.computeRawX(pointValue.getX());
final float rawY = computator.computeRawY(pointValue.getY());
Expand Down