Skip to content

Commit

Permalink
update proptypes
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed Aug 21, 2018
1 parent c4506b0 commit bd04e1e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion superset/assets/src/visualizations/word_cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const ROTATION = {
};

const propTypes = {
data: PropTypes.array,
data: PropTypes.arrayOf(PropTypes.shape({
size: PropTypes.number,
text: PropTypes.string,
})),
width: PropTypes.number,
height: PropTypes.number,
rotation: PropTypes.string,
Expand All @@ -30,6 +33,8 @@ function wordCloud(element, props) {
colorScheme,
} = props;

console.log('data', data);

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

0 comments on commit bd04e1e

Please sign in to comment.