You are here

function _charts_examples_pie_simple in Charts 7.2

2 calls to _charts_examples_pie_simple()
_charts_examples_pie_data_overrides in includes/charts.examples.inc
_charts_examples_pie_tooltips in includes/charts.examples.inc

File

includes/charts.examples.inc, line 47

Code

function _charts_examples_pie_simple() {
  $chart = array(
    '#type' => 'chart',
    '#title' => t('Pie simple'),
    '#chart_type' => 'pie',
    '#chart_library' => 'highcharts',
    '#legend_position' => 'right',
    '#data_labels' => TRUE,
    '#tooltips' => FALSE,
  );
  $chart['pie_data'] = array(
    '#type' => 'chart_data',
    '#title' => t('Gender'),
    '#labels' => array(
      'Male',
      'Female',
    ),
    '#data' => array(
      10,
      20,
    ),
  );
  $example['chart'] = $chart;
  return $example;
}