#HelloCharts for Android
Charting library for Android compatible with API 8+(Android 2.2).
Works best when hardware acceleration is available, so API 14+(Android 4.0) is recommended.
Apache License 2.0.
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-HelloCharts%20for%20Android-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1068)
<a href="https://scan.coverity.com/projects/4121">
<img alt="Coverity Scan Build Status"
src="https://scan.coverity.com/projects/4121/badge.svg"/>
</a>
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.lecho/hellocharts-library/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.lecho/hellocharts-library)
[![Release](https://img.shields.io/github/release/lecho/hellocharts-android.svg?label=JitPack.io)](https://jitpack.io/#lecho/hellocharts-android)
##Features
- Line chart(cubic lines, filled lines, scattered points)
- Column chart(grouped, stacked, negative values)
- Pie chart
- Bubble chart
- Combo chart(columns/lines)
- Preview charts(for column chart and line chart)
- Zoom(pinch to zoom, double tap zoom), scroll and fling
- Custom and auto-generated axes(top, bottom, left, right, inside)
- Animations
##Screens and Demos
- Code of a demo application is in `hellocharts-samples` directory, requires appcompat v21.
- The **demo app** is also ready for download on [**Google Play**](https://play.google.com/store/apps/details?id=lecho.lib.hellocharts.samples).
- Short **video** is available on [**YouTube**](https://www.youtube.com/watch?v=xbSBjyjH2SY).
![](screens/scr_dependecy_preview.gif)
![](screens/scr-tempo.png)
![](screens/scr-dependency.png)
![](screens/scr-preview-column.png)
![](screens/scr-pie1.png)
![](screens/scr-bubble1.png)
![](screens/scr-combo.png)
##Download and Import
####Android Studio/Gradle
- Maven Central/jCenter, add dependency to your `build.gradle`:
```groovy
dependencies{
compile 'com.github.lecho:hellocharts-library:1.5.8@aar'
}
```
- JitPack.io, add `jitpack.io` repositiory and dependency to your `build.gradle`:
```groovy
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.github.lecho:hellocharts-android:v1.5.8'
}
```
####Eclipse/ADT
- Download the latest [release jar file](https://github.com/lecho/hellocharts-android/releases).
- Copy `hellocharts-library-<version>.jar` into the `libs` folder of your application project.
##Usage
Every chart view can be defined in layout xml file:
```xml
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="match_parent" />
```
or created in code and added to layout later:
```java
LineChartView chart = new LineChartView(context);
layout.addView(chart);
```
Use methods from *Chart classes to define chart behaviour, example methods:
```java
Chart.setInteractive(boolean isInteractive);
Chart.setZoomType(ZoomType zoomType);
Chart.setContainerScrollEnabled(boolean isEnabled, ContainerScrollType type);
```
Use methods from data models to define how chart looks like, example methods:
```java
ChartData.setAxisXBottom(Axis axisX);
ColumnChartData.setStacked(boolean isStacked);
Line.setStrokeWidth(int strokeWidthDp);
```
Every chart has its own method to set chart data and its own data model, example for line chart:
```java
List<PointValue> values = new ArrayList<PointValue>();
values.add(new PointValue(0, 2));
values.add(new PointValue(1, 4));
values.add(new PointValue(2, 3));
values.add(new PointValue(3, 4));
//In most cased you can call data model methods in builder-pattern-like manner.
Line line = new Line(values).setColor(Color.BLUE).setCubic(true);
List<Line> lines = new ArrayList<Line>();
lines.add(line);
LineChartData data = new LineChartData();
data.setLines(lines);
LineChartView chart = new LineChartView(context);
chart.setLineChartData(data);
```
After the chart data has been set you can still modify its attributes but right after that you should call
`set*ChartData()` method again to let chart recalculate and redraw data. There is also an option to use copy constructor for deep copy of
chart data. You can safely modify copy in other threads and pass it to `set*ChartData()` method later.
##Contributing
Yes:) If you found a bug, have an idea how to improve library or have a question, please create new issue or comment existing one. If you would like to contribute code fork the repository and send a pull request.
#License
HelloCharts
Copyright 2014 Leszek Wach
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.
---
HelloCharts library uses code from InteractiveChart sample available
on Android Developers page:
http://developer.android.com/training/gestures/scale.html
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
android 最新公司开源框架 (2000个子文件)
hellocharts-library-debug.aar 144KB
hellocharts-library-release.aar 143KB
MediaSessionCompat.aidl 787B
MediaSessionCompat.aidl 787B
ParcelableVolumeInfo.aidl 689B
ParcelableVolumeInfo.aidl 689B
PlaybackStateCompat.aidl 688B
PlaybackStateCompat.aidl 688B
MediaMetadataCompat.aidl 680B
MediaMetadataCompat.aidl 680B
ResultReceiver.aidl 675B
ResultReceiver.aidl 675B
RatingCompat.aidl 673B
RatingCompat.aidl 673B
resources-debug.ap_ 538KB
resources-debug-androidTest.ap_ 776B
resources-debug-androidTest.ap_ 765B
hellocharts-samples-debug.apk 1.33MB
hellocharts-samples-debug-unaligned.apk 1.33MB
gradlew.bat 2KB
fileSnapshots.bin 748KB
fileHashes.bin 153KB
taskArtifacts.bin 74KB
localClassSetAnalysis.bin 62KB
localClassSetAnalysis.bin 52KB
localClassSetAnalysis.bin 52KB
outputFileStates.bin 22KB
localJarClasspathSnapshot.bin 19KB
localJarClasspathSnapshot.bin 19KB
localJarClasspathSnapshot.bin 19KB
ViewPager.class 51KB
FragmentManagerImpl.class 45KB
AppCompatDelegateImplV7.class 39KB
SearchView.class 36KB
Toolbar.class 36KB
BackStackRecord.class 35KB
DrawerLayout.class 34KB
NestedScrollView.class 32KB
WindowDecorActionBar.class 30KB
Fragment.class 29KB
MenuBuilder.class 28KB
SlidingPaneLayout.class 27KB
LinearLayoutCompat.class 25KB
SwitchCompat.class 24KB
AccessibilityNodeInfoCompat.class 24KB
SwipeRefreshLayout.class 24KB
ListPopupWindow.class 22KB
VectorDrawableCompat.class 22KB
AppCompatDrawableManager.class 22KB
ViewDragHelper.class 21KB
MediaSessionCompat$MediaSessionImplBase.class 21KB
FragmentActivity.class 21KB
ActionBarOverlayLayout.class 20KB
R$styleable.class 20KB
R$styleable.class 20KB
R$style.class 20KB
R$style.class 20KB
SuggestionsAdapter.class 19KB
ActionMenuPresenter.class 19KB
ToolbarWidgetWrapper.class 18KB
ToolbarActionBar.class 18KB
ViewCompat.class 18KB
AlertController.class 18KB
ViewCompat$BaseViewCompatImpl.class 18KB
ActionMenuView.class 17KB
AnimatedVectorDrawableCompat.class 17KB
MenuItemImpl.class 17KB
MediaBrowserCompat$MediaBrowserImplBase.class 16KB
AxesRenderer.class 16KB
AxesRenderer.class 16KB
AxesRenderer.class 16KB
LineChartRenderer.class 16KB
LineChartRenderer.class 16KB
LineChartRenderer.class 16KB
PieChartRenderer.class 15KB
PieChartRenderer.class 15KB
PieChartRenderer.class 15KB
NotificationCompatJellybean.class 14KB
AppCompatSpinner.class 14KB
ActivityChooserView.class 14KB
ActivityChooserModel.class 14KB
AccessibilityNodeInfoCompat$AccessibilityNodeInfoStubImpl.class 14KB
AbstractChartView.class 13KB
AbstractChartView.class 13KB
AbstractChartView.class 13KB
IMediaSession$Stub$Proxy.class 13KB
ActionBarContextView.class 13KB
FragmentTransitionCompat21.class 13KB
MediaBrowserServiceCompat.class 13KB
ColumnChartRenderer.class 13KB
ColumnChartRenderer.class 13KB
ColumnChartRenderer.class 13KB
PagerTitleStrip.class 13KB
MediaBrowserCompat$MediaBrowserImplApi21.class 12KB
ScrollingTabContainerView.class 12KB
MenuPopupHelper.class 11KB
NotificationCompat$WearableExtender.class 11KB
AlertDialog$Builder.class 11KB
ExploreByTouchHelper.class 11KB
LineChartActivity$PlaceholderFragment.class 11KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- 9930830282018-07-29根本就是不能运行
- 一键盘拍死你2019-02-15骗人。不能运行
a36953695
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2023-04-06-项目笔记 - 第一百十五阶段 - 4.4.2.113全局变量的作用域-113 -2024.04.26
- 2023-04-06-项目笔记 - 第一百十五阶段 - 4.4.2.113全局变量的作用域-113 -2024.04.26
- htmlzwbjq_downyi.com.zip
- 无头单向非循环链表的实现(Test.c)
- 无头单向非循环链表的实现(SList.c)
- 浏览器重定向插件更新文件
- SSA-BP麻雀算法优化BP神经网络多特征分类预测(Matlab实现完整源码和数据)
- 粒子群算法优化BP神经网络PSO-BP的MATLAB代码(数值预测)
- 基于Springboot的一起看书平台.zip
- 无头单向非循环链表的实现(SList.h)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功