You are here

public function SeriesPie::content in Flot 8

Zooming.

1 string reference to 'SeriesPie::content'
flot_examples.routing.yml in flot_examples/flot_examples.routing.yml
flot_examples/flot_examples.routing.yml

File

flot_examples/src/Controller/SeriesPie.php, line 15

Class

SeriesPie
Display a chart demonstrating pie charts.

Namespace

Drupal\flot_examples\Controller

Code

public function content() {
  $output[] = [
    '#type' => 'flot',
    '#theme' => 'flot_examples_series_pie',
    '#data' => [
      [
        'label' => "Series1",
        'data' => 3,
      ],
      [
        'label' => "Series2",
        'data' => 30,
      ],
    ],
    '#options' => [
      'series' => [
        'pie' => [
          'show' => TRUE,
        ],
      ],
    ],
  ];
  return $output;
}