function graph(data) {
return Plot.plot({
width: 1200,
height: 500,
x: {
label: ejeX,
tickFormat: d3.format(".0f")
},
y: {
label: ejeY,
grid: true,
tickFormat: d => d3.format(",.0f")(d).replace(/,/g, ".")
},
color: {legend: true},
marks: [
Plot.ruleY([0]),
Plot.lineY(data, {x: variableX, y: variableY, stroke: "#31E0C9", tip: true}),
]
});
}