Skip to content

Commit

Permalink
2.0.0-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
VinsonGuo committed Sep 28, 2018
1 parent ab8f535 commit ab0bf9f
Show file tree
Hide file tree
Showing 57 changed files with 118 additions and 143 deletions.
12 changes: 0 additions & 12 deletions MPChartLib/说明.txt

This file was deleted.

27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# android-kline

**基于MPAndroidChart的专业K线图**
**基于MPAndroidChart的K线图**

## 简介

Expand All @@ -15,17 +15,8 @@ android-kline是Android平台的金融图表库,包括**分时图**和**K线

![demo](art/new_chart.gif)

也可以[点击这里下载](https://github.com/gzw19931217/android-kline/raw/master/art/app-debug.apk)
也可以[点击这里下载](https://github.com/VinsonGuo/android-kline/raw/master/art/app-debug.apk)

## What's new

- 增加了MACD、KDJ指标的显示和切换
- 增加了五日的分时图
- 优化图表的缩放,可以进行放大和缩小操作(之前只支持在初始状态下的放大操作)
- 拼接图表的缩放功能(之前如果一个手指在K线图,另一个手指在交易量图的时候,图表是不可以缩放的)
- 全屏模式的示例
- 分时图增加涨跌幅的坐标,并且涨跌幅为0%时竖直居中显示
- K线图增加最大/最小值的显示

## 配置

Expand All @@ -39,7 +30,7 @@ android-kline是Android平台的金融图表库,包括**分时图**和**K线
}
}
dependencies {
compile com.github.gzw19931217:android-kline:1.0.2'
compile com.github.VinsonGuo:android-kline:2.0.0-alpha'
}
```

Expand All @@ -56,15 +47,15 @@ mTimeLineView.initData(hisData); // 初始化图表数据
**xml**

```xml
<com.guoziwei.klinelib.chart.KLineView
<com.vinsonguo.klinelib.chart.KLineView
android:id="@+id/kline"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
```


```xml
<com.guoziwei.klinelib.chart.TimeLineView
<com.vinsonguo.klinelib.chart.TimeLineView
android:id="@+id/timeline"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Expand Down Expand Up @@ -105,20 +96,16 @@ mTimeLineView.initData(hisData); // 初始化图表数据

**个性化**:如果需要配置颜色,可以到colors.xml中重写颜色的值。

## 反馈

欢迎各位提issues和PRs!

**联系方式**

_qq群: 629878453_
_qq群: 494309361_

_email: [email protected]_


## License

Copyright gzw19931217 <[email protected]>
Copyright VinsonGuo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 26

