function validate( state ) {
	/* eslint-disable no-underscore-dangle */
	var x;
	var y;
	var i;

	x = state._xData;
	y = state._yData;
	if ( x.length !== y.length ) {
		throw new Error( format( 'invalid state. x and y are different lengths. x length: `%u`. y length: `%u`.', x.length, y.length ) );
	}
	// TODO: will need to refactor to some degree to support `ndarray`-like `x` and `y`
	for ( i = 0; i < x.length; i++ ) {
		if ( x[ i ].length !== y[ i ].length ) {
			throw new Error( format( 'invalid state. Each `x[i]:y[i]` pair must be the same length. x[%u].length: `%u`, y[%u].length: `%u`.', i, x[i].length, i, y[i].length ) );
		}
	}
}
Validates that an instance is in a valid state for rendering.

@private
@param {Object} state - state
@throws {Error} must be in a valid state to render