You are here

function d3_examples_column in d3.js 7

Demonstrates a column chart using the D3 API directly.

1 string reference to 'd3_examples_column'
d3_examples_menu in modules/d3_examples/d3_examples.module
Implements hook_menu().

File

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

Code

function d3_examples_column() {
  $chart = array(
    'id' => 'visualization',
    'type' => 'columnchart',
    'legend' => array(
      'Development',
      'QA',
      'Strategy',
      'Design',
    ),
    'rows' => array(
      array(
        '1st Quarter 2011',
        10,
        20,
        26,
        35,
      ),
      array(
        '2nd Quarter 2011',
        20,
        26,
        27,
        37,
      ),
      array(
        '3rd Quarter 2011',
        10,
        50,
        28,
        50,
      ),
      array(
        '4th Quarter 2011',
        15,
        76,
        49,
        51,
      ),
      array(
        '1st Quarter 2012',
        20,
        100,
        50,
        52,
      ),
      array(
        '2nd Quarter 2012',
        4,
        1,
        110,
        40,
      ),
    ),
  );
  return d3_draw($chart);
}