Google Treemap Chart
open XPlot.GoogleCharts
let data =
[
"Global", "", 0, 0
"America", "Global", 0, 0
"Europe", "Global", 0, 0
"Asia", "Global", 0, 0
"Australia", "Global", 0, 0
"Africa", "Global", 0, 0
"Brazil", "America", 11, 10
"USA", "America", 52, 31
"Mexico", "America", 24, 12
"Canada", "America", 16, -23
"France", "Europe", 42, -11
"Germany", "Europe", 31, -2
"Sweden", "Europe", 22, -13
"Italy", "Europe", 17, 4
"UK", "Europe", 21, -5
"China", "Asia", 36, 4
"Japan", "Asia", 20, -12
"India", "Asia", 40, 63
"Laos", "Asia", 4, 34
"Mongolia", "Asia", 1, -5
"Israel", "Asia", 12, 24
"Iran", "Asia", 18, 13
"Pakistan", "Asia", 11, -52
"Egypt", "Africa", 21, 0
"S. Africa", "Africa", 30, 43
"Sudan", "Africa", 12, 2
"Congo", "Africa", 10, 12
"Zaire", "Africa", 8, 10
]
let options =
Options(
minColor = "#f00",
midColor = "#ddd",
maxColor = "#0d0",
headerHeight = 15,
fontColor = "black",
showScale = true
)
let chart =
data
|> Chart.Treemap
|> Chart.WithOptions options
|> Chart.WithLabels
[
"Location"
"Parent"
"Market trade volume (size)"
"Market increase/decrease (color)"
]
Google Chart
namespace XPlot
namespace XPlot.GoogleCharts
val data : (string * string * int * int) list
val options : Options
Multiple items
type Options =
new : unit -> Options
member ShouldSerializeaggregationTarget : unit -> bool
member ShouldSerializeallValuesSuffix : unit -> bool
member ShouldSerializeallowHtml : unit -> bool
member ShouldSerializealternatingRowStyle : unit -> bool
member ShouldSerializeanimation : unit -> bool
member ShouldSerializeannotations : unit -> bool
member ShouldSerializeannotationsWidth : unit -> bool
member ShouldSerializeareaOpacity : unit -> bool
member ShouldSerializeavoidOverlappingGridLines : unit -> bool
...
--------------------
new : unit -> Options
val chart : GoogleChart
type Chart =
static member Annotation : data:seq<DateTime * #value * string * string> * ?Labels:seq<string> * ?Options:Options -> GoogleChart + 1 overload
static member Area : data:seq<#value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart + 2 overloads
static member Bar : data:seq<#value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart + 2 overloads
static member Bubble : data:seq<string * #value * #value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart + 2 overloads
static member Calendar : data:seq<DateTime * #value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart
static member Candlestick : data:seq<#key * #value * #value * #value * #value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart + 1 overload
static member Column : data:seq<#value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart + 2 overloads
static member Combo : data:seq<#seq<'K * 'V>> * ?Labels:seq<string> * ?Options:Options -> GoogleChart (requires 'K :> key and 'V :> value)
static member private Create : data:seq<#seq<'T>> -> labels:seq<string> option -> options:Options option -> chartType:ChartGallery -> datumNew:('T -> Datum) -> GoogleChart
static member private Create' : data:seq<#value> -> labels:seq<string> option -> options:Options option -> chartType:ChartGallery -> GoogleChart
...
static member Chart.Treemap : data:seq<string * string * #value * #value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart
static member Chart.Treemap : data:seq<string * string * #value> * ?Labels:seq<string> * ?Options:Options -> GoogleChart
static member Chart.WithOptions : options:Options -> chart:GoogleChart -> GoogleChart
static member Chart.WithLabels : labels:seq<string> -> chart:GoogleChart -> GoogleChart
member GoogleChart.GetHtml : unit -> string