billboard 0.0.1
billboard: ^0.0.1 copied to clipboard

Dart js
Flutter web

Dart interop for billboard.js charts library

A generated Dart API for billboard.js using pkg/js and dart_js_facade_gen.

Example #

import 'dart:html';

import 'package:billboard/billboard.dart';
import 'package:js/js_util.dart';

void main() {
  final container = document.querySelector('#chart');

  final data = Data()
    ..columns = [
      ['data1', 30, 200, 100, 400, 150, 250],
      ['data2', 50, 20, 10, 40, 15, 25]
    ]
    ..types = jsify({'data2': 'bar'})
    ..axes = jsify({'data2': 'y2'});

  final axis = Axis();
  axis.y = YAxisConfiguration()
    ..label = jsify({'text': 'Y Label', 'position': 'outer-middle'});

  axis.y2 = YAxisConfiguration()
    ..show = true
    ..label = jsify({'text': 'Y2 Label', 'position': 'outer-middle'});

  final configuration = ChartOptions()
    ..bindto = container
    ..data = data
    ..axis = axis;

  final chart = bb.generate(configuration);

  chart.load(Data()
    ..columns = [
      ['data1', 300, 100, 250, 150, 300, 150, 500],
      ['data2', 100, 200, 150, 50, 100, 250]
    ]);
}
0
likes
80
pub points
25%
popularity

Dart interop for billboard.js charts library

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

hadrien.lejard@gmail.com

License

MIT (LICENSE)

Dependencies

js

More

Packages that depend on billboard