Run dgmo from code
1.Install
bash
brew install diagrammo/dgmo/dgmo1.Install
bash
npm install @diagrammo/dgmo2.Render
ts
import { render } from '@diagrammo/dgmo';
const { svg } = await render(`pie Browser Market Share (2025)
Chrome 63.5
Safari 19.8
Firefox 6.2
Edge 5.1
Other 5.4`);
document.getElementById('chart').innerHTML = svg;Produces
1.Install
html
<!-- Drop this in your <head>; that's the whole install. -->
<script
src="https://cdn.jsdelivr.net/npm/@diagrammo/dgmo@^0.8/dist/auto.js"
crossorigin="anonymous"
></script>2.Render
html
<pre class="dgmo">pie Browser Market Share (2025)
Chrome 63.5
Safari 19.8
Firefox 6.2
Edge 5.1
Other 5.4</pre>Produces