slider_bar_chart 0.0.6 copy "slider_bar_chart: ^0.0.6" to clipboard
slider_bar_chart: ^0.0.6 copied to clipboard

Simple Bar Chart is a lightweight and customizable Flutter library for creating simple bar charts. Ideal for visually comparing data in an elegant and minimalistic way.

example/lib/main.dart

import 'dart:math';

import 'package:flutter/material.dart';
import 'package:slider_bar_chart/slider_bar_chart.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Simple Bar Chart Example',
      theme: ThemeData.light(),
      home: Scaffold(
        appBar: AppBar(title: const Text('Simple Bar Chart Example')),
        body: Center(
          child: SingleChildScrollView(
            child: SafeArea(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  const Text('With single y values'),
                  SliderBarChartWidget(
                    data: SbcData(
                      xValues: List.generate(100, (index) => index),
                      yValues: List.generate(
                          100, (index) => Random().nextDouble() * 256),
                    ),
                  ),
                  const Divider(height: 100),
                  const Text('With double y values'),
                  SliderBarChartWidget(
                    data: SbcData(
                      xValues: List.generate(100, (index) => index),
                      yValues: List.generate(
                          100, (index) => Random().nextDouble() * 256),
                      y2Values: List.generate(
                          100, (index) => Random().nextDouble() * 256),
                    ),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
copied to clipboard
3
likes
160
points
47
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.23 - 2025.04.07

Simple Bar Chart is a lightweight and customizable Flutter library for creating simple bar charts. Ideal for visually comparing data in an elegant and minimalistic way.

Homepage

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on slider_bar_chart