Skip to content

rickypid/flutter_bargraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

flutter_bargraph

Pub Package Pub Points Pub Likes

Package Issue Package License

Bar Graph Indicator for Flutter. It graphically displays the current value on a bar graph and manages its animation when the value changes. you can customize the orientation and direction of the bar.

Image
BarGraph

Features

  • Min/Max property
  • Customizable colors and text style
  • Vertical orientation, left to right and right to left direction
  • Horizontal orientation, top to bottom and bottom to top direction
  • Number of divisions customizable

Usage

Make sure to check out examples.

Installation

Add the following line to pubspec.yaml:

dependencies:
  flutter_bargraph: <last-release>

Basic setup

The complete example is available here.

BarGraph requires you to provide min, max and value:

  • min is the min value of BarGraph scale.
  • max is the max value of BarGraph scale.
  • value is the currently value of BarGraph scale.
BarGraph(
    min: 0,
    max: 100.0,
    value: 65.0,
);

Advanced options

Style

  • orientation is the scale orientation, default vertical from bottom.
  • indicatorStyle is the scale indicators style, default BOTH, left and right visible.
  • indicatorSpacing is the scale indicators spacing, default SPACE_AROUND, alternative SPACE_BETWEEN.

Colors

  • backgroundColor is the background color og BarGraph.
  • barColor is the color of actual value bar.
  • indicatorsColor is the color of indicators scale.

Indicators text

  • textStyle is the TextStyle of indicators text.
  • textAlign is the Alignment of indicators text.
  • fractionDigits is the number of fraction digits visible.
  • divisions is the number of divisions of scale.
  • textFlex is the percentage of portion used for text, remaining space is used for indicators.

Animation

  • animationDuration in milliseconds, it's duration time of animation when actual value changed.

Example

Image Image Image
Vertical space around Horizontal space around Vertical space between

πŸ“š My open source projects

Flutter

Package Verison Score Likes Test Coverage
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes

Dart

Package Verison Score Likes Test Coverage
Pub Package Pub Points Pub Likes Test CI codecov
Pub Package Pub Points Pub Likes Test CI codecov