我正在尝试使用 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
地图显示没有任何标记。
应如何修改代码以确保标记位置?