`
- const body = model.body.flatMap((body) => body.lines)
+ content += `
`;
+ const body = model.body.flatMap((body) => body.lines);
body.forEach((line, i) => {
- const colors = model.labelColors[i]
+ const colors = model.labelColors[i];
content += `
${line}
-
`
- })
- content += `
`
+
`;
+ });
+ content += ``;
- el.innerHTML = content
+ el.innerHTML = content;
- const pos = context.chart.canvas.getBoundingClientRect()
- el.style.opacity = "1"
- el.style.position = "absolute"
- el.style.left = `${pos.left + window.scrollX + model.caretX}px`
- el.style.top = `${pos.top + window.scrollY + model.caretY}px`
- el.style.pointerEvents = "none"
+ const pos = context.chart.canvas.getBoundingClientRect();
+ el.style.opacity = "1";
+ el.style.position = "absolute";
+ el.style.left = `${pos.left + window.scrollX + model.caretX}px`;
+ el.style.top = `${pos.top + window.scrollY + model.caretY}px`;
+ el.style.pointerEvents = "none";
}
-function createTypedChart(
- type: ChartType,
- components: ChartComponent[]
-): Component