<commit_before>import React from 'react'
import PropTypes from 'prop-types'

import DashPanel from './DashPanel.jsx'
import ErrorPanel from '../ErrorPanel.jsx'
import { Responsive, WidthProvider } from 'react-grid-layout'
import 'react-grid-layout/css/styles.css'
import 'react-resizable/css/styles.css'
import ErrorBoundary from 'react-error-boundary'

import { matchesTarget } from '../../utils'

const GridLayout = WidthProvider(Responsive)

const gridResponsiveCols = { lg: 12, md: 10, sm: 8, xs: 6 }
const gridStyle = { paddingLeft: '15px' }

const dashPanelDivStyle = { position: 'absolute' }

class Dashboard extends React.Component {
  handleCloseClicked = ({ chartIndex }) => {
    this.props.removeChartByIndex(chartIndex)
  }
  handleNewSettings = (chartInfo, settings) => {
    this.props.updateChartSettings(this.props.chartlist.indexOf(chartInfo), settings)
  }

  calculateGridForIndex = (idx) => {
    return {
      x: (idx % 2) * 5,<commit_msg>ensure chart settings works correctly<commit_after>import React from 'react'
import PropTypes from 'prop-types'

import DashPanel from './DashPanel.jsx'
import ErrorPanel from '../ErrorPanel.jsx'
import { Responsive, WidthProvider } from 'react-grid-layout'
import 'react-grid-layout/css/styles.css'
import 'react-resizable/css/styles.css'
import ErrorBoundary from 'react-error-boundary'

import { matchesTarget } from '../../utils'

const GridLayout = WidthProvider(Responsive)

const gridResponsiveCols = { lg: 12, md: 10, sm: 8, xs: 6 }
const gridStyle = { paddingLeft: '15px' }

const dashPanelDivStyle = { position: 'absolute' }

class Dashboard extends React.Component {
  handleCloseClicked = ({ chartIndex }) => {
    this.props.removeChartByIndex(chartIndex)
  }
  handleNewSettings = ({ chartIndex }, settings) => {
    this.props.updateChartSettings(chartIndex, settings)
  }

  calculateGridForIndex = (idx) => {
    return {
      x: (idx % 2) * 5,
{'fraction_non_alphanumeric': 0.12733887733887733, 'fraction_numerical': 0.010395010395010396, 'mean_word_length': 4.5, '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': '1777428', 'n_tokens_mistral': 624, 'n_tokens_neox': 597, 'n_words': 149}