From 82a329bb42823abebc04706e3477f50acf35343f Mon Sep 17 00:00:00 2001 From: Indrijeet kumar Date: Mon, 18 May 2020 10:08:40 +0530 Subject: removed unwanted codes in ChartD3Helper removed unwanted codes in ChartD3Helper Issue-ID: PORTAL-813 Change-Id: I8fe16c45f54bb2072667aec9629c11dd6134f6ca Signed-off-by: Indrijeet Kumar --- .../analytics/model/runtime/ChartD3Helper.java | 104 ++------------------- 1 file changed, 10 insertions(+), 94 deletions(-) (limited to 'ecomp-sdk') diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java index 72769e3f..b780062c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java @@ -278,13 +278,11 @@ public class ChartD3Helper { } } - //Object uniqueElements [] = ts.toArray(); - //SortedSet s = Collections.synchronizedSortedSet(ts); uniqueElements = ts.toArray(); } else { DataColumnType dct = null; List yTextSeries = reportRuntime.getChartDisplayNamesList(AppConstants.CHART_ALL_COLUMNS, formValues); - //if(columnValuesList.size() == 1) { + for (Iterator iter = l.iterator(); iter.hasNext();) { dct = (DataColumnType) iter.next(); @@ -307,19 +305,10 @@ public class ChartD3Helper { chartLeftAxisLabel = (chartLeftAxisLabel.indexOf("|")!=-1)?chartLeftAxisLabel.substring(0,chartLeftAxisLabel.indexOf("|")):""; } columnMap.put(dct.getDisplayName(), dct.getColId()); - /* - ts.add(dct.getDisplayName()); - if(nvl(chartLeftAxisLabel).length()<=0) { - chartLeftAxisLabel = nvl(dct.getYAxis()); - chartLeftAxisLabel = (chartLeftAxisLabel.indexOf("|")!=-1)?chartLeftAxisLabel.substring(0,chartLeftAxisLabel.indexOf("|")):""; - } - columnMap.put(dct.getDisplayName(), dct.getColId()); - */ } } } - //SortedSet s = Collections.synchronizedSortedSet(ts); uniqueElements = ts.toArray(); } @@ -373,13 +362,10 @@ public class ChartD3Helper { wholeScript.append(" \n"); wholeScript.append(" \n"); wholeScript.append(" \n"); - //wholeScript.append(" \n"); - //wholeScript.append(" \n"); wholeScript.append(" \n"); //json wholeScript.append("\n"); wholeScript.append("\n"); @@ -2185,8 +2123,6 @@ public class ChartD3Helper { if(!timeCharts) { wholeScript.append(" function nameAnnotation(ann) { \n"); wholeScript.append(" return ann.shortText; \n"); - //wholeScript.append(" var m = moment(ann.x);\n"); - //wholeScript.append(" return \"(\" + ann.series + \", \" + m.format(\"YYYY-MM-DD HH\"); + \")\"; \n"); wholeScript.append(" }\n"); wholeScript.append(" anns = [];\n"); } @@ -2195,9 +2131,6 @@ public class ChartD3Helper { wholeScript.append(" g = new Dygraph(\n"); wholeScript.append(" document.getElementById(\"div_g"+reportRuntime.getReportID()+"\"),\n"); //data here - /*wholeScript.append(" [\n"); - wholeScript.append(dataStrBuf.toString()); - wholeScript.append(" ],\n");*/ wholeScript.append(" data , \n"); wholeScript.append(" {\n"); @@ -2242,16 +2175,8 @@ public class ChartD3Helper { wholeScript.append(" var minutes = d.getMinutes();\n"); wholeScript.append(" var seconds = d.getSeconds();\n"); wholeScript.append(" var wholeString = Dygraph.zeropad(month)+'/'+Dygraph.zeropad(day);\n"); - // wholeScript.append(" if(hour >= 0 && minutes > 0 && seconds > 0) {\n"); - //wholeScript.append(" wholeString += ' ' + Dygraph.zeropad(hour) + ':'+Dygraph.zeropad(minutes)+':'+Dygraph.zeropad(seconds);\n"); - //wholeScript.append(" } else if (hour >= 0 && minutes > 0 && seconds == 0) {\n"); if(AppUtils.nvl(reportRuntime.getTimeAxisType()).length()==0 || AppUtils.nvl(reportRuntime.getTimeAxisType()).equals("hourly")) wholeScript.append(" wholeString += ' ' + Dygraph.zeropad(hour) + ':'+Dygraph.zeropad(minutes);\n"); - //wholeScript.append(" } else if (hour >= 0 && (minutes >= 0 && seconds > 0)) {\n"); - //wholeScript.append(" wholeString += ' ' + Dygraph.zeropad(hour) + ':'+Dygraph.zeropad(minutes)+':'+Dygraph.zeropad(seconds);\n"); - //wholeScript.append(" } else if (hour >= 0) { \n"); - //wholeScript.append(" wholeString += ' ' + Dygraph.zeropad(hour); \n"); - //wholeScript.append(" } \n"); wholeScript.append(" return wholeString; \n"); wholeScript.append(" },\n"); wholeScript.append(" ticker: function (a, b, pixels, opts, dygraph, vals) { \n "); @@ -2280,15 +2205,6 @@ public class ChartD3Helper { wholeScript.append(" touchstart : newDygraphTouchstart,\n"); wholeScript.append(" touchend : Dygraph.defaultInteractionModel.touchend,\n"); wholeScript.append(" touchmove : Dygraph.defaultInteractionModel.touchmove\n"); - //wholeScript.append(" 'dblclick' : dblClickV3,\n"); - //wholeScript.append(" 'mousewheel' : scrollV3\n"); - - /*wholeScript.append(" 'mousedown' : downV3,\n"); - wholeScript.append(" 'mousemove' : moveV3,\n"); - wholeScript.append(" 'mouseup' : upV3,\n"); - wholeScript.append(" 'click' : clickV3,\n"); - wholeScript.append(" 'dblclick' : dblClickV3,\n"); - wholeScript.append(" 'mousewheel' : scrollV3\n");*/ wholeScript.append("},\n"); /*wholeScript.append(" zoomCallback: function(minDate, maxDate, yRanges) { \n"); if(AppUtils.nvl(reportRuntime.getTimeAxisType()).equals("daily")) { -- cgit 1.2.3-korg