diff --git a/caravel/assets/javascripts/explorev2/components/ChartContainer.jsx b/caravel/assets/javascripts/explorev2/components/ChartContainer.jsx index 00967f79d8..698d6a7cee 100644 --- a/caravel/assets/javascripts/explorev2/components/ChartContainer.jsx +++ b/caravel/assets/javascripts/explorev2/components/ChartContainer.jsx @@ -5,12 +5,13 @@ import moment from 'moment'; const propTypes = { viz: PropTypes.shape({ - data: PropTypes.object.isRequired, + data: PropTypes.array.isRequired, form_data: PropTypes.shape({ - slice_name: PropTypes.object.isRequired, + viz_type: PropTypes.string.isRequired, + slice_name: PropTypes.string.isRequired, }).isRequired, }).isRequired, - height: PropTypes.number.isRequired, + height: PropTypes.string.isRequired, }; export default class ChartContainer extends React.Component { @@ -45,6 +46,12 @@ export default class ChartContainer extends React.Component { return newValues; } + isLineViz() { + // todo(alanna) generalize this check and map to charts + const vizType = this.props.viz.form_data.viz_type; + return vizType === 'line'; + } + render() { return (