所以我在一页中同时使用 ammap 和 amcharts。问题是,amcharts.js 总是禁用我的 ammap 的图例并使其不可见。
我该如何解决这个问题?
amcharts 图例设置:
"legend": {
"width" : "100%",
"maxRows": 1,
"position": "bottom",
// "useGraphSettings": true,
"markerSize": 10,
"align" : "center",
},
ammap 图例设置:
"legend" : {
"width": "30%",
"useGraphSettings": true,
"marginRight": 27,
"marginLeft": 27,
"equalWidths": false,
"backgroundAlpha": 0.2,
"backgroundColor": "#000000",
"borderColor": "#ffffff",
"top": 450,
"left": 0,
"horizontalGap": 10,
"data": [ {
"title": "Negeri",
"color": "#BF55EC",
// "customMarker": "https://www.amcharts.com/lib/3/images/car.png"
}, {
"title": "Swasta",
"color": "#32C5D2",
"border" : "#000000"
} ],
}
但我认为问题不在于我的代码。每当我注释掉 amcharts.js 时,它就会再次工作。