我正试图从NEO4J db中显示json电影的图表。但它显示一个空白页面,在控制台中显示错误。这里输出: 代码如下:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="one">
<div id="text1">
this is my text
</div>
</div>
<div id="two">
</div>
答案 0 :(得分:1)
我认为这不是初始化库的方法。将脚本修改为
<script type="text/javascript">
var config ={
dataSource: "../result.json",
dataType:'html',
nodeCaption:'name',
nodeMouseOver:'name',
cluster: true,
clusterColours:["#1B9E77,#D95F02,#7570B3,#E7298A,#66A61E,#E6AB02"]
};
alchemy = new Alchemy(config);
</script>
Referencce http://graphalchemist.github.io/Alchemy/#/examples
看起来你没有加载alchemyjs。你只加载alchemyjs的依赖项。包括两个脚本
<script src="https://cdnjs.cloudflare.com/ajax/libs/alchemyjs/0.4.2/scripts/vendor.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/alchemyjs/0.4.2/alchemy.min.js"></script>