Commit b67f9b08 authored by dkasliwal's avatar dkasliwal

1) Dyanmic Div for IndiaMap. And HeatMap Add tag metadata...

1) Dyanmic Div for IndiaMap. And HeatMap Add tag metadata ComponentTitle,component_css,component_icon
For dyanamic css and title Name and container and also remove all table tr td tag from gwtdahboardpagemap.html


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100380 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2690f3fc
...@@ -964,6 +964,13 @@ public class ChartCreator ...@@ -964,6 +964,13 @@ public class ChartCreator
JSONString dataStringValue = null; JSONString dataStringValue = null;
JSONString linkStringValue = null; JSONString linkStringValue = null;
ArrayList<String> linkedMetadataList= new ArrayList<String>(); ArrayList<String> linkedMetadataList= new ArrayList<String>();
/*Added By Dhanendra*/
List<String> componantTitlList = new ArrayList<String>();
List<String> groupCssTypeList = new ArrayList<String>();
String componentIconName = "";
/*Ended by Dhanendra */
for (int i = 0; i < graphDtlList.size(); i++) for (int i = 0; i < graphDtlList.size(); i++)
{ {
if (i == 3) if (i == 3)
...@@ -1018,6 +1025,20 @@ public class ChartCreator ...@@ -1018,6 +1025,20 @@ public class ChartCreator
{ {
linkedMetadataList = (ArrayList<String>)graphDtlList.get(i); linkedMetadataList = (ArrayList<String>)graphDtlList.get(i);
} }
/*Start Added Code for getValue from List By Dhanendra on 11-03-2016 */
if (i == 16)
{
componantTitlList = (ArrayList<String>)graphDtlList.get(i);
}
if (i == 17)
{
groupCssTypeList = (ArrayList<String>)graphDtlList.get(i);
}
if (i == 18)
{
componentIconName = ""+graphDtlList.get(i);
}
/*Start Added Code for getValue from List By Dhanendra on 11-03-2016 */
} }
if (jsonObjGraph != null) if (jsonObjGraph != null)
...@@ -1094,7 +1115,7 @@ public class ChartCreator ...@@ -1094,7 +1115,7 @@ public class ChartCreator
} }
valueList.add(currentvalue); valueList.add(currentvalue);
} }
blDataMap.put(key, valueList); blDataMap.put(key, valueList);
valueList = new ArrayList<String>(); valueList = new ArrayList<String>();
for (int yCnt = 0; yCnt < columnIdList.size(); yCnt++) for (int yCnt = 0; yCnt < columnIdList.size(); yCnt++)
{ {
...@@ -1131,6 +1152,7 @@ public class ChartCreator ...@@ -1131,6 +1152,7 @@ public class ChartCreator
columnJson.put("column", JSONParser.parseStrict(columnDataList.toString())); columnJson.put("column", JSONParser.parseStrict(columnDataList.toString()));
graphJson.put("columns", JSONParser.parseStrict(columnJson.toString())); graphJson.put("columns", JSONParser.parseStrict(columnJson.toString()));
mapSet = allDataMap.keySet(); mapSet = allDataMap.keySet();
Window.alert("mapSet: "+mapSet);
for (String keyString : mapSet) for (String keyString : mapSet)
{ {
mapValuList = allDataMap.get(keyString); mapValuList = allDataMap.get(keyString);
...@@ -1188,7 +1210,6 @@ public class ChartCreator ...@@ -1188,7 +1210,6 @@ public class ChartCreator
dataSetJson.put("data", JSONParser.parseStrict(dataList.toString())); dataSetJson.put("data", JSONParser.parseStrict(dataList.toString()));
dataSetList.add(dataSetJson.toString().replace('=', ':')); dataSetList.add(dataSetJson.toString().replace('=', ':'));
graphJson.put("dataset", JSONParser.parseStrict(dataSetList.toString())); graphJson.put("dataset", JSONParser.parseStrict(dataSetList.toString()));
for (int clrRngCnt = 0; clrRngCnt < colorRangeList.size(); clrRngCnt++) for (int clrRngCnt = 0; clrRngCnt < colorRangeList.size(); clrRngCnt++)
{ {
if(clrRngCnt==0) if(clrRngCnt==0)
...@@ -1286,6 +1307,12 @@ public class ChartCreator ...@@ -1286,6 +1307,12 @@ public class ChartCreator
JSONString jsnStringKey = null; JSONString jsnStringKey = null;
/*End Declaration part for maxvalue dyanamic by dhanendra on 25/04/2015 */ /*End Declaration part for maxvalue dyanamic by dhanendra on 25/04/2015 */
/*Added By Dhanendra*/
List<String> componantTitlList = new ArrayList<String>();
List<String> groupCssTypeList = new ArrayList<String>();
String componentIconName = "";
/*Ended by Dhanendra */
LinkedHashMap<JSONString, JSONValue> dataValueJson = new LinkedHashMap<JSONString, JSONValue>(); LinkedHashMap<JSONString, JSONValue> dataValueJson = new LinkedHashMap<JSONString, JSONValue>();
List<LinkedHashMap<JSONString, JSONValue>> dataValueJsonList = new ArrayList<LinkedHashMap<JSONString, JSONValue>>(); List<LinkedHashMap<JSONString, JSONValue>> dataValueJsonList = new ArrayList<LinkedHashMap<JSONString, JSONValue>>();
for (int i = 0; i < graphDtlList.size(); i++) for (int i = 0; i < graphDtlList.size(); i++)
...@@ -1338,6 +1365,20 @@ public class ChartCreator ...@@ -1338,6 +1365,20 @@ public class ChartCreator
{ {
toolTextLblList = (ArrayList<String>)graphDtlList.get(i); toolTextLblList = (ArrayList<String>)graphDtlList.get(i);
} }
/*Start Added Code for getValue from List By Dhanendra on 11-03-2016 */
if (i == 15)
{
componantTitlList = (ArrayList<String>)graphDtlList.get(i);
}
if (i == 16)
{
groupCssTypeList = (ArrayList<String>)graphDtlList.get(i);
}
if (i == 17)
{
componentIconName = ""+graphDtlList.get(i);
}
/*Start Added Code for getValue from List By Dhanendra on 11-03-2016 */
} }
if (jsonObjGraph != null) if (jsonObjGraph != null)
{ {
......
...@@ -569,7 +569,14 @@ public class GraphComponent extends Composite ...@@ -569,7 +569,14 @@ public class GraphComponent extends Composite
imageName = (String) graphDtlList.get(0); imageName = (String) graphDtlList.get(0);
width = (String) graphDtlList.get(1); width = (String) graphDtlList.get(1);
height = (String) graphDtlList.get(2); height = (String) graphDtlList.get(2);
graphJson = ChartCreator.buildHeatMap(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList); // start- added empty json chartdata to display no data found message by swati on 7jan2015
/*Start Added Code for getValue from list by Dhanendra 11-03-2016*/
componantTitlNameList =(ArrayList<String>)graphDtlList.get(16);
groupCssTypeNameList =(ArrayList<String>)graphDtlList.get(17);
componentIconName = ""+graphDtlList.get(18);
/*End Added Code for getValue from list by Dhanendra 11-03-2016*/
graphJson = ChartCreator.buildHeatMap(graphDtlList, jsonObjFrGraph, dtSrouce,parameterList,filterList); // start- added empty json chartdata to display no data found message by swati on 7jan2015
if(graphJson.size()==0 ) if(graphJson.size()==0 )
{ {
graphJson.put("chart", new JSONString("")); graphJson.put("chart", new JSONString(""));
...@@ -577,7 +584,45 @@ public class GraphComponent extends Composite ...@@ -577,7 +584,45 @@ public class GraphComponent extends Composite
// end- added empty json chartdata to display no data found message by swati on 7jan2015 // end- added empty json chartdata to display no data found message by swati on 7jan2015
if (graphJson != null && graphJson.size() > 0) if (graphJson != null && graphJson.size() > 0)
{ {
this.createChart(graphJson.toString().replace('@', '='), "chartContainer" + componentId, "chartContainer" + componentId, width, height, imageName,userMail,reportCaption); /*Start Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/
this.createOuterDiv("Map"+uniqueId+componentId,type,groupCssTypeNameList.get(0));
idList.add("Map"+uniqueId+componentId+"Div");
Label componantTtl=null;
componantTtl = new Label(componantTitlNameList.get(0));
Image componantTtlImg = new Image("FusionChart/images/"+componentIconName);
Image refreshImg = new Image("FusionChart/images/refresh.png");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date();
String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label(dateformat);
HorizontalPanel componantTtlPanel = new HorizontalPanel();
HorizontalPanel dateHPanel = new HorizontalPanel();
componantTtlImg.setStyleName("componantTtlImg");
componantTtl.setStyleName("componantTtl");
componantTtlPanel.add(componantTtlImg);
componantTtlPanel.add(componantTtl);
refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshImg);
dateHPanel.add(refreshDateTime);
HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.add(componantTtlPanel);
mainPanel.add(dateHPanel);
mainPanel.setStyleName("mainPanel");
mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
RootPanel.get("Map"+uniqueId+componentId+"head").add(mainPanel);
this.createInnerDiv(uniqueId+componentId,"Map"+uniqueId+componentId);
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption);
/*End Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/
//this.createChart(graphJson.toString().replace('@', '='), "chartContainer" + componentId, "chartContainer" + componentId, width, height, imageName,userMail,reportCaption);
} }
} }
} }
...@@ -590,6 +635,13 @@ public class GraphComponent extends Composite ...@@ -590,6 +635,13 @@ public class GraphComponent extends Composite
imageName = (String) graphDtlList.get(0); imageName = (String) graphDtlList.get(0);
width = (String) graphDtlList.get(1); width = (String) graphDtlList.get(1);
height = (String) graphDtlList.get(2); height = (String) graphDtlList.get(2);
/*Start Added Code for getValue from list by Dhanendra 11-03-2016*/
componantTitlNameList =(ArrayList<String>)graphDtlList.get(15);
groupCssTypeNameList =(ArrayList<String>)graphDtlList.get(16);
componentIconName = ""+graphDtlList.get(17);
/*End Added Code for getValue from list by Dhanendra 11-03-2016*/
graphJson = ChartCreator.buildCountryMap(graphDtlList, jsonObjFrGraph, dtSrouce); graphJson = ChartCreator.buildCountryMap(graphDtlList, jsonObjFrGraph, dtSrouce);
// start- added empty json chartdata to display no data found message by swati on 7jan2015 // start- added empty json chartdata to display no data found message by swati on 7jan2015
...@@ -599,7 +651,48 @@ public class GraphComponent extends Composite ...@@ -599,7 +651,48 @@ public class GraphComponent extends Composite
} }
if (graphJson != null && graphJson.size() > 0) if (graphJson != null && graphJson.size() > 0)
{ {
this.createChart(graphJson.toString().replace('@', '='), "chartContainer" + componentId, "chartContainer" + componentId, width, height, imageName,userMail,reportCaption);
/*Start Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/
this.createOuterDiv("Map"+uniqueId+componentId,type,groupCssTypeNameList.get(0));
idList.add("Map"+uniqueId+componentId+"Div");
Label componantTtl=null;
componantTtl = new Label(componantTitlNameList.get(0));
Image componantTtlImg = new Image("FusionChart/images/"+componentIconName);
Image refreshImg = new Image("FusionChart/images/refresh.png");
SimpleDateFormat dispDateTimeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = new Date();
String strDate = dispDateTimeFormat.format(date);
String dateformat = getTimeSince(strDate);
Label refreshDateTime = new Label(dateformat);
HorizontalPanel componantTtlPanel = new HorizontalPanel();
HorizontalPanel dateHPanel = new HorizontalPanel();
componantTtlImg.setStyleName("componantTtlImg");
componantTtl.setStyleName("componantTtl");
componantTtlPanel.add(componantTtlImg);
componantTtlPanel.add(componantTtl);
refreshDateTime.setStyleName("refreshDateTime");
dateHPanel.setStyleName("refreshDatePanel");
dateHPanel.add(refreshImg);
dateHPanel.add(refreshDateTime);
HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.add(componantTtlPanel);
mainPanel.add(dateHPanel);
mainPanel.setStyleName("mainPanel");
mainPanel.setCellHorizontalAlignment(dateHPanel, HasHorizontalAlignment.ALIGN_RIGHT);
RootPanel.get("Map"+uniqueId+componentId+"head").add(mainPanel);
this.createInnerDiv(uniqueId+componentId,"Map"+uniqueId+componentId);
this.createChart(graphJson.toString().replace('@', '='), uniqueId+componentId, "chartContainer" + uniqueId+componentId, width, height, imageName,userMail,reportCaption);
/*End Added Code by Dhanendra for Dyanmic Div By Dhanendra on 11-03-2016*/
//this.createChart(graphJson.toString().replace('@', '='), "chartContainer" + componentId, "chartContainer" + componentId, width, height, imageName,userMail,reportCaption);
} }
} }
} }
...@@ -1374,7 +1467,6 @@ public class GraphComponent extends Composite ...@@ -1374,7 +1467,6 @@ public class GraphComponent extends Composite
FilterInfo filterInfo = null; FilterInfo filterInfo = null;
/** Start Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/ /** Start Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/
String flitrValue=""; String flitrValue="";
objActionPath = "/ibase/" + servletname; objActionPath = "/ibase/" + servletname;
int cnt=0; int cnt=0;
......
...@@ -196,12 +196,14 @@ public class MetaDataDtl ...@@ -196,12 +196,14 @@ public class MetaDataDtl
for (int viewCtr = 0; viewCtr < viewNodeList.getLength(); viewCtr++) for (int viewCtr = 0; viewCtr < viewNodeList.getLength(); viewCtr++)
{ {
viewNode = viewNodeList.item(viewCtr); viewNode = viewNodeList.item(viewCtr);
/*Start Remove If condition by Dhanendra on 11-03-2016*/
//if (("component".equals(viewNode.getNodeName()) || "grid".equals(viewNode.getNodeName())) ) //if (("component".equals(viewNode.getNodeName()) || "grid".equals(viewNode.getNodeName())) )
{ //{
datsSourceDtlList = new ArrayList<String>(); datsSourceDtlList = new ArrayList<String>();
graphID = viewNode.getAttributes().getNamedItem("datasource").getNodeValue(); graphID = viewNode.getAttributes().getNamedItem("datasource").getNodeValue();
datsSourceDtlMap.put(graphID, datsSourceDtlMap_temp.get(graphID)); datsSourceDtlMap.put(graphID, datsSourceDtlMap_temp.get(graphID));
} //}
/*End Remove If condition by Dhanendra on 11-03-2016*/
} }
} }
} }
...@@ -911,6 +913,13 @@ public class MetaDataDtl ...@@ -911,6 +913,13 @@ public class MetaDataDtl
metaDataList = new ArrayList<String>(); metaDataList = new ArrayList<String>();
graphMeataDataMap = new HashMap<String, ArrayList<Object>>(); graphMeataDataMap = new HashMap<String, ArrayList<Object>>();
graphNodeList = viewNode.getChildNodes(); graphNodeList = viewNode.getChildNodes();
/* Add By Dhanedra for metadata change by Dhanendra on 11-03-2016 */
componentCssList = new ArrayList<String>();
componantTitlList = new ArrayList<String>();
String componentIconName = "";
/* End By Dhanedra for metadata change by Dhanendra on 11-03-2016 */
for (int i = 0; i < graphNodeList.getLength(); i++) for (int i = 0; i < graphNodeList.getLength(); i++)
{ {
graphDataNode = graphNodeList.item(i); graphDataNode = graphNodeList.item(i);
...@@ -1176,6 +1185,20 @@ public class MetaDataDtl ...@@ -1176,6 +1185,20 @@ public class MetaDataDtl
colorList.add(colorDataMap.toString().replace('=', ':')); colorList.add(colorDataMap.toString().replace('=', ':'));
} }
} }
/* Add By for metadata change by Dhanendra on 11-03-2016 */
if ("ComponentTitle".equalsIgnoreCase(childNodeName))
{
componantTitlList.add(graphDataNode.getChildNodes().item(0).getNodeValue());
}
if ("component_css".equalsIgnoreCase(childNodeName))
{
componentCssList.add(graphDataNode.getChildNodes().item(0).getNodeValue());
}
if ("component_icon".equalsIgnoreCase(childNodeName))
{
componentIconName = (graphDataNode.getChildNodes().item(0).getNodeValue());
}
/* End By for metadata change by Dhanendra on 11-03-2016 */
} }
metaDataList.add(metaDataMap.toString().replace('=', ':')); metaDataList.add(metaDataMap.toString().replace('=', ':'));
graphDtlList.add(metaDataList); graphDtlList.add(metaDataList);
...@@ -1192,6 +1215,13 @@ public class MetaDataDtl ...@@ -1192,6 +1215,13 @@ public class MetaDataDtl
graphDtlList.add(brLabelList); graphDtlList.add(brLabelList);
graphDtlList.add(blLabelList); graphDtlList.add(blLabelList);
graphDtlList.add(linkedMetadataList); graphDtlList.add(linkedMetadataList);
/* Add graphDtlList list by Dhanendra on 11-03-2016*/
graphDtlList.add(componantTitlList);
graphDtlList.add(componentCssList);
graphDtlList.add(componentIconName);
/* End graphDtlList list by Dhanendra on 11-03-2016*/
conuter++; conuter++;
gridNGraphMeataDataMap.put("type" + graphID, typeGraphMap); gridNGraphMeataDataMap.put("type" + graphID, typeGraphMap);
graphMeataDataMap.put("graph" + conuter, graphDtlList); graphMeataDataMap.put("graph" + conuter, graphDtlList);
...@@ -1232,6 +1262,13 @@ public class MetaDataDtl ...@@ -1232,6 +1262,13 @@ public class MetaDataDtl
String divisionName = ""; String divisionName = "";
String[] brandNameArr = null; String[] brandNameArr = null;
String[] divisionNameArr = null; String[] divisionNameArr = null;
/* Add By Dhanedra for metadata change by Dhanendra on 11-03-2016 */
componentCssList = new ArrayList<String>();
componantTitlList = new ArrayList<String>();
String componentIconName = "";
/* End By Dhanedra for metadata change by Dhanendra on 11-03-2016 */
for (int i = 0; i < graphNodeList.getLength(); i++) for (int i = 0; i < graphNodeList.getLength(); i++)
{ {
graphDataNode = graphNodeList.item(i); graphDataNode = graphNodeList.item(i);
...@@ -1452,6 +1489,21 @@ public class MetaDataDtl ...@@ -1452,6 +1489,21 @@ public class MetaDataDtl
} }
} }
} }
/* Add By for metadata change by Dhanendra on 11-03-2016 */
if ("ComponentTitle".equalsIgnoreCase(childNodeName))
{
componantTitlList.add(graphDataNode.getChildNodes().item(0).getNodeValue());
}
if ("component_css".equalsIgnoreCase(childNodeName))
{
componentCssList.add(graphDataNode.getChildNodes().item(0).getNodeValue());
}
if ("component_icon".equalsIgnoreCase(childNodeName))
{
componentIconName = (graphDataNode.getChildNodes().item(0).getNodeValue());
}
/* End By for metadata change by Dhanendra on 11-03-2016 */
if ("data".equalsIgnoreCase(childNodeName)) if ("data".equalsIgnoreCase(childNodeName))
{ {
columnNodeList = graphDataNode.getChildNodes(); columnNodeList = graphDataNode.getChildNodes();
...@@ -1510,6 +1562,13 @@ public class MetaDataDtl ...@@ -1510,6 +1562,13 @@ public class MetaDataDtl
graphDtlList.add(showLabelList); graphDtlList.add(showLabelList);
graphDtlList.add(hovercolorList); graphDtlList.add(hovercolorList);
graphDtlList.add(tooltextList); graphDtlList.add(tooltextList);
/* Add graphDtlList list by Dhanendra on 11-03-2016*/
graphDtlList.add(componantTitlList);
graphDtlList.add(componentCssList);
graphDtlList.add(componentIconName);
/* End graphDtlList list by Dhanendra on 11-03-2016*/
conuter++; conuter++;
gridNGraphMeataDataMap.put("type" + graphID, typeGraphMap); gridNGraphMeataDataMap.put("type" + graphID, typeGraphMap);
graphMeataDataMap.put("graph" + conuter, graphDtlList); graphMeataDataMap.put("graph" + conuter, graphDtlList);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="GwtDashboardPage.css"> <link type="text/css" rel="stylesheet" href="GwtDashboardPage.css">
<script type="text/javascript" language="javascript" src="FusionChart/js/BuildChart.js"></script> <script type="text/javascript" language="javascript" src="FusionChart/js/BuildChart.js"></script>
<script type="text/javascript" language="javascript" src="FusionChart/js/fusioncharts.js"></script> <script type="text/javascript" language="javascript" src="FusionChart/js/heatmap/FusionCharts.js"></script>
<script type="text/javascript" language="javascript" src="gwtdashboardreport/gwtdashboardreport.nocache.js"></script> <script type="text/javascript" language="javascript" src="gwtdashboardreport/gwtdashboardreport.nocache.js"></script>
</head> </head>
...@@ -14,37 +14,6 @@ ...@@ -14,37 +14,6 @@
<div id="filterDiv" class="filterDiv"></div> <div id="filterDiv" class="filterDiv"></div>
<div id="optioDiv"></div> <div id="optioDiv"></div>
<div id="chartContainer" > <div id="chartContainer" >
<table >
<tr>
<td><div id="chartContainer1" class="chartContainer"></div></td>
<td><div id="chartContainer2" class="chartContainer"></div></td>
</tr>
<tr> <td colspan="2"><div id="chartContainer3" class="chartContainer"></div></td></tr>
<tr> <td colspan="2"><div id="chartContainer4" class="chartContainer"></div></td></tr>
<tr> <td colspan="2"><div id="chartContainer5" class="chartContainer" ></div></td></tr>
<tr>
<td><div id="chartContainer6" class="chartContainer" ></div></td>
<td><div id="chartContainer7" class="chartContainer"></div></td>
</tr>
<tr>
<td><div id="chartContainer8" class="chartContainer" ></div></td>
<td><div id="chartContainer9" class="chartContainer"></div></td>
</tr>
<tr>
<td><div id="chartContainer10" class="chartContainer" ></div></td>
<td><div id="chartContainer11" class="chartContainer"></div></td>
</tr>
</table>
</div> </div>
<!-- <body>
<div id="chartContainer1" class="chartContainer1">FusionCharts will load here...</div>
</body> -->
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment