ZingChart无法显示词云中的所有单词。

4

我正在使用词云,只需传递一组想要显示在词云中的单词即可,而不会被忽略。例如:"text" : "you are a good person",所有类似于"you"、"are"、"a"、"good"、"person"的单词都将显示在词云中。我应该怎么做?文档在哪里可以找到?

1个回答

4

完全透明,我是ZingChart团队的成员。

有一个名为min-length的属性,默认值为2。您可以将其设置为1或0。我们在画廊中展示了一些很酷的示例。我们还在这里提供了词云文档。

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>


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接