js/app.js
/**
 * update the bubble chart
 * @param {the sample selected by the optionChanged function} sample 
 */
update the bubble chart
@param {the sample selected by the optionChanged function} sample
update the bubble chart @param { the sample selected by the optionChanged function } sample
function updateBubbleChart(sample) {
	if (sample == null) {
		d3.select("bubble").text("");
		return;
	}
	var data = [{
		x: sample.otu_ids,
		y: sample.sample_values,
		text: sample.otu_labels.map(object => object.split(";").join("<br>")),
		mode: 'markers',
		marker: {
			color: sample.otu_ids.map(object => otuIdToRgb(object)),
			size: sample.sample_values
		}
	}];
	var layout = {
		title: `All Samples for Test Subject ID No. ${sample.id}`
	};
	Plotly.newPlot("bubble", data, layout);
}
function updateBubbleChart ( sample ) { if ( sample == null ) { d3 . select ( "bubble" ) . text ( "" ) ; return ; } var data = [ { x : sample . otu_ids , y : sample . sample_values , text : sample . otu_labels . map ( object => object . split ( ";" ) . join ( "<br>" ) ) , mode : 'markers' , marker : { color : sample . otu_ids . map ( object => otuIdToRgb ( object ) ) , size : sample . sample_values } } ] ; var layout = { title : ` ${ sample . id } ` } ; Plotly . newPlot ( "bubble" , data , layout ) ; }
update the bubble chart
 @param {the sample selected by the optionChanged function} sample
update the bubble chart @param { the sample selected by the optionChanged function } sample
// if the sample is null, clear and exit
 // map the sample data
 // set the layout
 // plot the data
