You are here

function d3_examples_pie in d3.js 7

Generates a random pie chart example.

Return value

string HTML for the page.

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

File

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

Code

function d3_examples_pie() {
  $chart = array(
    'id' => 'visualization',
    'type' => 'piechart',
    'rows' => array(
      array(
        'Development',
        500,
      ),
      array(
        'Strategy',
        50,
      ),
      array(
        'Design',
        100,
      ),
      array(
        'QA',
        160,
      ),
    ),
  );
  return d3_draw($chart);
}