9 Unstar Star 66 Fork 8

entronad / graphic

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

examples

A Flutter data visualization library based on Grammar of Graphics.

Usage

Installing

pub.dev

Basic example

graphic.Chart(
  data: [
    { 'genre': 'Sports', 'sold': 275 },
    { 'genre': 'Strategy', 'sold': 115 },
    { 'genre': 'Action', 'sold': 120 },
    { 'genre': 'Shooter', 'sold': 350 },
    { 'genre': 'Other', 'sold': 150 },
  ],
  scales: {
    'genre': graphic.CatScale(
      accessor: (map) => map['genre'] as String,
    ),
    'sold': graphic.NumScale(
      accessor: (map) => map['sold'] as num,
      nice: true,
    )
  },
  geoms: [graphic.IntervalGeom(
    position: graphic.PositionAttr(field: 'genre*sold'),
    shape: graphic.ShapeAttr(values: [
      graphic.Shapes.rrectInterval(radius: Radius.circular(5))
    ]),
  )],
  axes: {
    'genre': graphic.Defaults.horizontalAxis,
    'sold': graphic.Defaults.verticalAxis,
  },
)

Document

If you have ever used data visualization libs based on Grammar of Graphics, such as AntV , ggplot2, you can be quite familiar with these concepts.

The document has not been written yet, but by referring to the Example App , I believe you can be smart enough to build your charts :)

TODO

  • static chart

  • interaction

  • animation

  • legend

  • tooltip

  • annotation

    ...

Comments ( 3 )

Sign in for post a comment

About

A Flutter data visualization library based on Grammar of Graphics. spread retract
Dart and 3 more languages
ECL-2.0
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
Dart
1
https://gitee.com/entronad/graphic.git
git@gitee.com:entronad/graphic.git
entronad
graphic
graphic
master

Search