搜索插件、代码仓与 APP 分类

flutter_radar_chart 封面
插件详情v0.2.1

flutter_radar_chart

适用于 Flutter 的基本雷达图。此图表旨在开箱即用,能够根据给定数据自动调整。图表的设计灵感来自 Python Graph Gallery。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1730
喜欢数
101
Pub 分数
140

安装插件

flutter pub add flutter_radar_chart

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个简单的、自动调节的雷达图,适用于 Flutter,可无缝配合提供的数据使用。灵感来自 Python Graph Gallery,为多维数据提供简洁直观的可视化效果。该图表会自动缩放并适应输入值,非常适合快速实现而无需复杂配置。适用于跨多个平台的仪表板、性能对比和数据分析界面。

适合场景

  • 性能指标可视化
  • 多维数据比较
  • 仪表板小部件
  • 应用中的数据分析
  • 教育工具

主要特点

  • 基于数据的自动缩放
  • 所需设置最少
  • 跨平台支持
  • 简洁现代的设计
  • 响应式布局

适合对象

  • 寻求快速雷达图的开发者
  • 仪表板中的数据可视化
  • 教育或分析应用
  • 带有多轴数据的应用程序
  • 需要轻量级图表的项目

使用建议

  • 有限的自定义选项
  • 最适合小型到中型数据集
  • 不太适合高度交互的图表
  • 无内置提示工具或动画
  • 依赖外部库以实现高级功能

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

flutter_radar_chart

Animated radar chart for Flutter inspired by The Python Graph Gallery (https://python-graph-gallery.com/radar-chart/).

Follow the instructions on pub to install this package.

Example

screenshot

Usage

Basic usage of radar chart requires three pieces of data:

  • ticks - Defines the numerical axis for the chart. Each tick generates an outline. Currently, each feature is plotted using the numerical range define by the ticks.
  • features - Defines the numerical variables for each individual in the chart. There is no limit to the number of features.
  • data - List of data points used to construct each individual in the chart. The number of data points must match the number of features. There is no limit to the number of individuals in the chart; however, multiple entities might cause the graph to become unreadable.
RadarChart.light(
    ticks: ticks,
    features: features,
    data: data,
),

A full example (as seen in the screenshots) can be found in example/lib/main.dart

Customizability

Most of the customizability of the graph is a work in progress, but here's some of the features of the chart:

  • Animations! Trying to add some life to the chart. Animation is currently triggered whenever the widget is updated (didUpdateWidget). Animations are currently enabled by default.
  • Number of features: As shown in the example, the radar chart will adjust to the number of given variables. More work is needed to ensure the chart doesn't explode when given invalid data.
  • Reverse axis: Reverses the axis range so that the min value starts at the graph outline.
  • Dark mode: Simple factory that showcases the color customizability of the chart.
  • Polygon sides: Ability to use flat polygon borders instead of a circular border.

screenshot

Future Work Ideas

There's a few more areas of work that I'd love to get around to building. I will eventually move these items over to issues for better tracking.

  • [ ] Option for round corners
  • [x] Animations on render
  • [ ] Integration testing
  • [ ] Responsive design
  • [ ] Legends

Acknowledgements

所属分类

源码仓库

使用此插件的项目