I'm using highcharts in my Angular project and need to do some manipulation on the export CSV functionality.
I've found an thread here in stackoverflow that seems to explain what I require to do:
Add Source to Highcharts Export CSV
But unfortunately it is implemented using pure javascript and I'm unable to find out how I'm supposed to extend Highcharts inside an Angular component.
This is what I want to know how to implement in Angular:
(function (H) {
H.wrap(H.Chart.prototype, 'getCSV', function (proceed, useLocalDecimalPoint) {
// Run the original proceed method
result = proceed.apply(this, Array.prototype.slice.call(arguments, 1));
result += '\n"My source 1","My source 2","My source 3"';
return result;
});
}(Highcharts));
Here's the working example in JSFiddle