Skip to content

Commit 1a44a16

Browse files
committed
readme
1 parent 392fc34 commit 1a44a16

File tree

24 files changed

+204
-340
lines changed

24 files changed

+204
-340
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
*.iml
22
.gradle
33
/local.properties
4-
/.idea/workspace.xml
5-
.idea/libraries
4+
.idea/*
65
.DS_Store
76
/build
87
/captures
98
gradle.properties
109
gradlew
1110
gradlew.bat
1211
test
12+
*/.idea/*
1313
gradle

README.md

Lines changed: 118 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
![](https://img.shields.io/badge/Jgraph-download-brightgreen.svg?style=flat-square)
44
[![Release](https://jitpack.io/v/org.bitbucket.User/Repo.svg?style=flat-square)](https://jitpack.io/#org.bitbucket.User/Repo)
55

6-
6+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/2.gif)
7+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/4.gif)
8+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/6.gif)
9+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/13.gif)
10+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/15.gif)
11+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/22.gif)
712

813
2. [Gradle](https://github.com/mychoices/Jgraph/blob/master/README.md#gradle)
914
3. [Demo](https://github.com/mychoices/Jgraph/blob/master/README.md#demo)
@@ -38,27 +43,131 @@ demo下载地址
3843

3944
## GraphStyle
4045

46+
```
47+
setGraphStyle(@GraphStyle int graphStyle) //柱状图 和 折线图
48+
```
49+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/01.gif)
4150
## Scrollable
42-
51+
```
52+
setScrollAble(boolean )
53+
```
54+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/02.gif)
4355
## 纵轴
4456

57+
```
58+
setYaxisValues(@NonNull String... showMsg)
59+
setYaxisValues(int max, int showYnum)
60+
setYaxisValues(int min, int max, int showYnum)
61+
```
62+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/03.gif)
63+
4564
## BarShowStyle
65+
```
66+
setBarShowStyle(@BarShowStyle int barShowStyle)
67+
/**
68+
* 水波 方式生长
69+
*/
70+
int BARSHOW_ASWAVE
71+
/**
72+
* 线条 一从直线慢慢变成折线/曲线
73+
*/
74+
int BARSHOW_FROMLINE
75+
/**
76+
* 柱形条 由某个往外扩散
77+
*/
78+
int BARSHOW_EXPAND
79+
80+
/**
81+
* 一段一段显示
82+
*/
83+
int BARSHOW_SECTION
84+
```
85+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/04.gif)
4686

4787
## barcolor
48-
49-
50-
## LineShowStyle
51-
88+
```
89+
setNormalColor(@ColorInt int normalColor)
90+
setPaintShaderColors(@ColorInt int... colors)
91+
```
92+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/05.gif)
5293
## LineStyle
53-
94+
```
95+
setLineStyle(@LineStyle int lineStyle)
96+
/**
97+
* 折线
98+
*/
99+
int LINE_BROKEN = 0;
100+
/**
101+
* 曲线
102+
*/
103+
int LINE_CURVE = 1;
104+
```
105+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/06.gif)
106+
## LineShowStyle
107+
```
108+
setLineShowStyle(@LineShowStyle int lineShowStyle)
109+
110+
/**
111+
* 线条从无到有 慢慢出现
112+
*/
113+
int LINESHOW_DRAWING
114+
/**
115+
* 线条 一段一段显示
116+
*/
117+
int LINESHOW_SECTION
118+
/**
119+
* 线条 一从直线慢慢变成折线/曲线
120+
*/
121+
int LINESHOW_FROMLINE
122+
123+
/**
124+
* 从左上角 放大
125+
*/
126+
int LINESHOW_FROMCORNER
127+
/**
128+
* 水波 方式展开
129+
*/
130+
int LINESHOW_ASWAVE
131+
```
132+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/07.gif)
54133
## LineMode
134+
```
135+
setLineMode(@LineMode int lineMode)
136+
/**
137+
* 连接每一个点
138+
*/
139+
int LINE_EVERYPOINT
140+
/**
141+
* 跳过0 断开
142+
*/
143+
int LINE_JUMP0
144+
145+
/**
146+
* 跳过0 用虚线链接
147+
*/
148+
int LINE_DASH_0
149+
```
150+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/08.gif)
55151

56152
## linecolor
57-
153+
```
154+
setNormalColor(@ColorInt int normalColor)
155+
setPaintShaderColors(@ColorInt int... colors)
156+
setShaderAreaColors(@ColorInt int... colors)
157+
```
158+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/09.gif)
58159
## select
160+
```
161+
setSelected(int selected)
162+
setSelectedMode(@SelectedMode int selectedMode)
163+
```
164+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/010.gif)
59165

60166
# datachange
61-
167+
```
168+
aniChangeData(List<Jchart> jchartList)
169+
```
170+
![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/011.gif)
62171

63172
# Versions
64173

app/src/main/java/com/jonas/schart/ChartActivity.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ protected void onCreate(Bundle savedInstanceState){
4343
// lines.add(new Jchart(10,new SecureRandom().nextInt(50) + 15,"test", Color.parseColor("#b8e986")));
4444
}
4545
// lines.get(new SecureRandom().nextInt(chartNum-1)).setUpper(0);
46-
// lines.get(1).setUpper(0);
47-
// lines.get(new SecureRandom().nextInt(chartNum-1)).setLower(10);
48-
// lines.get(chartNum-2).setUpper(0);
46+
lines.get(1).setUpper(0);
47+
lines.get(new SecureRandom().nextInt(chartNum-1)).setLower(10);
48+
lines.get(chartNum-2).setUpper(0);
4949
// mLineChar.setScrollAble(true);
50-
mLineChar.setVisibleNums(10);
50+
// mLineChar.setLineMode();
5151
mLineChar.setLinePointRadio((int)mLineChar.getLineWidth());
5252
// mLineChar.setLineMode(JcoolGraph.LineMode.LINE_DASH_0);
5353
// mLineChar.setLineStyle(JcoolGraph.LineStyle.LINE_BROKEN);
5454

5555
// mLineChar.setYaxisValues("test","测试","text");
5656
// mLineChar.setSelectedMode(BaseGraph.SelectedMode.SELECETD_MSG_SHOW_TOP);
57-
// mLineChar.setShaderAreaColors(Color.parseColor("#4B494B"),Color.TRANSPARENT);
57+
// mLineChar.setShaderAreaColors(Color.parseColor("#4B494B"),Color.TRANSPARENT);
5858
// mLineChar.setPaintShaderColors(Color.parseColor("#80ff3320"), Color.parseColor("#ffbf55"), Color.parseColor("#f7eb57"), Color.parseColor("#b8e986"), Color.parseColor("#73c0fd"));
5959
mLineChar.setNormalColor(Color.parseColor("#676567"));
6060
// mLineChar.setShowFromMode(JcoolGraph.ShowFromMode.SHOWFROMBUTTOM);
@@ -98,7 +98,7 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked){
9898
if(isChecked) {
9999
mLineChar.setLineMode(JcoolGraph.LineMode.LINE_DASH_0);
100100
}else {
101-
mLineChar.setLineMode(JcoolGraph.LineMode.LINE_EVERYPOINT);
101+
mLineChar.setLineMode(JcoolGraph.LineMode.LINE_JUMP0);
102102
}
103103
break;
104104
case R.id.select:

app/src/main/java/com/jonas/schart/RecyclerHolder.java

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

gif/01.gif

196 KB
Loading

gif/010.gif

89 KB
Loading

gif/011.gif

406 KB
Loading

gif/02.gif

229 KB
Loading

gif/03.gif

88.4 KB
Loading

gif/04.gif

259 KB
Loading

0 commit comments

Comments
 (0)