v0.2.0
flutter_k_chart
flutter_k_chart, Writted with pure dart, supported both iOS and Android.
23Likes 3930-day downloads45Pub points
Platforms unavailable
gwhcn/flutter_k_chart open-source repository details.
English project snapshot. Visit GitHub for the latest content.
一个仿火币的flutter图表库包含深度图,支持各种指标及放大缩小、平移等操作

本项目数据来自火币openApi,火币的接口可能需要翻墙,接口失败后会加载本地json。由于项目没有很好的封装,建议使用本地方式使用
//本地导入方式
dependencies:
flutter_k_chart:
path: 项目路径
import 'package:flutter_k_chart/flutter_k_chart.dart';
....
Container(
height: 450,
width: double.infinity,
child: KChartWidget(
datas,//数据
isLine: isLine,//是否显示折线图
mainState: _mainState,//控制主视图指标线
secondaryState: _secondaryState,//控制副视图指标线
volState: VolState.VOL,//控制成交量指标线
fractionDigits: 4,//保留小数位数
),
)
//深度图使用
Container(
height: 230,
width: double.infinity,
child: DepthChart(_bids, _asks),
)
可在chart_style.dart里面修改图表样式
//接口获取数据后,计算数据
DataUtil.calculate(datas);
//更新最后一条数据
DataUtil.updateLastData(datas);
//添加数据
DataUtil.addLastData(datas,kLineEntity);
import 'package:flutter_k_chart/generated/l10n.dart' as k_chart;
MaterialApp(
localizationsDelegates: [
k_chart.S.delegate//国际化
],
);
使用中如果有问题可以加QQ群:114563912
🙏感谢🙏

Dependency list 4 items
{"sdk":"flutter"}{"sdk":"flutter"}^0.17.0{"sdk":"flutter"}Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