speedometer_chart

A library of velocity gauge charts for Flutter.

Install

Add the following dependency to your pubspec.yaml file:

dependencies:
    speedometer_chart: ^1.0.5

Import it in your dart code:

import 'package:speedometer_chart/speedometer_chart.dart';

Usage

SpeedometerChart(
  dimension: 200,
  minValue: 0,
  maxValue: 100,
  value: 75,
  minTextValue: 'Min. 0',
  maxTextValue: 'Max. 100',
  graphColor: [Colors.red, Colors.yellow, Colors.green],
  pointerColor: Colors.black,
  valueVisible: true,
  rangeVisible: true,
)

Property

The SpeedometerChart widget accepts the following properties:

Key Description Required Type Default
dimension The size of the speedometer chart. false double 200
minValue The size of the speedometer chart. false double 0
maxValue The minimum value of the chart. false double 100
value The current value of the chart. false double 0
valueFixed The number of decimal places to display for the current value. false double 0
minTextValue The text to display for the minimum value. false String 'Min. 0'
maxTextValue The text to display for the maximum value. false String 'Max. 100'
graphColor A list of colors for the chart scale. false List<Color> Colors.red, Colors.yellow, Colors.green
pointerColor The color of the pointer. false Color Colors.black
pointerWidth The width of the pointer. false double 40
valueVisible Whether the current value should be visible. false bool true
valueTextStyle The text style for the current value. false TextStyle? null
rangeVisible Whether the current value should be visible. false bool true
rangeTextStyle The text style for the minimum and maximum values. false TextStyle? null
title The title of the chart. false String? null
animationDuration The duration of the chart animation. false int 2000

Feel free to customize the properties based on your specific needs.

Libraries

speedometer_chart