jointjs
Version:
JavaScript diagramming library
35 lines (31 loc) • 854 B
HTML
<p>An ellipse with a label.</p>
<b>Supported <code>attrs</code> properties</b></p>
<table>
<tr>
<th>Selector</th>
<th>Node</th>
<th>Description</th>
</tr>
<tr>
<td>root</td>
<td><i>SVGGElement</i></td>
<td>Container of all nodes</td>
</tr>
<tr>
<td>body</td>
<td><i>SVGEllipseElement</i></td>
<td>Elliptical body of the shape</td>
</tr>
<tr>
<td>label</td>
<td><i>SVGTextElement</i></td>
<td>Text inside the body</td>
</tr>
</table>
<pre><code>var ellipse = new joint.shapes.standard.Ellipse();
ellipse.resize(150, 100);
ellipse.position(425, 10);
ellipse.attr('root/title', 'joint.shapes.standard.Ellipse');
ellipse.attr('label/text', 'Ellipse');
ellipse.attr('body/fill', 'lightblue');
ellipse.addTo(graph);</code></pre>