图表控件

Jgraph

项目地址: mychoices/Jgraph
简介:图表控件

License  

      

  1. Gradle
  2. Demo
  3. Use Guide
    1. 图表风格
    2. 滚动
    3. 纵轴
    4. 柱-动画
    5. 柱-颜色
    6. 线-动画
    7. 线-风格
    8. 线-断 0
    9. 线-颜色
    10. 选中
    11. 切换数据
  4. Versions
  5. Todo
  6. License

Gradle

allprojects {
        repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}
dependencies {
    compile 'com.github.mychoices:Jgraph:v1.2'
}

DEMO

demo 下载地址 

User Guide


自定义属性

<attr name="graphstyle" format="enum">
    <enum name="bar" value="0"/>
    <enum name="line" value="1"/>
</attr>
<attr name="scrollable" format="boolean"/>  
<attr name="visiblenums" format="integer"/>
<attr name="showymsg" format="boolean"/>
<attr name="normolcolor" format="color"/>
<attr name="activationcolor" format="color"/>
<attr name="linestyle" format="enum">
    <!--折线-->
    <enum name="broken" value="0"/>
    <!--曲线-->
    <enum name="curve" value="1"/>
</attr>
<attr name="linemode" format="enum">
    <!--链接每一个点-->
    <enum name="everypoint" value="1"/>
    <!--跳过 0 的点-->
    <enum name="jump0" value="2"/>
    <!--跳过的 0 点用虚线链接-->
    <enum name="dash0" value="3"/>
</attr>
<attr name="linewidth" format="dimension"/>
<attr name="lineshowstyle" format="enum">
    <enum name="drawing" value="0"/>
    <enum name="section" value="1"/>
    <enum name="fromline" value="2"/>
    <enum name="fromcorner" value="3"/>
    <enum name="aswave" value="4"/>
</attr>

GraphStyle

setGraphStyle(@GraphStyle int graphStyle) //柱状图 和 折线图

Scrollable

setScrollAble(boolean )

纵轴

setYaxisValues(@NonNull String... showMsg)
setYaxisValues(int max, int showYnum)
setYaxisValues(int min, int max, int showYnum)

BarShowStyle

setBarShowStyle(@BarShowStyle int barShowStyle)
/**
 * 水波 方式生长
 */
int BARSHOW_ASWAVE 
/**
 * 线条 一从直线慢慢变成折线/曲线
 */
int BARSHOW_FROMLINE 
/**
 * 柱形条 由某个往外扩散
 */
int BARSHOW_EXPAND 

/**
 * 一段一段显示
 */
int BARSHOW_SECTION

barcolor

setNormalColor(@ColorInt int normalColor)
setPaintShaderColors(@ColorInt int... colors)

LineStyle

setLineStyle(@LineStyle int lineStyle)
/**
 * 折线
 */
int LINE_BROKEN = 0;
/**
 * 曲线
 */
int LINE_CURVE = 1;

LineShowStyle

setLineShowStyle(@LineShowStyle int lineShowStyle)

/**
 * 线条从无到有 慢慢出现
 */
int LINESHOW_DRAWING 
/**
 * 线条 一段一段显示
 */
int LINESHOW_SECTION 
/**
 * 线条 一从直线慢慢变成折线/曲线
 */
int LINESHOW_FROMLINE 

/**
 * 从左上角 放大
 */
int LINESHOW_FROMCORNER 
/**
 * 水波 方式展开
 */
int LINESHOW_ASWAVE

LineMode

setLineMode(@LineMode int lineMode)
/**
 * 连接每一个点
 */
int LINE_EVERYPOINT 
/**
 * 跳过 0  断开
 */
int LINE_JUMP0 

/**
 * 跳过 0 用虚线链接
 */
int LINE_DASH_0

linecolor

setNormalColor(@ColorInt int normalColor)
setPaintShaderColors(@ColorInt int... colors)
setShaderAreaColors(@ColorInt int... colors)

select

setSelected(int selected)
setSelectedMode(@SelectedMode int selectedMode)

datachange

aniChangeData(List<Jchart> jchartList)

Versions

Todo

Todo

License

Copyright 2016 Yun

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值