setAttr method

void setAttr (Element el, Map<String, String> attr)

Sets the attributes for an Element from a Map. Example: setAttr(plotArea, {SVG.X: "20", SVG.Y: "40"});

Implementation

static void setAttr(Element el, Map<String, String> attr) {
  attr.forEach((key, value) => el.setAttribute(key, value));
}