compileScope = $rootScope.$new();
compileScope.from = from.format('dddd MMMM DD');
compileScope.to = to.format('dddd MMMM DD');
compileScope.y = y || null;
console.log(compileScope);
var element = $compile(angular.element(
'<div class="tooltip-chart">' +
'<p>{{from}} - {{to}}</p>' +
'<p ng-if="y">USD: <bold style="color: #000000">{{y}}</bold></p>' +
'</div>'
))(compileScope);