// Get the symbol with initial options constinitialSymbol = getSymbol('taurus', { stroke:'blue', strokeWidth:2 }) // Modify attributes using method chaining constmodifiedSymbol = initialSymbol.setStroke('green').setStrokeWidth(3)
// Log the modified SVG as a string console.log(symbol.toString())
// Log the modified SVG as a Data URL console.log(symbol.toDataURL())
Throws
Will throw an error if the specified SVG file is not found
Gets an SVG as a string or as a Data URL, with option to modify attributes.