Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.75 KB | None | 0 0
  1. open System
  2. open System.Collections.Generic
  3. open System.Windows.Forms
  4. open System.Windows.Forms.DataVisualization.Charting
  5. open System.Reactive.Linq;
  6. open FSharp.Charting
  7.  
  8.  
  9. [<EntryPoint>]
  10. [<STAThread>]
  11. let main argv =
  12.  
  13.     Application.EnableVisualStyles()
  14.     Application.SetCompatibleTextRenderingDefault false
  15.  
  16.     let form = new Form(Visible = true, TopMost = true,
  17.                             Width = 700, Height = 500)
  18.     let rand = new Random()
  19.  
  20.     let obs = Observable.Interval(TimeSpan.FromSeconds(2.0))
  21.                 |> Observable.map(fun x -> DateTime.Now.ToShortDateString(),rand.Next(0,21))
  22.    
  23.     let one  = LiveChart.FastLineIncremental(obs,Name="SimpleExample")
  24.     one.ShowChart()
  25.    
  26.     Application.Run form
  27.     0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement