<commit_before>import React, {Component} from 'react';
import Chart from 'react-google-charts';
import $ from 'jquery';

export default class ProgressionChart extends Component {
    constructor(props) {
        super(props);
        this.chartData = [["Global Set", "Effort"]];
        this.exerciseSets = [];
        let globalSet = 0;
        this.props.data.forEach(datapoint => {
            datapoint.routine.forEach(routine => {
                this.exerciseSets.push(routine.tasks.length);
                routine.tasks.forEach(task => {
                    this.chartData.push([globalSet++, task.effort !== 0 ? task.effort : 0.4]);
                });
            });<commit_msg>Number of repeated sets now taken into account in chart data<commit_after>import React, {Component} from 'react';
import Chart from 'react-google-charts';
import $ from 'jquery';

export default class ProgressionChart extends Component {
    constructor(props) {
        super(props);
        this.chartData = [["Global Set", "Effort"]];
        this.exerciseSets = [];
        let globalSet = 0;
        this.props.data.forEach(datapoint => {
            datapoint.routine.forEach(routine => {
                this.exerciseSets.push(routine.tasks.length);
                routine.tasks.forEach(task => {
                    this.chartData.push([globalSet += task.sets, task.effort !== 0 ? task.effort : 0.4]);
                });
            });
{'fraction_non_alphanumeric': 0.13179916317991633, 'fraction_numerical': 0.005578800557880056, 'mean_word_length': 2.291284403669725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4421354', 'n_tokens_mistral': 406, 'n_tokens_neox': 386, 'n_words': 85}