add  attr to chart directive