【问题标题】:ZingChart does not display all the words in wordcloudZingChart 不显示 wordcloud 中的所有单词
【发布时间】:2016-10-27 11:04:06
【问题描述】:

我正在使用 wordcloud,我只是传递了一组我想在 word cloud 中显示而不会被忽略的单词。例如, "text" : "you are a good person" 所有像 "you"," are","a","good","person" 这样的词。我怎样才能做到这一点??这方面的所有文档在哪里可用??

【问题讨论】:

    标签: javascript charts zingchart


    【解决方案1】:

    完全披露我是 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>

    【讨论】:

      猜你喜欢
      • 2018-10-10
      • 2017-03-31
      • 2015-11-25
      • 1970-01-01
      • 2020-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多