title: Placing the nodes in the center of screen in d3 force layout
body: <p>How can i place the nodes in the center of the force layout in d3.js.
  Here i'm getting the JSON data, which is like this</p>
  
  <pre><code>"nodes": [{
      "cName": "User",
      "cImage_url": "/final/images/component_icons/user_image.png",
      "x": 49.99999999999999,
      "y": 150,
      "fixed": true
  }, {
      "cType": "Oracle WebLogic",
      "cName": "weblogic177:7001",
      "cImage_url": "/final/images/Light/component_icons/APPLICATION_SERVERS.png",
      "x": 167,
      "y": 150,
      "fixed": true,
      "AlarmPopup": "WebLogic_server:weblogic177:7001",
      "cStateImage_url": "/final/images/Light/state20_INTERMEDIATE.png",
      "linktoLayermodel": "/final/monitor/EgDispLayers.jsp?site=egurkha.physical.topology&amp;qctr=0&amp;host=weblogic177:7001&amp;comptype=Oracle WebLogic&amp;comeFrom=topology&amp;To=layerMode&amp;isFromZone=null&amp;iszoneName=&amp;parentZone=null&amp;tab=LayerModel&amp;toDashBoardLayer=true"
  }, {
      "cType": "Group",
      "cName": "hari11",
      "cImage_url": "/final/images/component_icons/group.png",
      "x": 283.99999999999994,
      "y": 49.99999999999999,
      "fixed": true,
      "AlarmPopup": "Group:hari11:NULL",
      "cStateImage_url": "/final/images/Light/state20_LOW.png",
      "linktoLayermodel": "/final/monitor/EgDisplayGroups.jsp?ptype=group&amp;showsitesegments=false&amp;group=hari11&amp;serverType=Group&amp;site=egurkha.physical.topology&amp;segmentName=sample&amp;fromHomepage=true"
  }..
  </code></pre>
  
  <p>so the nodes always starting from left corner of the screen but i need to start it from center.<img src="https://i.stack.imgur.com/zCB6p.png" alt="enter image description here"></p>
  
  <p>so how can i manipulate the existing  x, y in the JSON data? </p>
  
  <p><img src="https://i.stack.imgur.com/TVKMa.png" alt="enter image description here"></p>