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

套件詳情v3.0.2

chart_engine

可交換圖表引擎(如 ChartJS 和 ApexCharts)的圖表產生器。

Web
近 30 天下載
2320
喜歡數
50
Pub 分數
160

安裝套件

flutter pub add chart_engine

套件介紹

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

Chart Engine 是一個 Flutter/Dart 套件,提供統一介面,以使用可交換的後端引擎(例如 ChartJS 和 ApexCharts)產生圖表。此套件主要針對 Web 應用程式設計,讓開發者能在不變更圖表設定程式碼的情況下,無縫切換渲染引擎。這種抽象簡化了與不同視覺化庫的整合,同時在各平台維持一致的 API 使用方式。該套件支援動態圖表更新與響應式設計,非常適合資料密集型的 Web 儀表板。

適用情境

  • 基於 Web 的資料儀表板
  • 互動式圖表顯示
  • 動態資料視覺化
  • 跨引擎圖表相容性
  • 即時分析介面

主要特色

  • 即插即用的圖表引擎
  • 支援 ChartJS 和 ApexCharts
  • 響應式圖表渲染
  • 引擎間的 API 保持一致
  • 與網頁應用輕鬆整合

適合對象

  • Flutter web 開發人員
  • 資料視覺化專案
  • 需要多種圖表類型的儀表板
  • 團隊在圖表庫之間切換
  • 需要靈活圖表後端的應用程式

使用建議

  • 主要針對網路優化
  • 有限的原生移動支援
  • 特定於引擎的功能可能未完全暴露
  • 需要理解底層圖表庫
  • 依賴於在網頁上下文中載入的外部引擎腳本

原始 README

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

chart_engine

pub package Null Safety Dart CI GitHub Tag New Commits Last Commits Pull Requests Code size License Live Example

Chart generator with interchangeable chart engines, like ChartJS and ApexCharts.

Engines

NOTE: You don't need to read any specific documentation of any engine to use chart_engine, since any Chart configuration needed to generate your Chart will be automatically handled by this package (see the example).

Usage

A simple example using ApexCharts (ChartsJS is commented):

import 'dart:html';

//import 'package:chart_engine/chart_engine_chartjs.dart';
import 'package:chart_engine/chart_engine_apexcharts.dart';

void main() async {

  var series = ChartSeries(
      ['Jan','Feb','Mar'],
      {
        'A': [10,20,5] ,
        'B': [15,25,55] ,
        'C': [100,130,140]
      }
  ) ;

  series.title = 'Chart Example' ;
  series.xTitle = 'Months' ;
  series.yTitle = 'Count' ;
  series.options.fillLines = true ;
  series.options.straightLines = true ;

  //var charEngine = ChartEngineChartJS() ;
  var charEngine = ChartEngineApexCharts() ;
  await charEngine.load() ;
  charEngine.renderLineChart( querySelector('#output') , series ) ;


}

Live Example

You can see here a live example

If your prefer you can experiment with the example from the source code.

Example from Sources

Get the source

  $> git clone https://github.com/Colossus-Services/chart_engine.git

...and see the Web Example (just follow the README file for instructions).

Loading Engines JavaScript Libraries

This Dart package already bundles the JavaScript libraries of each supported engine. When an implementation of ChartEngine is instantiated, the corresponding JavaScript library is automatically loaded and no extra code is needed in your Dart files or HTML files.

The loading processes is made by the package amdjs.dart. It loads the JavaScript libraries using AMD framework when an AMD implementation is present and detected, or injecting a tag <script src='lib-x.js'></script> as fallback.

ChartJS and Moment

You don't need to load Moment JS library to use Time Series Charts when using ChartJS engine. We implement a fallback Date adapter, using Dart code interoperability, based in Dart DateTime and DateFormat implementations. ;-P

Features and bugs

Please file feature requests and bugs at the issue tracker.

Colossus.Services

This is an open-source project from Colossus.Services: the gateway for smooth solutions.

Author

Graciliano M. Passos: gmpassos@GitHub.

License

Apache License - Version 2.0

所屬分類

依賴

依賴清單 6 項

  • amdjs^3.0.0
  • color_palette_generator^2.0.1
  • dom_tools^3.1.1
  • intl^0.20.3
  • swiss_knife^3.4.2
  • web_utils^1.1.0

原始碼儲存庫

使用此套件的專案

暫無相關資料。