lhh_circular_chart 0.0.2 copy "lhh_circular_chart: ^0.0.2" to clipboard
lhh_circular_chart: ^0.0.2 copied to clipboard

A circular chart library which includes data visualization widgets such as pie and doughnut charts.

example/main.dart

import 'package:flutter/material.dart';
import 'package:lhh_circular_chart/lhh_circular_chart.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(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.blue,
        title: const Text(
          'Pie Chart',
          style: TextStyle(
            color: Colors.white,
          ),
        ),
      ),
      body: CircularChart(
        dataList: [
          ChartData('', 10, Colors.blue.shade900),
          ChartData('', 10, Colors.blue.shade800),
          ChartData('', 10, Colors.blue.shade700),
          ChartData('', 10, Colors.blue.shade600),
          ChartData('', 10, Colors.blue.shade500),
          ChartData('', 10, Colors.blue.shade400),
          ChartData('', 10, Colors.blue.shade300),
          ChartData('', 10, Colors.blue.shade200),
          ChartData('', 10, Colors.blue.shade100),
          ChartData('', 10, Colors.blue.shade50),
        ],
        radius: MediaQuery.of(context).size.width / 4,
        strokeWidth: MediaQuery.of(context).size.width / 4,
      ),
    );
  }
}
1
likes
140
pub points
43%
popularity

Publisher

unverified uploader

A circular chart library which includes data visualization widgets such as pie and doughnut charts.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on lhh_circular_chart