Dc.js D3+crossfilter.top To Export Filtered Data To Csv
I have looked extensively at code samples and have been able to call crossfilter's .top(Infinity) function to output the updated data records after filtration. I am even able to ca
Solution 1:
I solved this by simply using a jquery onclick handler. I think I just needed to sleep on the problem. also using download.js to trigger a file download using javascript
depthChart.width(930)
.height(150)
.margins({top: 10, right: 10, bottom: 20, left: 40})
.dimension(depthValue)
.group(depthValueGroup)
.transitionDuration(500)
.centerBar(true)
.gap(1)
.x(d3.scale.linear().domain([0, 500]))
.elasticY(false)
.xAxis().tickFormat(function(v) {
//function triggered onClick by element from DOM
$("#exportData").unbind().click(function() {
download(d3.csv.format(depthValue.top(500))."exportedData.csv")
});
return v;});
dc.renderAll();
});
Post a Comment for "Dc.js D3+crossfilter.top To Export Filtered Data To Csv"