-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBellyButton_gauge_starter_code.js
More file actions
46 lines (27 loc) · 1.19 KB
/
BellyButton_gauge_starter_code.js
File metadata and controls
46 lines (27 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Create the buildChart function.
function buildCharts(sample) {
// Use d3.json to load the samples.json file
d3.json("samples.json").then((data) => {
console.log(data);
// Create a variable that holds the samples array.
// Create a variable that filters the samples for the object with the desired sample number.
// 1. Create a variable that filters the metadata array for the object with the desired sample number.
// Create a variable that holds the first sample in the array.
// 2. Create a variable that holds the first sample in the metadata array.
// Create variables that hold the otu_ids, otu_labels, and sample_values.
// 3. Create a variable that holds the washing frequency.
// Create the yticks for the bar chart.
// Use Plotly to plot the bar data and layout.
Plotly.newPlot();
// Use Plotly to plot the bubble data and layout.
Plotly.newPlot();
// 4. Create the trace for the gauge chart.
var gaugeData = [
];
// 5. Create the layout for the gauge chart.
var gaugeLayout = {
};
// 6. Use Plotly to plot the gauge data and layout.
Plotly.newPlot();
});
}