export function queryResultFilter(rows, chartKind) {
  switch (chartKind) {
    case 'bubble': {
      const filtered = rows.filter(item => {
        if (item.landbakgrunn && item.landbakgrunn == '1') {
          return false
        }
        return [':', '.', '0'].indexOf(item.tabellvariabel) == -1
      })
      return filtered
    }
    default: {
      return rows
    }
  }
}

export function queryResultFilter(rows, chartKind) {
  switch (chartKind) {
    case 'bubble': {
      const filtered = rows.filter(item => {
        // Remove "Alle"
        if (item.landbakgrunn && item.landbakgrunn == '1') {
          return false
        }
        // Remove ":", "." etc
        if (isNaN(item.tabellvariabel)) {
          return false
        }
        // Remove empty data
        return item.tabellvariabel != '0'
      })
      return filtered
    }
    default: {
      return rows
    }
  }
}

Refactor bubble chart filter