Skip to content

open-android/hellocharts-android

Repository files navigation

hellocharts-android项目使用

开源地址:https://github.com/open-android/hellocharts-android

运行效果

  • 爱生活,爱学习,更爱做代码的搬运工,分类查找更方便请下载黑马助手app

黑马助手.png

使用步骤

1. 在project的build.gradle添加如下代码(如下图)

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

2. 在Module的build.gradle添加依赖

compile 'com.github.open-android:hellocharts-android:v1.5.8'

3.布局文件使用对应Chart

<lecho.lib.hellocharts.view.LineChartView
    android:id="@+id/chart"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

4.Activity初始化

mChart = (LineChartView) findViewById(R.id.chart);
//...省略,请参考hellowchartssample
mChart.setLineChartData(data);//给图表设置数据
  • 详细的使用方法在DEMO里面都演示啦,如果你觉得这个库还不错,请赏我一颗star吧~~~

  • 欢迎关注微信公众号

About

hellocharts-android项目使用,一行依赖,快捷开发。

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages