https://github.com/jacob-dvlp/chart-line
Flutter
https://github.com/jacob-dvlp/chart-line
dart flutter java kotlin package
Last synced: 9 months ago
JSON representation
Flutter
- Host: GitHub
- URL: https://github.com/jacob-dvlp/chart-line
- Owner: Jacob-dvlp
- License: mit
- Created: 2023-01-15T13:52:50.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T23:48:48.000Z (over 3 years ago)
- Last Synced: 2023-08-09T13:59:25.547Z (almost 3 years ago)
- Topics: dart, flutter, java, kotlin, package
- Language: Dart
- Homepage: https://pub.dev/packages/chart_line
- Size: 162 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# chart_line
by: [Jacob Larte](https://github.com/Jacob-dvlp/chart-line.git)
## Current Features
- [X] Custom graphic
- [X] transition graphic
## Supported Platforms
* Flutter Android
* Flutter iOS
* Flutter web
* Flutter desktop
## Preview
## Installation
Add `chart_line: ^0.0.3` to your `pubspec.yaml` dependencies. And import it:
```dart
import 'package:chart_line/chart_line.dart';
```
## How to use
```dart
Column(
children: [
ChartLine(value: 5, backgroundColor: Colors.blue,label:'One',),
ChartLine(value: 10, backgroundColor: Colors.blue,label:'One',),
ChartLine(value: 55, backgroundColor: Colors.blue,label:'One',),
ChartLine(value: 12, backgroundColor: Colors.blue,label:'One',),
ChartLine(value: 15, backgroundColor: Colors.blue,label:'One',),
],
);
```
## General Example
```dart
class MyExemple extends StatelessWidget {
const MyExemple({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0XFF07111a),
appBar: AppBar(
title: Text(widget.title),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
value: 50,
backgroundColor: Colors.pink,
label: 'Pink',
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
value: 80,
backgroundColor: Colors.blue,
label: 'Blue',
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
value: 90,
backgroundColor: Colors.red,
label: 'Red',
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
value: 100,
backgroundColor: Colors.orange,
label: 'Ora',
),
),
],
),
);
}
}
```
## Gif
Normal Example:

```dart
import 'package:chart_line/chart_line.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Exemple'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0XFF07111a),
appBar: AppBar(
title: Text(widget.title),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
backgroundColorLine: Colors.white,
value: 15,
backgroundColor: Colors.pink,
label: 'Pink',
textStyleLine: TextStyle(color: Colors.blue),
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
value: 80,
backgroundColor: Colors.blue,
label: 'Blue',
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
value: 90,
backgroundColor: Colors.red,
label: 'Red',
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: ChartLine(
value: 100,
backgroundColor: Colors.orange,
label: 'Ora',
),
),
],
),
);
}
}
```