function set( type ) {
	/* eslint-disable no-invalid-this */
	if ( !isChartType( type ) ) {
		throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', 'type', CHART_TYPES.join( '", "' ), type ) );
	}
	if ( type !== this._type ) {
		debug( 'Current value: %s.', this._type );

		this._type = type;
		debug( 'New value: %s.', this._type );

		this.emit( 'change' );
	}
}
Sets the sparkline chart type.

@private
@param {string} type - chart type
@throws {TypeError} must be a supported chart type