All Projects → whataa → Suitlines

whataa / Suitlines

[DEPRECATED]一个小巧且高效的线性图表组件。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Suitlines

Laravel View Models
View models in Laravel
Stars: ✭ 722 (-17.01%)
Mutual labels:  view
Croppy
Image Cropping Library for Android
Stars: ✭ 906 (+4.14%)
Mutual labels:  view
Html
HTML helper library
Stars: ✭ 8 (-99.08%)
Mutual labels:  view
Ringprogressbar
A material design circle the progress bar.
Stars: ✭ 789 (-9.31%)
Mutual labels:  view
Uuwaveview
[iOS]带有波形效果的UI控件,可自定义波形线条的数量、颜色、振幅、传播速度等各种参数。
Stars: ✭ 18 (-97.93%)
Mutual labels:  view
Graphview
Android GraphView is used to display data in graph structures.
Stars: ✭ 918 (+5.52%)
Mutual labels:  view
Windowimageview
An ImageView display in RecyclerView, looks like window.
Stars: ✭ 699 (-19.66%)
Mutual labels:  view
Tabulate
Table Maker for Modern C++
Stars: ✭ 862 (-0.92%)
Mutual labels:  view
Lvartisan
Laravel artisan command for creating view.
Stars: ✭ 18 (-97.93%)
Mutual labels:  view
Adaptablebottomnavigation
A simpler way for implementing the Bottom Navigation View on Android
Stars: ✭ 844 (-2.99%)
Mutual labels:  view
Cyltabbarcontroller
[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
Stars: ✭ 6,605 (+659.2%)
Mutual labels:  view
Drab
Remote controlled frontend framework for Phoenix.
Stars: ✭ 833 (-4.25%)
Mutual labels:  view
Partially useful
📑 👀 Helps identifying partials in verbose HTML source code.
Stars: ✭ 23 (-97.36%)
Mutual labels:  view
Creditcardview
💳 CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card.
Stars: ✭ 744 (-14.48%)
Mutual labels:  view
Dachshund Tab Layout
Extended Android Tab Layout with animated indicators that have continuous feedback.
Stars: ✭ 853 (-1.95%)
Mutual labels:  view
Oxchart
各种自定义图表库,使用简单,支持扩展
Stars: ✭ 715 (-17.82%)
Mutual labels:  view
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-97.47%)
Mutual labels:  view
Trianglelabelview
Show triangle view.
Stars: ✭ 870 (+0%)
Mutual labels:  view
Fingereyes Xr
FingerEyes-Xr for HTML5, A JavaScript library for building professional GIS System.
Stars: ✭ 9 (-98.97%)
Mutual labels:  view
Modelassistant
Elegant library to manage the interactions between view and model in Swift
Stars: ✭ 26 (-97.01%)
Mutual labels:  view

SuitLines Download

suitline是一个小巧且高效的线性图表组件。

image image

image image

更新历史

  • 2018/7/9

从本次提交开始,不再支持通过compile形式集成,建议直接拷贝源码到项目,方便自定义;

1. 修复被detach的情况下,重新attach到View时没有绘制的情况;
2. 支持显示y为负数的情况;
3. 新增y轴刻度辅助线显示,通过方法`setShowYGrid(boolean showYGrid)`开启或关闭;
  • 2017/5/21(v1.1.0)

    1. 修复BUG:#1,#7;
    2. 新增FILL形态时显示图表上边框线的属性coverLine,具体效果已添加至demo,通过方法setCoverLine(boolean enable)开启或关闭;

功能特性

suitline基于实用性目的而打造,相较于其它图表库,suitlines在多线段、性能体验以及视觉反馈等几个方面进行了支持和优化,使其更适合用于实际项目中。suitLines的所有特性如下:

  • 可以为line指定一或多种颜色;

  • 支持多条line;

  • 支持线段 / 曲线 / 虚线 相互切换;

  • 支持边缘拖动反馈效果;

  • 支持y轴自定义分隔区间、x轴自定义文本;

  • 支持点击反馈;

  • 美而不腻的动画;

使用步骤

注意:SuitLines需要项目的 API >= 14

1.集成

  • 第一种:通过build.gradle方式集成 [DEPRECATED]

    compile 'tech.linjiang:suitlines:1.1.0'
    
  • 第二种:直接下载源文件到项目。(推荐

    由于所有的逻辑代码都在SuitLines.java中且拥有丰富的注释,所以可以方便地按照实际业务需求来调整或改造。

2.在xml布局中调用:

<tech.linjiang.suitlines.SuitLines
    xmlns:line="http://schemas.android.com/apk/res-auto"
    android:id="@+id/suitlines"
    android:layout_width="match_parent"
    android:layout_height="200dp"
    line:xySize="8"
    line:xyColor="@color/colorAccent"
    line:lineType="curve"
    line:Style="solid"
    line:needEdgeEffect="true"
    line:colorEdgeEffect="@color/colorPrimaryDark"
    line:needClickHint="true"
    line:colorHint="@color/colorPrimary"
    line:maxOfVisible="7"
    line:countOfY="6"/>

所有可静态配置的属性如上,以下是其对应的动态设置方法及其它API:

静态属性 对应API 说明
xySize setXySize xy轴文字大小
xyColor setXyColor xy轴文字的颜色,包含轴线
lineType setLineType 指定line类型:CURVE / SEGMENT(曲线/线段)
Style setLineStyle 指定line的风格:DASHED / SOLID(虚线/实线)
needEdgeEffect disableEdgeEffect 关闭边缘效果,默认开启
colorEdgeEffect setEdgeEffectColor 指定边缘效果的颜色,默认为Color.GRAY
needClickHint disableClickHint 关闭点击提示信息,默认开启
colorHint setHintColor 设置提示辅助线、文字颜色
maxOfVisible / 一组数据在可见区域中的最大可见点数,至少>=2
countOfY / y轴刻度数,至少>=1
/ setLineSize 设置line在非填充形态时的大小
/ setLineForm 设置line的形态:是否填充,默认为false
/ setCoverLine 设置当line是FILL形态时,是否现在上边框线,默认false

3.填充数据

对于一条line,可以直接调用feed或feedWithAnim方法:

List<Unit> lines = new ArrayList<>();
for (int i = 0; i < 14; i++) {
    lines.add(new Unit(new SecureRandom().nextInt(48), i + ""));
}
suitLines.feedWithAnim(lines);

如果是多条数据,则需要通过Builder来实现:

SuitLines.LineBuilder builder = new SuitLines.LineBuilder();
for (int j = 0; j < count; j++) {
    List<Unit> lines = new ArrayList<>();
    for (int i = 0; i < 50; i++) {
        lines.add(new Unit(new SecureRandom().nextInt(128), "" + i));
    }
    builder.add(lines, new int[]{...});
}
builder.build(suitLines, true);

说明

感谢star或fork,若需要了解具体实现,请直接clone本工程,源码拥有丰富的注释说明。

有任何Bug或建议欢迎提issue或pull request,或者直接 反馈给我.

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].