Commit 84bcea27 authored by Mael NICOLAS's avatar Mael NICOLAS

missed to add some files :/

parent 834766bf
module Charts.Data where
import Charts.Font (TextStyle, Icon)
import Prelude ((<<<))
import Unsafe.Coerce (unsafeCoerce)
type DataN =
{ name :: String
, icon :: Icon
, textStyle :: TextStyle
}
type DataV =
{ value :: String
, textStyle :: TextStyle
}
type DataS =
{ name :: String
, value :: Number
}
module Charts.Series where
import Charts.Data (DataS)
import Prelude (class Show, show, (<<<))
newtype SeriesType = SeriesType String
data SeriesShape = Line
| Bar | PictorialBar
| Pie
| Scatter | EffectScater
| Radar
| Tree | TreeMap
| Sunburst
| Boxplot
| Candlestick
| Heatmap
| Map
| Parallel
| Lines
| Graph
| Sankey
| Funnel
| Gauge
| ThemeRiver
instance showSeriesShape :: Show SeriesShape where
show Line = "line"
show Bar = "bar"
show Pie = "pie"
show Sunburst = "sunburst"
show Funnel = "funnel"
show Heatmap = "heatmap"
show _ = ""
seriesType :: SeriesShape -> SeriesType
seriesType = SeriesType <<< show
type Series =
{ name :: String
, "type" :: SeriesType
, "data" :: Array DataS
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment