使用来自 fsi 的 XPlot 的异常
Exception using XPlot from fsi
我正在尝试 运行 XPLot Xplot from FSI. I've installed all the nuget packages 的一个简单示例,我在他们的 hello world 页面中复制了该示例。
#r "../packages/Google.DataTable.Net.Wrapper.1.0.0/lib/Google.DataTable.Net.Wrapper.dll"
#r "../packages/Newtonsoft.Json.3.5.8/lib/35/Newtonsoft.Json.dll"
#r "System.Core.dll"
#r "System.dll"
#r "System.Numerics.dll"
#r "../packages/XPlot.GoogleCharts.1.3.1/lib/net45/XPlot.GoogleCharts.dll"
open XPlot.GoogleCharts
let Bolivia = [("2004", 400.0); ("2005", 500.0); ("2006", 900.0); ("2007", 700.0) ]
let Ecuador = [("2004", 500.0); ("2005", 700.0); ("2006", 600.0); ("2007", 900.0) ]
let Madagascar = [("2004", 100.0); ("2005", 200.0); ("2006", 300.0); ("2007", 400.0) ]
let series = [ "bars"; "bars"; "bars"]
let inputs = [ Bolivia; Ecuador; Madagascar ]
let chart =
inputs
|> Chart.Combo
|> Chart.WithOptions
(Options(title = "Coffee Production", series =
[| for typ in series -> Series(typ) |]))
|> Chart.WithLabels
["Bolivia"; "Ecuador"; "Madagascar"]
|> Chart.WithLegend true
|> Chart.WithSize (600, 250)
现在,例如,当我尝试获取图表的 HTML 时...
chart.Html
...我收到以下错误:
> System.TypeLoadException: Could not load type 'Google.DataTable.Net.Wrapper.Extension.SystemDataTableExtension' from assembly 'Google.DataTable.Net.Wrapper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at XPlot.GoogleCharts.GoogleChart.get_Js()
at XPlot.GoogleCharts.GoogleChart.get_Html() in C:\Users\AHMED\Documents\GitHub\XPlot\src\XPlot.GoogleCharts\Main.fs:line 282
at <StartupCode$FSI_0006>.$FSI_0006.main@() in C:\Projects\XPlotTest\XPlotTest\Script.fsx:line 18
我做错了什么?我怎样才能让它发挥作用?
非常感谢,
尝试将 Google.DataTable.Net.Wrapper 更新为 latest version (3.1.2)
#r "../packages/Google.DataTable.Net.Wrapper.3.1.2.0\lib\Google.DataTable.Net.Wrapper.dll"
(...)
let html = chart.Html
:
val html : string =
"<!DOCTYPE html>
<html>
<head>
<met"+[1535 chars]
我正在尝试 运行 XPLot Xplot from FSI. I've installed all the nuget packages 的一个简单示例,我在他们的 hello world 页面中复制了该示例。
#r "../packages/Google.DataTable.Net.Wrapper.1.0.0/lib/Google.DataTable.Net.Wrapper.dll"
#r "../packages/Newtonsoft.Json.3.5.8/lib/35/Newtonsoft.Json.dll"
#r "System.Core.dll"
#r "System.dll"
#r "System.Numerics.dll"
#r "../packages/XPlot.GoogleCharts.1.3.1/lib/net45/XPlot.GoogleCharts.dll"
open XPlot.GoogleCharts
let Bolivia = [("2004", 400.0); ("2005", 500.0); ("2006", 900.0); ("2007", 700.0) ]
let Ecuador = [("2004", 500.0); ("2005", 700.0); ("2006", 600.0); ("2007", 900.0) ]
let Madagascar = [("2004", 100.0); ("2005", 200.0); ("2006", 300.0); ("2007", 400.0) ]
let series = [ "bars"; "bars"; "bars"]
let inputs = [ Bolivia; Ecuador; Madagascar ]
let chart =
inputs
|> Chart.Combo
|> Chart.WithOptions
(Options(title = "Coffee Production", series =
[| for typ in series -> Series(typ) |]))
|> Chart.WithLabels
["Bolivia"; "Ecuador"; "Madagascar"]
|> Chart.WithLegend true
|> Chart.WithSize (600, 250)
现在,例如,当我尝试获取图表的 HTML 时... chart.Html
...我收到以下错误:
> System.TypeLoadException: Could not load type 'Google.DataTable.Net.Wrapper.Extension.SystemDataTableExtension' from assembly 'Google.DataTable.Net.Wrapper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at XPlot.GoogleCharts.GoogleChart.get_Js()
at XPlot.GoogleCharts.GoogleChart.get_Html() in C:\Users\AHMED\Documents\GitHub\XPlot\src\XPlot.GoogleCharts\Main.fs:line 282
at <StartupCode$FSI_0006>.$FSI_0006.main@() in C:\Projects\XPlotTest\XPlotTest\Script.fsx:line 18
我做错了什么?我怎样才能让它发挥作用?
非常感谢,
尝试将 Google.DataTable.Net.Wrapper 更新为 latest version (3.1.2)
#r "../packages/Google.DataTable.Net.Wrapper.3.1.2.0\lib\Google.DataTable.Net.Wrapper.dll"
(...)
let html = chart.Html
:
val html : string =
"<!DOCTYPE html>
<html>
<head>
<met"+[1535 chars]