Skip to content

Instantly share code, notes, and snippets.

@ashic
Created February 20, 2013 09:18
Show Gist options
  • Save ashic/4994216 to your computer and use it in GitHub Desktop.
Save ashic/4994216 to your computer and use it in GitHub Desktop.
open System
open MSDN.FSharp.Charting
open System.Windows.Forms.DataVisualization.Charting
[<EntryPoint>]
let main argv =
let r = Random()
let chart = [for d in 0..100 ->
(d, d*2)]
|> fun x -> FSharpChart.Column (x, Name = "Stuff")
|> FSharpChart.WithSeries.Style (Color = System.Drawing.Color.Orange, BorderColor = System.Drawing.Color.Green, BorderWidth = 20)
|> FSharpChart.WithSeries.AxisType (YAxisType = AxisType.Secondary, XAxisType = AxisType.Primary)
|> FSharpChart.WithArea.AxisX (Minimum = 0.0, Maximum = 200.0, MajorGrid = Grid(Enabled=true))
|> FSharpChart.WithArea.AxisY (Minimum = 0.0, Maximum = 200.0, Title = "Val", TitleFont = new Drawing.Font("Calibri", 11.0f), MajorGrid = Grid(LineColor = System.Drawing.Color.LightGray))
|> FSharpChart.WithCreate
chart.SaveChartAs("D:foo.jpeg", ChartImageFormat.Jpeg)
Console.ReadLine() |> ignore
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment