搜尋套件、儲存庫與 APP 分類

套件詳情v0.1.4

flutter_candlesticks

適用於 Flutter 的優雅 OHLC 蜡燭圖和交易量圖表。

近 30 天下載
56
喜歡數
30
Pub 分數
40

安裝套件

flutter pub add flutter_candlesticks

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個用於創建優雅的OHLC(開盤價、最高價、最低價、收盤價)K線圖和交易量可視化的Flutter套件。專為金融數據顯示設計,提供流暢且可自訂的圖表渲染,並支援即時更新。該套件可無縫整合至Flutter應用中,提供乾淨的API來繪製價格走勢與交易活動。非常適合需要專業級繪圖功能的加密貨幣、股票或外匯追蹤應用。

適用情境

  • 金融市場數據可視化
  • 加密貨幣價格追蹤
  • 股票和外匯圖表
  • 即時交易儀表板
  • 投資組合績效監控

主要特色

  • OHLC K線圖渲染
  • 交易量可視化
  • 流暢的動畫
  • 可自定義的顏色和樣式
  • 響應式設計
  • 與資料流的輕鬆整合

適合對象

  • 交易應用開發者
  • 財務數據分析師
  • 加密貨幣儀表板創建者
  • 即時圖表應用
  • 面向使用者的金融工具

使用建議

  • 僅限二維圖表類型
  • 無內建資料擷取
  • 需要手動處理時間序列資料
  • 未針對非常大的資料集進行優化
  • 依賴外部資料來源以取得即時更新

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

pub package

flutter_candlesticks

Elegant OHLC Candlestick and Trade Volume charts for Flutter

Usage

Install for Flutter with pub.

Property Description
data Required. List of maps containing open, high, low, close and volumeto
enableGridLines Required. Enable or disable grid lines
volumeProp Required. Proportion of container to be given to volume bars
lineWidth Default 1.0. Width of most lines
gridLineAmount Default 5. Number of grid lines to draw. Labels automatically assigned
gridLineWidth Default 0.5. Width of grid lines
gridLineColor Default Colors.grey. Color of grid lines
gridLineLabelColor Default Colors.grey. Color of grid line labels
labelPrefix Default "$". Prefix before grid line labels.
increaseColor Default Colors.green. Color of increasing candles.
decreaseColor Default Colors.red. Color of decreasing candles.

Examples

No Grid Lines
new OHLCVGraph(
    data: sampleData,
    enableGridLines: false,
    volumeProp: 0.2
    )
)

Candle size dynamically changes by amount of data

Grid Lines
new OHLCVGraph(
    data: sampleData,
    enableGridLines: true,
    volumeProp: 0.2,
    gridLineAmount: 5,
    gridLineColor: Colors.grey[300],
    gridLineLabelColor: Colors.grey
    )
)

Full App Example
import 'package:flutter/material.dart';
import 'package:flutter_candlesticks/flutter_candlesticks.dart';

void main() {
  List sampleData = [
    {"open":50.0, "high":100.0, "low":40.0, "close":80, "volumeto":5000.0},
    {"open":80.0, "high":90.0, "low":55.0, "close":65, "volumeto":4000.0},
    {"open":65.0, "high":120.0, "low":60.0, "close":90, "volumeto":7000.0},
    {"open":90.0, "high":95.0, "low":85.0, "close":80, "volumeto":2000.0},
    {"open":80.0, "high":85.0, "low":40.0, "close":50, "volumeto":3000.0},
  ];

  runApp(
    new MaterialApp(
      home: new Scaffold(
        body: new Center(
          child: new Container(
            height: 500.0,
            child: new OHLCVGraph(
                data: sampleData,
                enableGridLines: false,
                volumeProp: 0.2
            ),
          ),
        ),
      )
    )
  );
}

所屬分類

原始碼儲存庫

使用此套件的專案