GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - open-android/MPAndroidChart: 最火绘图项目MPAndroidChart的使用,一行依赖,快捷开发。

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.settings/gradle
.settings/gradle
 
 
MPChartExample
MPChartExample
 
 
MPChartLib
MPChartLib
 
 
demo
demo
 
 
design
design
 
 
gradle/wrapper
gradle/wrapper
 
 
screenshots
screenshots
 
 
.gitignore
.gitignore
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
readme.md
readme.md
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

MPAndroidChart项目使用

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

运行效果

详细效果请参考MPChartExample例子

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

黑马助手.png

使用步骤

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

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

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

compile 'com.github.open-android:MPAndroidChart:v3.0.1'

3.清单文件添加权限

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

4.布局文件使用

<com.github.mikephil.charting.charts.LineChart
    android:id="@+id/line_chart"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

5.Activity中初始化

mChart = (LineChart) findViewById(R.id.line_chart);//初始化对应的Chart控件
//省略部分代码,具体请参考MPChartExample例子实现想要的效果
setData(1000, 500f);//给图表设置数据
mChart.invalidate();//刷新
  • 详细的使用方法在DEMO里面都演示啦,如果你觉得这个库还不错,请赏我一颗star吧~~~

  • 欢迎关注微信公众号

About

最火绘图项目MPAndroidChart的使用,一行依赖,快捷开发。

Topics

android

Resources

Readme
Activity

Stars

11 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.