Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 1.83 KB

README.md

File metadata and controls

50 lines (44 loc) · 1.83 KB

k_chart

A Flutter K Chart.And easy to use.

vertical

Getting Started

Install

dependencies:
  k_chart: ^0.1.1

or use latest:

k_chart:
    git:
      url: https://github.com/mafanwei/k_chart

Usage

use k line chart:

Container(
              height: 450,
              width: double.infinity,
              child: KChartWidget(
                datas,//Required,Data must be an ordered list,(history=>now)
                isLine: isLine,//Decide whether it is k-line or time-sharing
                mainState: _mainState,//Decide what the main view shows
                secondaryState: _secondaryState,//Decide what the sub view shows
                fixedLength: 2,//Displayed decimal precision
                timeFormat: TimeFormat.YEAR_MONTH_DAY,
                onLoadMore: () {},//Called when the list is swiped to the far left,use it load history.
                maDayList: [5,10,20],//Display of ma
                bgColor: [Colors.black],//The background color of the chart is gradient
                isChinese: true,//Graphic language
                isOnDrag: (isDrag){},// true is on Drag.Don't load data while Draging.
              ),
            ),

use depth chart:

DepthChart(_bids, _asks) //Note: Datas must be an ordered list,

Donate

Buy a cup of coffee for the author.

alipay

wechat