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

flutter_sales_graph 封面
插件详情v0.0.5

flutter_sales_graph

一个用于以条形图格式显示销售数据的 Flutter 包。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
36
喜欢数
9
Pub 分数
150

安装插件

flutter pub add flutter_sales_graph

插件介绍

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

一个用于使用直观的条形图可视化销售数据的 Flutter 包。它使开发者能够轻松地将响应式且可自定义的条形图集成到其应用程序中,非常适合仪表板或分析界面。该包支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台,确保跨平台一致性。通过简单的配置选项,它可渲染出干净、交互式的图表,能够适应不同的数据集和屏幕尺寸。

适合场景

  • 销售仪表板可视化
  • 实时数据跟踪
  • 商业分析应用
  • 电子商务性能监控
  • 报告工具

主要特点

  • 条形图渲染
  • 跨平台支持
  • 可自定义的颜色和标签
  • 响应式设计
  • 与数据流的轻松集成
  • 流畅的动画

适合对象

  • 开发业务应用的开发者
  • 分析仪表板创建者
  • 电子商务平台团队
  • 数据可视化初学者
  • 需要销售指标的Flutter项目

使用建议

  • 需要兼容格式的数据
  • 仅限柱状图类型
  • 复杂的 UI 可能需要额外的样式
  • 依赖于 Flutter 的渲染引擎
  • 不适用于非销售数据类型

原始 README

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

flutter_sales_graph

A Flutter package for displaying customizable bar charts for sales data.

Features

  • Displays a bar chart with customizable bar appearance and layout.
  • Supports different time ranges (e.g., Last 7 Days, Last 30 Days, Last 12 Months).
  • Customizable parameters for bar height, width, colors, and labels.

Platforms Supported

  • Android: Yes
  • iOS: Yes
  • Web: Yes
  • Windows: Yes
  • macOS: Yes
  • Linux: Yes

Screenshot

Sales Graph Screenshot

Installation

To use the flutter_sales_graph package in your Flutter project, follow these steps:

  1. Add flutter_sales_graph to your pubspec.yaml file:

    dependencies:
      flutter_sales_graph: ^0.0.5
    
  2. Run flutter pub get to install the package.

Usage

Here’s a basic example of how to use the FlutterSalesGraph widget in your Flutter app:

  1. Import the package:

    import 'package:flutter_sales_graph/flutter_sales_graph.dart';
    
  2. Use the FlutterSalesGraph widget:

     import 'package:flutter/material.dart';
    import 'package:flutter_sales_graph/flutter_sales_graph.dart';
    
    void main() {
    

runApp(MyApp()); }

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar(title: Text('Sales Graph Example')), body: Center( child: FlutterSalesGraph( salesData: [100, 200, 150, 300, 250, 350], labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'], maxBarHeight: 250.0, barWidth: 30.0, colors: [Colors.blue, Colors.green, Colors.red], dateLineHeight: 20.0, ), ), ), ); } }

```

Parameters

  • salesData: A List<double> representing the sales values. Must be non-empty.
  • labels: A List<String> representing the labels corresponding to each bar. Must be non-empty and the same length as salesData.
  • selectedRange: A String to indicate the selected time range for the graph. (For display purposes; not functional in this package).
  • maxBarHeight: A double specifying the maximum height of the bars in the graph.
  • barWidth: A double specifying the width of each bar in the graph.
  • colors: A List<Color> providing the colors for the bars.
  • dateLineHeight: A double specifying the height of the labels below the bars.

Example

For a full example of how to use this package, see the example directory in the GitHub repository.

Development

If you’d like to contribute to this package, please follow these guidelines:

  1. Fork the repository:

    • Click the "Fork" button on the top-right corner of github page.
  2. Clone your fork:

    git clone https://github.com/AsherAyub80/flutter_sales_graph.git
    
    
  3. Create a branch for your changes:

    git checkout -b feature/your-feature-name
    
  4. Make your changes and commit them:

          git add .
          git commit -m "Add feature: your feature description"
    
  5. Push your changes:

        git push origin feature/your-feature-name
    
  6. Create a pull request:

    Go to the repository on GitHub and click the "New Pull Request" button.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。