Created
October 6, 2016 11:18
-
-
Save smzn/87b29bedd22f9b267fd6779abcc44b01 to your computer and use it in GitHub Desktop.
WordCloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://d3js.org/d3.v3.min.js"></script> | |
<?php echo $this->Html->script('d3.layout.cloud.js');?> | |
<script>var tags = [ | |
<?php for($index = 0; $index < count($weight); $index++){ ?> | |
{"key": "<?php echo $weight[$index][0];?>", "value": <?php echo $weight[$index][1];?>}, | |
<?php }?> | |
] | |
</script> | |
<div id="vis"></div> | |
<?php echo $this->Html->script('word-cloud.js');?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment