charthub 1.0.0 copy "charthub: ^1.0.0" to clipboard
charthub: ^1.0.0 copied to clipboard

Create stunning and interactive charts in your Flutter apps effortlessly with the Charthub package. Choose from three chart types - Line Chart, Bar Chart, and Pie Chart - and bring your data to life. [...]

example/lib/main.dart

import 'package:charthub/pieChart.dart';
import 'package:flutter/material.dart';
import 'package:charthub/lineChart.dart';
import 'package:charthub/barChart.dart';
import 'package:get/get.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.blue,
          title: Text(
            'ChartHub',
            style: TextStyle(color: Colors.white),
          ),
        ),
        body: SingleChildScrollView(
          child: Column(
            children: [
              SizedBox(
                height: 20,
              ),
              Text(
                'Line Graph',
                style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
              ),
              SizedBox(
                height: 20,
              ),
              LineChart(
                size: Get.width - 20,
                items: [23, 45, 12, 60, 44, 10, 54, 34, 23],
              ),
              SizedBox(
                height: 40,
              ),
              Text(
                'Pie Chart',
                style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
              ),
              SizedBox(
                height: 120,
              ),
              PieChart(size: Get.width / 2, items: [30, 22, 43, 12, 56, 70]),
              SizedBox(
                height: 120,
              ),
              SizedBox(
                height: 20,
              ),
              Text(
                'Bar Graph',
                style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
              ),
              SizedBox(
                height: 20,
              ),
              BarChart(size: Get.width - 20, items: [100, 40, 300, 50, 450]),
              SizedBox(
                height: 100,
              )
            ],
          ),
        ),
      ),
    );
  }
}
16
likes
120
points
39
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Create stunning and interactive charts in your Flutter apps effortlessly with the Charthub package. Choose from three chart types - Line Chart, Bar Chart, and Pie Chart - and bring your data to life. Charthub makes charting simple and flexible, so you can focus on delivering meaningful insights to your users.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on charthub