Commit 66615cab by Vasyl Nakvasiuk

fix cloude size

parent 82f87a91
...@@ -48,13 +48,12 @@ WordCloudMain.prototype = { ...@@ -48,13 +48,12 @@ WordCloudMain.prototype = {
inputSection = this.wordCloudEl.find('#input-cloud-section'); inputSection = this.wordCloudEl.find('#input-cloud-section');
resultSection = this.wordCloudEl.find('#result-cloud-section'); resultSection = this.wordCloudEl.find('#result-cloud-section');
resultSection.text('TODO: Word cloud canvas');
inputSection.hide(); inputSection.hide();
resultSection.show(); resultSection.show();
words = response.top_words; words = response.top_words;
d3.layout.cloud().size([5, 5]) d3.layout.cloud().size([500, 500])
.words(words) .words(words)
.rotate(function () { .rotate(function () {
return ~~(Math.random() * 2) * 90; return ~~(Math.random() * 2) * 90;
...@@ -74,7 +73,7 @@ WordCloudMain.prototype = { ...@@ -74,7 +73,7 @@ WordCloudMain.prototype = {
.attr('width', 500) .attr('width', 500)
.attr('height', 500) .attr('height', 500)
.append('g') .append('g')
// .attr('transform', 'translate(125,125)') .attr('transform', 'translate(125,125)')
.selectAll('text') .selectAll('text')
.data(words) .data(words)
.enter().append('text') .enter().append('text')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment