You are here

function d3_examples_menu in d3.js 7

Implements hook_menu().

File

modules/d3_examples/d3_examples.module, line 10
D3 Example module file.

Code

function d3_examples_menu() {
  $items['d3/examples'] = array(
    'title' => 'D3 examples',
    'description' => 'Different visualization examples using d3.',
    'page callback' => 'd3_examples_linegraph',
    'access callback' => TRUE,
  );
  $items['d3/examples/line'] = array(
    'title' => 'Line graph',
    'description' => 'Uses d3 module to create a sample line graph',
    'access callback' => TRUE,
    'page callback' => 'd3_examples_linegraph',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  if (module_exists('graphapi')) {
    $items['d3/examples/forcedirected'] = array(
      'title' => 'Force directed graph',
      'description' => 'Uses d3 module to create a sample force directed graph',
      'access callback' => TRUE,
      'page callback' => 'd3_examples_forcedirected',
      'type' => MENU_LOCAL_TASK,
    );
  }
  $items['d3/examples/column'] = array(
    'title' => 'Column chart',
    'description' => 'Uses d3 module to create a sample column chart',
    'access callback' => TRUE,
    'page callback' => 'd3_examples_column',
    'type' => MENU_LOCAL_TASK,
  );
  $items['d3/examples/bar'] = array(
    'title' => 'Bar chart',
    'description' => 'Uses d3 module to create a sample bar chart',
    'access callback' => TRUE,
    'page callback' => 'd3_examples_bar',
    'type' => MENU_LOCAL_TASK,
  );
  $items['d3/examples/pie'] = array(
    'title' => 'Pie chart',
    'description' => 'Uses d3 module to create a sample pie chart.',
    'access callback' => TRUE,
    'page callback' => 'd3_examples_pie',
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}