Move code from landing control to charts service, and allow callback: ``` - service.top10Chart = function(title, type, xFacet, xLabel, limit) { + service.top10Chart = function(title, type, xFacet, xLabel, limit, callback) { return { options: { chart: { @@ -30,6 +30,21 @@ }, legend: { enabled: false + }, + plotOptions: { + series: { + cursor: 'pointer', + point: { + events: { + click: function (e) { + var facet = this.series.name; + var x = this.xCategory || this.x; + var y = this.yCategory || this.y; + callback(facet, x, y); + } + } + } + } ```
Move code from landing control to charts service, and allow callback: