Javascript amcharts 4 worldmap上工具提示中的交互式内容不起作用

Javascript amcharts 4 worldmap上工具提示中的交互式内容不起作用,javascript,tooltip,amcharts,Javascript,Tooltip,Amcharts,这是我的javascript世界地图。其想法是让工具提示弹出窗口包含指向url的链接,允许用户单击该链接,并在另一个选项卡/窗口中打开url。工具提示只是远离指针,无法单击带有url的嵌入标记。如何阻止工具提示远离指针?(tooltipPosition:已修复或指针未更改任何内容) //创建映射实例 var chart=am4core.create(“chartdiv”,am4maps.MapChart); //设置地图定义 chart.geodata=am4geodata\u worldLow

这是我的javascript世界地图。其想法是让工具提示弹出窗口包含指向url的链接,允许用户单击该链接,并在另一个选项卡/窗口中打开url。工具提示只是远离指针,无法单击带有url的嵌入标记。如何阻止工具提示远离指针?(tooltipPosition:已修复或指针未更改任何内容)

//创建映射实例
var chart=am4core.create(“chartdiv”,am4maps.MapChart);
//设置地图定义
chart.geodata=am4geodata\u worldLow;
//集合投影
chart.projection=新的am4maps.projections.Miller();
//禁用缩放和平移
chart.seriesContainer.draggable=false;
chart.seriesContainer.resizeable=false;
chart.maxZoomLevel=1;
//灰色背景地图系列
var worldSeries=chart.series.push(新的am4maps.MapPolygonSeries());
worldSeries.exclude=[“AQ”];
worldSeries.useGeodata=真;
var polygonTemplate=worldSeries.mapPolygons.template;
polygontamplate.fill=am4core.color(“#ebebebebebeb”);
//创建地图多边形系列
var polygonSeries=chart.series.push(新的am4maps.mappygonseries());
//使地图从GeoJSON加载多边形(如国家名称)数据
polygoseries.useGeodata=true;
//配置系列
var polygontamplate=polygonSeries.mapPolygons.template;
polygoontemplate.tooltipHTML=“{name}

{email}
{phone}”; 添加(“ToolTiHTML”,函数(html,ev){ 如果(!ev.dataItem.dataContext.site){ 返回“{name}”; } 返回html; }) polygontamplate.fill=am4core.color(“#6f52a8”); polygonSeries.tooltip.InteractionEnabled=true;//允许交互 PolygoSeries.tooltip.pointerOrientation=“垂直”; //创建悬停状态并设置替代填充颜色 var hs=polygonTemplate.states.create(“悬停”); hs.properties.fill=am4core.color(“#442580”); //包括 包括=[“AD”,“AR”,“AM”,“AU”,“AT”,“BS”,“BB”,“BZ”,“BM”,“BO”,“BR”,“BG”,“KH”,“CM”,“CA”,“CL”,“CN”,“CO”,“HR”,“DO”,“AE”,“EC”,“EG”,“DE”,“GT”,“HN”,“HK”,“IN”,“ID”,“IR”,“IQ”,“IL”,“IT”,“JP”,“JO”,“KW”,“LB”,“LY”,“MK”,“MX”,“MM”,“NL”,“NG”,“PK”,“PA”,“PY”,“PE”,“PH”,“PR”,“RU”,“RS”,“SG”,“SR”、“CH”、“TW”、“TT”、“TR”、“UA”、“GB”、“US”、“VE”、“VN” ];
// Create map instance
var chart = am4core.create("chartdiv", am4maps.MapChart);

// Set map definition
chart.geodata = am4geodata_worldLow;

// Set projection
chart.projection = new am4maps.projections.Miller();

// Disable Zoom and Pan
chart.seriesContainer.draggable = false;
chart.seriesContainer.resizable = false;
chart.maxZoomLevel = 1;

// Series for gray background map
var worldSeries = chart.series.push(new am4maps.MapPolygonSeries());
worldSeries.exclude = ["AQ"];
worldSeries.useGeodata = true;
var polygonTemplate = worldSeries.mapPolygons.template;
polygonTemplate.fill = am4core.color("#ebebeb");

// Create map polygon series
var polygonSeries = chart.series.push(new am4maps.MapPolygonSeries());

// Make map load polygon (like country names) data from GeoJSON
polygonSeries.useGeodata = true;

// Configure series
var polygonTemplate = polygonSeries.mapPolygons.template;
polygonTemplate.tooltipHTML = "{name}<br/><a style=\"color:white; text-decoration: underline;\" href=\"{site}\" target=\"_blank\">{site}</a><br/>{email}<br/>{phone}";
polygonTemplate.adapter.add("tooltipHTML", function (html, ev) {
    if (!ev.dataItem.dataContext.site) {
        return "{name}";
    }
    return html;
})

polygonTemplate.fill = am4core.color("#6f52a8");


polygonSeries.tooltip.interactionsEnabled = true;  // allow interaction
polygonSeries.tooltip.pointerOrientation = "vertical";

// Create hover state and set alternative fill color
var hs = polygonTemplate.states.create("hover");
hs.properties.fill = am4core.color("#442580");


// Include
polygonSeries.include = ["AD", "AR", "AM" , "AU", "AT", "BS" , "BB", "BZ", "BM", "BO", "BR",, "BG", "KH", "CM", "CA", "CL", "CN", "CO" , "HR", "DO", "AE", "EC", "EG", "DE", "GT", "HN", "HK", "IN", "ID", "IR", "IQ", "IL", "IT", "JP", "JO", "KW", "LB", "LY",  "MK", "MX", "MM", "NL", "NG", "PK", "PA", "PY", "PE", "PH", "PR", "RU" , "SA", "RS", "SG", "SR", "CH", "TW", "TT", "TR", "UA", "GB", "US", "VE", "VN"
];