<commit_before>import { pluck } from '../../../../tools';
import Donut from '../../../donut';

class CenterText extends React.PureComponent {
  format(number) {
    const formatted = this.props.styling.charts.hoverFormatter(number) || '';
    return [
      formatted.slice(0, -1),
      <span className="multiplier">{formatted.slice(-1)}</span>
    ];
  }

  render() {
    const { data } = this.props;
    const [fst, snd] = data.map(pluck('value'));
    return (
      <div className="center-text two-rows">
        <div>
          ${this.format(fst)}
          <div className="secondary">
            ${snd} Lost
          </div>
        </div>
      </div>
    );
  }
}

class AmountWonVsLost extends React.Component {<commit_msg>OCE-444 Formatting lost amount for 2nd donut on supplier single page<commit_after>import { pluck } from '../../../../tools';
import Donut from '../../../donut';

class CenterText extends React.PureComponent {
  format(number) {
    const formatted = this.props.styling.charts.hoverFormatter(number) || '';
    return [
      formatted.slice(0, -1),
      <span className="multiplier">{formatted.slice(-1)}</span>
    ];
  }

  render() {
    const { data } = this.props;
    const [fst, snd] = data.map(pluck('value'));
    return (
      <div className="center-text two-rows">
        <div>
          ${this.format(fst)}
          <div className="secondary">
            ${this.format(snd)} Lost
          </div>
        </div>
      </div>
    );
  }
}

class AmountWonVsLost extends React.Component {
{'fraction_non_alphanumeric': 0.17425227568270482, 'fraction_numerical': 0.006501950585175552, 'mean_word_length': 2.3096774193548386, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '376437', 'n_tokens_mistral': 490, 'n_tokens_neox': 484, 'n_words': 102}