function createVertexData(numberOfRecords, categories, numberOfEdgesToCreate) {
		var result = {
			data: [],
			edges: [],
			meta: {}
		};

		if (numberOfRecords===undefined || isNaN(numberOfRecords)) {
			return result;
		}

		var catCount = parseInt(numberOfRecords/categories.length),
			nodes=[];

		categories.forEach(function(category, index) {
			for (var i = 0; i<catCount;i ++) {
				var indx = parseInt(index*catCount + i);
				var itemObj = {
		            "id": 100 + indx,
		            //"index": indx,
		            "label": category.label,
		            "type": "vertex",
		            "properties": {
		            	"person_name": "NODE-" + indx,
		                "person_emailId": [
			                {
			                    "id": "1241x-ivjc-4qt",
			                    "value": "barbara.clancey@ipgdirect.com"
			                }
		                ],
		                "person_salary": [
			                {
			                    "id": "125mt-ivjc-6bp",
			                    "value": "54000.0"
			                }
		                ],
		                "person_department": [
			                {
			                    "id": "1258l-ivjc-f0l",
			                    "value": "DEVELOPMENT"
			                }
		                ],
		                "person_age": [
			                {
			                    "id": "124ud-ivjc-7wl",
			                    "value": "44"
			                }
		                ],
		                "person_isInternal": [
			                {
			                    "id": "124g5-ivjc-9hh",
			                    "value": "false"
			                }
		                ]
		            }
	    		};

				nodes.push(itemObj);
			}
		});

		result.edges = createEdgesForAllVertex(nodes,categories,numberOfEdgesToCreate);
		result.data = nodes;
		return result;
	}
/*
	 *This creates Vertex Data JSON of specified Number of Nodes, equally for each category
	*/
This creates Vertex Data JSON of specified Number of Nodes, equally for each category
This creates Vertex Data JSON of specified Number of Nodes equally for each category
function createVertexData(numberOfRecords, categories, numberOfEdgesToCreate) {
		var result = {
			data: [],
			edges: [],
			meta: {}
		};
		if (numberOfRecords===undefined || isNaN(numberOfRecords)) {
			return result;
		}
		var catCount = parseInt(numberOfRecords/categories.length),
			nodes=[];
		categories.forEach(function(category, index) {
			for (var i = 0; i<catCount;i ++) {
				var indx = parseInt(index*catCount + i);
				var itemObj = {
		            "id": 100 + indx,
		            "label": category.label,
		            "type": "vertex",
		            "properties": {
		            	"person_name": "NODE-" + indx,
		                "person_emailId": [
			                {
			                    "id": "1241x-ivjc-4qt",
			                    "value": "barbara.clancey@ipgdirect.com"
			                }
		                ],
		                "person_salary": [
			                {
			                    "id": "125mt-ivjc-6bp",
			                    "value": "54000.0"
			                }
		                ],
		                "person_department": [
			                {
			                    "id": "1258l-ivjc-f0l",
			                    "value": "DEVELOPMENT"
			                }
		                ],
		                "person_age": [
			                {
			                    "id": "124ud-ivjc-7wl",
			                    "value": "44"
			                }
		                ],
		                "person_isInternal": [
			                {
			                    "id": "124g5-ivjc-9hh",
			                    "value": "false"
			                }
		                ]
		            }
	    		};
				nodes.push(itemObj);
			}
		});
		result.edges = createEdgesForAllVertex(nodes,categories,numberOfEdgesToCreate);
		result.data = nodes;
		return result;
	}
function createVertexData ( numberOfRecords , categories , numberOfEdgesToCreate ) { var result = { data : [ ] , edges : [ ] , meta : { } } ; if ( numberOfRecords === undefined || isNaN ( numberOfRecords ) ) { return result ; } var catCount = parseInt ( numberOfRecords / categories . length ) , nodes = [ ] ; categories . forEach ( function ( category , index ) { for ( var i = 0 ; i < catCount ; i ++ ) { var indx = parseInt ( index * catCount + i ) ; var itemObj = { "id" : 100 + indx , "label" : category . label , "type" : "vertex" , "properties" : { "person_name" : "NODE-" + indx , "person_emailId" : [ { "id" : "1241x-ivjc-4qt" , "value" : "barbara.clancey@ipgdirect.com" } ] , "person_salary" : [ { "id" : "125mt-ivjc-6bp" , "value" : "54000.0" } ] , "person_department" : [ { "id" : "1258l-ivjc-f0l" , "value" : "DEVELOPMENT" } ] , "person_age" : [ { "id" : "124ud-ivjc-7wl" , "value" : "44" } ] , "person_isInternal" : [ { "id" : "124g5-ivjc-9hh" , "value" : "false" } ] } } ; nodes . push ( itemObj ) ; } } ) ; result . edges = createEdgesForAllVertex ( nodes , categories , numberOfEdgesToCreate ) ; result . data = nodes ; return result ; }
This creates Vertex Data JSON of specified Number of Nodes, equally for each category
This creates Vertex Data JSON of specified Number of Nodes equally for each category
//"index": indx,
