misBarras = {
const ancho = 500;
const alto = 400;
const miLienzo = d3.create("svg").attr("width", ancho).attr("height", alto);
const m = {h: ancho * 0.2, v: alto * 0.1}
const escalaX = d3.scaleLinear()
.domain([0, d3.max(datosParticipantes, d => d.edad)])
.range([0, ancho - (m.h * 2)])
const escalaY = d3.scaleBand()
.domain(datosParticipantes.map(d => d.nombre))
.range([alto - (m.v * 2), 0])
const ticksX = miLienzo.append("g")
.attr("transform", `translate(${m.h},${alto - m.v})`)
.call(d3.axisBottom(escalaX))
const ticksY = miLienzo.append("g")
.attr("transform", `translate(${m.h},${m.v})`)
.call(d3.axisLeft(escalaY))
const miGrupo = miLienzo.append("g").attr("transform", `translate(${m.h},${m.v})`);
miGrupo.selectAll("rect")
.data(datosParticipantes)
.join("rect")
.attr("x", 0)
.attr("y", d => escalaY(d.nombre))
.attr("width", d => escalaX(d.edad))
.attr("height", 10)
.attr("fill", "tomato")
return miLienzo.node()
}