Bugs
In Progress

Mermaid: not all scripts from Anytype work in AnyTwo

Wenn I copy & paste Mermaid scrips from Anytype to AnyTwo, not all of them become rendered.

This relative simple chart diagram does only work in Anytype, but not in AnyTwo:

(async function() {
const data = [
{ year: 2010, count: 10 },
{ year: 2011, count: 20 },
{ year: 2012, count: 15 },
{ year: 2013, count: 25 },
{ year: 2014, count: 22 },
{ year: 2015, count: 30 },
{ year: 2016, count: 28 },
];

new Chart(
document.getElementById('chart'),
{
type: 'bar',
data: {
labels: data.map(row => row.year),
datasets: [
{
label: 'Acquisitions by year',
data: data.map(row => row.count)
}
]
}
}
);
})();

1 Comment

Sign in to comment

AL
Alex Lins (Bao)·2 days ago

Thanks for reporting this — it's helpful to see a concrete example.

A few quick clarifications would help us track this down:

  1. When you say "not all of them become rendered" — does AnyTwo show an error message, a blank space, or does it silently skip the script entirely?
  2. The script you shared looks like a Chart.js example, not Mermaid syntax (which typically starts with graph, sequenceDiagram, etc.). Is this the actual script from Anytype, or did it get pasted differently? If you have the original Anytype version, that'd be really useful.
  3. Which Mermaid diagrams DO work in AnyTwo? That'll help us narrow down whether it's a syntax issue, a script size limit, or something else.