我在着陆页中从Anychart添加了一个tagCloud图表,但发现此警告并且几天以来该图表不可见。
这是脚本
<script src="https://cdn.anychart.com/releases/v8/js/anychart-base.min.js"></script>
<script src="https://cdn.anychart.com/releases/v8/js/anychart-tag-cloud.min.js"></script>
有解决方法吗?
谢谢。
更新
我这样配置图表
anychart.onDocumentReady(function() {
var data = [
{"x": "Family", "value": 10, category: "Family"},
{"x": "Friends", "value": 10, category: "Friends"}
];
var chart = anychart.tagCloud(data);
var tooltip = chart.tooltip();
chart.tooltip().useHtml(true);
tooltip.positionMode("point");
tooltip.format("Goal steps: <b>{%value}");
chart.tooltip(false);
chart.angles([0])
chart.container("wordCloudChart");
var dict = {
"Family": "https://www.google.com",
"Friends": "https://www.google.it"
};
chart.listen("pointClick", function(e){
for(var key in dict) {
var valueSelected = dict[e.point.get("x")];
window.open(valueSelected, "_blank");
}
});
chart.background().fill({
keys: ["#2a2a2a", "#2a2a2a", "#2a2a2a"],
angle: 130,
});
chart.tooltip().format(function(e){
var value = ((this.value)*100)/200000;
return "Value: " + value + "%";
});
chart.scale(anychart.scales.linear());
chart.draw();
});