fix line chart directive, use angularjs replace instead js dom manipulation