Climate Change Burden of Disease Visualization D3 Project

Hi there, I’m up to Step 6 of this project and am unsure if I’ve done it correctly. There’s no help video at the end either. Would be grateful if someone could please assist. Here is the link to the project: https://www.codecademy.com/courses/learn-d3/projects/d3-visualization?action=resume_content_item

let climate_daly_data = [
{region: “Low-and-middle-income countries of the African Region”, deaths: 57},
{region: “Low-and-middle-income countries of the Americas”, deaths: 2},
{region: “Low-and-middle-income countries of the Eastern Mediterranean Region”, deaths: 20},
{region: “Low-and-middle-income countries of the European Region”, deaths: 0.67},
{region: “Low-and-middle-income countries of the South-East Asia Region”, deaths: 58},
{region: “Low-and-middle-income countries of the Western Pacific Region”, deaths: 4},
{region: “High income countries”, deaths: 0.23}
];

let toggleClass = (i,toggle) => {
d3.select("#viz div:nth-child("+ i +")").classed(“highlightBar”,toggle);
d3.select("#legend li:nth-child("+ i +")").classed(“highlightText”,toggle);
};

let divSelection = d3.select("#viz")
.selectAll(“div”)
.data(climate_daly_data)
.enter()
.append(‘div’)
.attr(‘class’, ‘bar’)
.style(‘width’, (d) => {
return d.deaths * 8 ‘px’
})

Hi ashibhat95,
Your code looks fine to me (fellow student)
Only there is a ‘+’ sign missing between the ‘8’ and ‘px’ in your last line of code.
“return d.deaths * 8 ‘px’” should read “return d.deaths * 8 + ‘px’”
Add that and you’ll see yellow bars popping up all over.
Hope this helps,
Willem