Commit 14be3148 authored by Nia Kathoni's avatar Nia Kathoni Committed by Daniel Cothran
Browse files

Issue #3298929 by nikathone, andileco: Trim xaxis label in the...

Issue #3298929 by nikathone, andileco: Trim xaxis label in the Drupal\charts\Plugin\views\style\ChartsPluginStyleChart
parent 872b9794
Loading
Loading
Loading
Loading
+1 −1
Changes for src/Plugin/views/style/ChartsPluginStyleChart.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -361,7 +361,7 @@ class ChartsPluginStyleChart extends StylePluginBase implements ContainerFactory
          // from before the grouping, so we need to keep our own row number
          // when looping through the rows.
          foreach ($data_set['rows'] as $result_number => $row) {
            $xaxis_label = strip_tags($this->getField($result_number, $label_field_key));
            $xaxis_label = trim(strip_tags($this->getField($result_number, $label_field_key)));
            if ($label_field_key) {
              $xaxis_labels = $chart['xaxis']['#labels'] ?? [];
              if (!in_array($xaxis_label, $xaxis_labels)) {