Skip to content

Commit

Permalink
[bug fix] Fixed adhoc metric is not working for WordCloud (apache#5877)
Browse files Browse the repository at this point in the history
* fixed adhoc metric

* change rotate default to flat

(cherry picked from commit 8569261)
(cherry picked from commit 19aaee2)
  • Loading branch information
conglei authored and betodealmeida committed Oct 30, 2018
1 parent 09c39a6 commit 61b7e9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion superset/assets/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ export const controls = {
label: t('Rotation'),
choices: formatSelectOptions(['random', 'flat', 'square']),
renderTrigger: true,
default: 'square',
default: 'flat',
description: t('Rotation to apply to words in the cloud'),
},

Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/visualizations/word_cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function wordCloud(element, props) {

const chart = d3.select(element);
const size = [width, height];
const rotationFn = ROTATION[rotation] || ROTATION.random;
const rotationFn = ROTATION[rotation] || ROTATION.flat;

const scale = d3.scale.linear()
.range(sizeRange)
Expand Down

0 comments on commit 61b7e9e

Please sign in to comment.