Index: views_simplechart/plugins/views_simplechart_plugin_style.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- views_simplechart/plugins/views_simplechart_plugin_style.inc	(revision 7cf6b648b399bd1a4c8fc2b1a44c1cc226515d7c)
+++ views_simplechart/plugins/views_simplechart_plugin_style.inc	(date 1552440570000)
@@ -55,6 +55,14 @@
         'ColumnChart' => t('Column Chart'),
         'Timeline' => t('Timeline'),
         'OrgChart' => t('Organization Chart'),
+        'ScatterChart' => t('Scatter Chart'),
+        'AreaChart' => t('Area Chart'),
+        'SteppedAreaChart' => t('Stepped Area Chart'),
+        'BubbleChart' => t('Bubble Chart'),
+        'CandlestickChart' => t('Candlestick Chart'),
+        'ComboChart' => t('Combo Chart'),
+        'TreeMap' => t('Tree Map'),
+        'Table' => t('Table'),
       ),
       '#default_value' => $this->options['chart_type'],
     );
@@ -64,6 +72,13 @@
       '#options' => array('yes' => t('Yes'),'no' => t('No')),
       '#description' => t('This is applicable only for Bar and Column chart.'),
       '#default_value' => $this->options['chart_type_stacked'],
+      '#states' => [
+        'visible' => [
+          [':input[name="style_options[chart_type]"]' => ['value' => 'PieChart']],
+          [':input[name="style_options[chart_type]"]' => ['value' => 'BarChart']],
+          [':input[name="style_options[chart_type]"]' => ['value' => 'ColumnChart']],
+        ],
+      ],
     );
     $form['chart_legend_position'] = array(
       '#type' => 'radios',
@@ -83,14 +98,52 @@
       '#size' => '60',
       '#default_value' => $this->options['chart_height'],
     );
+    $form['chart_3d'] = [
+      '#title' => t('Chart 3D'),
+      '#type' => 'checkbox',
+      '#default_value' => empty($this->options['chart_3d']) ? 0 : 1,
+      '#states' => [
+        'visible' => [
+          [':input[name="style_options[chart_type]"]' => ['value' => 'PieChart']],
+          [':input[name="style_options[chart_type]"]' => ['value' => 'BarChart']],
+          [':input[name="style_options[chart_type]"]' => ['value' => 'ColumnChart']],
+        ],
+      ],
+    ];
+    $form['chart_pieHole'] = [
+      '#title' => t('Chart Pie hole'),
+      '#type' => 'textfield',
+      '#attributes' => [
+        'type' => 'number',
+        'min' => 0.1,
+        'max' => 1,
+      ],
+      '#description' => t('Making a Donut Chart ex: 0.6'),
+      '#default_value' => $this->options['chart_pieHole'],
+      '#states' => [
+        'visible' => [
+          ':input[name="style_options[chart_type]"]' => ['value' => 'PieChart'],
+        ],
+      ],
+    ];
   }
   
   function render() {
     $barchart = $this->render_fields($this->view->result);
-    $chartdata[] = explode(',', $this->options['chart_axis_mapping']);
+    if(!empty($this->options['chart_axis_mapping'])){
+      $chartdata[] = explode(',', $this->options['chart_axis_mapping']);
+    }else{
+      foreach ($this->display->display_options["fields"] as $fields){
+        if(empty($fields["exclude"])) {
+          $chartdata[0][] = !empty($fields['label']) ? $fields['label'] : '';
+        }
+      }
+    }
     foreach($barchart as $row) {
       $chartdata[] = array_values($row);
     }
+    // Allow other modules to alter chart data.
+    drupal_alter('simplechart_data', $chartdata, $this->view);
     $chartdata = json_encode($chartdata, JSON_NUMERIC_CHECK);
     if ($this->options['chart_type'] == 'Timeline') {
       $chartdata = preg_replace('/"(\d+)-(\d+)-(\d+)"/i', 'new Date(\'$1-$2-$3\')', $chartdata);
Index: views_simplechart/views-simplechart-graph.tpl.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- views_simplechart/views-simplechart-graph.tpl.php	(revision 7cf6b648b399bd1a4c8fc2b1a44c1cc226515d7c)
+++ views_simplechart/views-simplechart-graph.tpl.php	(date 1552440570000)
@@ -1,17 +1,48 @@
+<?php
+  $options = [
+    'legend' => $metadata['chart_legend_position'],
+    'title' => $metadata['chart_title'],
+    'allowHtml' => true
+  ];
+  switch ($metadata['chart_type'] ){
+    case 'Table':
+      $packages = ['table'];
+      break;
+    case 'Timeline':
+      $packages = ['timeline'];
+      break;
+    case 'OrgChart':
+      $packages = ['orgchart'];
+      break;
+    default :
+      $packages = ['corechart'];
+  }
+  if(!empty( $metadata['chart_width'])){
+    $options['width'] = $metadata['chart_width'];
+  }
+  if(!empty( $metadata['chart_height'])){
+    $options['height'] = $metadata['chart_height'];
+  }
+  if(in_array($metadata['chart_type'], ['BarChart','ColumnChart'])){
+    if($metadata['chart_type_stacked'] == 'yes') {
+      $options['isStacked'] = TRUE;
+    }
+    if(!empty($metadata["chart_3d"])){
+      $options['is3D'] = true;
+      $packages[] = 'columnchart';
+    }
+  }
+  if(in_array($metadata['chart_type'] ,['PieChart'])){
+    if(!empty($metadata["chart_3d"])){
+      $options['is3D'] = TRUE;
+      $packages[] = 'piechart';
+    }
+    if(!empty($metadata["chart_pieHole"]) && is_numeric($metadata["chart_pieHole"])){
+      $options['pieHole'] = $metadata["chart_pieHole"];
+    }
+  }
+?>
 <div id="views-simplechart-<?php print $id ?>" class="<?php print $classes ?>">
   <script type="text/javascript">
-    google.charts.load('current', {'packages':['corechart','timeline','orgchart']}); 
+    google.charts.load('current', {'packages': ['<?php echo implode("','", $packages)?>']});
     google.charts.setOnLoadCallback(function(){
       var data = new google.visualization.arrayToDataTable(<?php print $barchart;?>);
-      var options = {
-        <?php (in_array($metadata['chart_type'],array('BarChart','ColumnChart')) && $metadata['chart_type_stacked'] == 'yes') ? print("'isStacked':true,") : NULL;?>
-        'is3D':true,
-        'legend':'<?php print $metadata['chart_legend_position'];?>',
-        'title':'<?php print $metadata['chart_title'];?>',
-        'width':<?php print $metadata['chart_width'];?>,
-        'height':<?php print $metadata['chart_height'];?>,
-        'allowHtml':true
-      };
+      var options =  <?php echo json_encode($options) ?>;
       var container = document.getElementById('views-simplechart-graph-<?php print $id ?>');
       var chart = new google.visualization.<?php print $metadata['chart_type'];?>(container);
       chart.draw(data, options);
