为什么 XPlot.GoogleCharts.Chart.Map 不生成工具提示?

Why isn't XPlot.GoogleCharts.Chart.Map producing tooltips?

我正在尝试使用 XPlot 和 googlecharts.chart.map 在地图上绘制位置。

我按照找到的示例进行操作,但生成的地图在指定位置没有工具提示。

为了调试我的代码,我只是尝试重现该示例,结果相同,即在指定位置没有标记。

我的示例 (https://fslab.org/XPlot/chart/google-map-chart.html) 的实现如下:

let data =
        [
            "China", "China: 1,363,800,000"
            "India", "India: 1,242,620,000"
            "US", "US: 317,842,000"
            "Indonesia", "Indonesia: 247,424,598"
            "Brazil", "Brazil: 201,032,714"
            "Pakistan", "Pakistan: 186,134,000"
            "Nigeria", "Nigeria: 173,615,000"
            "Bangladesh", "Bangladesh: 152,518,015"
            "Russia", "Russia: 146,019,512"
            "Japan", "Japan: 127,120,000"
        ]


let options = XPlot.GoogleCharts.Configuration.Options(showTip = true)

let chart =  data 
             |> XPlot.GoogleCharts.Chart.Map
             |> XPlot.GoogleCharts.Chart.WithOptions options
             |> XPlot.GoogleCharts.Chart.WithHeight 420
             |> XPlot.GoogleCharts.Chart.WithWidth 800

chart |> XPlot.GoogleCharts.Chart.Show

显示的地图没有任何标记。

应该如何修改代码以确保标记位置?

缺少工具提示的问题源不在您的代码中,而是在周围环境中。

如果您在不做任何更改的情况下使用 F# 控制台图表应用程序代码,但将其与 nuget 包绑定 XPlot.GoogleCharts ver 1.4.2 instead of the latest at the moment XPlot.GoogleCharts ver 1.5.0,它将按预期工作,即 工具提示将出现 即使在浏览器中查看的 html 静态页面上。

我认为回归与 XPlot.GoogleCharts 本身无关,很可能是由 change to the way of loading JS libraries introduced by Google: XPlot.GoogleCharts ver 1.4.2 uses the old loader , while the latest XPlot.GoogleCharts ver 1.5.0 uses the new one.

引起的