<commit_before>import constants from '../misc/constants'
import { axisTop, axisLeft, axisRight, axisBottom } from 'd3-axis'
import { format } from 'd3-format'

export default class Axis {
  type = constants.scaleType.linear
  orientation
  label = ''
  top = 0
  left = 0
  scale = null
  orientation = 'bottom'
  axisObject = null
  reduce = false
  buffer = 0
  isVertical = false

  constructor ({
    type,
    orientation,
    label,
    top,
    left,
    scale,
    tickFormat,
    reduce,
    buffer
  }) {
    console.log('setting up axis: ', arguments)

    // cry if no scale is set
    if (!scale) throw new Error('an axis needs a scale')

    this.scale = scale
    this.type = type ?? this.type
    this.label = label ?? this.label
    this.buffer = buffer ?? this.buffer
    this.top = top ?? this.top
    this.left = left ?? this.left
    this.orientation = orientation ?? this.orientation
    this.reduce = reduce ?? this.reduce
    this.isVertical = [constants.axisOrientation.left, constants.axisOrientation.right].includes(this.orientation)

    this.setupAxisObject()
<commit_msg>removed obsolete axis type parameter<commit_after>import constants from '../misc/constants'
import { axisTop, axisLeft, axisRight, axisBottom } from 'd3-axis'
import { format } from 'd3-format'

export default class Axis {
  label = ''
  top = 0
  left = 0
  scale = null
  orientation = 'bottom'
  axisObject = null
  reduce = false
  buffer = 0
  isVertical = false

  constructor ({
    orientation,
    label,
    top,
    left,
    scale,
    tickFormat,
    reduce,
    buffer
  }) {
    console.log('setting up axis: ', arguments)

    // cry if no scale is set
    if (!scale) throw new Error('an axis needs a scale')

    this.scale = scale
    this.label = label ?? this.label
    this.buffer = buffer ?? this.buffer
    this.top = top ?? this.top
    this.left = left ?? this.left
    this.orientation = orientation ?? this.orientation
    this.reduce = reduce ?? this.reduce
    this.isVertical = [constants.axisOrientation.left, constants.axisOrientation.right].includes(this.orientation)

    this.setupAxisObject()

{'fraction_non_alphanumeric': 0.10933833880807133, 'fraction_numerical': 0.004692632566870014, 'mean_word_length': 2.883424408014572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6855652', 'n_tokens_mistral': 650, 'n_tokens_neox': 627, 'n_words': 187}