Skip to content

Commit a2d7a68

Browse files
committed
Merge
2 parents 4c06674 + 662a846 commit a2d7a68

6 files changed

Lines changed: 67 additions & 122 deletions

File tree

‎MPChartLib/build.gradle‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ task sourcesJar(type: Jar) {
5050
classifier = 'sources'
5151
}
5252

53+
task javadoc(type: Javadoc) {
54+
failOnError false
55+
source = android.sourceSets.main.java.sourceFiles
56+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
57+
}
58+
59+
task javadocJar(type: Jar, dependsOn: javadoc) {
60+
classifier = 'javadoc'
61+
from javadoc.destinationDir
62+
}
63+
5364
artifacts {
5465
archives sourcesJar
66+
archives javadocJar
5567
}

‎MPChartLib/src/com/github/mikephil/charting/utils/FSize.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
/**
55
* Immutable class for describing width and height dimensions in some arbitrary
6-
* unit.
7-
* Replacement for the android.Util.SizeF which is available only on API >= 21.
6+
* unit. Replacement for the android.Util.SizeF which is available only on API >= 21.
87
*/
98
public final class FSize {
109

‎MPChartLib/src/com/github/mikephil/charting/utils/PointD.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/**
55
* Point encapsulating two double values.
6-
*
6+
*
77
* @author Philipp Jahoda
88
*/
99
public class PointD {
@@ -16,7 +16,9 @@ public PointD(double x, double y) {
1616
this.y = y;
1717
}
1818

19-
/** returns a string representation of the object */
19+
/**
20+
* returns a string representation of the object
21+
*/
2022
public String toString() {
2123
return "PointD, x: " + x + ", y: " + y;
2224
}

‎MPChartLib/src/com/github/mikephil/charting/utils/ViewPortHandler.java‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public class ViewPortHandler {
7676
*/
7777
private float mTransOffsetY = 0f;
7878

79+
/**
80+
* Constructor - don't forget calling setChartDimens(...)
81+
*/
7982
public ViewPortHandler() {
8083

8184
}
@@ -346,6 +349,11 @@ public void limitTransAndScale(Matrix matrix, RectF content) {
346349
matrix.setValues(vals);
347350
}
348351

352+
/**
353+
* Sets the minimum scale factor for the x-axis
354+
*
355+
* @param xScale
356+
*/
349357
public void setMinimumScaleX(float xScale) {
350358

351359
if (xScale < 1f)
@@ -356,13 +364,24 @@ public void setMinimumScaleX(float xScale) {
356364
limitTransAndScale(mMatrixTouch, mContentRect);
357365
}
358366

367+
/**
368+
* Sets the maximum scale factor for the x-axis
369+
*
370+
* @param xScale
371+
*/
359372
public void setMaximumScaleX(float xScale) {
360373

361374
mMaxScaleX = xScale;
362375

363376
limitTransAndScale(mMatrixTouch, mContentRect);
364377
}
365378

379+
/**
380+
* Sets the minimum and maximum scale factors for the x-axis
381+
*
382+
* @param minScaleX
383+
* @param maxScaleX
384+
*/
366385
public void setMinMaxScaleX(float minScaleX, float maxScaleX) {
367386

368387
if (minScaleX < 1f)
@@ -374,6 +393,11 @@ public void setMinMaxScaleX(float minScaleX, float maxScaleX) {
374393
limitTransAndScale(mMatrixTouch, mContentRect);
375394
}
376395

396+
/**
397+
* Sets the minimum scale factor for the y-axis
398+
*
399+
* @param yScale
400+
*/
377401
public void setMinimumScaleY(float yScale) {
378402

379403
if (yScale < 1f)
@@ -384,6 +408,11 @@ public void setMinimumScaleY(float yScale) {
384408
limitTransAndScale(mMatrixTouch, mContentRect);
385409
}
386410

411+
/**
412+
* Sets the maximum scale factor for the y-axis
413+
*
414+
* @param yScale
415+
*/
387416
public void setMaximumScaleY(float yScale) {
388417

389418
mMaxScaleY = yScale;
@@ -460,10 +489,20 @@ public float getScaleY() {
460489
return mScaleY;
461490
}
462491

492+
/**
493+
* Returns the translation (drag / pan) distance on the x-axis
494+
*
495+
* @return
496+
*/
463497
public float getTransX() {
464498
return mTransX;
465499
}
466500

501+
/**
502+
* Returns the translation (drag / pan) distance on the y-axis
503+
*
504+
* @return
505+
*/
467506
public float getTransY() {
468507
return mTransY;
469508
}
@@ -535,10 +574,20 @@ public boolean hasNoDragOffset() {
535574
return mTransOffsetX <= 0 && mTransOffsetY <= 0 ? true : false;
536575
}
537576

577+
/**
578+
* Returns true if the chart is not yet fully zoomed out on the x-axis
579+
*
580+
* @return
581+
*/
538582
public boolean canZoomOutMoreX() {
539583
return (mScaleX > mMinScaleX);
540584
}
541585

586+
/**
587+
* Returns true if the chart is not yet fully zoomed in on the x-axis
588+
*
589+
* @return
590+
*/
542591
public boolean canZoomInMoreX() {
543592
return (mScaleX < mMaxScaleX);
544593
}

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Questions & Issues
5757
If you are having questions or problems, you should:
5858

5959
- Make sure you are using the latest version of the library. Check the [**release-section**](https://github.com/PhilJay/MPAndroidChart/releases).
60-
- Study the [**Documentation-Wiki**](https://github.com/PhilJay/MPAndroidChart/wiki)
60+
- Study the [**Documentation-Wiki**](https://github.com/PhilJay/MPAndroidChart/wiki) or the [javadocs](https://jitpack.io/com/github/PhilJay/MPAndroidChart/-SNAPSHOT/javadoc/)
6161
- Search or open questions on [**stackoverflow**](https://stackoverflow.com/search?q=mpandroidchart) with the `mpandroidchart` tag
6262
- Search [**known issues**](https://github.com/PhilJay/MPAndroidChart/issues) for your problem (open and closed)
6363
- Create new issues (please **search known issues before**, do not create duplicate issues)

‎deploy.gradle‎

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

0 commit comments

Comments
 (0)