| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Charts.Internal.Chart
Synopsis
- data Column
- data ChartStyle
- data ChartOptions = ChartOptions Value
- defaultChartOptions :: ChartOptions
- data Chart = Chart {
- options :: ChartOptions
- style :: ChartStyle
- columns :: [Column]
- dataTable :: [[Value]]
- dynamic :: Bool
- buildChart :: ChartOptions -> ChartStyle -> [Column] -> [[Value]] -> Chart
Documentation
Valid Column types. Each "data" column also accepts a column header. Role columns do not.
See https://developers.google.com/chart/interactive/docs/roles
Constructors
| NumberColumn Text | |
| StringColumn Text | |
| BoolColumn Text | |
| DateColumn Text | |
| DateTimeColumn Text | |
| TimeOfDayColumn Text | |
| AnnotationColumn | |
| AnnotationTextColumn | |
| CertaintyColumn | |
| EmphasisColumn | |
| IntervalColumn | |
| ScopeColumn | |
| StyleColumn | |
| TooltipColumn | |
| DomainColumn | This is typically inferred and explicitly |
| DataColumn | This is typically inferred and explicitly |
data ChartStyle Source #
Supported chart types See https://developers.google.com/chart/interactive/docs/gallery
Constructors
| LineChart | |
| Histogram | |
| BarChart | |
| ColumnChart | |
| ScatterChart | |
| AreaChart | |
| PieChart | |
| BubbleChart | |
| SteppedAreaChart | |
| CandlestickChart |
Instances
| Eq ChartStyle Source # | |
Defined in Charts.Internal.Chart | |
| Ord ChartStyle Source # | |
Defined in Charts.Internal.Chart Methods compare :: ChartStyle -> ChartStyle -> Ordering # (<) :: ChartStyle -> ChartStyle -> Bool # (<=) :: ChartStyle -> ChartStyle -> Bool # (>) :: ChartStyle -> ChartStyle -> Bool # (>=) :: ChartStyle -> ChartStyle -> Bool # max :: ChartStyle -> ChartStyle -> ChartStyle # min :: ChartStyle -> ChartStyle -> ChartStyle # | |
| Show ChartStyle Source # | |
Defined in Charts.Internal.Chart Methods showsPrec :: Int -> ChartStyle -> ShowS # show :: ChartStyle -> String # showList :: [ChartStyle] -> ShowS # | |
| ToJSON ChartStyle Source # | |
Defined in Charts.Internal.Chart Methods toJSON :: ChartStyle -> Value # toEncoding :: ChartStyle -> Encoding # toJSONList :: [ChartStyle] -> Value # toEncodingList :: [ChartStyle] -> Encoding # | |
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 |
Instances
| ToJSON ChartOptions Source # | |
Defined in Charts.Internal.Chart Methods toJSON :: ChartOptions -> Value # toEncoding :: ChartOptions -> Encoding # toJSONList :: [ChartOptions] -> Value # toEncodingList :: [ChartOptions] -> Encoding # | |
defaultChartOptions :: ChartOptions Source #
Empty chart options
The primary chart type. Build using buildChart.
buildChart :: ChartOptions -> ChartStyle -> [Column] -> [[Value]] -> Chart Source #
Construct a chart.
e.g.
buildChart defaultChartOptions BarChart [StringColumn Year, NumberColumn Population] [ [ String "2004", Number 1000 ] , [ String "2005", Number 1170 ] , [ String "2006", Number 660 ] , [ String "2007", Number 1030 ] ]