lusterOptions.mass = totalMass;
                  return clusterOptions;
              },
              clusterNodeProperties: {id: 'cluster:' + color, borderWidth: 3, shape: 'database', color:color, label:'color:' + color}
          };
          network.cluster(clusterOptionsByData);
      }
  }
  function clusterByConnection() {
      network.setData(data);
      network.clusterByConnection(1)
  }
  function clusterOutliers() {
      network.setData(data);
      network.clusterOutliers();
  }
  function c