Skip to content

About

Candlestick charts for Flutter: 31 indicators, 29 drawing tools, 55 more chart types. Pure CustomPainter, no WebView.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

ohlcv_chart

pub package pub points CI license: MIT

Candlestick charts for Flutter, with indicators, drawing tools and a library of other chart types. Pure CustomPainter — no WebView, no JavaScript bridge. Free for any use, with no paid tier.

A candlestick chart with moving averages, volume and a MACD pane

Highlights

  • Candlestick chart — eight chart types, Heikin-Ashi, Renko, Kagi and more, four price scales, sessions, comparison overlays and bar replay.
  • 31 indicators — overlays and stacked panes, each a configured instance, with higher-timeframe values that never repaint.
  • 29 drawing tools — Fibonacci, channels, patterns and positions, with an editor, undo/redo, alerts and JSON persistence.
  • 55 more chart widgets — series, pie, heatmap, treemap, sankey, depth, order flow, volatility and futures curves, risk and portfolio charts, the charts a backtest report is made of, and charts for training and serving language models.
  • Fully themeable — ChartStyle, ChartColors and ChartTranslations.

See the full feature list and the gallery.

Note

This package has grown large. To keep it fast and focused, the next update will split it into separate packages. ohlcv_chart will keep only the candlestick (OHLCV) chart, its indicators and its drawing tools; the other chart widgets will move to their own packages.

Installation

dependencies:
  material_ui: ">=1.0.0 <2.0.0"
  ohlcv_chart: ">=3.2.0 <4.0.0"

Requires Dart 3.12 and Flutter 3.44 or later. Widgets are built on the material_ui package rather than the Material library that used to ship in the Flutter SDK, so import package:material_ui/material_ui.dart where your app imported package:flutter/material.dart.

Quick start

Pass a list of KLineEntity to KChartWidget. Call DataUtil.calculate first so the indicator values are populated:

import 'package:ohlcv_chart/ohlcv_chart.dart';

DataUtil.calculate(candles);

KChartWidget(
  candles,
  ChartColors(),
  timeFrame: const Duration(minutes: 15),
  indicators: [MaIndicator(period: 20), MacdIndicator()],
  fixedLength: 2,
);

The example app demonstrates every option in the package.

Charts

Screenshots and a reference page for every chart are in the gallery.

Candlestick, indicators and drawing

Business and statistical

Trading analysis

Models, tokens and AI

Axes and interaction

Documentation

Contributing

Bug reports and pull requests are welcome — see CONTRIBUTING.md. If the package is useful to you, a star on the repository or a like on pub.dev helps others find it.

License

Released under the MIT License. See LICENSE. The rendering core is derived from the open-source k_chart package and has since been substantially extended.

About

Candlestick charts for Flutter: 31 indicators, 29 drawing tools, 55 more chart types. Pure CustomPainter, no WebView.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages