swarupbc / real_time_chart

A Real-Time Chart.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Real-time Chart

A Flutter package for displaying real-time charts with flexible customization options.

Features

  • Display real-time data on a graph
  • Supports negative values
  • Adapts height automatically based on the maximum value
  • Customizable colors, axis labels, and grid lines

Getting started

To use this package, add real_time_chart as a dependency in your pubspec.yaml file.

dependencies:
  real_time_chart: ^0.0.1

Usage

To display a real-time chart, you can use the RealTimeChart widget. Here's an example of how to use it in your code:

import 'package:real_time_chart/real_time_chart.dart';

class RealTimeChartExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return RealTimeChart(
      stream: positiveDataStream(),
      graphColor = Colors.red,
    );
  }
}

Stream<double> positiveDataStream() {
  return Stream.periodic(const Duration(milliseconds: 500), (_) {
    return Random().nextInt(300).toDouble();
  }).asBroadcastStream();
}

Additional information

This package provides a simple solution for displaying real-time data in a graph format. It offers support for both positive and negative values and automatically adapts the height of the graph to fit the maximum value.

If you encounter any issues or bugs while using the package, feel free to file an issue in the issue tracker. We are committed to providing quick and helpful responses to any questions or concerns that you may have.

If you would like to contribute to the development of this package, we welcome pull requests and any other forms of contribution. Your help and support are greatly appreciated!

About

A Real-Time Chart.

License:Apache License 2.0


Languages

Language:Dart 34.9%Language:C++ 29.5%Language:CMake 25.9%Language:C 2.6%Language:HTML 2.4%Language:Swift 1.7%Language:Shell 1.4%Language:Objective-C 0.8%Language:Java 0.7%Language:Kotlin 0.2%