diff --git a/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp b/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp
index ce78a23e3..285b8f050 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/ntcTotalReportDetailList.jsp
@@ -270,7 +270,7 @@
type : 'string',
value : ''
})
- var total = total = JSON.parse($("#total").val());
+ var total = JSON.parse($("#total").val());
a.push({
type : "number",
value : total
@@ -285,6 +285,56 @@
};
}(Highcharts));
+ (function(H) {
+ H.Chart.prototype.downloadCSV = function() {
+ var rows = this.getDataRows(true);
+ var data=new Array();
+ var total = total = JSON.parse($("#total").val());
+ $(rows).each(function (i,d){
+ if(d!=null){
+ data.push({
+ num1:d[0],
+ num2:d[1]
+ })
+ }
+ })
+ data.push({
+ num1:"",
+ num2:total
+ })
+ var start = $("#beginDate").val();
+ var end = $("#endDate").val();
+ exportCsv({
+ title:["",start+"--"+end],
+ titleForKey:["num1","num2"],
+ data:data
+ });
+ };
+ }(Highcharts));
+
+ function exportCsv(obj){
+ //title ["","",""]
+ var title = obj.title;
+ //titleForKey ["","",""]
+ var titleForKey = obj.titleForKey;
+ var data = obj.data;
+ var str = [];
+ str.push(obj.title.join(",")+"\n");
+ for(var i=0;i