Commit f59ef28e authored by sbade's avatar sbade

added line graph functionality in combination with stack graph


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98397 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 20d480a0
......@@ -7,6 +7,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import sun.java2d.loops.RenderLoops;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONParser;
......@@ -367,10 +369,13 @@ public class ChartCreator
}
if(chartTypeList.get(0).trim().equals("stack"))
{
int count=0;
//HashMap<String, String> dMap = new HashMap<String, String>();
for (String keyString : valueMapSet)
{
count++;
mapValuList = allDataMap.get(keyString);
jsnStringKey = new JSONString("label");
dataStringKey = new JSONString("value");
String value = mapValuList.get(1).replace("{", "");
......@@ -378,6 +383,7 @@ public class ChartCreator
String[] tempArray = value.split(",");
barMap = new LinkedHashMap<JSONValue, JSONValue>();
barValueList = new ArrayList<LinkedHashMap<JSONValue, JSONValue>>();
for(int i=0;i<tempArray.length;i++)
{
if(! tempArray[i].equals(""))
......@@ -406,6 +412,11 @@ public class ChartCreator
}
}
barMap.put(new JSONString("seriesname"), new JSONString(mapValuList.get(0)));
if(renderInfoList.contains("line")){
if(count==renderInfoList.size() || count==(renderInfoList.size()-1) ){
barMap.put(new JSONString("renderas"), new JSONString("Line"));
}
}
barDataVal = JSONParser.parseStrict(barValueList.toString().replace('=', ':'));
barMap.put(new JSONString("data"), barDataVal);
allDataList.add(barMap);
......@@ -413,7 +424,7 @@ public class ChartCreator
}
categryDataVal = JSONParser.parseStrict(labelList.toString().replace('=', ':'));
categryJson.put("category", categryDataVal);
graphJson.put("categories", categryJson);
graphJson.put("categories", categryJson);
}
/**Start of Linked chart logic by swati dates: 22 December 2014 **/
......
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