Is there an easy way scrub the HTML out or otherwise transform the headers during export?
I tried changing the downloadFile statement’s “columnHeaders” property to state the header values that I wanted exported, but that didn’t take.
handsonchart.getPlugin('exportFile').downloadFile(format, {
filename: 'MyExport',
columnHeaders: true
});
…to:
handsonchart.getPlugin('exportFile').downloadFile(format, {
filename: 'MyExport',
columnHeaders: ['ID', 'Name', 'MyDescription']
});
What I did get working was to update the whole chart to my export headers, export it, and then update the chart to restore the old, HTMLed headers:
handsonchart.updateSettings({
colHeaders: [
'ID', 'Name', 'MyDescription'
]
});
handsonchart.render();
handsonchart.getPlugin('exportFile').downloadFile(format, {
filename: 'MyExport',
columnHeaders: true
});
handsonchart.updateSettings({
colHeaders: [
'ID', 'Name', 'MyDescription <img src="icon.png"/>'
]
});
handsonchart.render();
…but I’m hoping that there should be a better way.