Chart Engine 是一个 Flutter/Dart 包,提供统一的接口以使用可互换的后端引擎(如 ChartJS 和 ApexCharts)生成图表。该包主要针对 Web 应用程序设计,允许开发者在不更改图表配置代码的情况下无缝切换渲染引擎。这种抽象简化了与不同可视化库的集成,同时在各个平台上保持一致的 API 使用方式。该包支持动态图表更新和响应式设计,非常适合数据密集型 Web 仪表板。
适合场景
基于 Web 的数据仪表板
交互式图表显示
动态数据可视化
跨引擎图表兼容性
实时分析界面
主要特点
即插即用的图表引擎
支持 ChartJS 和 ApexCharts
响应式图表渲染
引擎间的 API 保持一致
与网页应用轻松集成
适合对象
Flutter web 开发人员
数据可视化项目
需要多种图表类型的仪表板
团队在图表库之间切换
需要灵活图表后端的应用程序
使用建议
主要针对网络优化
有限的原生移动支持
特定于引擎的功能可能未完全暴露
需要理解底层图表库
依赖于在网页上下文中加载的外部引擎脚本
原始 README
以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。
chart_engine
Chart generator with interchangeable chart engines, like ChartJS and ApexCharts.
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):
...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.