graphic 0.2.0 copy "graphic: ^0.2.0" to clipboard
graphic: ^0.2.0 copied to clipboard

outdated

A data visualization (charts / chart / charting) library based on Grammar of Graphics.

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.LinearScale(
      accessor: (map) => map['sold'] as num,
      nice: true,
    )
  },
  geoms: [graphic.IntervalGeom(
    position: graphic.PositionAttr(field: 'genre*sold'),
  )],
  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 :)

630
likes
0
pub points
96%
popularity

Publisher

unverified uploader

A data visualization (charts / chart / charting) library based on Grammar of Graphics.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, intl, meta, vector_math

More

Packages that depend on graphic