Skip to main content

plot_twist 0.2.0 copy "plot_twist: ^0.2.0" to clipboard
plot_twist: ^0.2.0 copied to clipboard

Composable charts for Flutter. Line, bar, scatter and candlestick series, pan and zoom, and any widget as a tooltip, marker or axis label, in one data-space view.

example/example.md

plot_twist examples #

A price chart #

A time axis, a Y axis that follows whatever the X window shows, pan and zoom, a crosshair and a tooltip:

import 'package:flutter/widgets.dart';
import 'package:plot_twist/plot_twist.dart';

class PriceChart extends StatelessWidget {
  const PriceChart({super.key, required this.prices});

  /// For example `ChartData.fromXY(times, values)`.
  final ChartData prices;

  @override
  Widget build(BuildContext context) {
    return Chart(
      x: const .time(),
      y: const .linear(range: .fitVisible()),
      left: const <Widget>[ChartAxis()],
      bottom: const <Widget>[ChartAxis()],
      children: <Widget>[
        const ChartGrid(),
        LineSeries(data: prices, label: 'Price'),
        const ChartPanZoom(),
        const ChartCrosshair(),
        const ChartTooltip(),
      ],
    );
  }
}

Drag to pan, pinch or scroll to zoom, drag an axis to stretch it, and double-tap to reset.

This folder is a gallery app with one small demo for each of the 26 aspects a chart library is judged on: widgets as tooltips and axis labels, lazily loaded history, live data, linked charts, a million points, candlesticks and more. Each demo is a single file under lib/demos/ written against the public API only.

doc/aspects.md explains why each aspect matters and how plot_twist meets it.

17
likes
0
points
76
downloads

Publisher

verified publisherglynskyi.com

Weekly Downloads

Composable charts for Flutter. Line, bar, scatter and candlestick series, pan and zoom, and any widget as a tooltip, marker or axis label, in one data-space view.

Homepage
Repository (GitHub)
View/report issues

Topics

#chart #visualization #graph #data-visualization #candlestick

License

unknown (license)

Dependencies

flutter

More

Packages that depend on plot_twist