Is there a generic function to set attribute of a component? For instance setAttr or setAttribute?
My specific need is to set the chart type i.e. switch the chart type from, say, 'scatter' to 'line'.
I know there are some setter functions like setHtml(), but those don't exist for all attributes.