charter-0.1.1.1
Safe HaskellNone
LanguageHaskell2010

Charts.Internal.Chart

Synopsis

Documentation

data Column Source #

Valid Column types. Each "data" column also accepts a column header. Role columns do not.

See https://developers.google.com/chart/interactive/docs/roles

Instances

Instances details
Eq Column Source # 
Instance details

Defined in Charts.Internal.Chart

Methods

(==) :: Column -> Column -> Bool #

(/=) :: Column -> Column -> Bool #

Show Column Source # 
Instance details

Defined in Charts.Internal.Chart

ToJSON Column Source # 
Instance details

Defined in Charts.Internal.Chart

data ChartOptions Source #

I plan to make this typesafe for each partiular chart type but that's a LOT of work, so for now it's just free-form, if you'd actually use this, please make an issue on Github so I know folks need this behaviour :)

Find your chart in the chart gallery to see which options it will accept.

https://developers.google.com/chart/interactive/docs/gallery

Constructors

ChartOptions Value 

data Chart Source #

The primary chart type.

Constructors

Chart 

Instances

Instances details
ToJSON Chart Source # 
Instance details

Defined in Charts.Internal.Chart

buildChart :: ChartOptions -> ChartStyle -> [Column] -> [[Value]] -> Chart Source #

Construct a chart.

e.g.

myChart :: Chart
myChart = buildChart defaultChartOptions BarChart
  [StringColumn Year, NumberColumn Population]
  [ [ String "2004", Number 1000 ]
  , [ String "2005", Number 1170 ]
  , [ String "2006", Number 660 ]
  , [ String "2007", Number 1030 ]
  ]