Skip to content

Instantly share code, notes, and snippets.

@TahaHachana
Last active August 29, 2015 14:08
Show Gist options
  • Save TahaHachana/06e0b39407ba2e6f8100 to your computer and use it in GitHub Desktop.
Save TahaHachana/06e0b39407ba2e6f8100 to your computer and use it in GitHub Desktop.
#r "PresentationCore.dll"
#r "PresentationFramework.dll"
#r "System.Xaml.dll"
#r "WindowsBase.dll"
#load "../packages/XPlot.GoogleCharts.1.0.1/XPlot.GoogleCharts.fsx"
open System.Windows
open System.Windows.Controls
open XPlot.GoogleCharts
let initWindow() =
let wnd = Window()
wnd.Height <- 700.
wnd.Width <- 1000.
wnd.Topmost <- true
wnd.WindowStartupLocation <- WindowStartupLocation.CenterScreen
wnd
let showInWindow (chart:GoogleChart) =
let wnd = initWindow()
let browser = new WebBrowser()
browser.NavigateToString chart.Html
wnd.Content <- browser
wnd.Show()
"Google Chart"
fsi.AddPrinter showInWindow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment