安卓交互式图表展示App
Find a file
2026-03-26 00:17:53 +08:00
assets Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
.gitignore Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
App.js Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
app.json Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
eas.json Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
index.js Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
package-lock.json Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
package.json Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00
README.md Initial commit: 交互式图表展示 Android App 2026-03-26 00:17:53 +08:00

交互图表展示 Android App

基于 React Native (Expo) 开发的交互式图表展示应用,支持多种图表类型,适配安卓手机。

功能特性

  • 📈 折线图 - 支持多系列,支持点击交互
  • 📊 柱状图 - 柱状数据展示
  • 🥧 饼图 - 占比分析
  • 🎯 进度环图 - 进度展示
  • 📱 完美适配安卓 - 自动适配屏幕宽度
  • 点击交互 - 点击数据点显示详细信息

如何运行

方法一:使用 Expo Go (推荐,快速测试)

  1. 在你的安卓手机上安装 Expo Go 应用

  2. 在电脑上启动开发服务器:

cd InteractiveChartApp
npm start
  1. 扫描终端显示的二维码,即可在手机上打开应用

方法二:编译生成 APK (安装到手机)

# 安装 EAS CLI
npm install -g eas-cli

# 登录 Expo
eas login

# 构建 APK
eas build -p android --profile preview

构建完成后会下载 APK 文件,直接安装到安卓手机即可。

项目结构

InteractiveChartApp/
├── App.js          # 主应用代码(所有图表都在这里)
├── package.json    # 依赖配置
└── README.md       # 说明文件

技术栈

  • React Native (Expo)
  • react-native-chart-kit - 图表库
  • react-native-svg - SVG 渲染

自定义数据

打开 App.js,修改对应的 data 即可更换自己的数据:

  • lineChartData - 折线图数据
  • barChartData - 柱状图数据
  • pieChartData - 饼图数据
  • progressChartData - 进度环图数据

截图预览

应用会自动适配你的安卓手机屏幕宽度,支持竖屏展示。所有图表都在一个页面,上下滚动浏览。