搜尋套件、儲存庫與 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.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。