<commit_before>declare function require(name:string): any;
const owid: any = require('../owid').default
import * as _ from 'lodash'
import {observable, computed, action, autorun, toJS} from 'mobx'
import {ScaleType} from './AxisScale'
import {ComparisonLineConfig} from './ComparisonLine'

export interface TimelineConfig {
    compareEndPointsOnly?: boolean
}

export interface HighlightToggleConfig {
    description: string
    paramStr: stirng
}

// In-progress mobx model layer that will eventually replace ChartModel
export default class ChartConfig {
    @observable.ref type: string
    @observable.ref slug: string
    @observable.ref title: string
    @observable.ref subtitle: string
    @observable.ref sourceDesc: string
    @observable.ref note: string
    @observable.ref internalNotes: string
    @observable.ref logosSVG: string[]
    @observable.ref originUrl: string

	@observable.ref selectedEntities: Object[] = []
    @observable.ref entityType: string = "country"
    @observable.ref timeDomain: [number|null, number|null]
    @observable.ref timeline: TimelineConfig|null = null
    @observable.ref entityColors: {[key: string]: string} = {}

    @observable.ref yAxisConfig: any
    @observable.ref yDomain: [number|null, number|null]
    @observable.ref yScaleType: ScaleType
    @observable.ref yScaleTypeOptions: ScaleType[]
    @observable.ref yAxisLabel: string
    @observable.ref yTickFormat: (v: number) => string<commit_msg>Essential scatterplot optimization<commit_after>declare function require(name:string): any;
const owid: any = require('../owid').default
import * as _ from 'lodash'
import {observable, computed, action, autorun, toJS} from 'mobx'
import {ScaleType} from './AxisScale'
import {ComparisonLineConfig} from './ComparisonLine'

export interface TimelineConfig {
    compareEndPointsOnly?: boolean
}

export interface HighlightToggleConfig {
    description: string
    paramStr: stirng
}

// In-progress mobx model layer that will eventually replace ChartModel
export default class ChartConfig {
    @observable.ref type: string
    @observable.ref slug: string
    @observable.ref title: string
    @observable.ref subtitle: string
    @observable.ref sourceDesc: string
    @observable.ref note: string
    @observable.ref internalNotes: string
    @observable.ref logosSVG: string[]
    @observable.ref originUrl: string

	@observable.ref selectedEntities: Object[] = []
    @observable.ref entityType: string = "country"
    @observable.ref timeDomain: [number|null, number|null]
    @observable.ref timeline: TimelineConfig|null = null
    @observable.struct entityColors: {[key: string]: string} = {}

    @observable.ref yAxisConfig: any
    @observable.ref yDomain: [number|null, number|null]
    @observable.ref yScaleType: ScaleType
    @observable.ref yScaleTypeOptions: ScaleType[]
    @observable.ref yAxisLabel: string
    @observable.ref yTickFormat: (v: number) => string
{'fraction_non_alphanumeric': 0.10272108843537416, 'fraction_numerical': 0.0, 'mean_word_length': 4.601904761904762, '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': '2231976', 'n_tokens_mistral': 866, 'n_tokens_neox': 848, 'n_words': 243}