Added jquery methods to ChartContainer to get world_map viz working in exploreV2 (#1443)

This commit is contained in:
vera-liu 2016-11-03 15:50:36 -07:00 committed by GitHub
parent 77b6e2cd2e
commit 5882c7e344

View File

@ -40,13 +40,18 @@ class ChartContainer extends React.Component {
$(this.state.selector).html(data);
},
css: () => {
css: (dim, size) => {
// dimension can be 'height'
// pixel string can be '300px'
// should call callback to adjust height of chart
$(this.state.selector).css(dim, size);
},
height: () => parseInt(this.props.height, 10) - 100,
show: () => { this.render(); },
get: (n) => ($(this.state.selector).get(n)),
find: (classname) => ($(this.state.selector).find(classname)),
},