chartAuthors = {
const d3 = Object.assign(await require("d3@6"), {
cloud: await require("d3-cloud@1")
});
const fontFamily = "sans-serif";
const fontScale = 1.5;
const rotate = () => 0;
const padding = 0;
const height = 250;
const width = 550;
const color = "rgb(21, 108, 132)";
const svg = d3
.create("svg")
.style("background-color", "rgb(255, 255, 255)")
.style('fill', color)
.attr("viewBox", [0, 0, width, height])
.attr("font-family", fontFamily)
.attr("text-anchor", "middle");
const cloud = d3
.cloud()
.size([width, height])
.words(dataAuteurs.map((d) => Object.create(d)))
.padding(padding)
.rotate(rotate)
.font(fontFamily)
.fontSize((d) => Math.sqrt(d.value) * fontScale)
.on("word", ({ size, x, y, rotate, text }) => {
svg
.append("text")
.attr("font-size", size)
.attr("transform", `translate(${x},${y}) rotate(${rotate})`)
.text(text);
});
cloud.start();
invalidation.then(() => cloud.stop());
return svg.node();
}