Skip to content

Instantly share code, notes, and snippets.

@TahaHachana
Last active August 29, 2015 14:07
Show Gist options
  • Save TahaHachana/b2135ec0e93d28295bbb to your computer and use it in GitHub Desktop.
Save TahaHachana/b2135ec0e93d28295bbb to your computer and use it in GitHub Desktop.
#load "../packages/XPlot.GoogleCharts.1.0.1/XPlot.GoogleCharts.fsx"
open XPlot.GoogleCharts
let sales = ["2013", 1000; "2014", 1170; "2015", 660; "2016", 1030]
let expenses = ["2013", 400; "2014", 460; "2015", 1120; "2016", 540]
let options = Options()
options.title <- "Company Performance"
let hAxisOptions = Axis()
hAxisOptions.title <- "Year"
hAxisOptions.titleTextStyle <- TextStyle(color = "red")
options.hAxis <- hAxisOptions
let chart =
[sales; expenses]
|> Chart.Column
|> Chart.WithLabels ["Sales"; "Expenses"]
|> Chart.WithOptions options
|> Chart.WithLegend true
|> Chart.Show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment