我正在使用 wordcloud,我只是传递一组我希望在不被忽略的情况下显示在词云中的词。例如, "text": "you are a good person"所有像"you","are","a","good","person"这样的词。我怎样才能做到这一点??哪里有这方面的所有文档??
最佳答案
完全公开我是 ZingChart 团队的成员。
有一个名为 min-length
的属性,其默认值为 2。您可以将该值设置为 1 或 0。我们的 gallery 中有一些很棒的示例.我们还有 wordcloud 文档 here .
var myConfig = {
"graphset":[
{
"type":"wordcloud",
"options":{
"text":"you are a gg good person",
"max-items":200,
"min-length":1
}
}
]
};
zingchart.render({
id : 'myChart',
data : myConfig,
height: "100%",
width: "100%"
});
html,body,#myChart{
height: 100%;
width: 100%;
}
<!DOCTYPE html>
<html>
<head>
<!--Assets will be injected here on compile. Use the assets button above-->
<script src= "https://cdn.zingchart.com/zingchart.min.js"></script>
<script> zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";
</script>
<!--Inject End-->
</head>
<body>
<div id='myChart'></div>
</body>
</html>
关于javascript - ZingChart 不显示 wordcloud 中的所有单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40282999/