diff --git a/modules/charts_api_example/src/Controller/ChartsApiExample.php b/modules/charts_api_example/src/Controller/ChartsApiExample.php
index 6f80e9f..2e2da13 100644
--- a/modules/charts_api_example/src/Controller/ChartsApiExample.php
+++ b/modules/charts_api_example/src/Controller/ChartsApiExample.php
@@ -49,24 +49,29 @@ class ChartsApiExample extends ControllerBase implements ContainerInjectionInter
 
     // Sample data format.
     $categories = ['Category 1', 'Category 2', 'Category 3', 'Category 4'];
-    $seriesData = [
-      [
-        'name'  => 'Series 1',
-        'color' => '#0d233a',
-        'type'  => NULL,
-        'data'  => [250, 350, 400, 200],
-      ], [
-        'name'  => 'Series 2',
-        'color' => '#8bbc21',
-        'type'  => 'column',
-        'data'  => [150, 450, 500, 300],
-      ], [
-        'name'  => 'Series 3',
-        'color' => '#910000',
-        'type'  => 'area',
-        'data'  => [0, 0, 60, 90],
-      ],
+    $seriesData[] = [
+      'name'  => 'Series 1',
+      'color' => '#0d233a',
+      'type'  => NULL,
+      'data'  => [250, 350, 400, 200],
     ];
+    switch ($this->chartSettings['type']) {
+      default:
+        $seriesData[] = [
+          'name'  => 'Series 2',
+          'color' => '#8bbc21',
+          'type'  => 'column',
+          'data'  => [150, 450, 500, 300],
+        ];
+        $seriesData[] = [
+          'name'  => 'Series 3',
+          'color' => '#910000',
+          'type'  => 'area',
+          'data'  => [0, 0, 60, 90],
+        ];
+
+      case 'pie':
+    }
 
     $build = [
       '#theme'      => 'charts_api_example',
