original_string: public function removeSparklineMetric($metricNames)
      {
          foreach ($this->sparkline_metrics as $index => $metric) {
              if ($metric['columns'] === $metricNames) {
                  array_splice($this->sparkline_metrics, $index, 1);
  
                  break;
              }
          }
      }
code: public function removeSparklineMetric($metricNames)
      {
          foreach ($this->sparkline_metrics as $index => $metric) {
              if ($metric['columns'] === $metricNames) {
                  array_splice($this->sparkline_metrics, $index, 1);
  
                  break;
              }
          }
      }
code_tokens: public function removeSparklineMetric ( $ metricNames ) { foreach ( $ this -> sparkline_metrics as $ index => $ metric ) { if ( $ metric [ 'columns' ] === $ metricNames ) { array_splice ( $ this -> sparkline_metrics , $ index , 1 ) ; break ; } } }
docstring: Removes an existing sparkline entry. Especially useful in dataTable filters in case sparklines should be not
  displayed depending on the fetched data.
  
  Example:
  $config->addSparklineMetric('nb_users');
  $config->filters[] = function ($dataTable) use ($config) {
  if ($dataTable->getFirstRow()->getColumn('nb_users') == 0) {
  // do not show a sparkline if there are no recorded users
  $config->removeSparklineMetric('nb_users');
  }
  }
  
  @param array|string $metricNames The name of the metrics in the same format they were used when added via
  {@link addSparklineMetric}
docstring_tokens: Removes an existing sparkline entry . Especially useful in dataTable filters in case sparklines should be not displayed depending on the fetched data .