function graphapi_settings_defaults() {
  $result = array(
    'label' => t('Graph'),
    'settings' => array(
      'global' => array(
        'use_global' => FALSE,
      ),
      'graph' => array(
        'animate' => TRUE,
        'background-color' => 'grey',
        'height' => '800',
        'menu' => TRUE,
        'randomize' => TRUE,
        'rankType' => 'TopBottom',
        'rankDepth' => 2,
        'showLinks' => FALSE,
        'width' => '800',
      ),
      'physics' => array(
        'showForces' => FALSE,
        'applyAttractToCenter' => TRUE,
        'applyBoundingBox' => FALSE,
        'applyBoxOverlap' => FALSE,
        'applyCoulombsLaw' => TRUE,
        'applyDamping' => TRUE,
        'applyHookesLaw' => TRUE,
        'applyCompass' => FALSE,
      ),
      'links' => array(),
    ),
  );
  return $result;
}

Especially the physics part seems graph_phyz related.

Comments

s.daniel’s picture

Note: graph_phyz_default_config doesn't exist currently but is called in graph_phyz.module:

  162  function template_preprocess_views_graphapi_style_graph_phyz(&$vars) {
  163   _views_graph_phyz_style_build_graph_data($vars);
  164
  165    $config = $vars['settings'];
  166:   $config = $config + graph_phyz_default_config();
  167    $vars["xml"] = theme('graph_phyz_container', array('graph' => $vars['graph'], 'config' => $config));
  168  }
  ...
  256   *   Graph array.
  257   * @param $config
  258:  *   Graph config array (see graph_phyz_default_config() for details).
  259   */
  260  function theme_graph_phyz_links($variables) {

There is graph_phyz_graphapi_default_settings() and graph_phyz_default_settings()

I'm currently trying to understand how you intented the settings of the graphapi and the rendering modules to work together. If you have time to describe me what your goals for the settings structure, this would probably help me to implement the graphviz integration.

clemens.tolboom’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.