html
html
1
Enter to Rename, Shift+Enter to Preview
css
css
1
Enter to Rename, Shift+Enter to Preview
js
js
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
I have the following code, it seems a lot different to what I have found online when it comes to d3.js tutorials.
This code works for creating a bar chart. What I would like to do is add a line to the bar chart. I would like the line to visualize the same info as the bars do.
The code is as follows:
/**
DATA examples:
response =
{
data: Array(11)
0: {dim0: '2021-01', metric0: 36, metric1: 46}
1: {dim0: '2021-02', metric0: 27, metric1: 30}
2: {dim0: '2021-03', metric0: 33, metric1: 46}
3: {dim0: '2021-04', metric0: 35, metric1: 40}
4: {dim0: '2021-05', metric0: 36, metric1: 45}
5: {dim0: '2021-06', metric0: 48, metric1: 36}
6: {dim0: '2021-07', metric0: 31, metric1: 37}
7: {dim0: '2021-08', metric0: 39, metric1: 33}
8: {dim0: '2021-09', metric0: 34, metric1: 45}
9: {dim0: '2021-10', metric0: 47, metric1: 43}
10: {dim0: '2021-11', metric0: 34, metric1: 45}
length: 11
[[Prototype]]: Array(0)
dims: Array(1)
0: {dim0: 'Year Month'}
length: 1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run