js/bonus.js
/**
 * update the gauge with the sent in metadata
 * honestly this was a hacked together way of achieving my goal
 * @param {object} metadata 
 */
update the gauge with the sent in metadata
honestly this was a hacked together way of achieving my goal
@param {object} metadata
update the gauge with the sent in metadata honestly this was a hacked together way of achieving my goal @param { object } metadata
function updateGauge(metadata) {
	var data = [
		{
			type: "indicator",
			mode: "gauge",
			value: 0,
			title: {
				text: "Scrubs per Week"
			},
			gauge: {
				visible: false,
				axis: {
					visible: false,
					range: [0, 9],
					tickwidth: 0
				},
				borderwidth: 0,
				steps: getGuageSteps(),
				threshold: {
					line: {
						color: "rgb(131,3,8)",
						width: 10
					},
					thickness: 1,
					value: 9
				}
			},
			domain: {
				row: 0,
				column: 0
			}
		}
	];
	var layout = {
		title: {
			text: "<b>Belly Button Washing Frequency</b>"
		},
		width: svgWidth,
		height: svgHeight,
		margin: { t: -200, r: 0, l: 0, b: 200 },
	};
	Plotly.newPlot('gauge', data, layout);
	addArcNumbers(d3.select(".angular"));
	modifyArcArrow(d3.select(".threshold-arc"), +metadata.wfreq);
}
function updateGauge ( metadata ) { var data = [ { type : "indicator" , mode : "gauge" , value : 0 , title : { text : "Scrubs per Week" } , gauge : { visible : false , axis : { visible : false , range : [ 0 , 9 ] , tickwidth : 0 } , borderwidth : 0 , steps : getGuageSteps ( ) , threshold : { line : { color : "rgb(131,3,8)" , width : 10 } , thickness : 1 , value : 9 } } , domain : { row : 0 , column : 0 } } ] ; var layout = { title : { text : "<b>Belly Button Washing Frequency</b>" } , width : svgWidth , height : svgHeight , margin : { t : - 200 , r : 0 , l : 0 , b : 200 } , } ; Plotly . newPlot ( 'gauge' , data , layout ) ; addArcNumbers ( d3 . select ( ".angular" ) ) ; modifyArcArrow ( d3 . select ( ".threshold-arc" ) , + metadata . wfreq ) ; }
update the gauge with the sent in metadata
 honestly this was a hacked together way of achieving my goal
 @param {object} metadata
update the gauge with the sent in metadata honestly this was a hacked together way of achieving my goal @param { object } metadata
// create the gauge data
 // create the gauge layout
 // plot the gauge
 // add in the numbers
 // modify the gauge
