k_chart_flutter
A high-performance, interactive candlestick (K-line) and line chart widget for Flutter, designed for crypto and financial data visualization.
- Gesture support: drag, scale, long press, fling
- Main chart indicators: MA, BOLL
- Secondary indicators: MACD, KDJ, RSI, WR, CCI
- Customizable style and internationalization
- Suitable for crypto, stock, and other financial charts
Installation
dependencies:
k_chart_flutter: ^1.0.0
Quick Start
// Initialize data
data = DataUtil.calculate(data);
// Use the KChartWidget
KChartWidget(
data: data,
style: ChartStyle(),
isLine: true,
isTrendLine: false,
mainState: MainState.MA,
volHidden: false,
secondaryState: SecondaryState.MACD,
timeFormat: TimeFormat.YEAR_MONTH_DAY,
translations: {
'en': ChartTranslations(
date: 'Date',
open: 'Open',
high: 'High',
low: 'Low',
close: 'Close',
changeAmount: 'Change',
change: 'Change %',
amount: 'Volume',
)
},
showNowPrice: true,
hideGrid: true,
isTapShowInfoDialog: true,
maDayList: const [1, 100, 1000],
dataFormat: (value) => value.toStringAsFixed(2)
)
Example
A full demo app is available at examples/k_chart_demo
in this repository. You can run and debug it locally.
Contributing
Issues and PRs are welcome!
License
MIT
Libraries
- chart_style
- chart_translations
- depth_chart
- entity/candle_entity
- entity/cci_entity
- entity/depth_entity
- entity/index
- entity/info_window_entity
- entity/k_entity
- entity/k_line_entity
- entity/kdj_entity
- entity/macd_entity
- entity/rsi_entity
- entity/rw_entity
- entity/volume_entity
- extension/map_ext
- extension/num_ext
- k_chart_flutter
- k_chart_widget
- renderer/base_chart_painter
- renderer/base_chart_renderer
- renderer/chart_painter
- renderer/index
- renderer/main_renderer
- renderer/secondary_renderer
- renderer/vol_renderer
- utils/data_util
- utils/date_format_util
- utils/index
- utils/number_util