original_string: public function replaceSparklineMetric($metricNames, $replacementColumns)
      {
          foreach ($this->sparkline_metrics as $index => $metric) {
              if ($metric['columns'] === $metricNames) {
                  $this->sparkline_metrics[$index]['columns'] = $replacementColumns;
              }
          }
      }
code: public function replaceSparklineMetric($metricNames, $replacementColumns)
      {
          foreach ($this->sparkline_metrics as $index => $metric) {
              if ($metric['columns'] === $metricNames) {
                  $this->sparkline_metrics[$index]['columns'] = $replacementColumns;
              }
          }
      }
code_tokens: public function replaceSparklineMetric ( $ metricNames , $ replacementColumns ) { foreach ( $ this -> sparkline_metrics as $ index => $ metric ) { if ( $ metric [ 'columns' ] === $ metricNames ) { $ this -> sparkline_metrics [ $ index ] [ 'columns' ] = $ replacementColumns ; } } }
docstring: Replaces an existing sparkline entry with different columns. 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) {
  // instead of showing the sparklines for users, show a placeholder if there are no recorded users
  $config->replaceSparklineMetric(array('nb_users'), '');
  }
  }
  
  @param array|string $metricNames The name of the metrics in the same format they were used when added via
  {@link addSparklineMetric}
  @param array|string $replacementColumns The removed columns will be replaced with these columns
docstring_tokens: Replaces an existing sparkline entry with different columns . Especially useful in dataTable filters in case sparklines should be not displayed depending on the fetched data .