├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-hdpi │ │ │ │ └── ico_popincome.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── layout │ │ │ │ ├── activity_chart_in_fragment.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_linev2.xml │ │ │ │ ├── fragment_chart.xml │ │ │ │ ├── activity_outside_line_chart.xml │ │ │ │ ├── activity_move_select_line_chart.xml │ │ │ │ └── activity_leaf_chart.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── menu │ │ │ │ └── menu_leaf_chart.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── beiing │ │ │ │ └── leafchartdemo │ │ │ │ ├── ChartInFragmentActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── OutsideLineChartActivity.java │ │ │ │ ├── SlideSelectLineChartActivity.java │ │ │ │ ├── ChartFragment.java │ │ │ │ └── LeafChartActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── beiing │ │ │ └── leafchartdemo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── beiing │ │ └── leafchartdemo │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── leafchart ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── attrs.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── beiing │ │ │ │ └── leafchart │ │ │ │ ├── support │ │ │ │ ├── OnChartSelectedListener.java │ │ │ │ ├── Chart.java │ │ │ │ ├── OnPointSelectListener.java │ │ │ │ ├── Mode.java │ │ │ │ └── LeafUtil.java │ │ │ │ ├── bean │ │ │ │ ├── ChartData.java │ │ │ │ ├── AxisValue.java │ │ │ │ ├── Square.java │ │ │ │ ├── PointValue.java │ │ │ │ ├── SlidingLine.java │ │ │ │ ├── Line.java │ │ │ │ └── Axis.java │ │ │ │ ├── renderer │ │ │ │ ├── LeafSquareRenderer.java │ │ │ │ ├── SlideSelectLineRenderer.java │ │ │ │ ├── LeafLineRenderer.java │ │ │ │ ├── AbsRenderer.java │ │ │ │ └── OutsideLineRenderer.java │ │ │ │ ├── LeafSquareChart.java │ │ │ │ ├── LeafLineChart.java │ │ │ │ ├── OutsideLineChart.java │ │ │ │ ├── SlideSelectLineChart.java │ │ │ │ └── AbsLeafChart.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── beiing │ │ │ └── leafchart │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── beiing │ │ └── leafchart │ │ └── ApplicationTest.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── screenshot ├── mode.png ├── square.png ├── square2.png ├── cubic_filled.png ├── multi_lines.png ├── slide_select.gif ├── animate_line1.gif ├── animate_line2.gif └── fold_not_filled.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── 类介绍.md ├── gradlew ├── README.md └── LICENSE /.idea/.name: -------------------------------------------------------------------------------- 1 | LeafChart -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /leafchart/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':leafchart' 2 | -------------------------------------------------------------------------------- /screenshot/mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/mode.png -------------------------------------------------------------------------------- /screenshot/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/square.png -------------------------------------------------------------------------------- /screenshot/square2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/square2.png -------------------------------------------------------------------------------- /screenshot/cubic_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/cubic_filled.png -------------------------------------------------------------------------------- /screenshot/multi_lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/multi_lines.png -------------------------------------------------------------------------------- /screenshot/slide_select.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/slide_select.gif -------------------------------------------------------------------------------- /screenshot/animate_line1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/animate_line1.gif -------------------------------------------------------------------------------- /screenshot/animate_line2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/animate_line2.gif -------------------------------------------------------------------------------- /screenshot/fold_not_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/screenshot/fold_not_filled.png -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /leafchart/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | leafchart 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ico_popincome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineChen/LeafChart/HEAD/app/src/main/res/drawable-hdpi/ico_popincome.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LeafChart 3 | 4 | 5 | Hello blank fragment 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Mar 24 10:03:47 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /leafchart/src/main/java/com/beiing/leafchart/support/OnChartSelectedListener.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchart.support; 2 | 3 | /** 4 | * Created by Administrator on 2017/5/9. 5 | */ 6 | 7 | public interface OnChartSelectedListener { 8 | void onChartSelected(boolean isChartSelected); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #00000000 7 | 8 | -------------------------------------------------------------------------------- /leafchart/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_chart_in_fragment.xml: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /leafchart/src/main/java/com/beiing/leafchart/support/Chart.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchart.support; 2 | 3 | import com.beiing.leafchart.bean.Axis; 4 | 5 | /** 6 | * Created by chenliu on 2016/7/15.
7 | * 描述: 8 | *
9 | */ 10 | public interface Chart { 11 | 12 | void setAxisX(Axis axisX); 13 | 14 | void setAxisY(Axis axisY); 15 | 16 | Axis getAxisX(); 17 | 18 | Axis getAxisY(); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/test/java/com/beiing/leafchartdemo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchartdemo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants chartView. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /leafchart/src/test/java/com/beiing/leafchart/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchart; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants chartView. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/beiing/leafchartdemo/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchartdemo; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /leafchart/src/androidTest/java/com/beiing/leafchart/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchart; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /leafchart/src/main/java/com/beiing/leafchart/support/OnPointSelectListener.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchart.support; 2 | 3 | /** 4 | * Created by chenliu on 2016/12/12.
5 | * 描述: 6 | *
7 | */ 8 | public interface OnPointSelectListener { 9 | 10 | /** 11 | * @param position x轴位置 12 | * @param xLabel x轴对应刻度值 13 | * @param value 对应点数值 14 | */ 15 | void onPointSelect(int position, String xLabel, String value); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/beiing/leafchartdemo/ChartInFragmentActivity.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchartdemo; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | 6 | public class ChartInFragmentActivity extends AppCompatActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_chart_in_fragment); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /leafchart/src/main/java/com/beiing/leafchart/support/Mode.java: -------------------------------------------------------------------------------- 1 | package com.beiing.leafchart.support; 2 | 3 | /** 4 | * Created by chenliu on 2016/11/24.
5 | * 描述: 6 | *
7 | */ 8 | public interface Mode { 9 | /** 10 | * 交叉,x、y轴都超出0点 11 | */ 12 | int ACROSS = 1; 13 | 14 | /** 15 | * 相交, x、y轴交于0点 16 | */ 17 | int INTERSECT = 2; 18 | 19 | /** 20 | * x轴超出0点 21 | */ 22 | int X_ACROSS = 3; 23 | 24 | /** 25 | * y轴超出0点 26 | */ 27 | int Y_ACROSS = 4; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |