Skip to content

Instantly share code, notes, and snippets.

@smzn

smzn/graph.ctp

Created Oct 6, 2016
Embed
What would you like to do?
WordCloud
<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
You can’t perform that action at this time.