chart =
{
const width = 800;
const height = 400;
const svg = d3.create('svg').attr('width', width).attr('height', height);
const margin = ({ top: 10, right: 10, bottom: 20, left: 60 });
const xScale = d3
.scaleLinear()
.domain([0, 40])
.range([margin.left, width - margin.right]);
const yScale = d3
.scaleLinear()
.domain([0, 500000])
.range([height - margin.bottom, margin.top]);
const xAxis = d3.axisBottom()
.scale(xScale)
.ticks(5)
const yAxis = d3.axisLeft()
.scale(yScale)
.ticks(5);
svg.append("g")
.attr('transform', `translate(0, ${height - margin.bottom})`)
.call(xAxis);
svg.append("g")
.attr('transform', `translate(${margin.left}, 0)`)
.call(yAxis);
svg
.selectAll("circle")
.data(dataset)
.join("circle")
.attr("cx", (d) => xScale(d.x))
.attr("cy", (d) => yScale(d.y))
.attr("r", 2)
.style("fill", Inglewood)
function Inglewood(d, i) {
var color = '0'
if(d.id=="Inglewood"){color = 'rgb(255,0,0)'}
return color
}
return svg.node();
}