<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import WidgetChartToolTip from 'pages/country/widget/components/widget-chart-tooltip';
import maxBy from 'lodash/maxBy';
import {
  BarChart,
  Bar,
  XAxis,
  YAxis,
  CartesianGrid,
  Tooltip,
  ResponsiveContainer
} from 'recharts';
import moment from 'moment';

import CustomTick from './custom-tick-component';
import './widget-bar-chart-styles.scss';

class WidgetBarChart extends PureComponent {
  render() {
    const { data, xKey, yKeys, className } = this.props;
    const { tooltip, colors, unit } = this.props.config;
    const dataMax = maxBy(data, yKeys[yKeys.length - 1])[
      yKeys[yKeys.length - 1]
    ];

    return (
      <div className={`c-bar-chart ${className}`}>
        <ResponsiveContainer>
          <BarChart
            data={data}
            margin={{ top: 15, right: 0, left: 42, bottom: 0 }}
            padding={{ left: 50 }}
          >
            <XAxis
              dataKey={xKey}
              axisLine={false}
              tickLine={false}
              tick={{ dy: 8, fontSize: '12px', fill: '#555555' }}
              tickFormatter={tick => moment(tick, 'YYYY').format('YY')}
            />
            <YAxis
              axisLine={false}
              strokeDasharray="3 4"
              tickSize={-42}
              mirror
              tickMargin={0}
              tick={<CustomTick dataMax={dataMax} unit={unit} fill="#555555" />}
            />
            <CartesianGrid vertical={false} strokeDasharray="3 4" />
            <Tooltip
              content={
                <WidgetChartToolTip settings={tooltip} colors={colors} /><commit_msg>fix grey on bar chart cursor<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import WidgetChartToolTip from 'pages/country/widget/components/widget-chart-tooltip';
import maxBy from 'lodash/maxBy';
import {
  BarChart,
  Bar,
  XAxis,
  YAxis,
  CartesianGrid,
  Tooltip,
  ResponsiveContainer
} from 'recharts';
import moment from 'moment';

import CustomTick from './custom-tick-component';
import './widget-bar-chart-styles.scss';

class WidgetBarChart extends PureComponent {
  render() {
    const { data, xKey, yKeys, className } = this.props;
    const { tooltip, colors, unit } = this.props.config;
    const dataMax = maxBy(data, yKeys[yKeys.length - 1])[
      yKeys[yKeys.length - 1]
    ];

    return (
      <div className={`c-bar-chart ${className}`}>
        <ResponsiveContainer>
          <BarChart
            data={data}
            margin={{ top: 15, right: 0, left: 42, bottom: 0 }}
            padding={{ left: 50 }}
          >
            <XAxis
              dataKey={xKey}
              axisLine={false}
              tickLine={false}
              tick={{ dy: 8, fontSize: '12px', fill: '#555555' }}
              tickFormatter={tick => moment(tick, 'YYYY').format('YY')}
            />
            <YAxis
              axisLine={false}
              strokeDasharray="3 4"
              tickSize={-42}
              mirror
              tickMargin={0}
              tick={<CustomTick dataMax={dataMax} unit={unit} fill="#555555" />}
            />
            <CartesianGrid vertical={false} strokeDasharray="3 4" />
            <Tooltip
              cursor={{ fill: '#d6d6d9' }}
              content={
                <WidgetChartToolTip settings={tooltip} colors={colors} />
{'fraction_non_alphanumeric': 0.13254060324825986, 'fraction_numerical': 0.01943155452436195, 'mean_word_length': 2.101618705035971, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '3145835', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1006, 'n_words': 234}