function set( data ) {
	/* eslint-disable no-invalid-this */
	var FLG;
	var i;

	FLG = isndarrayLike( data ) && typeof data.iget === 'function';
	if ( !isCollection( data ) && !FLG ) {
		throw new TypeError( format( 'invalid assignment. `%s` must be an array-like object or an ndarray. Value: `%s`.', 'data', data ) );
	}
	if ( data.length > this._bufferSize ) {
		throw new RangeError( format( 'invalid assignment. `%s` length exceeds maximum data buffer size. Buffer size: `%u`. Length: `%u`.', 'data', this._bufferSize, data.length ) );
	}
	debug( 'Current value: %s.', JSON.stringify( this._data ) );

	this._data = [];
	if ( FLG ) {
		for ( i = 0; i < data.length; i++ ) {
			this._data.push( data.iget( i ) );
		}
	} else {
		for ( i = 0; i < data.length; i++ ) {
			this._data.push( data[ i ] );
		}
	}
	debug( 'New value: %s.', JSON.stringify( this._data ) );
	this.emit( 'change' );
}
Sets the sparkline data.

@private
@param {(Collection|ndarrayLike)} data - sparkline data
@throws {TypeError} must be an array-like object or an ndarray
@throws {RangeError} length must not exceed maximum data buffer size