XPlot


Google Combo Chart

Binder

open XPlot.GoogleCharts

let Bolivia = ["2004/05", 165.; "2005/06", 135.; "2006/07", 157.; "2007/08", 139.; "2008/09", 136.]
let Ecuador = ["2004/05", 938.; "2005/06", 1120.; "2006/07", 1167.; "2007/08", 1110.; "2008/09", 691.]
let Madagascar = ["2004/05", 522.; "2005/06", 599.; "2006/07", 587.; "2007/08", 615.; "2008/09", 629.]
let ``Papua New Guinea`` = ["2004/05", 998.; "2005/06", 1268.; "2006/07", 807.; "2007/08", 968.; "2008/09", 1026.]
let Rwanda = ["2004/05", 450.; "2005/06", 288.; "2006/07", 397.; "2007/08", 215.; "2008/09", 366.]
let Average = ["2004/05", 614.6; "2005/06", 682.; "2006/07", 623.; "2007/08", 609.4; "2008/09", 569.6]

let options =
    Options(
        title = "Monthly Coffee Production by Country",
        vAxis = Axis(title = "Cups"),
        hAxis = Axis(title = "Month"),
        seriesType = "bars",
        series =
            [|
                for _ in 0 .. 4 -> Series(``type`` = "bars")
                yield Series(``type`` = "line")
            |]
    )

let chart =
    [Bolivia; Ecuador; Madagascar; ``Papua New Guinea``; Rwanda; Average]
    |> Chart.Combo
    |> Chart.WithOptions options
    |> Chart.WithLabels ["Bolivia"; "Ecuador"; "Madagascar"; "Papua New Guinea"; "Rwanda"; "Average"]
Google Chart
namespace XPlot
namespace XPlot.GoogleCharts
val Bolivia : (string * float) list
val Ecuador : (string * float) list
val Madagascar : (string * float) list
val ( Papua New Guinea ) : (string * float) list
val Rwanda : (string * float) list
val Average : (string * float) 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
Multiple items
type Axis =
  new : unit -> Axis
  member ShouldSerializeallowContainerBoundaryTextCufoff : unit -> bool
  member ShouldSerializebaseline : unit -> bool
  member ShouldSerializebaselineColor : unit -> bool
  member ShouldSerializedirection : unit -> bool
  member ShouldSerializeformat : unit -> bool
  member ShouldSerializegridlines : unit -> bool
  member ShouldSerializelogScale : unit -> bool
  member ShouldSerializemaxAlternation : unit -> bool
  member ShouldSerializemaxTextLines : unit -> bool
  ...

--------------------
new : unit -> Axis
Multiple items
type Series =
  new : ?type:string -> Series
  member ShouldSerializeannotations : unit -> bool
  member ShouldSerializeareaOpacity : unit -> bool
  member ShouldSerializecolor : unit -> bool
  member ShouldSerializecurveType : unit -> bool
  member ShouldSerializefallingColor : unit -> bool
  member ShouldSerializelineWidth : unit -> bool
  member ShouldSerializepointShape : unit -> bool
  member ShouldSerializepointSize : unit -> bool
  member ShouldSerializerisingColor : unit -> bool
  ...

--------------------
new : ?type:string -> Series
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.Combo : data:seq<#seq<'K * 'V>> * ?Labels:seq<string> * ?Options:Options -> GoogleChart (requires 'K :> key and 'V :> value)
static member Chart.WithOptions : options:Options -> chart:GoogleChart -> GoogleChart
static member Chart.WithLabels : labels:seq<string> -> chart:GoogleChart -> GoogleChart
member GoogleChart.GetHtml : unit -> string