支持自由定制外观、手势旋转的雷达图表 android radarchart

Overview

RadarView

Download

一个可以自由定制、旋转交互的Android雷达图Lib

一些特性

  • 支持手势旋转(可关闭)

  • 支持动画的方式添加展现数据

  • 支持对各层雷达网添加背景

  • 支持自定义雷达网层数

  • 支持使用圆形作为雷达网

  • 扇区(顶点)个数无限制

  • 顶点描述支持图文混排

  • 支持添加多组数据

  • 数据区支持设置值的描述文字

  • 所有的文字、雷达网、线、数据区颜色和大小均可定制

how to use:

1. gradle

     compile 'q.rorbin:RadarView:1.0.4'

VERSION_CODE : here

2. xml

     <rorbin.q.radarview.RadarView
        android:id="@+id/radarView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

3. 属性说明

xml code 说明
app:radar_layer setLayer 雷达网层数
app:rotation_enable setRotationEnable 是否打开手势旋转
app:web_mode setWebMode 雷达网模式(多边形、圆形...)
app:max_value setMaxValue 最外圈的值
app:vertex_line_color setVertexLineColor 顶点连线颜色
app:vertex_line_width setVertexLineWidth 顶点连线宽度
app:layer_line_color setLayerLineColor 雷达网线条颜色
app:layer_line_width setLayerLineWidth 雷达网线条宽度
app:vertex_text setVertexText 顶点文字内容(字符串数组)
app:vertex_text_color setVertexTextColor 顶点文字颜色
app:vertex_text_size setVertexTextSize 顶点文字大小
app:vertex_icon_size setVertexIconSize 顶点图片的尺寸限制值
app:vertex_icon_position setVertexIconPosition 顶点图片相对于顶点文字的位置
app:vertex_icon_margin setVertexIconMargin 顶点图片相对于顶点文字的间距
app:vertex_text_offset setVertexTextOffset 顶点图文距最外层网偏移量
app:center_text_color setCenterTextColor 中心文字颜色
app:center_text_size setCenterTextSize 中心文字大小
app:center_text setCenterText 中心文字内容

注:各属性均有默认值

4. 方法说明

code 说明
setLayerColor 设置雷达网各层颜色
animeValue 展现一次数据添加动画
addData 添加数据
removeRadarData 删除一组数据
clearRadarData 删除所有数据
setEmptyHint 设置空数据时的提示
setMaxValue 设置数据区最大限制值
setMaxValues 设置数据区各顶点最大限制值
setVertexIconBitmap setVertexIconResid 设置顶点图片内容

5. 添加数据

  1. 创建并添加数据
List<Float> values = new ArrayList<>();
Collections.addAll(values, 3.2f, 6.7f, 2f, 7f, 5.6f);
RadarData data = new RadarData(values);
mRadarView.addData(data);
  1. 方法说明
code 说明
setLabel 数据的标注
setValue 设置(更改)数据值
 setLineWidth 设置边线宽度
 setValueText 数据值的描述
setValueTextEnable 是否显示描述
setValueTextSize 描述的文字大小
setVauleTextColor 描述的文字颜色

6. 更新计划

添加点击事件接口

LICENSE

Copyright 2016, RorbinQiu

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.
You might also like...
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#

Xamarin.Android Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#. Build Status Platform

A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

[] A fast PDF reader component for Android development
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

[] Define and render UI specs on top of your Android UI
[] Define and render UI specs on top of your Android UI

dspec A simple way to define and render UI specs on top of your Android UI. Usage Enclose the target UI with a DesignSpecFrameLayout, usually the root

A Material design Android pincode library. Supports Fingerprint.
A Material design Android pincode library. Supports Fingerprint.

LolliPin A Lollipop material design styled android pincode library (API 14+) To include in your project, add this to your build.gradle file: //Loll

Android Library to implement simple touch/tap/swipe gestures
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views
Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views

Decor Decor is a library that applies decorators to Android layout with additional attributes without the need to extend and create a custom View for

Comments
  • 属性动画内存溢出

    属性动画内存溢出

    stack size 8MB 出错堆栈

    1 rorbin.q.radarview.util.AnimeUtil$1.onAnimationUpdate(Unknown Source) 2 android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463) 3 android.animation.ValueAnimator.end(ValueAnimator.java:1155) 4 rorbin.q.radarview.util.AnimeUtil$1.onAnimationUpdate(Unknown Source) 5 android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463) 6 android.animation.ValueAnimator.end(ValueAnimator.java:1155) 7 rorbin.q.radarview.util.AnimeUtil$1.onAnimationUpdate(Unknown Source) 8 android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463) 9 android.animation.ValueAnimator.end(ValueAnimator.java:1155) 10 rorbin.q.radarview.util.AnimeUtil$1.onAnimationUpdate(Unknown Source) 11 android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463) 12 android.animation.ValueAnimator.end(ValueAnimator.java:1155) 13 rorbin.q.radarview.util.AnimeUtil$1.onAnimationUpdate(Unknown Source) 14 android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463) 15 android.animation.ValueAnimator.end(ValueAnimator.java:1155) 16 rorbin.q.radarview.util.AnimeUtil$1.onAnimationUpdate(Unknown Source) 17 android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463) 18 android.animation.ValueAnimator.end(ValueAnimator.java:1155) 19 rorbin.q.radarview.util.AnimeUtil$1.onAnimationUpdate(Unknown Source) 20 android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463)

    opened by arronvera 0
Releases(1.0.4)
  • 1.0.4(Oct 12, 2017)

    1、修复在ScrollView等可滑动的ViewGroup中无法触发手势旋转的问题 2、新增LayerLineColor、LayerLineWidth、VertexLineColor、VertexLineWidth属性,可单独设置雷达图顶点连线和各层连线的颜色与宽度,弃用RadarLineEnable、RadarLineWidth、RadarLineColor 3、RadarData新增setLineWidth用来设置数据区多边形外框线宽度

    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Oct 11, 2017)

    1、修复添加多组数据时,各组数据内容长度不同时的显示错误问题 2、修复初始顶点角度偏斜的问题 3、修复数据区即使达到最大值也无法充满整个雷达图的问题 4、顶点描述现在支持多种方式的图片+文字混排 5、添加给各顶点设置自己独立的最大值功能 6、添加设置中心描述文字功能

    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Mar 17, 2017)

Owner
Rorbin Qiu
Android developer
Rorbin Qiu
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

About MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and st

Feras Alnatsheh 1k Dec 20, 2022
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

Hannes Dorfmann 697 Dec 14, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022