<commit_before>import d3 from "d3";
import React from "react";

const chartConfig = {
    showTooltips: true,
    transitionDuration: 1000,
    innerRadius: 0
};

export default class BaseChart extends React.Component {
    constructor(el, props) {
        super(props);

        this.el = el;
        this.props = props;
        this.color = this.getColor();

        Object.keys(chartConfig).forEach(configKey => {
            // If a prop is defined, let's just use it, otherwise
            // fall back to the default.<commit_msg>[#9] Add option for showing legend<commit_after>import d3 from "d3";
import React from "react";

const chartConfig = {
    showTooltips: true,
    transitionDuration: 1000,
    innerRadius: 0,
    showLegend: false
};

export default class BaseChart extends React.Component {
    constructor(el, props) {
        super(props);

        this.el = el;
        this.props = props;
        this.color = this.getColor();

        Object.keys(chartConfig).forEach(configKey => {
            // If a prop is defined, let's just use it, otherwise
            // fall back to the default.
{'fraction_non_alphanumeric': 0.10323159784560143, 'fraction_numerical': 0.013464991023339317, 'mean_word_length': 2.484375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4122727', 'n_tokens_mistral': 328, 'n_tokens_neox': 310, 'n_words': 100}