{
const width = 500;
const height = 300;
const margin = { top: 20, right: 30, bottom: 40, left: 40 };
const svg = d3.create('svg')
.attr('width', width)
.attr('height', height);
const xScale = d3.scaleLinear()
.domain([0, 250])
.range([0, width - margin.right - margin.left]);
const yScale = d3.scaleLinear()
.domain([0, 500])
.range([height - margin.bottom - margin.top, 0]);
const xAxis = d3.axisBottom(xScale)
.ticks(10);
const yAxis = d3.axisLeft(yScale)
.ticks(10);
svg.append('g')
.attr('transform', `translate(${margin.left},${height - margin.bottom})`)
.call(xAxis);
svg.append('g')
.attr('transform', `translate(${margin.left},${margin.top})`)
.call(yAxis);
return svg.node();
}