基于D3.js绘制词云:使用GitHub源码的技术问询
哈喽~我把你这段用于D3.js词云开发的HTML代码整理成规范的Markdown格式啦,这样不管是自己调试还是后续提问都更清晰:
基于D3.js的词云项目HTML代码片段
你正在尝试使用GitHub上的D3.js源码绘制词云,以下是你的index.html文件内容(注意代码片段有截断,后续可以补充完整):
<html xmlns="html"> <head> <title>Visualization Medley</title> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <link rel="stylesheet" href="medley.css"> </head> <body> <div class="container"> <h3>Word Cloud</h3> <div id="world-cloud"></div> </div> <!-- 原代码在此处截断 --> </body> </html>
顺便提个小细节:你的词云容器ID写的是world-cloud(是world不是word),后续编写D3.js逻辑的时候要注意对应这个ID,避免因为拼写错误导致容器找不到哦~
内容的提问来源于stack exchange,提问作者Hello.World




