Skip to content

dessonchan/bubble_chart

 
 

Repository files navigation

Bubble chart

pub package travis

A simple Dart implementation of bubble chart.

Usage

Add bubble_chart to your pubspec:

dependencies:
  bubble_chart: any # or the latest version on Pub

Add in you project.

  final bubbles = BubbleNode.node(
    padding: 15,
    children: [
      BubbleNode.node(
        padding: 30,
        children: [
          BubbleNode.leaf(
            options: BubbleOptions(
              color: Colors.brown,
            ),
            value: 2583,
          ),
          BubbleNode.leaf(
            options: BubbleOptions(
              color: Colors.brown,
            ),
            value: 4159,
          ),
          BubbleNode.leaf(
            options: BubbleOptions(
              color: Colors.brown,
            ),
            value: 4159,
          ),
        ],
      ),
      BubbleNode.leaf(
        value: 4159,
      ),
      BubbleNode.leaf(
        value: 2074,
      ),
      BubbleNode.leaf(
        value: 4319,
      ),
      BubbleNode.leaf(
        value: 2074,
      ),
      BubbleNode.leaf(
        value: 2074,
      ),
      BubbleNode.leaf(
        value: 2074,
      ),
      BubbleNode.leaf(
        value: 2074,
      ),
    ],
  );

  Widget build(BuildContext context) {
    return Scaffold(
      body: BubbleChartLayout(
        root: bubbles,
      ),
    );
  }

Run the example

See the example/ folder for a working example app.

About

Simple bubble chart in dart

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 91.7%
  • Objective-C 3.8%
  • Shell 2.6%
  • Java 1.9%