javascript - Getting Highcharts tooltip to return an angular directive? -
we trying create complex tooltips our highcharts graph, showing dynamic data thats in app not displayed graph, figured best bet create angular directive formatting , such, , enable usehtml : true attribute of highcharts along custom formatter function. $compile() doesn't throw error..
however when code runs, tooltip shows object.object text, , not content of directive's template. missing something, or not going possible? below example of we're trying...
tooltip: { usehtml: true, formatter: function () { return $compile("<pm-error-rate-tooltip ></<pm-error-rate-tooltip>")($scope); } }
i'm wondering if needs 'appended' dom element work, if i'm not sure element named tooltip?
you giving formatter dom element, , wants html string. converting html works, seems inefficient way accomplish goal.
http://jsfiddle.net/ue3x49tt/3/
formatter: function () { return $compile("<pm-error-rate-tooltip></pm-error-rate-tooltip>")($scope).html(); }
Comments
Post a Comment