extract function for setting graphic attributes on SVG objects