Exporting dc.js chart from SVG to PNG
问题 I have a dc.js chart and I want to export it as a PNG image, using exupero's saveSvgAsPng: function save() { var options = {}; options.backgroundColor = '#ffffff'; options.selectorRemap = function(s) { return s.replace(/\.dc-chart/g, ''); }; var chart = document.getElementById('chart').getElementsByTagName('svg')[0]; saveSvgAsPng(chart, 'chart.png', options) } var data = [ {day: 1, service: 'ABC', count: 100}, {day: 2, service: 'ABC', count: 80}, {day: 4, service: 'ABC', count: 10}, {day: 7,