defaultConfig {
applicationId "com.guoziwei.kline"
applicationId "com.vinsonguo.kline"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
Expand Down Expand Up @@ -32,6 +32,6 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.android.support:design:26.1.0'
// implementation 'com.github.gzw19931217:android-kline:1.0.0'
// compile com.github.VinsonGuo:android-kline:2.0.0-alpha'
implementation project(':klinelib')
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.guoziwei.kline">
package="com.vinsonguo.kline">

<application
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;


import android.os.Bundle;
Expand All @@ -9,8 +9,8 @@
import android.view.View;
import android.view.ViewGroup;

import com.guoziwei.klinelib.chart.TimeLineView;
import com.guoziwei.klinelib.model.HisData;
import com.vinsonguo.klinelib.chart.TimeLineView;
import com.vinsonguo.klinelib.model.HisData;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;

import android.content.Context;
import android.content.Intent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;


import android.os.Bundle;
Expand All @@ -11,8 +11,8 @@
import android.widget.RadioButton;
import android.widget.RadioGroup;

import com.guoziwei.klinelib.chart.KLineView;
import com.guoziwei.klinelib.model.HisData;
import com.vinsonguo.klinelib.chart.KLineView;
import com.vinsonguo.klinelib.model.HisData;

import java.util.List;
import java.util.Timer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;

/**
* Created by dell on 2017/11/23.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;


import android.os.Bundle;
Expand All @@ -9,8 +9,8 @@
import android.view.View;
import android.view.ViewGroup;

import com.guoziwei.klinelib.chart.TimeLineView;
import com.guoziwei.klinelib.model.HisData;
import com.vinsonguo.klinelib.chart.TimeLineView;
import com.vinsonguo.klinelib.model.HisData;

import java.util.List;
import java.util.Timer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;

import android.content.Context;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.guoziwei.kline.model.KModel;
import com.guoziwei.kline.model.LineModel;
import com.guoziwei.klinelib.model.HisData;
import com.vinsonguo.kline.model.KModel;
import com.vinsonguo.kline.model.LineModel;
import com.vinsonguo.klinelib.model.HisData;

import java.io.BufferedReader;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline.model;
package com.vinsonguo.kline.model;

/**
* Created by Administrator on 2018/3/14 0014.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline.model;
package com.vinsonguo.kline.model;

/**
* Created by Administrator on 2018/3/14 0014.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline.view;
package com.vinsonguo.kline.view;

import android.content.Context;
import android.support.v4.view.ViewPager;
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_fullscreen_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.guoziwei.kline.MainActivity">
tools:context="com.vinsonguo.kline.MainActivity">

<android.support.design.widget.TabLayout
android:id="@+id/tab"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<com.guoziwei.kline.view.NoTouchScrollViewpager
<com.vinsonguo.kline.view.NoTouchScrollViewpager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.guoziwei.kline.MainActivity">
tools:context="com.vinsonguo.kline.MainActivity">

<android.support.design.widget.TabLayout
android:id="@+id/tab"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<com.guoziwei.kline.view.NoTouchScrollViewpager
<com.vinsonguo.kline.view.NoTouchScrollViewpager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_kline_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.guoziwei.klinelib.chart.KLineView
<com.vinsonguo.klinelib.chart.KLineView
android:id="@+id/kline"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.kline;
package com.vinsonguo.kline;

import org.junit.Test;

Expand Down
Binary file removed art/zsxq.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib;
package com.vinsonguo.klinelib;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
Expand Down
2 changes: 1 addition & 1 deletion klinelib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.guoziwei.klinelib"/>
package="com.vinsonguo.klinelib"/>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.content.Context;
import android.graphics.Canvas;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.graphics.Canvas;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.content.Context;
import android.graphics.Canvas;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.graphics.Canvas;
import android.graphics.Paint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.graphics.Canvas;
import android.graphics.Color;
Expand All @@ -19,7 +19,7 @@
import com.github.mikephil.charting.utils.Transformer;
import com.github.mikephil.charting.utils.Utils;
import com.github.mikephil.charting.utils.ViewPortHandler;
import com.guoziwei.klinelib.model.HisData;
import com.vinsonguo.klinelib.model.HisData;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.content.Context;
import android.support.annotation.Nullable;
Expand All @@ -14,9 +14,9 @@
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.utils.Transformer;
import com.guoziwei.klinelib.R;
import com.guoziwei.klinelib.model.HisData;
import com.guoziwei.klinelib.util.DateUtils;
import com.vinsonguo.klinelib.R;
import com.vinsonguo.klinelib.model.HisData;
import com.vinsonguo.klinelib.util.DateUtils;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.graphics.Canvas;
import android.graphics.Color;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.graphics.Canvas;
import android.graphics.Paint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.LinearLayout;

import com.github.mikephil.charting.charts.Chart;
import com.guoziwei.klinelib.model.HisData;
import com.vinsonguo.klinelib.model.HisData;

/**
* Created by dell on 2017/10/25.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.view.GestureDetector;
import android.view.MotionEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;

import android.graphics.Canvas;
import android.graphics.Paint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guoziwei.klinelib.chart;
package com.vinsonguo.klinelib.chart;


import android.graphics.Matrix;
Expand Down
Loading

0 comments on commit ab0bf9f

Please sign in to comment.