Library to create SVG visualisations for nano materials.
Install
npm install nanoviz-svg
Use
const nanoviz = const svg = nanoviz
nanoviz.nanoMaterial
Create an SVG with three parts, a core, a shell and a coating.
nanoviz.nanoMaterialArray<Object> parts, Array<Object>|Object|String|null style
parts
: an array of objectspart
: object with mandatory property label
style
: a string denoting one of the built-in styles, an object extending an existing style, or a list of partspartStyle
: object with the following properties:color
: fill colortextColor
striped
: whether the circle is striped (DEPRECATED: usepattern
)pattern
: fill pattern ('striped'
,'dotted'
)radius
: radius of the circle (0 - 100)text
: pair of coordinates where the label should be (x: -100 - 200; y: -100 - 100); note that there is not much space
Browser