├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── jdfw.gif │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ └── colors.xml │ │ │ ├── mipmap │ │ │ │ └── ic_launcher.jpg │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── mymarkerview.xml │ │ │ │ ├── activity_fix.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_kline.xml │ │ │ │ └── activity_minutes.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── yanjiang │ │ │ │ └── stockchart │ │ │ │ ├── inject │ │ │ │ ├── others │ │ │ │ │ ├── ApplicationScope.java │ │ │ │ │ ├── StringQuali.java │ │ │ │ │ ├── PerActivity.java │ │ │ │ │ ├── PerFragment.java │ │ │ │ │ └── PerService.java │ │ │ │ ├── component │ │ │ │ │ ├── FragmentComponent.java │ │ │ │ │ ├── ActivityComponent.java │ │ │ │ │ ├── ServiceComponent.java │ │ │ │ │ └── AppComponent.java │ │ │ │ └── modules │ │ │ │ │ ├── ActivityModule.java │ │ │ │ │ ├── AppModule.java │ │ │ │ │ ├── FragmentModule.java │ │ │ │ │ ├── ServiceModule.java │ │ │ │ │ └── ClientApiModule.java │ │ │ │ ├── bean │ │ │ │ ├── MinutesBean.java │ │ │ │ └── KLineBean.java │ │ │ │ ├── api │ │ │ │ ├── DownLoadApi.java │ │ │ │ ├── Constant.java │ │ │ │ └── ClientApi.java │ │ │ │ ├── mychart │ │ │ │ ├── MyXAxis.java │ │ │ │ ├── MyYAxis.java │ │ │ │ ├── MyBottomMarkerView.java │ │ │ │ ├── MyLeftMarkerView.java │ │ │ │ ├── MyRightMarkerView.java │ │ │ │ ├── MyYAxisRenderer.java │ │ │ │ └── CoupleChartGestureListener.java │ │ │ │ ├── rxutils │ │ │ │ ├── MyUtils.java │ │ │ │ ├── VolFormatter.java │ │ │ │ ├── FileUtils.java │ │ │ │ └── ExecutorManager.java │ │ │ │ ├── event │ │ │ │ └── ProgressUpdateEvent.java │ │ │ │ ├── interceptor │ │ │ │ ├── ProgressInterceptor.java │ │ │ │ ├── ProgressResponseBody.java │ │ │ │ └── LoggingInterceptor.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── application │ │ │ │ └── App.java │ │ │ │ ├── Test.java │ │ │ │ └── BaseActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── yanjiang │ │ │ └── stockchart │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── example │ │ └── yanjiang │ │ └── stockchart │ │ └── ApplicationTest.java └── build.gradle ├── MPChartLib ├── .gitignore ├── ic_launcher-web.png ├── .settings │ └── gradle │ │ └── org.springsource.ide.eclipse.gradle.core.prefs ├── src │ └── com │ │ └── github │ │ └── mikephil │ │ └── charting │ │ ├── interfaces │ │ ├── dataprovider │ │ │ ├── BubbleDataProvider.java │ │ │ ├── CandleDataProvider.java │ │ │ ├── ScatterDataProvider.java │ │ │ ├── LineDataProvider.java │ │ │ ├── BarDataProvider.java │ │ │ ├── BarLineScatterCandleBubbleDataProvider.java │ │ │ └── ChartInterface.java │ │ └── datasets │ │ │ ├── IBarLineScatterCandleBubbleDataSet.java │ │ │ ├── IBubbleDataSet.java │ │ │ ├── IRadarDataSet.java │ │ │ ├── IScatterDataSet.java │ │ │ ├── ILineScatterCandleRadarDataSet.java │ │ │ ├── ILineRadarDataSet.java │ │ │ ├── IPieDataSet.java │ │ │ ├── IBarDataSet.java │ │ │ ├── ICandleDataSet.java │ │ │ └── ILineDataSet.java │ │ ├── formatter │ │ ├── ColorFormatter.java │ │ ├── DefaultXAxisValueFormatter.java │ │ ├── YAxisValueFormatter.java │ │ ├── FillFormatter.java │ │ ├── XAxisValueFormatter.java │ │ ├── DefaultYAxisValueFormatter.java │ │ ├── PercentFormatter.java │ │ ├── DefaultFillFormatter.java │ │ ├── ValueFormatter.java │ │ ├── DefaultValueFormatter.java │ │ ├── StackedValueFormatter.java │ │ └── LargeValueFormatter.java │ │ ├── exception │ │ └── DrawingDataSetNotCreatedException.java │ │ ├── animation │ │ └── EasingFunction.java │ │ ├── listener │ │ ├── OnDrawLineChartTouchListener.java │ │ ├── OnChartValueSelectedListener.java │ │ ├── OnDrawListener.java │ │ └── OnChartGestureListener.java │ │ ├── utils │ │ ├── EntryXIndexComparator.java │ │ ├── PointD.java │ │ ├── FSize.java │ │ ├── SelectionDetail.java │ │ └── TransformerHorizontalBarChart.java │ │ ├── data │ │ ├── realm │ │ │ ├── implementation │ │ │ │ ├── RealmPieData.java │ │ │ │ ├── RealmBarData.java │ │ │ │ ├── RealmLineData.java │ │ │ │ ├── RealmRadarData.java │ │ │ │ ├── RealmBubbleData.java │ │ │ │ ├── RealmCandleData.java │ │ │ │ └── RealmScatterData.java │ │ │ └── base │ │ │ │ ├── RealmUtils.java │ │ │ │ ├── RealmBarLineScatterCandleBubbleDataSet.java │ │ │ │ └── RealmLineRadarDataSet.java │ │ ├── BarLineScatterCandleBubbleData.java │ │ ├── BarLineScatterCandleBubbleDataSet.java │ │ ├── CandleData.java │ │ ├── RadarData.java │ │ ├── LineData.java │ │ ├── BubbleEntry.java │ │ ├── BubbleData.java │ │ ├── ScatterData.java │ │ ├── PieData.java │ │ ├── BarData.java │ │ └── LineRadarDataSet.java │ │ ├── jobs │ │ ├── MoveViewJob.java │ │ ├── AnimatedMoveViewJob.java │ │ ├── ViewPortJob.java │ │ ├── AnimatedViewPortJob.java │ │ ├── ZoomJob.java │ │ └── AnimatedZoomJob.java │ │ ├── buffer │ │ ├── ScatterBuffer.java │ │ ├── AbstractBuffer.java │ │ └── HorizontalBarBuffer.java │ │ ├── highlight │ │ ├── Range.java │ │ ├── CombinedHighlighter.java │ │ └── HorizontalBarHighlighter.java │ │ ├── charts │ │ ├── CandleStickChart.java │ │ ├── LineChart.java │ │ ├── ScatterChart.java │ │ └── BubbleChart.java │ │ ├── renderer │ │ ├── Renderer.java │ │ ├── XAxisRendererRadarChart.java │ │ ├── LineScatterCandleRadarRenderer.java │ │ ├── LineRadarRenderer.java │ │ └── AxisRenderer.java │ │ └── components │ │ └── MarkerView.java ├── AndroidManifest.xml ├── project.properties ├── proguard-project.txt ├── build.gradle └── pom.xml ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── encodings.xml ├── modules.xml ├── runConfigurations.xml ├── misc.xml └── gradle.xml ├── README.md ├── .gitignore ├── gradle.properties ├── StockChart2.iml ├── StockChart-master.iml ├── StockChart.iml └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /MPChartLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':MPChartLib' 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/jdfw.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndroidJiang/StockChart/HEAD/app/src/main/res/jdfw.gif -------------------------------------------------------------------------------- /MPChartLib/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndroidJiang/StockChart/HEAD/MPChartLib/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | StockChart 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndroidJiang/StockChart/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap/ic_launcher.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndroidJiang/StockChart/HEAD/app/src/main/res/mipmap/ic_launcher.jpg -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/inject/others/ApplicationScope.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.inject.others; 2 | 3 | import javax.inject.Scope; 4 | 5 | @Scope 6 | public @interface ApplicationScope { 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jun 23 11:02:05 CST 2016 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-2.10-all.zip 7 | 8 | -------------------------------------------------------------------------------- /MPChartLib/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs: -------------------------------------------------------------------------------- 1 | #org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences 2 | #Mon Jan 18 23:02:46 CET 2016 3 | org.springsource.ide.eclipse.gradle.linkedresources= 4 | org.springsource.ide.eclipse.gradle.rootprojectloc=.. 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 若本demo不能满足您的需要 2 | 3 | - **商业版 K 线图源码**:功能更加完善,满足更高需求。 4 | - **定制开发服务**:如果商业版仍无法满足您的特定需求,我们可以提供您定制开发服务。 5 | 6 | 如需咨询或获取更多详情,请添加我的wx联系方式:**1025065158**。 7 | 8 | ### 商业版演示 9 | 请添加图片描述 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/inject/others/StringQuali.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.inject.others; 2 | 3 | import javax.inject.Qualifier; 4 | 5 | /** 6 | * Created by yanjiang on 2016/3/28. 7 | */ 8 | @Qualifier 9 | 10 | public @interface StringQuali { 11 | String value() default ""; 12 | } 13 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/interfaces/dataprovider/BubbleDataProvider.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.interfaces.dataprovider; 2 | 3 | import com.github.mikephil.charting.data.BubbleData; 4 | 5 | public interface BubbleDataProvider extends BarLineScatterCandleBubbleDataProvider { 6 | 7 | BubbleData getBubbleData(); 8 | } 9 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/interfaces/dataprovider/CandleDataProvider.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.interfaces.dataprovider; 2 | 3 | import com.github.mikephil.charting.data.CandleData; 4 | 5 | public interface CandleDataProvider extends BarLineScatterCandleBubbleDataProvider { 6 | 7 | CandleData getCandleData(); 8 | } 9 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/interfaces/dataprovider/ScatterDataProvider.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.interfaces.dataprovider; 2 | 3 | import com.github.mikephil.charting.data.ScatterData; 4 | 5 | public interface ScatterDataProvider extends BarLineScatterCandleBubbleDataProvider { 6 | 7 | ScatterData getScatterData(); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/inject/others/PerActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.inject.others; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Scope; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Scope 10 | @Retention(RUNTIME) 11 | public @interface PerActivity { 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/inject/others/PerFragment.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.inject.others; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Scope; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Scope 10 | @Retention(RUNTIME) 11 | public @interface PerFragment { 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/inject/others/PerService.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.inject.others; 2 | 3 | import java.lang.annotation.Retention; 4 | 5 | import javax.inject.Scope; 6 | 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Scope 10 | @Retention(RUNTIME) 11 | public @interface PerService { 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /app/app-release.apk 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | /.idea/ 10 | /MPChartLib/MPChartLib.iml 11 | /MPChartLib/proguard-project.txt 12 | /MPChartLib/pom.xml 13 | /MPChartLib/project.properties 14 | /gradle.properties 15 | /gradlew 16 | /gradlew.bat 17 | /StockChart2.iml 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/bean/MinutesBean.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.bean; 2 | 3 | 4 | public class MinutesBean { 5 | public String time; 6 | public float cjprice; 7 | public float cjnum; 8 | public float avprice = Float.NaN; 9 | public float per; 10 | public float cha; 11 | public float total; 12 | public int color = 0xff000000; 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/bean/KLineBean.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.bean; 2 | 3 | /** 4 | * author:ajiang 5 | * mail:1025065158@qq.com 6 | * blog:http://blog.csdn.net/qqyanjiang 7 | */ 8 | public class KLineBean { 9 | public String date; 10 | public float open; 11 | public float close; 12 | public float high; 13 | public float low; 14 | public float vol; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/test/java/com/example/yanjiang/stockchart/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart; 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 view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MPChartLib/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/formatter/ColorFormatter.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.formatter; 2 | 3 | import com.github.mikephil.charting.data.Entry; 4 | 5 | /** 6 | * Interface that can be used to return a customized color instead of setting 7 | * colors via the setColor(...) method of the DataSet. 8 | * 9 | * @author Philipp Jahoda 10 | */ 11 | public interface ColorFormatter { 12 | 13 | int getColor(Entry e, int index); 14 | } -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/interfaces/dataprovider/LineDataProvider.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.interfaces.dataprovider; 2 | 3 | import com.github.mikephil.charting.components.YAxis; 4 | import com.github.mikephil.charting.data.LineData; 5 | 6 | public interface LineDataProvider extends BarLineScatterCandleBubbleDataProvider { 7 | 8 | LineData getLineData(); 9 | 10 | YAxis getAxis(YAxis.AxisDependency dependency); 11 | } 12 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/interfaces/dataprovider/BarDataProvider.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.interfaces.dataprovider; 2 | 3 | import com.github.mikephil.charting.data.BarData; 4 | 5 | public interface BarDataProvider extends BarLineScatterCandleBubbleDataProvider { 6 | 7 | BarData getBarData(); 8 | boolean isDrawBarShadowEnabled(); 9 | boolean isDrawValueAboveBarEnabled(); 10 | boolean isDrawHighlightArrowEnabled(); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/example/yanjiang/stockchart/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart; 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 | } -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/exception/DrawingDataSetNotCreatedException.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.exception; 2 | 3 | public class DrawingDataSetNotCreatedException extends RuntimeException { 4 | 5 | /** 6 | * 7 | */ 8 | private static final long serialVersionUID = 1L; 9 | 10 | public DrawingDataSetNotCreatedException() { 11 | super("Have to create a new drawing set first. Call ChartData's createNewDrawingDataSet() method"); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/api/DownLoadApi.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.api; 2 | 3 | import okhttp3.ResponseBody; 4 | import retrofit2.http.GET; 5 | import retrofit2.http.Streaming; 6 | import rx.Observable; 7 | 8 | /** 9 | * Created by yanjiang on 2016/4/20. 10 | * 恩恩 11 | */ 12 | public interface DownLoadApi { 13 | /*http://7xrnuc.com1.z0.glb.clouddn.com/out.apatch*/ 14 | @Streaming 15 | @GET("out.apatch") 16 | Observable getDownApk(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/animation/EasingFunction.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.animation; 2 | 3 | import android.animation.TimeInterpolator; 4 | import android.annotation.SuppressLint; 5 | 6 | /** 7 | * Interface for creating custom made easing functions. Uses the 8 | * TimeInterpolator interface provided by Android. 9 | */ 10 | @SuppressLint("NewApi") 11 | public interface EasingFunction extends TimeInterpolator { 12 | 13 | @Override 14 | float getInterpolation(float input); 15 | } 16 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/listener/OnDrawLineChartTouchListener.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.listener; 2 | 3 | import android.view.GestureDetector.SimpleOnGestureListener; 4 | import android.view.MotionEvent; 5 | import android.view.View; 6 | import android.view.View.OnTouchListener; 7 | 8 | public class OnDrawLineChartTouchListener extends SimpleOnGestureListener implements OnTouchListener { 9 | 10 | @Override 11 | public boolean onTouch(View v, MotionEvent event) { 12 | return false; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.interfaces.datasets; 2 | 3 | import com.github.mikephil.charting.data.Entry; 4 | 5 | /** 6 | * Created by philipp on 21/10/15. 7 | */ 8 | public interface IBarLineScatterCandleBubbleDataSet extends IDataSet { 9 | 10 | /** 11 | * Returns the color that is used for drawing the highlight indicators. 12 | * 13 | * @return 14 | */ 15 | int getHighLightColor(); 16 | } 17 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/utils/EntryXIndexComparator.java: -------------------------------------------------------------------------------- 1 | package com.github.mikephil.charting.utils; 2 | 3 | import com.github.mikephil.charting.data.Entry; 4 | 5 | import java.util.Comparator; 6 | 7 | /** 8 | * Comparator for comparing Entry-objects by their x-index. 9 | * Created by philipp on 17/06/15. 10 | */ 11 | public class EntryXIndexComparator implements Comparator { 12 | @Override 13 | public int compare(Entry entry1, Entry entry2) { 14 | return entry1.getXIndex() - entry2.getXIndex(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/mymarkerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 13 | 14 | -------------------------------------------------------------------------------- /MPChartLib/src/com/github/mikephil/charting/utils/PointD.java: -------------------------------------------------------------------------------- 1 | 2 | package com.github.mikephil.charting.utils; 3 | 4 | /** 5 | * Point encapsulating two double values. 6 | * 7 | * @author Philipp Jahoda 8 | */ 9 | public class PointD { 10 | 11 | public double x; 12 | public double y; 13 | 14 | public PointD(double x, double y) { 15 | this.x = x; 16 | this.y = y; 17 | } 18 | 19 | /** 20 | * returns a string representation of the object 21 | */ 22 | @Override 23 | public String toString() { 24 | return "PointD, x: " + x + ", y: " + y; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/inject/component/FragmentComponent.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.inject.component; 2 | 3 | import android.app.Activity; 4 | 5 | import com.example.yanjiang.stockchart.inject.modules.FragmentModule; 6 | import com.example.yanjiang.stockchart.inject.others.PerFragment; 7 | 8 | import dagger.Component; 9 | 10 | @PerFragment 11 | @Component(modules = FragmentModule.class, dependencies = AppComponent.class) 12 | public interface FragmentComponent { 13 | 14 | Activity getActivity(); 15 | 16 | // void inject(BaseFragment mBaseFragment); 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/yanjiang/stockchart/mychart/MyXAxis.java: -------------------------------------------------------------------------------- 1 | package com.example.yanjiang.stockchart.mychart; 2 | 3 | import android.util.SparseArray; 4 | 5 | import com.github.mikephil.charting.components.XAxis; 6 | 7 | /** 8 | * author:ajiang 9 | * mail:1025065158@qq.com 10 | * blog:http://blog.csdn.net/qqyanjiang 11 | */ 12 | public class MyXAxis extends XAxis { 13 | private SparseArray labels; 14 | public SparseArray getXLabels() { 15 | return labels; 16 | } 17 | public void setXLabels(SparseArray labels) { 18 | this.labels = labels; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_fix.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 |