Last active
August 29, 2015 14:08
-
-
Save TahaHachana/06e0b39407ba2e6f8100 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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