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

sliver_bar_chart 封面
插件详情v0.0.1

sliver_bar_chart

一个支持在 Flutter Sliver 中使用柱状图的包。此包允许我们在 Sliver 中添加柱状图,并将其设置为 Sliver 滚动时的标题。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
21
喜欢数
27
Pub 分数
150

安装插件

flutter pub add sliver_bar_chart

插件介绍

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

sliver_bar_chart 包可将条形图集成到 Flutter 的 Sliver 小部件中,使开发者能够在列表或自定义滚动视图中以可滚动的标题形式显示条形图。该包专为需要在可滚动区域顶部进行视觉数据表示的复杂滚动布局而设计。它支持所有主要平台,并提供了一种无缝结合数据可视化与响应式 UI 的方式。通过提供动态、交互式的图表,这些图表能够适应滚动行为,从而提升用户体验。

适合场景

  • 使用图表标题创建可滚动仪表板
  • 在列表标题中显示时间序列数据
  • 构建带有视觉摘要的分析界面
  • 将图表集成到嵌套滚动视图中
  • 通过视觉反馈增强数据密集型应用程序屏幕

主要特点

  • 条形图作为 Sliver 头部
  • 跨平台的响应式设计
  • 与 CustomScrollView 的无缝集成
  • 支持动态数据更新
  • 内置的图表渲染动画

适合对象

  • 可滚动界面中的数据可视化
  • 仪表板和分析应用
  • 具有大量数据集的移动和网络应用程序
  • 使用基于 Sliver 的布局的开发者
  • 需要交互式图表标题的应用程序

使用建议

  • 需要了解 Sliver 小部件
  • 在非常大的数据集上可能会影响性能
  • 超出基本图表样式的有限自定义
  • 依赖于底层图表渲染库
  • 最适合静态或中等动态数据

原始 README

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

sliver_bar_chart

Flutter Website Dart Website MIT License

It is Sliver component. Bar chart work with sliver animation on expand and collapse. It is an independent component that allows you to set data for the chart with the configuration of Sliver.

Key Features

  • easy way to add bar chart in a Sliver.
  • used to set a bar chart as a Sliver Header.

Preview

sliver_bar_chart

Basic Usage

Import it to your project file

import 'package:sliver_bar_chart/sliver_bar_chart.dart';

And add it in its most basic form like it:

SliverBarChart(
  barWidget: BarChartWidget(
    minHeight: 100.0,
    maxHeight: 1000.0,
    barValues: [
      BarChartData(
        x: '2022',
        y: 500.0,
        barColor: Colors.blue,
      ),
    ],
    isScrolling: true,
  ),
);
Required parameters of SliverBarChart

Parameter Description
BarChartWidget barWidget Used to paint bar chart using custom painter
Optional parameters of SliverBarChart

Parameter Default Description
bool restrain false Whether to stick the header to the start of the viewport once it has reached its minimum size
bool scrolling - Whether sliver is scrolling or not
List heightArray [50.0, 78.0, 90.0, 67.0, 36.0] The array of height for generating the bars of the Bar Chart
double maxWidth 75.0 The maximum width dimensions of the sliver
double minHeight 30.0 The minimum height dimensions of the sliver
double maxHeight 175.0 The maximum height dimensions of the sliver
bool fluctuating false Whether the header should immediately grow again if the user reverses scroll direction
Required parameters of BarChartWidget

Parameter Description
double minHeight The minimum height dimensions of the BarChartWidget
double maxHeight The maximum height dimensions of the BarChartWidget
List barValues hold the list of bar chart data
bool isScrolling Whether sliver is scrolling or not
Optional parameters of BarChartWidget

Parameter Default Description
int yAxisIntervalCount 5 Used to set interval point on Y axis
double xAxisTextRotationAngle 0.0 Used to set X axis text on a rotation angle in case of larger text
Required parameters of BarChartData Model Class

Parameter Description
String x a text that visible on Bar Chart X axis
double y a value that visible on Bar Chart Y axis
Optional parameters of BarChartData Model Class

Parameter Default Description
Color barColor Colors.grey used to set color of the bar
Guideline for contributors

  • Contribution towards our repository is always welcome, we request contributors to create a pull request for development.
Guideline to report an issue/feature request

It would be great for us if the reporter can share the below things to understand the root cause of the issue.

  • Library version
  • Code snippet
  • Logs if applicable
  • Device specification like (Manufacturer, OS version, etc)
  • Screenshot/video with steps to reproduce the issue
  • Library used

LICENSE!

sliver_bar_chart is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。