diff --git a/src/Util/Util.php b/src/Util/Util.php
index 70af87b..ca8ef56 100644
--- a/src/Util/Util.php
+++ b/src/Util/Util.php
@@ -14,13 +14,18 @@ class Util {
   public static function viewsData($view, $labelValues, $labelField, $color, $attachmentChartTypeOption) {
     $data = [];
 
-    foreach ($view->result as $id => $row) {
+    foreach ($view->result as $row_number => $row) {
       $numberFields = 0;
       $rowData = [];
       foreach ($labelValues as $fieldId => $rowDataValue) {
+        $alter_text = $view->field[$labelField]->options['alter']['alter_text'];
+        if ($alter_text) {
+          $text = $view->field[$labelField]->options['alter']['text'];
+          $tokenized_text = trim(str_replace("\n", '', strip_tags($view->field[$labelField]->tokenizeValue($text, $row_number))));
+        }
         $rowData[$numberFields] = [
           'value' => $view->field[$fieldId]->getValue($row),
-          'label_field' => $view->field[$labelField]->getValue($row),
+          'label_field' => ($alter_text) ? $tokenized_text : $view->field[$labelField]->getValue($row),
           'label' => $view->field[$fieldId]->label(),
           // 'label' => $view->display_handler->display['id'], to use display_id
           'color' => $color[$fieldId],
@@ -28,7 +33,7 @@ class Util {
         ];
         $numberFields++;
       }
-      $data[$id] = $rowData;
+      $data[$row_number] = $rowData;
     }
 
     return $data;
@@ -86,7 +91,7 @@ class Util {
   public static function checkMissingLibrary($moduleName, $libraryPath) {
     $module_path = drupal_get_path('module', $moduleName);
     if (!file_exists($module_path . $libraryPath)) {
-      drupal_set_message(t('Charting libraries for ' . $moduleName . ' might 
+      drupal_set_message(t('Charting libraries for ' . $moduleName . ' might
       not be installed. Run \'composer install\' for ' . $moduleName . ' sub-module.'), 'error');
     }
   }
